JLChen
2020-05-28 04bd96cbf5d12a4e4b116d2b05fd0d05ea81ee23
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
using System;
using System.Collections.Generic;
namespace Shared
{
    /// <summary>
    /// 传感器
    /// </summary>
    [System.Serializable]
    public class Sensor : Common
    {
        public Sensor ()
        {
            Type = DeviceType.Sensor;
            DeviceTextID = 314; //SimpleControl.R.MyInternationalizationString.Sensor;
        }
 
        public int SensorTypeTestID = SimpleControl.R.MyInternationalizationString.Sensor;
 
}
 
 
    [System.Serializable]
    public class SensorMobileDetection : Sensor
    {
        public SensorMobileDetection ()
        {
            //  移动探测(01)增加状态广播项设置, 通道号,备注,使能位,灵敏度,状态,
            Type = DeviceType.SensorMobileDetection;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorMobileDetection;
        }
 
        public bool Enable = true;
 
        public byte Sensitivity;
 
        public byte Status;
 
    }
 
    [System.Serializable]
    public class SensorTemperature : Sensor
    {
        public SensorTemperature ()
        {
            //温度(02)增加状态广播项设置,详见操作码4.29   通道号,备注,当前温度(同时支持整形,浮点类型)E3E5的返回数据
            Type = DeviceType.SensorTemperature;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Environmental;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorTemperature;
 
        }
 
        public double CurrentTemperature;
 
    }
 
 
    [System.Serializable]
    public class SensorHumidity : Sensor
    {
        public SensorHumidity ()
        {
            //湿度(03)增加状态广播项设置,详见操作码4.29   通道号,备注,使能位,当前湿度
            Type = DeviceType.SensorHumidity;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Environmental;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorHumidity;
 
        }
        public bool Enable = true;
 
        public double CurrentHumidity;
 
    }
 
    [System.Serializable]
    public class SensorIllumination : Sensor
    {
        public SensorIllumination ()
        {
            //照度(04)增加状态广播项设置,详见操作码4.29   通道号,备注,使能位,当前照度
            Type = DeviceType.SensorIllumination;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Environmental;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorIllumination;
 
        }
        public bool Enable = true;
 
        public int CurrentIllumination;
 
    }
 
    [System.Serializable]
    public class SensorTVOC : Sensor
    {
        public SensorTVOC ()
        {
            //TVOC(05)   通道号,备注,使能位,当前空气质量等级
            Type = DeviceType.SensorTVOC;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Environmental;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorTVOC;
 
        }
        public bool Enable = true;
 
        public double CurrentTVOC;
 
    }
 
    [System.Serializable]
    public class SensorPM25 : Sensor
    {
        public SensorPM25 ()
        {
            //PM2.5(06)   通道号,备注,使能位,当前空气PM2.5值
            Type = DeviceType.SensorPM25;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorPM25;
 
        }
        public bool Enable = true;
 
        public int CurrentPM25;
 
    }
 
    [System.Serializable]
    public class SensorCO2 : Sensor
    {
        public SensorCO2 ()
        {
            //CO2(07) 通道号,备注,使能位,当前CO2 ppm值
            Type = DeviceType.SensorCO2;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Environmental;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorCO2;
 
        }
        public bool Enable = true;
 
        public int CurrentCO2;
 
    }
 
    [System.Serializable]
    public class SensorLPG : Sensor
    {
        public SensorLPG ()
        {
            //液化石油气(LPG)(08)  通道号,备注,使能位,当前LPG ppm值
            Type = DeviceType.SensorLPG;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorLPG;
 
            //人工煤气(CO,H2)(09) 通道号,备注,使能位,当前综合ppm值
            //天然气(CH4)(10)    通道号,备注,使能位,当前综合ppm值
        }
        public bool Enable = true;
 
        public byte CurrentLPG;
    }
 
    [System.Serializable]
    public class SensorCOH2 : Sensor
    {
        public SensorCOH2 ()
        {
            //人工煤气(CO,H2)(09) 通道号,备注,使能位,当前综合ppm值
            Type = DeviceType.SensorCOH2;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorCOH2;
        }
        public bool Enable = true;
 
        public int CurrentCOH2;
    }
 
    [System.Serializable]
    public class SensorCH4 : Sensor
    {
        public SensorCH4 ()
        {
            //天然气(CH4)(10)    通道号,备注,使能位,当前综合ppm值
            Type = DeviceType.SensorCH4;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorCH4;
        }
        public bool Enable = true;
 
        public int CurrentCH4;
    }
 
