message_base.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. syntax = "proto2";
  2. package message;
  3. //消息类型定义;每个在网络上传输的消息必须含有这个属性
  4. enum Message_type
  5. {
  6. eBase_msg=0x00;
  7. eCommand_msg=0x01; //指令消息
  8. eLocate_status_msg=0x11; //定位模块状态消息
  9. eLocate_request_msg=0x12; //定位请求消息
  10. eLocate_response_msg=0x13; //定位反馈消息
  11. eLocate_sift_request_msg = 0x14; //预测算法请求消息
  12. eLocate_sift_response_msg = 0x15; //预测算法反馈消息
  13. eDispatch_status_msg=0x21; //调度模块硬件状态消息
  14. eDispatch_request_msg=0x22; //请求调度消息
  15. eDispatch_response_msg=0x23; //调度结果反馈消息
  16. eParkspace_allocation_status_msg=0x31; //车位分配模块状态消息,包括车位信息
  17. eParkspace_allocation_request_msg=0x32; //请求分配车位消息
  18. eParkspace_allocation_response_msg=0x33;//分配车位结果反馈消息
  19. eParkspace_search_request_msg = 0x34; //查询车位请求消息
  20. eParkspace_search_response_msg = 0x35; //查询车位反馈消息
  21. eParkspace_release_request_msg = 0x36; //释放车位请求消息
  22. eParkspace_release_response_msg = 0x37; //释放车位反馈消息
  23. eParkspace_force_update_request_msg = 0x38; //手动修改车位消息
  24. eParkspace_force_update_response_msg = 0x39;//手动修改车位反馈消息
  25. eParkspace_confirm_alloc_request_msg = 0x3A;//确认分配车位请求消息
  26. eParkspace_confirm_alloc_response_msg = 0x3B;//确认分配车位反馈消息
  27. eParkspace_allocation_data_msg = 0x3C; //车位分配模块车位数据消息
  28. eParkspace_allocation_data_response_msg =0x3D;//车位数据反馈消息
  29. eParkspace_manual_search_request_msg = 0x3E; //手动查询车位请求消息
  30. eParkspace_manual_search_response_msg = 0x3F;//手动查询车位反馈消息
  31. eStore_command_request_msg=0x41; //终端停车请求消息
  32. eStore_command_response_msg=0x42; //停车请求反馈消息
  33. ePickup_command_request_msg=0x43; //取车请求消息
  34. ePickup_command_response_msg=0x44; //取车请求反馈消息
  35. eTerminal_status_msg = 0x50; //终端状态消息
  36. eStoring_process_statu_msg=0x90; //停车指令进度条消息
  37. ePicking_process_statu_msg=0x91; //取车指令进度消息
  38. eCentral_controller_statu_msg=0xa0; //中控系统状态消息
  39. eEntrance_manual_operation_msg=0xb0; //针对出入口状态操作的手动消息
  40. eProcess_manual_operation_msg=0xb1; //针对流程的手动消息
  41. eNotify_request_msg=0xc0; //取车等候区通知请求
  42. eNotify_response_msg=0xc1; //等候区反馈
  43. eNotify_status_msg=0xc2; //等候区通知节点状态
  44. eUnNormalized_module_statu_msg = 0xd0; //非标节点状态
  45. ;
  46. eDispatch_plan_request_msg = 0xe0; //调度总规划的请求(用于启动整个调度算法)(调度管理->调度算法)
  47. eDispatch_plan_response_msg = 0xe1; //调度总规划的答复(调度算法->调度管理)
  48. eDispatch_control_request_msg = 0xe2; //调度控制的任务请求(调度算法->调度管理)
  49. eDispatch_control_response_msg = 0xe3; //调度控制的任务答复(调度管理->调度算法)
  50. eDispatch_manager_status_msg = 0xea; //调度管理的设备状态消息(调度底下所有硬件设备状态的汇总)
  51. eDispatch_manager_data_msg = 0xeb; //调度管理的设备详细的数据信息
  52. eGround_detect_request_msg=0xf0; //地面雷达测量请求消息
  53. eGround_detect_response_msg=0xf1; //地面雷达测量反馈消息
  54. eGround_status_msg=0xf2; //地面雷达状态消息
  55. }
  56. //通讯单元
  57. enum Communicator
  58. {
  59. eEmpty=0x0000;
  60. eMain=0x0001; //主流程
  61. eTerminor=0x0100;
  62. //车位表
  63. eParkspace=0x0200;
  64. //测量单元
  65. eMeasurer=0x0300;
  66. //测量单元的服务器
  67. eMeasurer_sift_server=0x0301;
  68. //调度机构
  69. eDispatch_manager=0x0400;
  70. //调度机构
  71. eDispatch_control=0x0401;
  72. //...
  73. //取车等候区通知节点
  74. eNotify=0x0501;
  75. //地面测量单元
  76. eGround_measurer=0x0f00;
  77. }
  78. ////base message 用于解析未知类型的消息
  79. message Base_info
  80. {
  81. required Message_type msg_type=1[default = eBase_msg];
  82. optional int32 timeout_ms=2[default = 0];
  83. required Communicator sender=3[default = eEmpty]; //发送者
  84. required Communicator receiver=4[default = eEmpty]; //接收者
  85. }
  86. // 事件,停车或者取车
  87. enum Process_type
  88. {
  89. eStoring=1;
  90. ePicking=2;
  91. }
  92. message Base_msg
  93. {
  94. required Base_info base_info=1;
  95. }
  96. //错误等级,用来做故障处理
  97. enum Error_level
  98. {
  99. NORMAL = 0; // 正常,没有错误,默认值0
  100. NEGLIGIBLE_ERROR = 1; // 轻微故障;可忽略的故障,NEGLIGIBLE_ERROR
  101. MINOR_ERROR = 2; // 一般故障,MINOR_ERROR
  102. MAJOR_ERROR = 3; // 严重故障,MAJOR_ERROR
  103. CRITICAL_ERROR = 4; // 致命故障,CRITICAL_ERROR
  104. }
  105. message Error_manager
  106. {
  107. required int32 error_code = 1[default = 0];
  108. optional Error_level error_level = 2[default = NORMAL];
  109. optional string error_description = 3[default = ""];
  110. }
  111. message Id_struct
  112. {
  113. optional int32 terminal_id=1;
  114. optional int32 unit_id=2;
  115. }
  116. //测量结果结构体
  117. message Locate_information
  118. {
  119. optional float locate_x = 1[default = 0]; //整车的中心点x值; 四轮的中心
  120. optional float locate_y = 2[default = 0]; //整车的中心点y值; 四轮的中心
  121. optional float locate_angle = 3[default = 0]; //整车的旋转角; 四轮的旋转角
  122. optional float locate_length = 4[default = 0]; //整车的长度; 用于规避碰撞
  123. optional float locate_width = 5[default = 0]; //整车的宽度; 用于规避碰撞
  124. optional float locate_height = 6[default = 0]; //整车的高度; 用于规避碰撞
  125. optional float locate_wheel_base = 7[default = 0]; //整车的轮距; 前后轮的距离; 用于机器人或agv的抓车
  126. optional float locate_wheel_width = 8[default = 0]; //整车的轮距; 左右轮的距离; 用于机器人或agv的抓车
  127. optional bool locate_correct = 9[default = false]; //整车的校准标记位
  128. optional float locate_front_theta = 10[default = 0]; //整车的前轮的旋转角
  129. optional float uniformed_car_x = 11;
  130. optional float uniformed_car_y = 12;
  131. }
  132. //车辆基本信息
  133. message Car_info
  134. {
  135. optional float car_length=1[default = 0]; //车长
  136. optional float car_width=2[default = 0]; //车宽
  137. optional float car_height=3[default = 0]; //车高
  138. optional string license=4[default = ""]; //车辆凭证号(车牌号+唯一码)
  139. optional string car_numberPlate = 5[default = ""]; //车牌号
  140. optional float car_wheel_base = 6[default = 0]; //整车的轮距; 前后轮的距离; 用于机器人或agv的抓车
  141. optional float car_wheel_width = 7[default = 0]; //整车的轮距; 左右轮的距离; 用于机器人或agv的抓车
  142. }
  143. //车位状态枚举
  144. enum Parkspace_status
  145. {
  146. eParkspace_status_unknow = 0;
  147. eParkspace_empty = 1; //空闲,可分配
  148. eParkspace_occupied = 2; //被占用,不可分配
  149. eParkspace_reserved = 3; //被预约,预约车辆可分配
  150. eParkspace_locked = 4; //临时锁定,不可分配
  151. eParkspace_error = 5; //车位机械结构或硬件故障
  152. }
  153. //车位朝向, 小号朝前朝南, 大号朝后朝北
  154. enum Direction
  155. {
  156. eDirection_unknow = 0;
  157. eForward = 1; //小号朝前朝南
  158. eBackward = 2; //大号朝后朝北
  159. }
  160. //车位分配路线(根据中跑车的路线来定)
  161. enum Parkspace_path
  162. {
  163. UNKNOW_PATH = 0;
  164. OPTIMAL_PATH = 1;
  165. LEFT_PATH = 2;
  166. RIGHT_PATH = 3;
  167. TEMPORARY_CACHE_PATH = 4;
  168. }
  169. //车位类型
  170. enum Parkspace_type
  171. {
  172. UNKNOW_PARKSPACE_TYPE = 0;
  173. MIN_PARKINGSPACE = 1;//小车位
  174. MID_PARKINGSPACE = 2;//中车位
  175. BIG_PARKINGSPACE = 3;//大车位
  176. }
  177. //汽车类型
  178. enum Car_type
  179. {
  180. UNKNOW_CAR_TYPE = 0;
  181. MIN_CAR = 1;//小车
  182. MID_CAR = 2;//中车
  183. BIG_CAR = 3;//大车
  184. }
  185. //单个车位基本信息与状态信息,车位信息以及车位上的车辆信息
  186. message Parkspace_info
  187. {
  188. optional int32 parkingspace_index_id = 1; //车位ID
  189. optional Parkspace_type parkingspace_type = 2; //车位类型
  190. optional int32 parkingspace_unit_id = 3; //车位单元号
  191. optional int32 parkingspace_label_id = 4; //车位单元内部ID
  192. optional int32 parkingspace_room_id = 5; //同层编号
  193. optional Direction parkingspace_direction = 6; //前后
  194. optional int32 parkingspace_floor_id = 7; //楼层
  195. optional float parkingspace_width = 8; //车位宽
  196. optional float parkingspace_height = 9; //车位高
  197. optional Parkspace_status parkingspace_status = 10; //车位当前状态
  198. optional Car_info car_info = 11; //车辆信息
  199. optional string entry_time = 12; //入场时间
  200. optional string leave_time = 13; //离场时间
  201. optional Parkspace_path parkspace_path = 14; // 车位分配路线
  202. optional float path_estimate_time = 15; //车位分配路线 time(s)
  203. optional Parkspace_status parkspace_status_target = 16; //车位目标状态
  204. optional Car_type car_type = 17; //车辆类型
  205. }
  206. /*
  207. *流程中的步骤类型, 例如:停车流程包含5个步骤 , 分配车位-测量-检验结果-搬运-更新车位表
  208. */
  209. enum Step_type
  210. {
  211. eAlloc_step=0;
  212. eMeasure_step=1;
  213. eCompare_step=2;
  214. eDispatch_step=3;
  215. eConfirm_step=4;
  216. eSearch_step=5; //查询数据库
  217. eWait_step=6; //等待车辆离开
  218. eRelease_step=7; //释放车位
  219. eComplete=8; //完成
  220. eBackConfirm_step=9;
  221. eBack_compare_step=10;
  222. eBackMeasure_step=11;
  223. eBackAlloc_step=12;
  224. eBackWait_step=13;
  225. eBackDispatch_step=14;
  226. eBackSearch_step=15;
  227. eBackComplete=16;
  228. }
  229. //步骤状态,每个步骤有四中可能状态 ,等待中-执行中-完成或者错误 四个状态
  230. enum Step_statu
  231. {
  232. eWaiting=0; //完成/空闲
  233. eWorking=1;
  234. eError=2;
  235. eFinished=3;
  236. }
  237. //调度设备的类型
  238. enum Dispatch_device_type
  239. {
  240. ROBOT_1 = 101; //一号出口的专用机器手(只能负责1号出口的取车)(目前没有安装,暂时不考虑)
  241. ROBOT_2 = 102; //中间的大型机器手 (可以负责1~6号出入口的停车和取车)
  242. CARRIER_1 = 200; //左侧0号电梯井的搬运器(升降电梯 中跑车 小跑车 三合一为搬运器)
  243. CARRIER_2 = 207; //右侧7号电梯井的搬运器(升降电梯 中跑车 小跑车 三合一为搬运器)
  244. CARRIER_3 = 203; //中间3楼的搬运器(中跑车 小跑车 二合一为搬运器)(没有电梯, 只能在3楼活动)
  245. PASSAGEWAY_0 = 300; //0号出口(在左侧电梯井, 只能取车)(暂时不存在)
  246. PASSAGEWAY_1 = 301; //1号出入口
  247. PASSAGEWAY_2 = 302; //2号出入口
  248. PASSAGEWAY_3 = 303; //3号出入口
  249. PASSAGEWAY_4 = 304; //4号出入口
  250. PASSAGEWAY_5 = 305; //5号出入口
  251. PASSAGEWAY_6 = 306; //6号出入口
  252. PASSAGEWAY_7 = 307; //7号出口(在右侧电梯井, 只能取车)
  253. }