parkspace_allocation_message.proto 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. syntax = "proto2";
  2. package message;
  3. import "message_base.proto";
  4. // 请求
  5. // 1.分配车位
  6. // 2.查询车辆位置
  7. // 3.解锁车位
  8. // 4.手动操作修改车位状态
  9. // 5.临时锁定车位
  10. message Car_info
  11. {
  12. optional float car_length=1; //车长
  13. required float car_width=2; //车宽
  14. required float car_height=3; //车高
  15. required string license=4; //车辆凭证号
  16. }
  17. //车位状态枚举
  18. enum Parkspace_status
  19. {
  20. eParkspace_empty = 0; //空闲,可分配
  21. eParkspace_occupied = 1; //被车辆占用,不可分配
  22. eParkspace_reserved = 2; //被预约,预约车辆可分配
  23. eParkspace_locked = 3; //临时锁定,不可分配
  24. eParkspace_error = 4; //车位机械结构或硬件故障
  25. }
  26. //车辆状态枚举
  27. enum Vehicle_status
  28. {
  29. eVehicle_idle = 0; //车辆空闲
  30. eVehicle_in_garage = 1; //车辆已入库
  31. eVehicle_parking = 2; //车辆停车中
  32. eVehicle_fetching = 3; //车辆取车中
  33. eVehicle_reserved = 4; //已预约未停入
  34. eVehicle_unknown = 5; //未知状态
  35. }
  36. enum Direction
  37. {
  38. eForward = 0;
  39. eBackward = 1;
  40. }
  41. //单个车位基本信息与状态信息
  42. message Parkspace_info
  43. {
  44. required int32 parkspace_id=1; //车位编号
  45. required int32 index=2; //同层编号
  46. required Direction direction=3; //前后
  47. required int32 floor=4; //楼层
  48. optional float length=5; //车位长
  49. required float width=6; //车位宽
  50. required float height=7; //车位高
  51. required Parkspace_status parkspace_status=8; //车位当前状态
  52. optional Car_info car_info=9; //当前车位存入车辆的凭证号
  53. optional string entry_time=10; //入场时间
  54. optional string leave_time=11; //离场时间
  55. }
  56. //1.分配车位请求
  57. message Parkspace_allocation_request_msg
  58. {
  59. required Base_info base_info=1; //消息类型
  60. required int32 command_id=2; //指令唯一标识符id
  61. required Car_info car_info=3;
  62. required int32 terminal_id=4; //终端id,优化车位分配用
  63. }
  64. //分配车位反馈
  65. message Parkspace_allocation_response_msg
  66. {
  67. required Base_info base_info=1; //消息类型
  68. required int32 command_id=2; //指令唯一标识符id
  69. required Error_manager error_manager=3; //分配成功与否标志
  70. required Parkspace_info allocated_space_info=4; //分配车位信息
  71. }
  72. //2.查询车辆位置请求
  73. message Parkspace_search_request_msg
  74. {
  75. required Base_info base_info=1; //消息类型
  76. required int32 command_id=2; //指令唯一标识符id
  77. required Car_info car_info=3; //车辆凭证或号牌
  78. }
  79. //查询车辆位置反馈
  80. message Parkspace_search_response_msg
  81. {
  82. required Base_info base_info=1; //消息类型
  83. required int32 command_id=2; //指令唯一标识符id
  84. required Error_manager error_manager=3; //分配成功与否标志
  85. optional Parkspace_info car_position=4; //待查询车辆存放位置
  86. }
  87. //3.解锁车位请求
  88. message Parkspace_release_request_msg
  89. {
  90. required Base_info base_info=1; //消息类型
  91. required int32 command_id=2; //指令唯一标识符id
  92. required Parkspace_info release_space_info=3; //待释放车位信息
  93. }
  94. //解锁车位反馈
  95. message Parkspace_release_response_msg
  96. {
  97. required Base_info base_info=1; //消息类型
  98. required int32 command_id=2; //指令唯一标识符id
  99. required Error_manager error_manager=3; //分配成功与否标志
  100. required Parkspace_info release_space_info=4; //待释放车位信息
  101. }
  102. // 4.手动操作修改车位状态
  103. message Parkspace_force_update_request_msg
  104. {
  105. required Base_info base_info=1; //消息类型
  106. required int32 command_id=2; //指令唯一标识符id
  107. required Parkspace_info update_space_info=3; //待手动修改车位信息,通过id定位
  108. }
  109. //手动操作反馈
  110. message Parkspace_force_update_response_msg
  111. {
  112. required Base_info base_info=1; //消息类型
  113. required int32 command_id=2; //指令唯一标识符id
  114. required Error_manager error_manager=3; //分配成功与否标志
  115. required Parkspace_info update_space_info=4; //已修改后的车位信息
  116. }
  117. // 5.临时锁定车位
  118. message Parkspace_confirm_alloc_request_msg
  119. {
  120. required Base_info base_info=1; //消息类型
  121. required int32 command_id=2; //指令唯一标识符id
  122. required Parkspace_info confirm_space_info=3; //已修改后的车位信息
  123. }
  124. message Parkspace_confirm_alloc_response_msg
  125. {
  126. required Base_info base_info=1; //消息类型
  127. required int32 command_id=2; //指令唯一标识符id
  128. required Error_manager error_manager=3; //分配成功与否标志
  129. required Parkspace_info confirm_alloc_space_info=4; //已修改后的车位信息
  130. }
  131. // 车位心跳状态信息
  132. message Parkspace_allocation_status_msg
  133. {
  134. required Base_info base_info=1; //消息类型
  135. required Error_manager error_manager=2;
  136. repeated Parkspace_info parkspace_info=3; //车位状态
  137. }