syntax = "proto2"; package message; import "message_base.proto"; // 请求 // 1.分配车位 // 2.查询车辆位置 // 3.解锁车位 // 4.手动操作修改车位状态 // 5.临时锁定车位 //车辆状态枚举 enum Vehicle_status { eVehicle_unknown = 0; //未知状态 eVehicle_idle = 1; //车辆空闲 eVehicle_in_garage = 2; //车辆已入库 eVehicle_parking = 3; //车辆停车中 eVehicle_fetching = 4; //车辆取车中 eVehicle_reserved = 5; //已预约未停入 } //数据库状态 enum Database_controller_status { E_UNKNOWN = 0; //默认未知 E_READY = 1; //正常待机 E_DISCONNECT = 2; //断连 E_FAULT = 3; //故障 } //车位管理状态 enum Parkspace_manager_satus { eParkspace_manager_unknown =0;//位置 eParkspace_manager_normal =1;//正常 eParkspace_manager_fault =2;//故障 }; //1.分配车位请求 message Parkspace_allocation_request_msg { required Base_info base_info=1; //消息类型 required string command_key=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 string command_key=2; //指令唯一标识符id required Error_manager error_manager=3; //分配成功与否标志 repeated Parkspace_info allocated_parkspace_info_ex = 4; //分配车位信息 optional Car_type car_type = 5;//汽车类型 } //2.查询车辆位置请求(根据车辆唯一标识码查询) message Parkspace_search_request_msg { required Base_info base_info=1; //消息类型 required string command_key=2; //指令唯一标识符id required Car_info car_info=3; //车辆凭证或号牌 } //查询车辆位置反馈 message Parkspace_search_response_msg { required Base_info base_info=1; //消息类型 required string command_key=2; //指令唯一标识符id required Error_manager error_manager=3; //分配成功与否标志 repeated Parkspace_info query_parkspace_info_ex=4; //待查询车辆存放位置 } //手动查询车辆位置请求(根据车牌号查询) message Parkspace_manual_search_request_msg { required Base_info base_info=1; //消息类型 required string command_key=2; //指令唯一标识符id required Car_info car_info=3; //车辆凭证或号牌 } //手动查询车辆位置反馈 message Parkspace_manual_search_response_msg { required Base_info base_info=1; //消息类型 required string command_key=2; //指令唯一标识符id required Error_manager error_manager=3; //分配成功与否标志 repeated Parkspace_info query_parkspace_info_ex=4; //待查询车辆存放位置 } //3.释放车位请求 message Parkspace_release_request_msg { required Base_info base_info=1; //消息类型 required string command_key=2; //指令唯一标识符id repeated Parkspace_info release_parkspace_info_ex=3; //待释放车位信息 } //释放车位请求 message Parkspace_release_response_msg { required Base_info base_info=1; //消息类型 required string command_key=2; //指令唯一标识符id required Error_manager error_manager=3; //分配成功与否标志 repeated Parkspace_info release_parkspace_info_ex=4; //待释放车位信息 } // 4.手动操作修改车位状态 message Parkspace_force_update_request_msg { required Base_info base_info=1; //消息类型 required string command_key=2; //指令唯一标识符id repeated Parkspace_info manual_parkspace_info_ex=3; //待手动修改车位信息,通过id定位 } //手动操作反馈 message Parkspace_force_update_response_msg { required Base_info base_info=1; //消息类型 required string command_key=2; //指令唯一标识符id required Error_manager error_manager=3; //分配成功与否标志 repeated Parkspace_info manual_parkspace_info_ex=4; //已修改后的车位信息 } // 5.确认分配车位 message Parkspace_confirm_alloc_request_msg { required Base_info base_info=1; //消息类型 required string command_key=2; //指令唯一标识符id repeated Parkspace_info confirm_parkspace_info_ex = 3; //分配车位信息 optional Car_type car_type = 4;//汽车类型 } //确认分配车位反馈 message Parkspace_confirm_alloc_response_msg { required Base_info base_info=1; //消息类型 required string command_key=2; //指令唯一标识符id required Error_manager error_manager=3; //分配成功与否标志 repeated Parkspace_info confirm_parkspace_info_ex = 4; //已修改后的车位信息 optional Car_type car_type = 5;//汽车类型 } // 车位心跳状态信息 message Parkspace_allocation_status_msg { required Base_info base_info=1; //消息类型 required Error_manager error_manager=2; required Database_controller_status database_controller_status=3; //数据库的状态 required Parkspace_manager_satus parkspace_manager_satus=4; //车位管理状态 required int32 small_parkspace_remaining_number=5; //小型车位剩余数量 required int32 medium_parkspace_remaining_number=6; //中型车位剩余数量 required int32 large_parkspace_remaining_number=7; //大型车位剩余数量 required int32 total_parkspace_remaining_number=8; //所有车位剩余数量 } //更新车位数据请求 message Parkspace_refresh_request_msg { required Base_info base_info=1; //消息类型 } // 车位数据信息 message Parkspace_allocation_data_msg { required Base_info base_info=1; //消息类型 required Error_manager error_manager=2; repeated Parkspace_info parkspace_info_ex=3; }