123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- syntax = "proto2";
- package message;
- import "message_base.proto";
- // 请求
- // 1.分配车位
- // 2.查询车辆位置
- // 3.解锁车位
- // 4.手动操作修改车位状态
- // 5.临时锁定车位
- 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_reserved = 2; //被预约,预约车辆可分配
- eParkspace_locked = 3; //临时锁定,不可分配
- eParkspace_error = 4; //车位机械结构或硬件故障
- }
- //车辆状态枚举
- enum Vehicle_status
- {
- eVehicle_idle = 0; //车辆空闲
- eVehicle_in_garage = 1; //车辆已入库
- eVehicle_parking = 2; //车辆停车中
- eVehicle_fetching = 3; //车辆取车中
- eVehicle_reserved = 4; //已预约未停入
- eVehicle_unknown = 5; //未知状态
- }
- enum Direction
- {
- eForward = 0;
- eBackward = 1;
- }
- //单个车位基本信息与状态信息
- 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 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 Parkspace_info allocated_space_info=4; //分配车位信息
- }
- //2.查询车辆位置请求
- message Parkspace_search_request_msg
- {
- required Base_info base_info=1; //消息类型
- required int32 command_id=2; //指令唯一标识符id
- required Car_info car_info=3; //车辆凭证或号牌
- }
- //查询车辆位置反馈
- message Parkspace_search_response_msg
- {
- required Base_info base_info=1; //消息类型
- required int32 command_id=2; //指令唯一标识符id
- required Error_manager error_manager=3; //分配成功与否标志
- optional Parkspace_info car_position=4; //待查询车辆存放位置
- }
- //3.解锁车位请求
- message Parkspace_release_request_msg
- {
- required Base_info base_info=1; //消息类型
- required int32 command_id=2; //指令唯一标识符id
- required Parkspace_info release_space_info=3; //待释放车位信息
- }
- //解锁车位反馈
- message Parkspace_release_response_msg
- {
- required Base_info base_info=1; //消息类型
- required int32 command_id=2; //指令唯一标识符id
- required Error_manager error_manager=3; //分配成功与否标志
- required Parkspace_info release_space_info=4; //待释放车位信息
- }
- // 4.手动操作修改车位状态
- message Parkspace_force_update_request_msg
- {
- required Base_info base_info=1; //消息类型
- required int32 command_id=2; //指令唯一标识符id
- required Parkspace_info update_space_info=3; //待手动修改车位信息,通过id定位
- }
- //手动操作反馈
- message Parkspace_force_update_response_msg
- {
- required Base_info base_info=1; //消息类型
- required int32 command_id=2; //指令唯一标识符id
- required Error_manager error_manager=3; //分配成功与否标志
- required Parkspace_info update_space_info=4; //已修改后的车位信息
- }
- // 5.临时锁定车位
- message Parkspace_confirm_alloc_request_msg
- {
- required Base_info base_info=1; //消息类型
- required int32 command_id=2; //指令唯一标识符id
- required Parkspace_info confirm_space_info=3; //已修改后的车位信息
- }
- message Parkspace_confirm_alloc_response_msg
- {
- required Base_info base_info=1; //消息类型
- required int32 command_id=2; //指令唯一标识符id
- required Error_manager error_manager=3; //分配成功与否标志
- required Parkspace_info confirm_alloc_space_info=4; //已修改后的车位信息
- }
- // 车位心跳状态信息
- message Parkspace_allocation_status_msg
- {
- required Base_info base_info=1; //消息类型
- required Error_manager error_manager=2;
- repeated Parkspace_info parkspace_info=3; //车位状态
- }
|