| | |
| | | /// <param name="gatewayId">网关ID</param>
|
| | | /// <param name="topic">整个主题</param>
|
| | | /// <param name="reportTopic">上报数据的主题</param>
|
| | | /// <param name="receiveData">接收的数据</param>
|
| | | public void GatewayOverallMsgReceive(string gatewayId, string topic, string reportTopic, JObject receiveData)
|
| | | /// <param name="msgData">接收的数据</param>
|
| | | public void GatewayOverallMsgReceive(string gatewayId, string topic, string reportTopic, string msgData)
|
| | | {
|
| | | if (topic == "AppNoLogin")
|
| | | {
|
| | |
| | | });
|
| | | return;
|
| | | }
|
| | | else if (topic == "BeingSqueezedOffline")
|
| | | else if (topic == "ZigbeeGateWayToClient/" + Common.Config.Instance.ConnEmqClientId + "/Push/NotifySqueeze")
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | |
| | | });
|
| | | return;
|
| | | }
|
| | | else if (topic == "/ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/Deleted"
|
| | | || topic == "/ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/DeletedShareData")
|
| | | else if (topic == "ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/Deleted"
|
| | | || topic == "ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/DeletedShareData")
|
| | | {
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 3)
|
| | | {
|
| | |
| | | //不是自己绑定的网关,则不处理
|
| | | return;
|
| | | }
|
| | |
|
| | | //设备属性上报
|
| | | if (reportTopic == "DeviceStatusReport")
|
| | | {
|
| | | //设备属性上报
|
| | | this.DeviceAttributeReportPush(receiveData);
|
| | | this.DeviceAttributeReportPush(JObject.Parse(msgData));
|
| | | }
|
| | | //传感器上报
|
| | | else if (reportTopic == "IASInfoReport")
|
| | | {
|
| | | this.SensorDeviceReportPush(receiveData);
|
| | | this.SensorDeviceReportPush(JObject.Parse(msgData));
|
| | | }
|
| | | //门锁上报
|
| | | else if (topic == gatewayId + "/Alarms/SendAlarmInform")
|
| | | {
|
| | | this.DoorLockDeviceReportPush(receiveData);
|
| | | this.DoorLockDeviceReportPush(null);
|
| | | }
|
| | | //通过外部方式布防撤防成功时报告
|
| | | else if (topic == gatewayId + "/Security/EnOrWithdrawSucceedReport")
|
| | | {
|
| | | this.SecurityEnOrWithdrawSucceedReport(receiveData);
|
| | | this.SecurityEnOrWithdrawSucceedReport(JObject.Parse(msgData));
|
| | | }
|
| | | //设备在线状态更新反馈
|
| | | else if (reportTopic == "OnlineStatusChange_Respon")
|
| | | {
|
| | | this.DeviceOnlineChangePush(receiveData);
|
| | | this.DeviceOnlineChangePush(JObject.Parse(msgData));
|
| | | }
|
| | | //撤防
|
| | | else if (topic == gatewayId + "/Security/WithdrawMode_Respon")
|
| | | {
|
| | | this.RemoveSafetyGarrisonPush(receiveData);
|
| | | this.RemoveSafetyGarrisonPush(JObject.Parse(msgData));
|
| | | }
|
| | | //布防
|
| | | else if (topic == gatewayId + "/Security/EnableMode_Respon")
|
| | | {
|
| | | this.SetSafetyGarrisonPush(receiveData);
|
| | | this.SetSafetyGarrisonPush(JObject.Parse(msgData));
|
| | | }
|
| | | //逻辑触发上报
|
| | | else if (topic == gatewayId + "/Logic/Execute_Respon")
|
| | | {
|
| | | this.LogicExecutePush(receiveData);
|
| | | this.LogicExecutePush(null);
|
| | | }
|
| | | //场景触发上报
|
| | | else if (topic == gatewayId + "/Scene/Exec_Respon")
|
| | | {
|
| | | this.SceneExecPush(receiveData);
|
| | | this.SceneExecPush(null);
|
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | |
| | | private void DoorLockDeviceReportPush(JObject receiveData)
|
| | | {
|
| | | //保存门锁信息到本地
|
| | | HdlAlarmsLogic.Current.SaveDoorLockAlarmInfo(receiveData);
|
| | | //HdlAlarmsLogic.Current.SaveDoorLockAlarmInfo(receiveData);
|
| | |
|
| | | //显示有新消息的特效
|
| | | this.ShowHadNewMessageAppeal();
|