| | |
| | | var jObject = new JObject { { "DeviceAddr", device.DeviceAddr }, { "Epoint", 200 }, { "Cluster_ID", 64513 }, { "Command", 0 } };
|
| | | var data = new JObject { { "PassData", passData } };
|
| | | jObject.Add("Data", data);
|
| | | var result = HdlDeviceCommonLogic.Current.SendJobjectDataToGateway2(device, jObject.ToString(), "0409", 16, 9);
|
| | | //16:旧版本 18:新版本
|
| | | var result = HdlDeviceCommonLogic.Current.SendJobjectDataToGateway2(device, jObject.ToString(), "0409", 16, 9, new List<int> { 18 });
|
| | | if (result.ErrorMsg != null)
|
| | | {
|
| | | this.ShowTipMsg(result.ErrorMsg);
|
| | |
| | | {
|
| | | energyInfo.enable = false;
|
| | | }
|
| | | energyInfo.time = Convert.ToInt32(result.ReceiptData[12].ToString() + result.ReceiptData[13].ToString(), 16);
|
| | | energyInfo.level = Convert.ToInt32(result.ReceiptData[14].ToString() + result.ReceiptData[15].ToString(), 16);
|
| | |
|
| | | //新版本:07 0904 11 04 01 3C00 32
|
| | | if (result.ReceiptData.Length == 18)
|
| | | {
|
| | | energyInfo.time = Convert.ToInt32(result.ReceiptData[14].ToString() + result.ReceiptData[15].ToString() +
|
| | | result.ReceiptData[12].ToString() + result.ReceiptData[13].ToString(), 16);
|
| | |
|
| | | energyInfo.level = Convert.ToInt32(result.ReceiptData[16].ToString() + result.ReceiptData[17].ToString(), 16); |
| | | }
|
| | | //旧版本:07 0904 11 03 01 3C 32
|
| | | else
|
| | | {
|
| | | energyInfo.time = Convert.ToInt32(result.ReceiptData[12].ToString() + result.ReceiptData[13].ToString(), 16);
|
| | | energyInfo.level = Convert.ToInt32(result.ReceiptData[14].ToString() + result.ReceiptData[15].ToString(), 16);
|
| | | }
|
| | | return energyInfo;
|
| | | }
|
| | |
|