    [System.Serializable]
    public class SensorSmoke : Sensor
    {
        public SensorSmoke ()
        {
            //    烟雾(11)  通道号,备注,使能位,当前状态
            Type = DeviceType.SensorSmoke;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorSmoke;
        }
        public bool Enable = true;
 
        public int CurrentStatus;
    }
 
    [System.Serializable]
    public class SensorWindSpeed : Sensor
    {
        public SensorWindSpeed ()
        {
            //风速(12)  通道号,备注,使能位,当前风速
            Type = DeviceType.SensorWindSpeed;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorWindSpeed;
        }
        public bool Enable = true;
 
        public int CurrentWindSpeed;
    }
 
    [System.Serializable]
    public class SensorWindPressure : Sensor
    {
        public SensorWindPressure ()
        {
            //风压(13)  通道号,备注,使能位,当前风压
            Type = DeviceType.SensorWindPressure;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorWindPressure;
        }
        public bool Enable = true;
 
        public int CurrentWindPressure;
    }
 
    [System.Serializable]
    public class SensorLiquidFlow : Sensor
    {
        public SensorLiquidFlow ()
        {
            //液体流量(14)    通道号,备注,使能位,当前液体流量
            Type = DeviceType.SensorLiquidFlow;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorLiquidFlow;
        }
        public bool Enable = true;
 
        public int CurrentLiquidFlow;
    }
 
    [System.Serializable]
    public class SensorLiquidPressure : Sensor
    {
        public SensorLiquidPressure ()
        {
            //液体压力(15)    通道号,备注,使能位,当前液体压力
            Type = DeviceType.SensorLiquidPressure;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorLiquidPressure;
        }
        public bool Enable = true;
 
        public int CurrentLiquidPressure;
    }
 
    [System.Serializable]
    public class SensorLiquidDepth : Sensor
    {
        public SensorLiquidDepth ()
        {
            //液体深度(16)    通道号,备注,使能位,当前液体深度(mm)
            Type = DeviceType.SensorLiquidDepth;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorLiquidDepth;
        }
        public bool Enable = true;
 
        public int CurrentLiquidDepth;
    }
 
    [System.Serializable]
    public class SensorRainfall : Sensor
    {
        public SensorRainfall ()
        {
            //雨量(17)  通道号,备注,使能位,当前雨量(无雨,小雨,大雨)
            Type = DeviceType.SensorRainfall;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorRainfall;
        }
        public bool Enable = true;
 
        public int CurrentRainfall;
    }
 
    [System.Serializable]
    public class SensorWeight : Sensor
    {
        public SensorWeight ()
        {
            //重量(18)  通道号,备注,使能位,当前物体重量(KG)
            Type = DeviceType.SensorWeight;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorWeight;
        }
        public bool Enable = true;
 
        public int CurrentWeight;
    }
    [System.Serializable]
    public class SensorHeightLength : Sensor
    {
        public SensorHeightLength ()
        {
            //高度/长度(19)   通道号,备注,使能位,测量高度/长度(mm)
            Type = DeviceType.SensorHeightLength;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorHeightLength;
        }
        public bool Enable = true;
 
        public int CurrentHeightLength;
    }
    [System.Serializable]
    public class SensorVelocity : Sensor
    {
        public SensorVelocity ()
        {
            //物体速度(20)    通道号,备注,当前物体速度(m/s)
            Type = DeviceType.SensorHeightLength;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorVelocity;
        }
        public bool Enable = true;
 
        public int CurrentVelocity;
    }
    [System.Serializable]
    public class SensorVibration : Sensor
    {
        public SensorVibration ()
        {
            //震动(21)  通道号,备注,使能位,震动状态
            Type = DeviceType.SensorVibration;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorVibration;
        }
        public bool Enable = true;
 
        public int CurrentVibration;
    }
    [System.Serializable]
    public class SensorVoltage : Sensor
    {
        public SensorVoltage ()
        {
            //电压(22)  通道号,备注,使能位,当前电压
            Type = DeviceType.SensorVoltage;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorVoltage;
        }
        public bool Enable = true;
 
        public int CurrentVoltage;
    }
    [System.Serializable]
    public class SensorCurrent : Sensor
    {
        public SensorCurrent ()
        {
            //电流(23)  通道号,备注,使能位,当前电流
            Type = DeviceType.SensorVoltage;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorCurrent;
        }
        public bool Enable = true;
 
        public int CurrentCurrent;
    }
    [System.Serializable]
    public class SensorPower : Sensor
    {
        public SensorPower ()
        {
            //功率(24)  通道号,备注,使能位,当前功率
            Type = DeviceType.SensorPower;
            DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
            SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorPower;
        }
        public bool Enable = true;
 
        public int CurrentPower;
    }
}