| | |
| | | {
|
| | | this.DeviceOnlineChangePush(JObject.Parse(msgData));
|
| | | }
|
| | | //设备控制状态反馈
|
| | | else if (reportTopic == "DeviceDefaultAck")
|
| | | {
|
| | | this.DeviceControlResponePush(JObject.Parse(msgData));
|
| | | }
|
| | | //撤防
|
| | | else if (topic == gatewayId + "/Security/WithdrawMode_Respon")
|
| | | {
|
| | |
| | | tempDevice.IsOnline = Convert.ToInt32(receiveData["Data"]["IsOnline"].ToString());
|
| | |
|
| | | this.DeviceReportPush(tempDevice, ReceiveComandDiv.A设备在线上报);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 设备控制状态反馈___________________
|
| | |
|
| | | /// <summary>
|
| | | /// 设备控制状态反馈
|
| | | /// </summary>
|
| | | /// <param name="receiveData"></param>
|
| | | private void DeviceControlResponePush(JObject receiveData)
|
| | | {
|
| | | if (this.dicDeviceEvent.Count == 0)
|
| | | {
|
| | | //没有添加监听
|
| | | return;
|
| | | }
|
| | | var tempDevice = new CommonDevice() { DeviceAddr = receiveData.Value<string>("DeviceAddr"), DeviceEpoint = receiveData.Value<int>("Epoint") };
|
| | |
|
| | | this.DeviceReportPush(tempDevice, ReceiveComandDiv.A节点控制反馈);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | /// <summary>
|
| | | /// 设备在线上报
|
| | | /// </summary>
|
| | | A设备在线上报 = 3
|
| | | A设备在线上报 = 3,
|
| | | /// <summary>
|
| | | /// 当客户端发送控制设备指令,如打开或关闭设备、调节亮度、颜色。如果被控制的节点设备在线,节点设备将反馈
|
| | | /// </summary>
|
| | | A节点控制反馈 = 4
|
| | | }
|
| | | }
|