namespace SHH.Contracts { /// /// 协议代码定义常量类 /// 职责:统一管理 gRpc 通讯中所涉及的协议大类 (Protocol) 与具体业务指令码 (CmdCode) /// public static class ProtocolCodes { #region --- 1. 协议类型定义 (对应 Protocol 字段) --- /// /// 基础指令协议头 /// 用于标记该消息是一个业务控制指令 /// public const string Command = "Command"; /// /// 指令执行结果反馈协议头 /// 用于分析节点执行完指令后,向主控端回执操作结果 /// public const string Command_Result = "Command_Result"; #endregion #region --- 2. 业务指令码定义 (对应 CmdCode 字段) --- /// /// 服务器注册指令 /// 触发场景:节点启动时向主控端注册自身信息 /// public const string ServerRegister = "SERVER_REGISTER"; /// /// 同步摄像头配置指令 /// 触发场景:节点上线全量同步、数据库摄像头信息变更增量同步 /// public static string Sync_Camera { get; } = "Sync_Camera"; /// /// 移除摄像头指令 /// 触发场景:本地数据库删除摄像头后,通知远程节点停止相关流采集与分析 /// public static string Remove_Camera { get; } = "Remove_Camera"; /// 云台控制指令 public static string Ptz_Control { get; } = "Ptz_Control"; /// 设备重启指令 public static string Device_Reboot { get; } = "Device_Reboot"; /// 时间同步指令 public static string Device_TimeSync { get; } = "Device_TimeSync"; /// 预置点控制指令 public static string Device_Preset { get; } = "Device_Preset"; #endregion } }