parkspace_allocation_message.proto 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. syntax = "proto2";
  2. package message;
  3. import "message_base.proto";
  4. // 请求
  5. // 1.分配车位
  6. // 2.查询车辆位置
  7. // 3.解锁车位
  8. // 4.手动操作修改车位状态
  9. // 5.临时锁定车位
  10. //车辆状态枚举
  11. enum Vehicle_status
  12. {
  13. eVehicle_unknown = 0; //未知状态
  14. eVehicle_idle = 1; //车辆空闲
  15. eVehicle_in_garage = 2; //车辆已入库
  16. eVehicle_parking = 3; //车辆停车中
  17. eVehicle_fetching = 4; //车辆取车中
  18. eVehicle_reserved = 5; //已预约未停入
  19. }
  20. //数据库状态
  21. enum Database_controller_status
  22. {
  23. E_UNKNOWN = 0; //默认未知
  24. E_READY = 1; //正常待机
  25. E_DISCONNECT = 2; //断连
  26. E_FAULT = 3; //故障
  27. }
  28. //车位管理状态
  29. enum Parkspace_manager_satus
  30. {
  31. eParkspace_manager_unknown =0;//位置
  32. eParkspace_manager_normal =1;//正常
  33. eParkspace_manager_fault =2;//故障
  34. };
  35. //1.分配车位请求
  36. message Parkspace_allocation_request_msg
  37. {
  38. required Base_info base_info=1; //消息类型
  39. required string command_key=2; //指令唯一标识符id
  40. required Car_info car_info=3;
  41. required int32 terminal_id=4; //终端id,优化车位分配用
  42. }
  43. //分配车位反馈
  44. message Parkspace_allocation_response_msg
  45. {
  46. required Base_info base_info=1; //消息类型
  47. required string command_key=2; //指令唯一标识符id
  48. required Error_manager error_manager=3; //分配成功与否标志
  49. repeated Parkspace_info allocated_parkspace_info_ex = 4; //分配车位信息
  50. optional Car_type car_type = 5;//汽车类型
  51. }
  52. //2.查询车辆位置请求(根据车辆唯一标识码查询)
  53. message Parkspace_search_request_msg
  54. {
  55. required Base_info base_info=1; //消息类型
  56. required string command_key=2; //指令唯一标识符id
  57. required Car_info car_info=3; //车辆凭证或号牌
  58. }
  59. //查询车辆位置反馈
  60. message Parkspace_search_response_msg
  61. {
  62. required Base_info base_info=1; //消息类型
  63. required string command_key=2; //指令唯一标识符id
  64. required Error_manager error_manager=3; //分配成功与否标志
  65. repeated Parkspace_info query_parkspace_info_ex=4; //待查询车辆存放位置
  66. }
  67. //手动查询车辆位置请求(根据车牌号查询)
  68. message Parkspace_manual_search_request_msg
  69. {
  70. required Base_info base_info=1; //消息类型
  71. required string command_key=2; //指令唯一标识符id
  72. required Car_info car_info=3; //车辆凭证或号牌
  73. }
  74. //手动查询车辆位置反馈
  75. message Parkspace_manual_search_response_msg
  76. {
  77. required Base_info base_info=1; //消息类型
  78. required string command_key=2; //指令唯一标识符id
  79. required Error_manager error_manager=3; //分配成功与否标志
  80. repeated Parkspace_info query_parkspace_info_ex=4; //待查询车辆存放位置
  81. }
  82. //3.释放车位请求
  83. message Parkspace_release_request_msg
  84. {
  85. required Base_info base_info=1; //消息类型
  86. required string command_key=2; //指令唯一标识符id
  87. repeated Parkspace_info release_parkspace_info_ex=3; //待释放车位信息
  88. }
  89. //释放车位请求
  90. message Parkspace_release_response_msg
  91. {
  92. required Base_info base_info=1; //消息类型
  93. required string command_key=2; //指令唯一标识符id
  94. required Error_manager error_manager=3; //分配成功与否标志
  95. repeated Parkspace_info release_parkspace_info_ex=4; //待释放车位信息
  96. }
  97. // 4.手动操作修改车位状态
  98. message Parkspace_force_update_request_msg
  99. {
  100. required Base_info base_info=1; //消息类型
  101. required string command_key=2; //指令唯一标识符id
  102. repeated Parkspace_info manual_parkspace_info_ex=3; //待手动修改车位信息,通过id定位
  103. }
  104. //手动操作反馈
  105. message Parkspace_force_update_response_msg
  106. {
  107. required Base_info base_info=1; //消息类型
  108. required string command_key=2; //指令唯一标识符id
  109. required Error_manager error_manager=3; //分配成功与否标志
  110. repeated Parkspace_info manual_parkspace_info_ex=4; //已修改后的车位信息
  111. }
  112. // 5.确认分配车位
  113. message Parkspace_confirm_alloc_request_msg
  114. {
  115. required Base_info base_info=1; //消息类型
  116. required string command_key=2; //指令唯一标识符id
  117. repeated Parkspace_info confirm_parkspace_info_ex = 3; //分配车位信息
  118. optional Car_type car_type = 4;//汽车类型
  119. }
  120. //确认分配车位反馈
  121. message Parkspace_confirm_alloc_response_msg
  122. {
  123. required Base_info base_info=1; //消息类型
  124. required string command_key=2; //指令唯一标识符id
  125. required Error_manager error_manager=3; //分配成功与否标志
  126. repeated Parkspace_info confirm_parkspace_info_ex = 4; //已修改后的车位信息
  127. optional Car_type car_type = 5;//汽车类型
  128. }
  129. // 车位心跳状态信息
  130. message Parkspace_allocation_status_msg
  131. {
  132. required Base_info base_info=1; //消息类型
  133. required Error_manager error_manager=2;
  134. required Database_controller_status database_controller_status=3; //数据库的状态
  135. required Parkspace_manager_satus parkspace_manager_satus=4; //车位管理状态
  136. required int32 small_parkspace_remaining_number=5; //小型车位剩余数量
  137. required int32 medium_parkspace_remaining_number=6; //中型车位剩余数量
  138. required int32 large_parkspace_remaining_number=7; //大型车位剩余数量
  139. required int32 total_parkspace_remaining_number=8; //所有车位剩余数量
  140. }
  141. //更新车位数据请求
  142. message Parkspace_refresh_request_msg
  143. {
  144. required Base_info base_info=1; //消息类型
  145. }
  146. // 车位数据信息
  147. message Parkspace_allocation_data_msg
  148. {
  149. required Base_info base_info=1; //消息类型
  150. required Error_manager error_manager=2;
  151. repeated Parkspace_info parkspace_info_ex=3;
  152. }