void _messageCore_OnDeviceConfigDownloadReceived(SIPEndPoint arg1, DeviceConfigDownload config) { Invoke(new Action(() => { txtMsg.Text = DeviceConfigDownload.Instance.Save <DeviceConfigDownload>(config); })); }
internal void OnDeviceConfigDownloadReceived(SIPEndPoint arg1, DeviceConfigDownload arg2) { throw new NotImplementedException(); }
/// <summary> /// Message消息处理 /// </summary> /// <param name="localEP">本地终结点</param> /// <param name="remoteEP">远程终结点</param> /// <param name="request">sip请求</param> private void MessageHandle(SIPEndPoint localEP, SIPEndPoint remoteEP, SIPRequest request) { SendResponse(localEP, remoteEP, request); //心跳消息 KeepAlive keepAlive = KeepAlive.Instance.Read(request.Body); if (keepAlive != null && keepAlive.CmdType == CommandType.Keepalive) { KeepaliveHandle(localEP, remoteEP, request, keepAlive); return; } //设备目录 Catalog catalog = Catalog.Instance.Read(request.Body); if (catalog != null && catalog.CmdType == CommandType.Catalog) { CatalogHandle(localEP, remoteEP, request, catalog); return; } //录像查询 RecordInfo record = RecordInfo.Instance.Read(request.Body); if (record != null && record.CmdType == CommandType.RecordInfo) { RecordInfoHandle(localEP, remoteEP, request, record); return; } //媒体通知 MediaStatus mediaStatus = MediaStatus.Instance.Read(request.Body); if (mediaStatus != null && mediaStatus.CmdType == CommandType.MediaStatus) { _nodeMonitorService[request.Header.From.FromURI.User].ByeVideoReq(); //取值121表示历史媒体文件发送结束(回放结束/下载结束) //NotifyType未找到相关文档标明所有该类型值,暂时只处理121 if (mediaStatus.NotifyType.Equals("121")) { OnMediaStatusReceived?.Invoke(remoteEP, mediaStatus); } return; } //设备状态查询 DeviceStatus deviceStatus = DeviceStatus.Instance.Read(request.Body); if (deviceStatus != null && deviceStatus.CmdType == CommandType.DeviceStatus) { OnDeviceStatusReceived?.Invoke(remoteEP, deviceStatus); return; } //设备信息查询 DeviceInfo deviceInfo = DeviceInfo.Instance.Read(request.Body); if (deviceInfo != null && deviceInfo.CmdType == CommandType.DeviceInfo) { OnDeviceInfoReceived?.Invoke(remoteEP, deviceInfo); return; } //设备配置查询 DeviceConfigDownload devDownload = DeviceConfigDownload.Instance.Read(request.Body); if (devDownload != null && devDownload.CmdType == CommandType.ConfigDownload) { OnDeviceConfigDownloadReceived?.Invoke(remoteEP, devDownload); } //预置位查询 PresetInfo preset = PresetInfo.Instance.Read(request.Body); if (preset != null && preset.CmdType == CommandType.PresetQuery) { OnPresetQueryReceived?.Invoke(remoteEP, preset); } //报警通知 Alarm alarm = Alarm.Instance.Read(request.Body); if (alarm != null && alarm.CmdType == CommandType.Alarm)//单兵上报经纬度 { OnAlarmReceived?.Invoke(alarm); } }