| | |
| | | string capture_device =2; // 采集设备 |
| | | int32 capture_port = 3; // 采集设备序号 |
| | | DataField DataField = 4; |
| | | string data_type = 5; // 采集数据 |
| | | |
| | | string data_type = 5; // 数据类型 image udp |
| | | } |
| | | |
| | | message DataMessage{ |
| | |
| | | string sending_device = 2; |
| | | string target_device = 3; |
| | | CapturedData CapturedData = 5; |
| | | |
| | | } |
| | | |
| | | message StateData { |
| | | int64 state_time = 1; |
| | | string state_device = 2; |
| | | DataField DataField = 4; |
| | | } |
| | | |
| | | message StateMessage { |
| | | int64 sending_time = 1; |
| | | string sending_device = 2; |
| | | string target_device = 3; |
| | | CapturedData StatedData = 5; |
| | | } |
| | | |
| | | message CommandData { |
| | | SysCommand SysCommand = 1; |
| | | SubCommand SubCommand = 2; |
| | | } |
| | | |
| | | message CommandMessage { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | message ImagesMessage |
| | | { |
| | | bytes image1 = 1; |
| | | bytes image2 = 2; |
| | | bytes image3 = 3; |
| | | bytes image4 = 4; |
| | | bytes image5 = 5; |
| | | } |
| | | |
| | | message MicroWaveMessage |
| | | { |
| | | int32 length = 1; // 数据长度 |
| | | bytes data = 2; // 数据内容 |
| | | } |
| | | |
| | | message CommandRequest{ |
| | | |
| | | } |
| | | |
| | | message StateMessage{ |
| | | string message_type = 1; |
| | | int64 generate_time = 2; |
| | | string generate_device = 3; |
| | | string target_device = 4; |
| | | string message_uuid = 5; |
| | | string str_body = 6; |
| | | int64 sending_time = 1; |
| | | string sending_device = 2; |
| | | string target_device = 3; |
| | | CommandData CommandData =4; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // message ImagesMessage |
| | | // { |
| | | // bytes image1 = 1; |
| | | // bytes image2 = 2; |
| | | // bytes image3 = 3; |
| | | // bytes image4 = 4; |
| | | // bytes image5 = 5; |
| | | // } |
| | | |
| | | message RequestCommand { |
| | | int32 sync_word = 1; // 同步字 |
| | | string device_id = 2; // 设备ID |
| | | SysCommand sys_command = 3; // 命令1 |
| | | SubCommand sub_command = 4; // 命令2 |
| | | DataField data1 = 5; // 数据1 |
| | | DataField data2 = 6; // 数据2 |
| | | int32 checksum = 7; // 校验码 |
| | | } |
| | | // message MicroWaveMessage |
| | | // { |
| | | // int32 length = 1; // 数据长度 |
| | | // bytes data = 2; // 数据内容 |
| | | // } |
| | | |
| | | enum ResponseState |
| | | { |
| | | SUCCESS = 0; // 成功 |
| | | FAILURE = 1; // 失败 |
| | | ABNORMAL = 2; // 异常 |
| | | INFICIENT_POWER = 3; // 电量不足 |
| | | OTHER = 4; // 其他 |
| | | } |
| | | // message CommandRequest{ |
| | | |
| | | message ResponseCommand |
| | | { |
| | | string device_id = 1; // 设备ID |
| | | SysCommand sys_command = 2; // 命令1 |
| | | SubCommand sub_command = 3; // 命令2 |
| | | ResponseState state = 4; // 响应状态 |
| | | int32 data_length = 5; // 数据长度 |
| | | bytes data = 6; // 数据 |
| | | int32 checksum = 7; // 校验码 |
| | | } |
| | | // } |
| | | |
| | | // message StateMessage{ |
| | | // string message_type = 1; |
| | | // int64 generate_time = 2; |
| | | // string generate_device = 3; |
| | | // string target_device = 4; |
| | | // string message_uuid = 5; |
| | | // string str_body = 6; |
| | | // } |
| | | |
| | | |
| | | // 服务端向采集端发送的主指令 |
| | | enum ControlSysCommand { |
| | | DUST_CLEANER_COMMAND = 0; |
| | | } |
| | | |
| | | // 服务端向采集端发送的子命令 |
| | | enum ControlSubCommand { |
| | | // dust cleaner sub commands |
| | | DUST_CLEANER_ONETIME_CLEAN_SELF = 0; |
| | | DUST_CLEANER_ONETIME_CLEAN_CAMERA = 1; |
| | | DUST_CLEANER_CLOSE_PERIOD_CLEAN_SELF = 2; |
| | | DUST_CLEANER_CLOSE_PERIOD_CLEAN_CAMERA = 3; |
| | | DUST_CLEANER_PERIOD_CLEAN_SELF = 4; |
| | | DUST_CLEANER_PERIOD_CLEAN_CAMERA = 5; |
| | | } |
| | | |
| | | // dust cleaner command message |
| | | message DustCleanerMessage { |
| | | uint32 period = 1; |
| | | } |
| | | |
| | | // 控制上位机消息 |
| | | message ControllMessage { |
| | | int32 sync_word = 1; // 同步字 |
| | | ControlSysCommand sys_command = 3; // 主命令 |
| | | ControlSubCommand sub_command = 4; // 子命令 |
| | | DataField data = 5; // 数据 |
| | | int32 checksum = 7; // 校验码 |
| | | } |
| | | |
| | | // message RequestCommand { |
| | | // int32 sync_word = 1; // 同步字 |
| | | // string device_id = 2; // 设备ID |
| | | // SysCommand sys_command = 3; // 命令1 |
| | | // SubCommand sub_command = 4; // 命令2 |
| | | // DataField data1 = 5; // 数据1 |
| | | // DataField data2 = 6; // 数据2 |
| | | // int32 checksum = 7; // 校验码 |
| | | // } |
| | | |
| | | // enum ResponseState |
| | | // { |
| | | // SUCCESS = 0; // 成功 |
| | | // FAILURE = 1; // 失败 |
| | | // ABNORMAL = 2; // 异常 |
| | | // INFICIENT_POWER = 3; // 电量不足 |
| | | // OTHER = 4; // 其他 |
| | | // } |
| | | |
| | | // message ResponseCommand |
| | | // { |
| | | // string device_id = 1; // 设备ID |
| | | // SysCommand sys_command = 2; // 命令1 |
| | | // SubCommand sub_command = 3; // 命令2 |
| | | // ResponseState state = 4; // 响应状态 |
| | | // int32 data_length = 5; // 数据长度 |
| | | // bytes data = 6; // 数据 |
| | | // int32 checksum = 7; // 校验码 |
| | | // } |
| | | |
| | | |
| | | // // 服务端向采集端发送的主指令 |
| | | // enum ControlSysCommand { |
| | | // DUST_CLEANER_COMMAND = 0; |
| | | // } |
| | | |
| | | // // 服务端向采集端发送的子命令 |
| | | // enum ControlSubCommand { |
| | | // // dust cleaner sub commands |
| | | // DUST_CLEANER_ONETIME_CLEAN_SELF = 0; |
| | | // DUST_CLEANER_ONETIME_CLEAN_CAMERA = 1; |
| | | // DUST_CLEANER_CLOSE_PERIOD_CLEAN_SELF = 2; |
| | | // DUST_CLEANER_CLOSE_PERIOD_CLEAN_CAMERA = 3; |
| | | // DUST_CLEANER_PERIOD_CLEAN_SELF = 4; |
| | | // DUST_CLEANER_PERIOD_CLEAN_CAMERA = 5; |
| | | // } |
| | | |
| | | // // dust cleaner command message |
| | | // message DustCleanerMessage { |
| | | // uint32 period = 1; |
| | | // } |
| | | |
| | | // // 控制上位机消息 |
| | | // message ControllMessage { |
| | | // int32 sync_word = 1; // 同步字 |
| | | // ControlSysCommand sys_command = 3; // 主命令 |
| | | // ControlSubCommand sub_command = 4; // 子命令 |
| | | // DataField data = 5; // 数据 |
| | | // int32 checksum = 7; // 校验码 |
| | | // } |