1
wxr
2023-03-31 7e42cc13a14b7de31c9f5d5c61cdf24f3246335d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
using System;
namespace Shared
{
    [Serializable]
    public class Timer
    {
        /// <summary>
        /// 定时器的唯一ID
        /// </summary>
        public string Guid { get; set; }
 
        /// <summary>
        /// 定时器备注名
        /// </summary>
        public string TimerName { get; set; }
 
        /// <summary>
        /// 网关ID
        /// </summary>
        public int RegionID { get; set; }
 
        /// <summary>
        /// 执行时间点
        /// </summary>
        public string ExecutionTime { get; set; }
 
        /// <summary>
        /// 重复周期
        /// </summary>
        public string Periodicity { get; set; }
 
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsStart { get; set; }
 
        /// <summary>
        /// 定时器重复类型
        /// </summary>
        public TimerType TimerType { get; set; }
 
        /// <summary>
        /// 控制的设备数据
        /// </summary>
        public string ControlDeviceData ="";
 
        /// <summary>
        /// 房间名称
        /// </summary>
        public string RoomName { get; set; }
 
        /// <summary>
        /// 时区
        /// </summary>
        public int TimeZone { get; set; }
 
    }
 
    public enum TimerType
    {
        EveryDay = 0,   //每天
        WorkingDay, //工作日
        Weekend,    //周末
        Week,       //指定星期几
        Period,     //指定时间段
        AppointDay,  //指定日
     
    }
 
    #region 通讯
    public class DeviceInfo
    {
        public string DevicePath { get; set; }
 
        public int DeviceType { get; set; }
 
        public byte SubnetID { get; set; }
 
        public byte DeviceID { get; set; }
 
        public byte LoopID { get; set; }
 
        public int Command { get; set; }
 
        public byte [] SendBytes { get; set; }
        public DeviceType Type;
        public string SavePath;
        public string CommonLoopID {
            get {
                return SubnetID.ToString () + "_" + DeviceID.ToString () + "_" + LoopID.ToString ();
            }
        }
        public string Name;
    }
    //    AddTimer 添加定时器
    //当定时器重复类型为每日、工作日、周末,只填充TimerType
    //如果未指定星期几Week,填充Periodicity
 
    //    EditTimer 编辑定时器
    //当定时器重复类型为每日、工作日、周末,只填充TimerType
    //如果未指定星期几Week,填充Periodicity
 
    //GetOneTimerInfo 读取一个定时器信息
    //填充Id 字段就行了
 
    //GetTimerList 读取定时器列表    填充 GatewayId字段
 
    //IsEnableTimer 启用或禁用定时器    填充Id 字段就行了
 
    //DeleteTimer 删除定时器    填充Id 字段就行了
    #endregion
 
}