123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- syntax = "proto2";
- package message;
- //消息类型定义,每个在网络上传输的消息必须含有这个属性
- enum Message_type
- {
- eBase_msg=0x00;
- eCommand_msg=0x01; //指令消息
- eLocate_status_msg=0x11; //定位模块状态消息
- eLocate_request_msg=0x12; //定位请求消息
- eLocate_response_msg=0x13; //定位反馈消息
- eHarware_statu_msg=0x21; //调度模块硬件状态消息
- eExecute_request_msg=0x22; //请求调度消息
- eExecute_response_msg=0x23; //调度结果反馈消息
- }
- //通讯单元
- enum Communicator
- {
- eEmpty=0x0000;
- eMain=0x0001; //主流程
- eTerminor=0x0100;
- //数据表
- eTable=0x0200;
- //测量单元
- eMeasurer=0x0300;
- //调度机构
- eProcess=0x0400;
- //...
- }
- ////base message 用于解析未知类型的消息
- message Base_msg
- {
- required Message_type msg_type=1;
- optional int32 timeout_ms=2;
- required Communicator sender=3; //发送者
- required Communicator receiver=4; //接收者
- }
- //测量结果结构体
- message Locate_data
- {
- required int32 error_code=1;
- optional string error_description=2;
- optional float length=3;
- optional float width=4;
- optional float height=5;
- optional float wheel_base=6;
- optional float x=7;
- optional float y=8;
- optional float theta=9;
- }
|