|
@@ -2,54 +2,108 @@ syntax = "proto2";
|
|
|
package message;
|
|
|
import "message_base.proto";
|
|
|
|
|
|
-//车位分配模块请求消息
|
|
|
+// 请求
|
|
|
+// 1.分配车位
|
|
|
+// 2.查询车辆位置
|
|
|
+// 3.解锁车位
|
|
|
+
|
|
|
+message Car_info
|
|
|
+{
|
|
|
+ optional float car_length=1; //车长
|
|
|
+ required float car_width=2; //车宽
|
|
|
+ required float car_height=3; //车高
|
|
|
+ required string license=4; //车辆凭证号
|
|
|
+}
|
|
|
+
|
|
|
+//车位状态枚举
|
|
|
+enum Parkspace_status
|
|
|
+{
|
|
|
+ eParkspace_empty = 0; //空闲,可分配
|
|
|
+ eParkspace_occupied = 1; //被占用,不可分配
|
|
|
+ eParkspace_reserverd = 2; //被预约,预约车辆可分配
|
|
|
+ eParkspace_error = 3; //车位机械结构或硬件故障
|
|
|
+}
|
|
|
+
|
|
|
+enum Direction
|
|
|
+{
|
|
|
+ eForward = 1;
|
|
|
+ eBackward = 2;
|
|
|
+}
|
|
|
+
|
|
|
+//单个车位基本信息与状态信息
|
|
|
+message Parkspace_info
|
|
|
+{
|
|
|
+ required int32 parkspace_id=1; //车位编号
|
|
|
+ required int32 index=2; //同层编号
|
|
|
+ required Direction direction=3; //前后
|
|
|
+ required int32 floor=4; //楼层
|
|
|
+ optional float length=5; //车位长
|
|
|
+ required float width=6; //车位宽
|
|
|
+ required float height=7; //车位高
|
|
|
+ required Parkspace_status parkspace_status=8; //车位当前状态
|
|
|
+ optional Car_info car_info=9; //当前车位存入车辆的凭证号
|
|
|
+ optional string entry_time=10; //入场时间
|
|
|
+ optional string leave_time=11; //离场时间
|
|
|
+}
|
|
|
+
|
|
|
+//1.分配车位请求
|
|
|
message Parkspace_allocation_request_msg
|
|
|
{
|
|
|
required Base_info base_info=1; //消息类型
|
|
|
required int32 command_id=2; //指令唯一标识符id
|
|
|
- required int32 car_length=3; //车长
|
|
|
- required int32 car_width=4; //车宽
|
|
|
- required int32 car_height=5; //车高
|
|
|
+ required Car_info car_info=3;
|
|
|
+ required int32 terminal_id=4; //终端id,优化车位分配用
|
|
|
}
|
|
|
|
|
|
-//车位分配模块反馈消息
|
|
|
+//分配车位反馈
|
|
|
message Parkspace_allocation_response_msg
|
|
|
{
|
|
|
required Base_info base_info=1; //消息类型
|
|
|
required int32 command_id=2; //指令唯一标识符id
|
|
|
required Error_manager error_manager=3; //分配成功与否标志
|
|
|
- required int32 allocated_space_id=4; //分配车位id
|
|
|
+ required Parkspace_info allocated_space_info=4; //分配车位信息
|
|
|
}
|
|
|
|
|
|
-//车位分配模块状态消息
|
|
|
-message Parkspace_allocation_status_msg
|
|
|
+//2.查询车辆位置请求
|
|
|
+message Parkspace_search_request_msg
|
|
|
{
|
|
|
required Base_info base_info=1; //消息类型
|
|
|
- required Error_manager error_manager=2;
|
|
|
- repeated Parkspace_info parkspace_info=3; //车位状态
|
|
|
+ required int32 command_id=2; //指令唯一标识符id
|
|
|
+ required Car_info car_info=3; //车辆凭证或号牌
|
|
|
}
|
|
|
|
|
|
-//车位状态枚举
|
|
|
-enum Parkspace_status
|
|
|
+//查询车辆位置反馈
|
|
|
+message Parkspace_search_response_msg
|
|
|
{
|
|
|
- eParkspace_empty = 0; //空闲,可分配
|
|
|
- eParkspace_occupied = 1; //被占用,不可分配
|
|
|
- eParkspace_reserverd = 2; //被预约,预约车辆可分配
|
|
|
- eParkspace_error = 3; //车位机械结构或硬件故障
|
|
|
+ required Base_info base_info=1; //消息类型
|
|
|
+ required int32 command_id=2; //指令唯一标识符id
|
|
|
+ required Error_manager error_manager=3; //分配成功与否标志
|
|
|
+ optional Parkspace_info car_position=4; //待查询车辆存放位置
|
|
|
}
|
|
|
|
|
|
-//单个车位基本信息与状态信息
|
|
|
-message Parkspace_info
|
|
|
+//3.解锁车位请求
|
|
|
+message Parkspace_release_request_msg
|
|
|
{
|
|
|
- required int32 parkspace_id=1; //车位编号
|
|
|
- required int32 x_coordinate=2; //x坐标
|
|
|
- required int32 y_coordinate=3; //y坐标
|
|
|
- required int32 z_coordinate=4; //z坐标
|
|
|
- required int32 length=5; //车位长
|
|
|
- required int32 width=6; //车位宽
|
|
|
- required int32 height=7; //车位高
|
|
|
- required Parkspace_status parkspace_status=8; //车位当前状态
|
|
|
- optional int32 license=9; //当前车位存入车辆的凭证号
|
|
|
- optional string entry_time=10; //入场时间
|
|
|
- optional string leave_time=11; //离场时间
|
|
|
+ required Base_info base_info=1; //消息类型
|
|
|
+ required int32 command_id=2; //指令唯一标识符id
|
|
|
+ required Parkspace_info release_space_info=3; //待释放车位信息
|
|
|
+ required Car_info car_info=4; //待释放车辆凭证号
|
|
|
}
|
|
|
+
|
|
|
+//查询车辆位置反馈
|
|
|
+message Parkspace_release_response_msg
|
|
|
+{
|
|
|
+ required Base_info base_info=1; //消息类型
|
|
|
+ required int32 command_id=2; //指令唯一标识符id
|
|
|
+ required Error_manager error_manager=3; //分配成功与否标志
|
|
|
+}
|
|
|
+
|
|
|
+// 车位心跳状态信息
|
|
|
+message Parkspace_allocation_status_msg
|
|
|
+{
|
|
|
+ required Base_info base_info=1; //消息类型
|
|
|
+ required Error_manager error_manager=2;
|
|
|
+ repeated Parkspace_info parkspace_info=3; //车位状态
|
|
|
+}
|
|
|
+
|
|
|
+
|