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
| using System;
| using System.Collections.Generic;
| using Newtonsoft.Json.Linq;
| namespace ZigBee.Device
| {
| [System.Serializable]
| public class Transverter:CommonDevice
| {
| public Transverter()
| {
| this.Type = DeviceType.Transverter;
| }
|
| /// <summary>
| /// 开光状态:0=关,1=开,
| /// </summary>
| public int OnOffStatus = 0;
|
| #region 开关
| ///<summary >
| ///灯光开关控制
| /// <para>command的值</para>
| ///<para>0 : 关闭</para>
| ///<para>1: 打开</para>
| ///<para>2:取反</para>
| /// </summary>
| public void LightOpenOFFControl(int command)
| {
| SwitchControl(command);
| }
| #endregion
|
| /// <summary>
| /// 读取开关状态
| /// </summary>
| public void ReadOnOffStatus()
| {
| ReadAttri(Device.Cluster_ID.Switch, AttriButeId.Switch);
| }
|
| }
| }
|
|