| | |
| | | string busId = ""; |
| | | if (bus != null) |
| | | { |
| | | busId = bus.SubnetID + "_" + bus.DeviceID + "_" + bus.loopId; |
| | | busId = bus.SubnetID + "_" + bus.DeviceID + "_" + bus.LoopId; |
| | | } |
| | | return busId; |
| | | } |
| | |
| | | var sFunc = new SceneFunction(); |
| | | foreach (var attr in attributes) |
| | | { |
| | | if (attr.curValue.ToString() == "{}") |
| | | { |
| | | attr.curValue = "0"; |
| | | } |
| | | if (attr.key == FunctionAttributeKey.SetTemp) |
| | | { |
| | | var vv = Convert.ToDouble(attr.value); |
| | | double vv = 16; |
| | | Double.TryParse(attr.curValue.ToString(),out vv); |
| | | sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() }); |
| | | } |
| | | else |
| | |
| | | |
| | | var acd = new AlinkControlData(); |
| | | acd.sid = sid; |
| | | var aca = new AlinkControlAttributes(); |
| | | foreach (var dic in commandDictionary) |
| | | { |
| | | var aca = new AlinkControlAttributes(); |
| | | aca.key = dic.Key; |
| | | aca.value = dic.Value; |
| | | acd.status.Add(aca); |
| | |
| | | /// 功能属性 |
| | | /// 属性字段解析:attri :属性内容,value 属性的值,max 最大值 min 最小值 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class FunctionAttributes |
| | | { |
| | | /// <summary> |
| | |
| | | return Convert.ToByte(addresses.Substring(2, 2), 16); |
| | | } |
| | | } |
| | | public byte loopId; |
| | | public byte LoopId |
| | | { |
| | | get |
| | | { |
| | | return Convert.ToByte(loopId, 16); |
| | | } |
| | | } |
| | | |
| | | public string loopId; |
| | | } |
| | | |
| | | public static class SPK |