Bläddra i källkod

20210323, 调度控制线程的框架

huli 4 år sedan
förälder
incheckning
8ef5aa7d38

+ 3 - 1
CMakeLists.txt

@@ -43,6 +43,7 @@ aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/locate LOCATE_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/terminor TERMINOR_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/task TASK_MANAGER_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC )
+aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool/TaskQueue TASK_QUEUE_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/communication COMMUNICATION_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system SYSTEM_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/dispatch DISPATCH_SRC )
@@ -61,7 +62,8 @@ add_executable(terminal
         ${TERMINOR_SRC}
         ${LOCATE_SRC}
         ${TASK_MANAGER_SRC}
-        ${TOOL_SRC}
+		${TOOL_SRC}
+		${TASK_QUEUE_SRC}
 		${COMMUNICATION_SRC}
 		${SNAP7_COMMUNICATION_SRC}
         ${SYSTEM_SRC}

+ 2 - 0
dispatch/carrier.cpp

@@ -233,6 +233,8 @@ Error_manager Carrier::update_device_communication()
 //从内存中读数据到任务单, 子类必须重载
 Error_manager Carrier::check_and_read_memory_to_task(std::shared_ptr<Task_Base> p_task)
 {
+	Dispatch_communication::get_instance_references().communication_start();
+
 	//检查任务类型,
 	if (p_task->get_task_type() != CARRIER_TASK)
 	{

+ 2 - 0
dispatch/catcher.cpp

@@ -222,6 +222,8 @@ Error_manager Catcher::update_device_communication()
 //从内存中读数据到任务单, 子类必须重载
 Error_manager Catcher::check_and_read_memory_to_task(std::shared_ptr<Task_Base> p_task)
 {
+	Dispatch_communication::get_instance_references().communication_start();
+
 	//检查任务类型,
 	if (p_task->get_task_type() != CATCHER_TASK)
 	{

+ 4 - 4
dispatch/dispatch_communication.cpp

@@ -223,8 +223,8 @@ Error_manager Dispatch_communication::communication_init()
 	t_index += sizeof(unsigned char)*50;
 	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_respons_status", typeid(unsigned char).name(), t_index,sizeof(unsigned char), 1 });
 	t_index += sizeof(unsigned char)*1;
-	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_reserved51_71", typeid(unsigned char).name(), t_index,sizeof(unsigned char), 19 });
-	t_index += sizeof(unsigned char)*19;
+	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_reserved51_71", typeid(unsigned char).name(), t_index,sizeof(unsigned char), 21 });
+	t_index += sizeof(unsigned char)*21;
 
 	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_respons_x", typeid(float).name(), t_index,sizeof(float), 1 });
 	t_index += sizeof(float)*1;
@@ -293,8 +293,8 @@ Error_manager Dispatch_communication::communication_init()
 	t_index += sizeof(unsigned char)*1;
 	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_actual_joint_motion_x2", typeid(unsigned char).name(), t_index,sizeof(unsigned char), 1 });
 	t_index += sizeof(unsigned char)*1;
-	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_reserved63_99", typeid(unsigned char).name(), t_index,sizeof(unsigned char), 34 });
-	t_index += sizeof(unsigned char)*37;
+	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_reserved63_101", typeid(unsigned char).name(), t_index,sizeof(unsigned char), 39 });
+	t_index += sizeof(unsigned char)*39;
 
 	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_actual_error_code", typeid(unsigned char).name(), t_index,sizeof(unsigned char), 50 });
 	t_index += sizeof(unsigned char)*50;

+ 1 - 1
dispatch/dispatch_communication.h

@@ -191,7 +191,7 @@ public:
 		unsigned char			m_actual_small_sports_car_motion = 0;		//小跑车的位置,是否在中跑车上面, 0=无动作,1=出发到位,2=返回到位
 		unsigned char			m_actual_joint_motion_x1 = 0;		//电梯与X轴的横向轨道对接,0=无动作,1=伸出到位,2=收回到位
 		unsigned char			m_actual_joint_motion_x2 = 0;		//电梯与X轴的横向轨道对接,0=无动作,1=伸出到位,2=收回到位
-		unsigned char			m_reserved63_99[37] = {0};		//预留
+		unsigned char			m_reserved63_101[39] = {0};		//预留
 		//故障信息
 		unsigned char			m_actual_error_code[50] = {0};		//搬运器错误码
 		unsigned char			m_actual_warning_code[50] = {0};	//升降机错误码

+ 1 - 1
dispatch/dispatch_device_base.h

@@ -201,7 +201,7 @@ protected://member variable
 	std::shared_ptr<Task_Base>			mp_device_one_level_task;		//设备的普通任务, (一般移动和等待指令, 允许被打断)
 	std::shared_ptr<Task_Base>			mp_device_two_level_task;		//设备的优先任务, (紧急避让和插队指令, 允许打断普通任务)
 	std::shared_ptr<Task_Base>			mp_device_three_level_task;		//设备的核心任务, (锁定位置进行抓车和放车, 最高任务, 不允许打断和被打断)
-
+	//task任务的流程由Dispatch_process来管理
 
 
 private:

+ 110 - 16
dispatch/dispatch_manager.cpp

@@ -8,7 +8,15 @@
 Dispatch_manager::Dispatch_manager()
 {
 	m_dispatch_manager_status = E_DISPATCH_MANAGER_UNKNOW;
-//	m_carrier_number = 0;
+	m_dispatch_id = -1;
+
+	m_catcher_size = 0;
+	m_carrier_size = 0;
+	m_passageway_size = 0;
+
+	m_process_thread_queue = nullptr;
+	m_dispatch_manager_thread = nullptr;
+
 }
 
 Dispatch_manager::~Dispatch_manager()
@@ -21,32 +29,92 @@ Dispatch_manager::~Dispatch_manager()
 //调度管理 初始化
 Error_manager Dispatch_manager::dispatch_manager_init(int dispatch_id)
 {
-	m_dispatch_manager_status = E_DISPATCH_MANAGER_READY;
 	m_dispatch_id = dispatch_id;
-//	m_carrier_number = size;
-//
-//	for (int i = 0; i < size; ++i)
-//	{
-//		Carrier_base * p_arrier_base = new Carrier_base;
-//		p_arrier_base->carrier_base_init();
-//		m_carrier_vector.push_back(p_arrier_base);
-//	}
+
+	m_catcher_size = 2;
+	for (int i = 0; i < m_catcher_size; ++i)
+	{
+		std::shared_ptr<Catcher> tp_catcher(new Catcher);
+		tp_catcher->dispatch_device_base_init(i);
+		m_catcher_map[i] = tp_catcher;
+	}
+
+	m_carrier_size = 3;
+	for (int i = 0; i < m_carrier_size; ++i)
+	{
+		std::shared_ptr<Carrier> tp_carrier(new Carrier);
+		tp_carrier->dispatch_device_base_init(i);
+		m_carrier_map[i] = tp_carrier;
+	}
+
+	m_passageway_size = 8;
+	for (int i = 0; i < m_passageway_size; ++i)
+	{
+		std::shared_ptr<Passageway> tp_passageway(new Passageway);
+		tp_passageway->dispatch_device_base_init(i);
+		m_passageway_map[i] = tp_passageway;
+	}
+
+	//创建线程池
+	if (m_process_thread_queue == nullptr) {
+		m_process_thread_queue = tq::TQFactory::CreateDefaultQueue();
+		m_process_thread_queue->Start(48);
+	}
+
+	
+	m_dispatch_manager_status = E_DISPATCH_MANAGER_READY;
 	return Error_code::SUCCESS;
 }
 //调度管理 反初始化
 Error_manager Dispatch_manager::dispatch_manager_uninit()
 {
-//	//回收搬运器的内存
-//	for (int i = 0; i < m_carrier_number; ++i)
+	if (m_dispatch_manager_thread)
+	{
+		m_dispatch_manager_condition.kill_all();
+	}
+	if (m_dispatch_manager_thread)
+	{
+		m_dispatch_manager_thread->join();
+		delete m_dispatch_manager_thread;
+		m_dispatch_manager_thread = NULL;
+	}
+
+	//等待线程池完成
+	if(m_process_thread_queue!=nullptr) {
+		m_process_thread_queue->WaitForFinish();
+		m_process_thread_queue->Stop();
+		m_process_thread_queue = nullptr;
+	}
+
+	m_dispatch_manager_status = E_DISPATCH_MANAGER_UNKNOW;
+	m_dispatch_id = -1;
+
+
+//	for (int i = 0; i < m_catcher_size; ++i)
 //	{
-//		m_carrier_vector[i]->carrier_base_uninit();
+//		m_catcher_vector[i]->dispatch_device_base_uninit();
+//		delete(m_catcher_vector[i]);
+//	}
+//	m_catcher_size = 0;
+//	m_catcher_vector.clear();
+//
+//	for (int i = 0; i < m_carrier_size; ++i)
+//	{
+//		m_carrier_vector[i]->dispatch_device_base_uninit();
 //		delete(m_carrier_vector[i]);
 //	}
+//	m_carrier_size = 0;
+//	m_carrier_vector.clear();
+//
+//	for (int i = 0; i < m_passageway_size; ++i)
+//	{
+//		m_passageway_vector[i]->dispatch_device_base_uninit();
+//		delete(m_passageway_vector[i]);
+//	}
+//	m_passageway_size = 0;
+//	m_passageway_vector.clear();
 
-	m_dispatch_manager_status = E_DISPATCH_MANAGER_UNKNOW;
 
-//	m_carrier_number = 0;
-//	m_carrier_vector.clear();
 	return Error_code::SUCCESS;
 }
 
@@ -97,6 +165,32 @@ Error_manager Dispatch_manager::check_status()
 	return Error_code::SUCCESS;
 }
 
+//在流程的map 里面释放指定的流程
+Error_manager Dispatch_manager::release_dispatch_process(std::string command_key)
+{
+	std::unique_lock<std::mutex> t_lock(m_lock);
+
+	auto iter1 = m_key_to_dispatch_process_store_map.find(command_key);
+	if ( iter1 != m_key_to_dispatch_process_store_map.end())
+	{
+		m_key_to_dispatch_process_store_map.erase(iter1);
+	}
+
+	auto iter2 = m_key_to_dispatch_process_pickup_map.find(command_key);
+	if ( iter2 != m_key_to_dispatch_process_pickup_map.end())
+	{
+		m_key_to_dispatch_process_pickup_map.erase(iter2);
+	}
+	return Error_code::SUCCESS;
+}
+
+
+
+
+
+
+
+
 Dispatch_manager::Dispatch_manager_status Dispatch_manager::get_dispatch_manager_status()
 {
 	return m_dispatch_manager_status;

+ 24 - 5
dispatch/dispatch_manager.h

@@ -9,10 +9,14 @@
 #include "../error_code/error_code.h"
 #include "../tool/singleton.h"
 #include "../tool/thread_condition.h"
+#include "../tool/TaskQueue/TQFactory.h"
+#include "../tool/TaskQueue/BaseTask.h"
 
 #include "../dispatch/carrier.h"
 #include "../dispatch/catcher.h"
 #include "../dispatch/passageway.h"
+#include "../dispatch/dispatch_process.h"
+
 #include <vector>
 #include <glog/logging.h>
 
@@ -31,7 +35,6 @@ typedef struct Locate_information
 	float locate_wheel_width;	//整车的轮距, 左右轮的距离, 用于机器人或agv的抓车
 	bool locate_correct;		//整车的校准标记位
 	//注:理论上, 车宽和左右轮距应该是一样的, 但是实际上车宽比左右轮距略大,
-
 }Locate_information;
 
 //调度管理模块
@@ -77,6 +80,11 @@ public://API functions
 
 	//检查状态
 	Error_manager check_status();
+
+
+	//在流程的map 里面释放指定的流程
+	Error_manager release_dispatch_process(std::string command_key);
+
 public://get or set member variable
 	Dispatch_manager_status get_dispatch_manager_status();
 	int get_dispatch_id();
@@ -86,13 +94,24 @@ protected://member variable
 	Dispatch_manager_status						m_dispatch_manager_status;			//调度管理 的状态
 	int 										m_dispatch_id;						//调度模块的id, (楚天项目就是单元号, 0~2)
 
+	//硬件资源
+	int 										m_catcher_size;					//抓车器的数量, 默认1个
+	std::map<int, std::shared_ptr<Catcher>>		m_catcher_map;					//抓车器的对象实例,内存由本类管理
+	int 										m_carrier_size;					//搬运器的数量, 默认3个
+	std::map<int, std::shared_ptr<Carrier>>		m_carrier_map;					//搬运器的对象实例,内存由本类管理
+	int 										m_passageway_size;				//通道口的数量, 默认7个
+	std::map<int, std::shared_ptr<Passageway>>	m_passageway_map;				//通道口的对象实例,内存由本类管理
 
 
+	//流程控制
+	std::mutex                              	m_lock;        						//线程池的锁, 增删流程时要加锁.
+	tq::IQueue*                         		m_process_thread_queue;         	//指令流程线程池, 管理线程内存, 负责启动和回收线程内存资源,不负责控制流程.
+	std::thread*                        		m_dispatch_manager_thread;        	//调度总管理的线程, 总控全局, 控制每个流程的先后顺序, 并合理的分配资源.
+	Thread_condition				    		m_dispatch_manager_condition;		//调度总管理的条件变量, 总控全局, 控制每个流程的先后顺序, 并合理的分配资源.
 
-
-	int 										m_carrier_number;					//搬运器的数量, 默认3个
-	std::vector<Carrier*>					m_carrier_vector;					//搬运器的对象实例,内存由本类管理
-
+	//流程管理
+	std::map<std::string, Dispatch_process*>	m_key_to_dispatch_process_store_map;	//存车流程的map
+	std::map<std::string, Dispatch_process*>	m_key_to_dispatch_process_pickup_map;	//取车流程的map
 
 
 

+ 1 - 0
dispatch/passageway.cpp

@@ -280,6 +280,7 @@ Error_manager Passageway::update_device_communication()
 //从内存中读数据到任务单, 子类必须重载
 Error_manager Passageway::check_and_read_memory_to_task(std::shared_ptr<Task_Base> p_task)
 {
+	Dispatch_communication::get_instance_references().communication_start();
 	//检查任务类型,
 	if (p_task->get_task_type() != PASSAGEWAY_TASK)
 	{

+ 73 - 16
main.cpp

@@ -16,6 +16,11 @@
 #include "./dispatch/dispatch_manager.h"
 #include "./dispatch/dispatch_communication.h"
 
+
+#include "./tool/common_data.h"
+
+
+
 #include <algorithm>    // std::for_each
 
 
@@ -74,6 +79,31 @@ public:
 int main(int argc,char* argv[])
 {
 
+	message::Dispatch_plan_request_msg		m_dispatch_plan_request_msg;		//2调度总规划的请求, 用于启动整个调度算法(调度管理->调度算法)
+
+	m_dispatch_plan_request_msg.mutable_base_info()->set_msg_type(message::Message_type::eDispatch_plan_request_msg);
+	m_dispatch_plan_request_msg.mutable_base_info()->set_timeout_ms(50);
+	m_dispatch_plan_request_msg.mutable_base_info()->set_sender(message::Communicator::eDispatch_mamager);
+	m_dispatch_plan_request_msg.mutable_base_info()->set_receiver(message::Communicator::eDispatch_control);
+	m_dispatch_plan_request_msg.set_command_key("m_command_key");
+//
+//std::cout << " huli test :::: " << " 1231231231231231 = " << m_dispatch_plan_request_msg.has_dispatch_source() << std::endl;
+//	m_dispatch_plan_request_msg.set_dispatch_source(50);
+//	std::cout << " huli test :::: " << " 1231231231231231 = " << m_dispatch_plan_request_msg.has_dispatch_source() << std::endl;
+//
+//	m_dispatch_plan_request_msg.clear_dispatch_source();
+//	std::cout << " huli test :::: " << " 1231231231231231 = " << m_dispatch_plan_request_msg.has_dispatch_source() << std::endl;
+
+	int aaa =  m_dispatch_plan_request_msg.dispatch_task_type();
+	std::cout << " huli test :::: " << " aaa = " << aaa << std::endl;
+
+	m_dispatch_plan_request_msg.DebugString();
+	std::cout << " huli test :::: " << " m_dispatch_plan_request_msg.DebugString() = " << m_dispatch_plan_request_msg.DebugString() << std::endl;
+
+	return 0;
+
+
+
 	const char* logPath = "./";
 	google::InitGoogleLogging("LidarMeasurement");
 	google::SetStderrLogging(google::INFO);
@@ -88,7 +118,35 @@ int main(int argc,char* argv[])
 
 
 	Error_manager t_error;
+	t_error = Dispatch_communication::get_instance_references().communication_init();
+
+	Dispatch_manager::get_instance_references().dispatch_manager_init(0);
+	std::cout << "Dispatch_manager = " << Dispatch_manager::get_instance_references().get_dispatch_manager_status() << std::endl;
+
+	System_executor::get_instance_references().system_executor_init(8);
+	std::cout << "System_executor = " << System_executor::get_instance_references().get_system_executor_status() << std::endl;
+	System_communication::get_instance_references().communication_init();
+
 
+	return 0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//	Error_manager t_error;
 	t_error = Dispatch_communication::get_instance_references().communication_init();
 
 
@@ -105,7 +163,7 @@ int main(int argc,char* argv[])
 
 
 
-
+/*
 
 	Catcher t_catcher;
 	t_error = t_catcher.dispatch_device_base_init(1);
@@ -115,15 +173,15 @@ int main(int argc,char* argv[])
 	std::shared_ptr<Task_Base> tp_task_Base1(new Catcher_task);
 	Catcher_task * tp_catcher_task = (Catcher_task *)tp_task_Base1.get();
 	tp_catcher_task->task_init(NULL,std::chrono::milliseconds(15000));
-	tp_catcher_task->m_request_key = "ABCDEF";
-	tp_catcher_task->m_request_x = 123;
-	tp_catcher_task->m_request_y = 456;
+	tp_catcher_task->m_request_key = "nfddsfgkjvbds";
+	tp_catcher_task->m_request_x = 500;
+	tp_catcher_task->m_request_y = 600;
 	tp_catcher_task->m_request_b = 80;
-	tp_catcher_task->m_request_z = 789;
-	tp_catcher_task->m_request_d1 = 333;
-	tp_catcher_task->m_request_d2 = 444;
-	tp_catcher_task->m_request_wheelbase = 555;
-	tp_catcher_task->m_request_clamp_motion = Catcher_task::E_CLAMP_LOOSE;
+	tp_catcher_task->m_request_z = 700;
+	tp_catcher_task->m_request_d1 = 355;
+	tp_catcher_task->m_request_d2 = 455;
+	tp_catcher_task->m_request_wheelbase = 1255;
+	tp_catcher_task->m_request_clamp_motion = Catcher_task::E_CLAMP_TIGHT;
 	t_error = t_catcher.execute_task(tp_task_Base1, Dispatch_device_base::E_ONE_LEVEL);
 	std::cout << " huli test :::: " << " t_error = " << t_error << std::endl;
 	std::cout << " ---------------------------------------------------" << std::endl;
@@ -192,23 +250,23 @@ int main(int argc,char* argv[])
 
 	}
 
-
+*/
 
 
 
 
 	Carrier t_carrier;
-	t_error = t_carrier.dispatch_device_base_init(1);
+	t_error = t_carrier.dispatch_device_base_init(0);
 	std::cout << " huli test :::: " << " t_error = " << t_error << std::endl;
 	std::this_thread::sleep_for(std::chrono::seconds(2));
 
 	std::shared_ptr<Task_Base> tp_task_Base2(new Carrier_task);
 	Carrier_task * tp_carrier_task = (Carrier_task *)tp_task_Base2.get();
 	tp_carrier_task->task_init(NULL,std::chrono::milliseconds(15000));
-	tp_carrier_task->m_request_key = "ABCDEF";
-	tp_carrier_task->m_request_x = 123;
-	tp_carrier_task->m_request_y = 456;
-	tp_carrier_task->m_request_z = 789;
+	tp_carrier_task->m_request_key = "fimfyuiyuifjh";
+	tp_carrier_task->m_request_x = 333;
+	tp_carrier_task->m_request_y = 444;
+	tp_carrier_task->m_request_z = 555;
 	tp_carrier_task->m_request_y1 = 333;
 	tp_carrier_task->m_request_y2 = 444;
 	tp_carrier_task->m_request_clamp_motion = Carrier_task::E_CLAMP_LOOSE;
@@ -295,7 +353,6 @@ int main(int argc,char* argv[])
 
 
 
-
 	Passageway t_passageway;
 	t_error = t_passageway.dispatch_device_base_init(1);
 	std::cout << " huli test :::: " << " t_error = " << t_error << std::endl;

+ 145 - 149
message/dispatch_control.pb.cc

@@ -151,9 +151,9 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_plan_request_msg, error_manager_),
   1,
   0,
-  5,
   3,
   4,
+  5,
   2,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_plan_response_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_plan_response_msg, _internal_metadata_),
@@ -168,9 +168,9 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_plan_response_msg, error_manager_),
   1,
   0,
-  5,
   3,
   4,
+  5,
   2,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_request_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_request_msg, _internal_metadata_),
@@ -188,13 +188,13 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_request_msg, dispatch_device_task_status_),
   1,
   0,
-  7,
-  8,
   3,
+  8,
   4,
-  2,
   5,
+  2,
   6,
+  7,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_response_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_response_msg, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -211,13 +211,13 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_response_msg, dispatch_device_task_status_),
   1,
   0,
-  7,
-  8,
   3,
+  8,
   4,
-  2,
   5,
+  2,
   6,
+  7,
 };
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
   { 0, 11, sizeof(::message::Dispatch_plan_request_msg)},
@@ -292,44 +292,46 @@ void AddDescriptorsImpl() {
       "status\030\010 \001(\0162&.message.Dispatch_device_t"
       "arget_status\022I\n\033dispatch_device_task_sta"
       "tus\030\t \001(\0162$.message.Dispatch_device_task"
-      "_status*\333\005\n\022Dispatch_task_type\022\027\n\023DISPAT"
-      "CH_PLAN_STORE\020e\022\030\n\024DISPATCH_PLAN_PICKUP\020"
-      "f\022\036\n\032ROBOT_CATCH_CAR_FROM_INLET\020\001\022\034\n\030ROB"
-      "OT_PUT_CAR_TO_CARRIER\020\002\022 \n\034ROBOT_CATCH_C"
-      "AR_FROM_CARRIER\020\003\022\033\n\027ROBOT_PUT_CAR_TO_OU"
-      "TLET\020\004\022\016\n\nROBOT_MOVE\020\005\022\"\n\036CARRIER_RECEIV"
-      "E_CAR_FROM_ROBOT\020\013\022%\n!CARRIER_STORE_CAR_"
-      "TO_PARKINGSPACE\020\014\022(\n$CARRIER_STORE_CAR_T"
-      "O_PARKINGSPACE_EX\020z\022(\n$CARRIER_PICKUP_CA"
-      "R_FROM_PARKINGSPACE\020\r\022 \n\034CARRIER_DELIVER"
-      "_CAR_TO_ROBOT\020\016\022\020\n\014CARRIER_MOVE\020\017\022 \n\034PAS"
-      "SAGEWAY_OPEN_OUTSIDE_DOOR\020\025\022!\n\035PASSAGEWA"
-      "Y_CLOSE_OUTSIDE_DOOR\020\026\022\037\n\033PASSAGEWAY_OPE"
-      "N_INSIDE_DOOR\020\027\022 \n\034PASSAGEWAY_CLOSE_INSI"
-      "DE_DOOR\020\030\022*\n&PASSAGEWAY_ROTATE_TURNTABLE"
-      "_TO_CARRIER\020\031\022)\n%PASSAGEWAY_ROTATE_TURNT"
-      "ABLE_TO_OUTLET\020\032\022\023\n\017DISPATCH_FINISH\020\036\022\023\n"
-      "\017DISPATCH_CANCEL\020\037\022\022\n\016DISPATCH_PAUSE\020(\022\025"
-      "\n\021DISPATCH_RESERVED\0202*\370\001\n\024Dispatch_devic"
-      "e_type\022\013\n\007ROBOT_1\020e\022\013\n\007ROBOT_2\020f\022\016\n\tCARR"
-      "IER_1\020\310\001\022\016\n\tCARRIER_2\020\317\001\022\016\n\tCARRIER_3\020\313\001"
-      "\022\021\n\014PASSAGEWAY_0\020\254\002\022\021\n\014PASSAGEWAY_1\020\255\002\022\021"
-      "\n\014PASSAGEWAY_2\020\256\002\022\021\n\014PASSAGEWAY_3\020\257\002\022\021\n\014"
-      "PASSAGEWAY_4\020\260\002\022\021\n\014PASSAGEWAY_5\020\261\002\022\021\n\014PA"
-      "SSAGEWAY_6\020\262\002\022\021\n\014PASSAGEWAY_7\020\263\002*\244\001\n\035Dis"
-      "patch_device_target_status\022\032\n\026E_TARGET_S"
-      "TATUS_UNKNOW\020\000\022\030\n\024E_TARGET_STATUS_IDLE\020\001"
-      "\022\030\n\024E_TARGET_STATUS_BUSY\020\002\022\031\n\025E_TARGET_S"
-      "TATUS_READY\020\003\022\030\n\024E_TARGET_STATUS_WAIT\020\004*"
-      "\350\001\n\033Dispatch_device_task_status\022\022\n\016E_TAS"
-      "K_CREATED\020\000\022\020\n\014E_TASK_ISSUE\020\001\022\021\n\rE_TASK_"
-      "SIGNED\020\002\022\022\n\016E_TASK_WORKING\020\003\022\017\n\013E_TASK_O"
-      "VER\020\004\022\017\n\013E_TASK_STOP\020\005\022\020\n\014E_TASK_ERROR\020\013"
-      "\022\021\n\rE_TASK_CANCEL\020\025\022\017\n\013E_TASK_DEAD\020\026\022\023\n\017"
-      "E_TASK_WITHDRAW\020\037\022\017\n\013E_TASK_FREE\020 "
+      "_status*\250\006\n\022Dispatch_task_type\022\035\n\031DISPAT"
+      "CH_TASK_TYPE_UNKNOW\020\000\022\027\n\023DISPATCH_PLAN_S"
+      "TORE\020e\022\030\n\024DISPATCH_PLAN_PICKUP\020f\022\036\n\032ROBO"
+      "T_CATCH_CAR_FROM_INLET\020\001\022\034\n\030ROBOT_PUT_CA"
+      "R_TO_CARRIER\020\002\022 \n\034ROBOT_CATCH_CAR_FROM_C"
+      "ARRIER\020\003\022\033\n\027ROBOT_PUT_CAR_TO_OUTLET\020\004\022\016\n"
+      "\nROBOT_MOVE\020\005\022\"\n\036CARRIER_RECEIVE_CAR_FRO"
+      "M_ROBOT\020\013\022%\n!CARRIER_STORE_CAR_TO_PARKIN"
+      "GSPACE\020\014\022(\n$CARRIER_STORE_CAR_TO_PARKING"
+      "SPACE_EX\020z\022(\n$CARRIER_PICKUP_CAR_FROM_PA"
+      "RKINGSPACE\020\r\022,\n\'CARRIER_PICKUP_CAR_FROM_"
+      "PARKINGSPACE_EX\020\205\001\022 \n\034CARRIER_DELIVER_CA"
+      "R_TO_ROBOT\020\016\022\020\n\014CARRIER_MOVE\020\017\022 \n\034PASSAG"
+      "EWAY_OPEN_OUTSIDE_DOOR\020\025\022!\n\035PASSAGEWAY_C"
+      "LOSE_OUTSIDE_DOOR\020\026\022\037\n\033PASSAGEWAY_OPEN_I"
+      "NSIDE_DOOR\020\027\022 \n\034PASSAGEWAY_CLOSE_INSIDE_"
+      "DOOR\020\030\022*\n&PASSAGEWAY_ROTATE_TURNTABLE_TO"
+      "_CARRIER\020\031\022)\n%PASSAGEWAY_ROTATE_TURNTABL"
+      "E_TO_OUTLET\020\032\022\023\n\017DISPATCH_FINISH\020\036\022\023\n\017DI"
+      "SPATCH_CANCEL\020\037\022\022\n\016DISPATCH_PAUSE\020(\022\025\n\021D"
+      "ISPATCH_RESERVED\0202*\370\001\n\024Dispatch_device_t"
+      "ype\022\013\n\007ROBOT_1\020e\022\013\n\007ROBOT_2\020f\022\016\n\tCARRIER"
+      "_1\020\310\001\022\016\n\tCARRIER_2\020\317\001\022\016\n\tCARRIER_3\020\313\001\022\021\n"
+      "\014PASSAGEWAY_0\020\254\002\022\021\n\014PASSAGEWAY_1\020\255\002\022\021\n\014P"
+      "ASSAGEWAY_2\020\256\002\022\021\n\014PASSAGEWAY_3\020\257\002\022\021\n\014PAS"
+      "SAGEWAY_4\020\260\002\022\021\n\014PASSAGEWAY_5\020\261\002\022\021\n\014PASSA"
+      "GEWAY_6\020\262\002\022\021\n\014PASSAGEWAY_7\020\263\002*\244\001\n\035Dispat"
+      "ch_device_target_status\022\032\n\026E_TARGET_STAT"
+      "US_UNKNOW\020\000\022\030\n\024E_TARGET_STATUS_IDLE\020\001\022\030\n"
+      "\024E_TARGET_STATUS_BUSY\020\002\022\031\n\025E_TARGET_STAT"
+      "US_READY\020\003\022\030\n\024E_TARGET_STATUS_WAIT\020\004*\350\001\n"
+      "\033Dispatch_device_task_status\022\022\n\016E_TASK_C"
+      "REATED\020\000\022\020\n\014E_TASK_ISSUE\020\001\022\021\n\rE_TASK_SIG"
+      "NED\020\002\022\022\n\016E_TASK_WORKING\020\003\022\017\n\013E_TASK_OVER"
+      "\020\004\022\017\n\013E_TASK_STOP\020\005\022\020\n\014E_TASK_ERROR\020\013\022\021\n"
+      "\rE_TASK_CANCEL\020\025\022\017\n\013E_TASK_DEAD\020\026\022\023\n\017E_T"
+      "ASK_WITHDRAW\020\037\022\017\n\013E_TASK_FREE\020 "
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 2874);
+      descriptor, 2951);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "dispatch_control.proto", &protobuf_RegisterTypes);
   ::protobuf_message_5fbase_2eproto::AddDescriptors();
@@ -353,6 +355,7 @@ const ::google::protobuf::EnumDescriptor* Dispatch_task_type_descriptor() {
 }
 bool Dispatch_task_type_IsValid(int value) {
   switch (value) {
+    case 0:
     case 1:
     case 2:
     case 3:
@@ -376,6 +379,7 @@ bool Dispatch_task_type_IsValid(int value) {
     case 101:
     case 102:
     case 122:
+    case 133:
       return true;
     default:
       return false;
@@ -501,9 +505,9 @@ Dispatch_plan_request_msg::Dispatch_plan_request_msg(const Dispatch_plan_request
   } else {
     error_manager_ = NULL;
   }
-  ::memcpy(&dispatch_source_, &from.dispatch_source_,
-    static_cast<size_t>(reinterpret_cast<char*>(&dispatch_task_type_) -
-    reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_task_type_));
+  ::memcpy(&dispatch_task_type_, &from.dispatch_task_type_,
+    static_cast<size_t>(reinterpret_cast<char*>(&dispatch_destination_) -
+    reinterpret_cast<char*>(&dispatch_task_type_)) + sizeof(dispatch_destination_));
   // @@protoc_insertion_point(copy_constructor:message.Dispatch_plan_request_msg)
 }
 
@@ -513,7 +517,6 @@ void Dispatch_plan_request_msg::SharedCtor() {
   ::memset(&base_info_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&dispatch_destination_) -
       reinterpret_cast<char*>(&base_info_)) + sizeof(dispatch_destination_));
-  dispatch_task_type_ = 101;
 }
 
 Dispatch_plan_request_msg::~Dispatch_plan_request_msg() {
@@ -572,10 +575,9 @@ void Dispatch_plan_request_msg::Clear() {
     }
   }
   if (cached_has_bits & 56u) {
-    ::memset(&dispatch_source_, 0, static_cast<size_t>(
+    ::memset(&dispatch_task_type_, 0, static_cast<size_t>(
         reinterpret_cast<char*>(&dispatch_destination_) -
-        reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_destination_));
-    dispatch_task_type_ = 101;
+        reinterpret_cast<char*>(&dispatch_task_type_)) + sizeof(dispatch_destination_));
   }
   _has_bits_.Clear();
   _internal_metadata_.Clear();
@@ -723,18 +725,18 @@ void Dispatch_plan_request_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000020u) {
+  if (cached_has_bits & 0x00000008u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       3, this->dispatch_task_type(), output);
   }
 
   // optional int32 dispatch_source = 4;
-  if (cached_has_bits & 0x00000008u) {
+  if (cached_has_bits & 0x00000010u) {
     ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->dispatch_source(), output);
   }
 
   // optional int32 dispatch_destination = 5;
-  if (cached_has_bits & 0x00000010u) {
+  if (cached_has_bits & 0x00000020u) {
     ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->dispatch_destination(), output);
   }
 
@@ -778,18 +780,18 @@ void Dispatch_plan_request_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000020u) {
+  if (cached_has_bits & 0x00000008u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       3, this->dispatch_task_type(), target);
   }
 
   // optional int32 dispatch_source = 4;
-  if (cached_has_bits & 0x00000008u) {
+  if (cached_has_bits & 0x00000010u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->dispatch_source(), target);
   }
 
   // optional int32 dispatch_destination = 5;
-  if (cached_has_bits & 0x00000010u) {
+  if (cached_has_bits & 0x00000020u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->dispatch_destination(), target);
   }
 
@@ -859,6 +861,12 @@ size_t Dispatch_plan_request_msg::ByteSizeLong() const {
           *this->error_manager_);
     }
 
+    // optional .message.Dispatch_task_type dispatch_task_type = 3;
+    if (has_dispatch_task_type()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_task_type());
+    }
+
     // optional int32 dispatch_source = 4;
     if (has_dispatch_source()) {
       total_size += 1 +
@@ -873,12 +881,6 @@ size_t Dispatch_plan_request_msg::ByteSizeLong() const {
           this->dispatch_destination());
     }
 
-    // optional .message.Dispatch_task_type dispatch_task_type = 3;
-    if (has_dispatch_task_type()) {
-      total_size += 1 +
-        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_task_type());
-    }
-
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
@@ -922,13 +924,13 @@ void Dispatch_plan_request_msg::MergeFrom(const Dispatch_plan_request_msg& from)
       mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
     }
     if (cached_has_bits & 0x00000008u) {
-      dispatch_source_ = from.dispatch_source_;
+      dispatch_task_type_ = from.dispatch_task_type_;
     }
     if (cached_has_bits & 0x00000010u) {
-      dispatch_destination_ = from.dispatch_destination_;
+      dispatch_source_ = from.dispatch_source_;
     }
     if (cached_has_bits & 0x00000020u) {
-      dispatch_task_type_ = from.dispatch_task_type_;
+      dispatch_destination_ = from.dispatch_destination_;
     }
     _has_bits_[0] |= cached_has_bits;
   }
@@ -968,9 +970,9 @@ void Dispatch_plan_request_msg::InternalSwap(Dispatch_plan_request_msg* other) {
   command_key_.Swap(&other->command_key_);
   swap(base_info_, other->base_info_);
   swap(error_manager_, other->error_manager_);
+  swap(dispatch_task_type_, other->dispatch_task_type_);
   swap(dispatch_source_, other->dispatch_source_);
   swap(dispatch_destination_, other->dispatch_destination_);
-  swap(dispatch_task_type_, other->dispatch_task_type_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
   swap(_cached_size_, other->_cached_size_);
@@ -1035,9 +1037,9 @@ Dispatch_plan_response_msg::Dispatch_plan_response_msg(const Dispatch_plan_respo
   } else {
     error_manager_ = NULL;
   }
-  ::memcpy(&dispatch_source_, &from.dispatch_source_,
-    static_cast<size_t>(reinterpret_cast<char*>(&dispatch_task_type_) -
-    reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_task_type_));
+  ::memcpy(&dispatch_task_type_, &from.dispatch_task_type_,
+    static_cast<size_t>(reinterpret_cast<char*>(&dispatch_destination_) -
+    reinterpret_cast<char*>(&dispatch_task_type_)) + sizeof(dispatch_destination_));
   // @@protoc_insertion_point(copy_constructor:message.Dispatch_plan_response_msg)
 }
 
@@ -1047,7 +1049,6 @@ void Dispatch_plan_response_msg::SharedCtor() {
   ::memset(&base_info_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&dispatch_destination_) -
       reinterpret_cast<char*>(&base_info_)) + sizeof(dispatch_destination_));
-  dispatch_task_type_ = 101;
 }
 
 Dispatch_plan_response_msg::~Dispatch_plan_response_msg() {
@@ -1106,10 +1107,9 @@ void Dispatch_plan_response_msg::Clear() {
     }
   }
   if (cached_has_bits & 56u) {
-    ::memset(&dispatch_source_, 0, static_cast<size_t>(
+    ::memset(&dispatch_task_type_, 0, static_cast<size_t>(
         reinterpret_cast<char*>(&dispatch_destination_) -
-        reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_destination_));
-    dispatch_task_type_ = 101;
+        reinterpret_cast<char*>(&dispatch_task_type_)) + sizeof(dispatch_destination_));
   }
   _has_bits_.Clear();
   _internal_metadata_.Clear();
@@ -1257,18 +1257,18 @@ void Dispatch_plan_response_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000020u) {
+  if (cached_has_bits & 0x00000008u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       3, this->dispatch_task_type(), output);
   }
 
   // optional int32 dispatch_source = 4;
-  if (cached_has_bits & 0x00000008u) {
+  if (cached_has_bits & 0x00000010u) {
     ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->dispatch_source(), output);
   }
 
   // optional int32 dispatch_destination = 5;
-  if (cached_has_bits & 0x00000010u) {
+  if (cached_has_bits & 0x00000020u) {
     ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->dispatch_destination(), output);
   }
 
@@ -1312,18 +1312,18 @@ void Dispatch_plan_response_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000020u) {
+  if (cached_has_bits & 0x00000008u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       3, this->dispatch_task_type(), target);
   }
 
   // optional int32 dispatch_source = 4;
-  if (cached_has_bits & 0x00000008u) {
+  if (cached_has_bits & 0x00000010u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->dispatch_source(), target);
   }
 
   // optional int32 dispatch_destination = 5;
-  if (cached_has_bits & 0x00000010u) {
+  if (cached_has_bits & 0x00000020u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->dispatch_destination(), target);
   }
 
@@ -1393,6 +1393,12 @@ size_t Dispatch_plan_response_msg::ByteSizeLong() const {
           *this->error_manager_);
     }
 
+    // optional .message.Dispatch_task_type dispatch_task_type = 3;
+    if (has_dispatch_task_type()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_task_type());
+    }
+
     // optional int32 dispatch_source = 4;
     if (has_dispatch_source()) {
       total_size += 1 +
@@ -1407,12 +1413,6 @@ size_t Dispatch_plan_response_msg::ByteSizeLong() const {
           this->dispatch_destination());
     }
 
-    // optional .message.Dispatch_task_type dispatch_task_type = 3;
-    if (has_dispatch_task_type()) {
-      total_size += 1 +
-        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_task_type());
-    }
-
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
@@ -1456,13 +1456,13 @@ void Dispatch_plan_response_msg::MergeFrom(const Dispatch_plan_response_msg& fro
       mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
     }
     if (cached_has_bits & 0x00000008u) {
-      dispatch_source_ = from.dispatch_source_;
+      dispatch_task_type_ = from.dispatch_task_type_;
     }
     if (cached_has_bits & 0x00000010u) {
-      dispatch_destination_ = from.dispatch_destination_;
+      dispatch_source_ = from.dispatch_source_;
     }
     if (cached_has_bits & 0x00000020u) {
-      dispatch_task_type_ = from.dispatch_task_type_;
+      dispatch_destination_ = from.dispatch_destination_;
     }
     _has_bits_[0] |= cached_has_bits;
   }
@@ -1502,9 +1502,9 @@ void Dispatch_plan_response_msg::InternalSwap(Dispatch_plan_response_msg* other)
   command_key_.Swap(&other->command_key_);
   swap(base_info_, other->base_info_);
   swap(error_manager_, other->error_manager_);
+  swap(dispatch_task_type_, other->dispatch_task_type_);
   swap(dispatch_source_, other->dispatch_source_);
   swap(dispatch_destination_, other->dispatch_destination_);
-  swap(dispatch_task_type_, other->dispatch_task_type_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
   swap(_cached_size_, other->_cached_size_);
@@ -1572,9 +1572,9 @@ Dispatch_control_request_msg::Dispatch_control_request_msg(const Dispatch_contro
   } else {
     error_manager_ = NULL;
   }
-  ::memcpy(&dispatch_source_, &from.dispatch_source_,
+  ::memcpy(&dispatch_task_type_, &from.dispatch_task_type_,
     static_cast<size_t>(reinterpret_cast<char*>(&dispatch_device_type_) -
-    reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_device_type_));
+    reinterpret_cast<char*>(&dispatch_task_type_)) + sizeof(dispatch_device_type_));
   // @@protoc_insertion_point(copy_constructor:message.Dispatch_control_request_msg)
 }
 
@@ -1584,7 +1584,6 @@ void Dispatch_control_request_msg::SharedCtor() {
   ::memset(&base_info_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&dispatch_device_task_status_) -
       reinterpret_cast<char*>(&base_info_)) + sizeof(dispatch_device_task_status_));
-  dispatch_task_type_ = 101;
   dispatch_device_type_ = 101;
 }
 
@@ -1644,10 +1643,9 @@ void Dispatch_control_request_msg::Clear() {
     }
   }
   if (cached_has_bits & 248u) {
-    ::memset(&dispatch_source_, 0, static_cast<size_t>(
+    ::memset(&dispatch_task_type_, 0, static_cast<size_t>(
         reinterpret_cast<char*>(&dispatch_device_task_status_) -
-        reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_device_task_status_));
-    dispatch_task_type_ = 101;
+        reinterpret_cast<char*>(&dispatch_task_type_)) + sizeof(dispatch_device_task_status_));
   }
   dispatch_device_type_ = 101;
   _has_bits_.Clear();
@@ -1856,7 +1854,7 @@ void Dispatch_control_request_msg::SerializeWithCachedSizes(
   }
 
   // required .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000080u) {
+  if (cached_has_bits & 0x00000008u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       3, this->dispatch_task_type(), output);
   }
@@ -1868,12 +1866,12 @@ void Dispatch_control_request_msg::SerializeWithCachedSizes(
   }
 
   // optional int32 dispatch_source = 5;
-  if (cached_has_bits & 0x00000008u) {
+  if (cached_has_bits & 0x00000010u) {
     ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->dispatch_source(), output);
   }
 
   // optional int32 dispatch_destination = 6;
-  if (cached_has_bits & 0x00000010u) {
+  if (cached_has_bits & 0x00000020u) {
     ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->dispatch_destination(), output);
   }
 
@@ -1884,13 +1882,13 @@ void Dispatch_control_request_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_device_target_status dispatch_device_target_status = 8;
-  if (cached_has_bits & 0x00000020u) {
+  if (cached_has_bits & 0x00000040u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       8, this->dispatch_device_target_status(), output);
   }
 
   // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
-  if (cached_has_bits & 0x00000040u) {
+  if (cached_has_bits & 0x00000080u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       9, this->dispatch_device_task_status(), output);
   }
@@ -1929,7 +1927,7 @@ void Dispatch_control_request_msg::SerializeWithCachedSizes(
   }
 
   // required .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000080u) {
+  if (cached_has_bits & 0x00000008u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       3, this->dispatch_task_type(), target);
   }
@@ -1941,12 +1939,12 @@ void Dispatch_control_request_msg::SerializeWithCachedSizes(
   }
 
   // optional int32 dispatch_source = 5;
-  if (cached_has_bits & 0x00000008u) {
+  if (cached_has_bits & 0x00000010u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->dispatch_source(), target);
   }
 
   // optional int32 dispatch_destination = 6;
-  if (cached_has_bits & 0x00000010u) {
+  if (cached_has_bits & 0x00000020u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->dispatch_destination(), target);
   }
 
@@ -1958,13 +1956,13 @@ void Dispatch_control_request_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_device_target_status dispatch_device_target_status = 8;
-  if (cached_has_bits & 0x00000020u) {
+  if (cached_has_bits & 0x00000040u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       8, this->dispatch_device_target_status(), target);
   }
 
   // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
-  if (cached_has_bits & 0x00000040u) {
+  if (cached_has_bits & 0x00000080u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       9, this->dispatch_device_task_status(), target);
   }
@@ -2012,7 +2010,7 @@ size_t Dispatch_control_request_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
         _internal_metadata_.unknown_fields());
   }
-  if (((_has_bits_[0] & 0x00000083) ^ 0x00000083) == 0) {  // All required fields are present.
+  if (((_has_bits_[0] & 0x0000000b) ^ 0x0000000b) == 0) {  // All required fields are present.
     // required string command_key = 2;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::StringSize(
@@ -2030,14 +2028,14 @@ size_t Dispatch_control_request_msg::ByteSizeLong() const {
   } else {
     total_size += RequiredFieldsByteSizeFallback();
   }
-  if (_has_bits_[0 / 32] & 124u) {
-    // optional .message.Error_manager error_manager = 7;
-    if (has_error_manager()) {
-      total_size += 1 +
-        ::google::protobuf::internal::WireFormatLite::MessageSize(
-          *this->error_manager_);
-    }
+  // optional .message.Error_manager error_manager = 7;
+  if (has_error_manager()) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->error_manager_);
+  }
 
+  if (_has_bits_[0 / 32] & 240u) {
     // optional int32 dispatch_source = 5;
     if (has_dispatch_source()) {
       total_size += 1 +
@@ -2113,19 +2111,19 @@ void Dispatch_control_request_msg::MergeFrom(const Dispatch_control_request_msg&
       mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
     }
     if (cached_has_bits & 0x00000008u) {
-      dispatch_source_ = from.dispatch_source_;
+      dispatch_task_type_ = from.dispatch_task_type_;
     }
     if (cached_has_bits & 0x00000010u) {
-      dispatch_destination_ = from.dispatch_destination_;
+      dispatch_source_ = from.dispatch_source_;
     }
     if (cached_has_bits & 0x00000020u) {
-      dispatch_device_target_status_ = from.dispatch_device_target_status_;
+      dispatch_destination_ = from.dispatch_destination_;
     }
     if (cached_has_bits & 0x00000040u) {
-      dispatch_device_task_status_ = from.dispatch_device_task_status_;
+      dispatch_device_target_status_ = from.dispatch_device_target_status_;
     }
     if (cached_has_bits & 0x00000080u) {
-      dispatch_task_type_ = from.dispatch_task_type_;
+      dispatch_device_task_status_ = from.dispatch_device_task_status_;
     }
     _has_bits_[0] |= cached_has_bits;
   }
@@ -2149,7 +2147,7 @@ void Dispatch_control_request_msg::CopyFrom(const Dispatch_control_request_msg&
 }
 
 bool Dispatch_control_request_msg::IsInitialized() const {
-  if ((_has_bits_[0] & 0x00000083) != 0x00000083) return false;
+  if ((_has_bits_[0] & 0x0000000b) != 0x0000000b) return false;
   if (has_base_info()) {
     if (!this->base_info_->IsInitialized()) return false;
   }
@@ -2168,11 +2166,11 @@ void Dispatch_control_request_msg::InternalSwap(Dispatch_control_request_msg* ot
   command_key_.Swap(&other->command_key_);
   swap(base_info_, other->base_info_);
   swap(error_manager_, other->error_manager_);
+  swap(dispatch_task_type_, other->dispatch_task_type_);
   swap(dispatch_source_, other->dispatch_source_);
   swap(dispatch_destination_, other->dispatch_destination_);
   swap(dispatch_device_target_status_, other->dispatch_device_target_status_);
   swap(dispatch_device_task_status_, other->dispatch_device_task_status_);
-  swap(dispatch_task_type_, other->dispatch_task_type_);
   swap(dispatch_device_type_, other->dispatch_device_type_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
@@ -2241,9 +2239,9 @@ Dispatch_control_response_msg::Dispatch_control_response_msg(const Dispatch_cont
   } else {
     error_manager_ = NULL;
   }
-  ::memcpy(&dispatch_source_, &from.dispatch_source_,
+  ::memcpy(&dispatch_task_type_, &from.dispatch_task_type_,
     static_cast<size_t>(reinterpret_cast<char*>(&dispatch_device_type_) -
-    reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_device_type_));
+    reinterpret_cast<char*>(&dispatch_task_type_)) + sizeof(dispatch_device_type_));
   // @@protoc_insertion_point(copy_constructor:message.Dispatch_control_response_msg)
 }
 
@@ -2253,7 +2251,6 @@ void Dispatch_control_response_msg::SharedCtor() {
   ::memset(&base_info_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&dispatch_device_task_status_) -
       reinterpret_cast<char*>(&base_info_)) + sizeof(dispatch_device_task_status_));
-  dispatch_task_type_ = 101;
   dispatch_device_type_ = 101;
 }
 
@@ -2313,10 +2310,9 @@ void Dispatch_control_response_msg::Clear() {
     }
   }
   if (cached_has_bits & 248u) {
-    ::memset(&dispatch_source_, 0, static_cast<size_t>(
+    ::memset(&dispatch_task_type_, 0, static_cast<size_t>(
         reinterpret_cast<char*>(&dispatch_device_task_status_) -
-        reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_device_task_status_));
-    dispatch_task_type_ = 101;
+        reinterpret_cast<char*>(&dispatch_task_type_)) + sizeof(dispatch_device_task_status_));
   }
   dispatch_device_type_ = 101;
   _has_bits_.Clear();
@@ -2525,7 +2521,7 @@ void Dispatch_control_response_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000080u) {
+  if (cached_has_bits & 0x00000008u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       3, this->dispatch_task_type(), output);
   }
@@ -2537,12 +2533,12 @@ void Dispatch_control_response_msg::SerializeWithCachedSizes(
   }
 
   // optional int32 dispatch_source = 5;
-  if (cached_has_bits & 0x00000008u) {
+  if (cached_has_bits & 0x00000010u) {
     ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->dispatch_source(), output);
   }
 
   // optional int32 dispatch_destination = 6;
-  if (cached_has_bits & 0x00000010u) {
+  if (cached_has_bits & 0x00000020u) {
     ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->dispatch_destination(), output);
   }
 
@@ -2553,13 +2549,13 @@ void Dispatch_control_response_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_device_target_status dispatch_device_target_status = 8;
-  if (cached_has_bits & 0x00000020u) {
+  if (cached_has_bits & 0x00000040u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       8, this->dispatch_device_target_status(), output);
   }
 
   // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
-  if (cached_has_bits & 0x00000040u) {
+  if (cached_has_bits & 0x00000080u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       9, this->dispatch_device_task_status(), output);
   }
@@ -2598,7 +2594,7 @@ void Dispatch_control_response_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000080u) {
+  if (cached_has_bits & 0x00000008u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       3, this->dispatch_task_type(), target);
   }
@@ -2610,12 +2606,12 @@ void Dispatch_control_response_msg::SerializeWithCachedSizes(
   }
 
   // optional int32 dispatch_source = 5;
-  if (cached_has_bits & 0x00000008u) {
+  if (cached_has_bits & 0x00000010u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->dispatch_source(), target);
   }
 
   // optional int32 dispatch_destination = 6;
-  if (cached_has_bits & 0x00000010u) {
+  if (cached_has_bits & 0x00000020u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->dispatch_destination(), target);
   }
 
@@ -2627,13 +2623,13 @@ void Dispatch_control_response_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_device_target_status dispatch_device_target_status = 8;
-  if (cached_has_bits & 0x00000020u) {
+  if (cached_has_bits & 0x00000040u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       8, this->dispatch_device_target_status(), target);
   }
 
   // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
-  if (cached_has_bits & 0x00000040u) {
+  if (cached_has_bits & 0x00000080u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       9, this->dispatch_device_task_status(), target);
   }
@@ -2697,6 +2693,12 @@ size_t Dispatch_control_response_msg::ByteSizeLong() const {
           *this->error_manager_);
     }
 
+    // optional .message.Dispatch_task_type dispatch_task_type = 3;
+    if (has_dispatch_task_type()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_task_type());
+    }
+
     // optional int32 dispatch_source = 5;
     if (has_dispatch_source()) {
       total_size += 1 +
@@ -2723,12 +2725,6 @@ size_t Dispatch_control_response_msg::ByteSizeLong() const {
         ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_device_task_status());
     }
 
-    // optional .message.Dispatch_task_type dispatch_task_type = 3;
-    if (has_dispatch_task_type()) {
-      total_size += 1 +
-        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_task_type());
-    }
-
   }
   // optional .message.Dispatch_device_type dispatch_device_type = 4;
   if (has_dispatch_device_type()) {
@@ -2778,19 +2774,19 @@ void Dispatch_control_response_msg::MergeFrom(const Dispatch_control_response_ms
       mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
     }
     if (cached_has_bits & 0x00000008u) {
-      dispatch_source_ = from.dispatch_source_;
+      dispatch_task_type_ = from.dispatch_task_type_;
     }
     if (cached_has_bits & 0x00000010u) {
-      dispatch_destination_ = from.dispatch_destination_;
+      dispatch_source_ = from.dispatch_source_;
     }
     if (cached_has_bits & 0x00000020u) {
-      dispatch_device_target_status_ = from.dispatch_device_target_status_;
+      dispatch_destination_ = from.dispatch_destination_;
     }
     if (cached_has_bits & 0x00000040u) {
-      dispatch_device_task_status_ = from.dispatch_device_task_status_;
+      dispatch_device_target_status_ = from.dispatch_device_target_status_;
     }
     if (cached_has_bits & 0x00000080u) {
-      dispatch_task_type_ = from.dispatch_task_type_;
+      dispatch_device_task_status_ = from.dispatch_device_task_status_;
     }
     _has_bits_[0] |= cached_has_bits;
   }
@@ -2833,11 +2829,11 @@ void Dispatch_control_response_msg::InternalSwap(Dispatch_control_response_msg*
   command_key_.Swap(&other->command_key_);
   swap(base_info_, other->base_info_);
   swap(error_manager_, other->error_manager_);
+  swap(dispatch_task_type_, other->dispatch_task_type_);
   swap(dispatch_source_, other->dispatch_source_);
   swap(dispatch_destination_, other->dispatch_destination_);
   swap(dispatch_device_target_status_, other->dispatch_device_target_status_);
   swap(dispatch_device_task_status_, other->dispatch_device_task_status_);
-  swap(dispatch_task_type_, other->dispatch_task_type_);
   swap(dispatch_device_type_, other->dispatch_device_type_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);

+ 88 - 86
message/dispatch_control.pb.h

@@ -76,6 +76,7 @@ extern Dispatch_plan_response_msgDefaultTypeInternal _Dispatch_plan_response_msg
 namespace message {
 
 enum Dispatch_task_type {
+  DISPATCH_TASK_TYPE_UNKNOW = 0,
   DISPATCH_PLAN_STORE = 101,
   DISPATCH_PLAN_PICKUP = 102,
   ROBOT_CATCH_CAR_FROM_INLET = 1,
@@ -87,6 +88,7 @@ enum Dispatch_task_type {
   CARRIER_STORE_CAR_TO_PARKINGSPACE = 12,
   CARRIER_STORE_CAR_TO_PARKINGSPACE_EX = 122,
   CARRIER_PICKUP_CAR_FROM_PARKINGSPACE = 13,
+  CARRIER_PICKUP_CAR_FROM_PARKINGSPACE_EX = 133,
   CARRIER_DELIVER_CAR_TO_ROBOT = 14,
   CARRIER_MOVE = 15,
   PASSAGEWAY_OPEN_OUTSIDE_DOOR = 21,
@@ -101,8 +103,8 @@ enum Dispatch_task_type {
   DISPATCH_RESERVED = 50
 };
 bool Dispatch_task_type_IsValid(int value);
-const Dispatch_task_type Dispatch_task_type_MIN = ROBOT_CATCH_CAR_FROM_INLET;
-const Dispatch_task_type Dispatch_task_type_MAX = CARRIER_STORE_CAR_TO_PARKINGSPACE_EX;
+const Dispatch_task_type Dispatch_task_type_MIN = DISPATCH_TASK_TYPE_UNKNOW;
+const Dispatch_task_type Dispatch_task_type_MAX = CARRIER_PICKUP_CAR_FROM_PARKINGSPACE_EX;
 const int Dispatch_task_type_ARRAYSIZE = Dispatch_task_type_MAX + 1;
 
 const ::google::protobuf::EnumDescriptor* Dispatch_task_type_descriptor();
@@ -319,6 +321,13 @@ class Dispatch_plan_request_msg : public ::google::protobuf::Message /* @@protoc
   ::message::Error_manager* mutable_error_manager();
   void set_allocated_error_manager(::message::Error_manager* error_manager);
 
+  // optional .message.Dispatch_task_type dispatch_task_type = 3;
+  bool has_dispatch_task_type() const;
+  void clear_dispatch_task_type();
+  static const int kDispatchTaskTypeFieldNumber = 3;
+  ::message::Dispatch_task_type dispatch_task_type() const;
+  void set_dispatch_task_type(::message::Dispatch_task_type value);
+
   // optional int32 dispatch_source = 4;
   bool has_dispatch_source() const;
   void clear_dispatch_source();
@@ -333,13 +342,6 @@ class Dispatch_plan_request_msg : public ::google::protobuf::Message /* @@protoc
   ::google::protobuf::int32 dispatch_destination() const;
   void set_dispatch_destination(::google::protobuf::int32 value);
 
-  // optional .message.Dispatch_task_type dispatch_task_type = 3;
-  bool has_dispatch_task_type() const;
-  void clear_dispatch_task_type();
-  static const int kDispatchTaskTypeFieldNumber = 3;
-  ::message::Dispatch_task_type dispatch_task_type() const;
-  void set_dispatch_task_type(::message::Dispatch_task_type value);
-
   // @@protoc_insertion_point(class_scope:message.Dispatch_plan_request_msg)
  private:
   void set_has_base_info();
@@ -364,9 +366,9 @@ class Dispatch_plan_request_msg : public ::google::protobuf::Message /* @@protoc
   ::google::protobuf::internal::ArenaStringPtr command_key_;
   ::message::Base_info* base_info_;
   ::message::Error_manager* error_manager_;
+  int dispatch_task_type_;
   ::google::protobuf::int32 dispatch_source_;
   ::google::protobuf::int32 dispatch_destination_;
-  int dispatch_task_type_;
   friend struct ::protobuf_dispatch_5fcontrol_2eproto::TableStruct;
   friend void ::protobuf_dispatch_5fcontrol_2eproto::InitDefaultsDispatch_plan_request_msgImpl();
 };
@@ -494,6 +496,13 @@ class Dispatch_plan_response_msg : public ::google::protobuf::Message /* @@proto
   ::message::Error_manager* mutable_error_manager();
   void set_allocated_error_manager(::message::Error_manager* error_manager);
 
+  // optional .message.Dispatch_task_type dispatch_task_type = 3;
+  bool has_dispatch_task_type() const;
+  void clear_dispatch_task_type();
+  static const int kDispatchTaskTypeFieldNumber = 3;
+  ::message::Dispatch_task_type dispatch_task_type() const;
+  void set_dispatch_task_type(::message::Dispatch_task_type value);
+
   // optional int32 dispatch_source = 4;
   bool has_dispatch_source() const;
   void clear_dispatch_source();
@@ -508,13 +517,6 @@ class Dispatch_plan_response_msg : public ::google::protobuf::Message /* @@proto
   ::google::protobuf::int32 dispatch_destination() const;
   void set_dispatch_destination(::google::protobuf::int32 value);
 
-  // optional .message.Dispatch_task_type dispatch_task_type = 3;
-  bool has_dispatch_task_type() const;
-  void clear_dispatch_task_type();
-  static const int kDispatchTaskTypeFieldNumber = 3;
-  ::message::Dispatch_task_type dispatch_task_type() const;
-  void set_dispatch_task_type(::message::Dispatch_task_type value);
-
   // @@protoc_insertion_point(class_scope:message.Dispatch_plan_response_msg)
  private:
   void set_has_base_info();
@@ -539,9 +541,9 @@ class Dispatch_plan_response_msg : public ::google::protobuf::Message /* @@proto
   ::google::protobuf::internal::ArenaStringPtr command_key_;
   ::message::Base_info* base_info_;
   ::message::Error_manager* error_manager_;
+  int dispatch_task_type_;
   ::google::protobuf::int32 dispatch_source_;
   ::google::protobuf::int32 dispatch_destination_;
-  int dispatch_task_type_;
   friend struct ::protobuf_dispatch_5fcontrol_2eproto::TableStruct;
   friend void ::protobuf_dispatch_5fcontrol_2eproto::InitDefaultsDispatch_plan_response_msgImpl();
 };
@@ -669,6 +671,13 @@ class Dispatch_control_request_msg : public ::google::protobuf::Message /* @@pro
   ::message::Error_manager* mutable_error_manager();
   void set_allocated_error_manager(::message::Error_manager* error_manager);
 
+  // required .message.Dispatch_task_type dispatch_task_type = 3;
+  bool has_dispatch_task_type() const;
+  void clear_dispatch_task_type();
+  static const int kDispatchTaskTypeFieldNumber = 3;
+  ::message::Dispatch_task_type dispatch_task_type() const;
+  void set_dispatch_task_type(::message::Dispatch_task_type value);
+
   // optional int32 dispatch_source = 5;
   bool has_dispatch_source() const;
   void clear_dispatch_source();
@@ -697,13 +706,6 @@ class Dispatch_control_request_msg : public ::google::protobuf::Message /* @@pro
   ::message::Dispatch_device_task_status dispatch_device_task_status() const;
   void set_dispatch_device_task_status(::message::Dispatch_device_task_status value);
 
-  // required .message.Dispatch_task_type dispatch_task_type = 3;
-  bool has_dispatch_task_type() const;
-  void clear_dispatch_task_type();
-  static const int kDispatchTaskTypeFieldNumber = 3;
-  ::message::Dispatch_task_type dispatch_task_type() const;
-  void set_dispatch_task_type(::message::Dispatch_task_type value);
-
   // optional .message.Dispatch_device_type dispatch_device_type = 4;
   bool has_dispatch_device_type() const;
   void clear_dispatch_device_type();
@@ -741,11 +743,11 @@ class Dispatch_control_request_msg : public ::google::protobuf::Message /* @@pro
   ::google::protobuf::internal::ArenaStringPtr command_key_;
   ::message::Base_info* base_info_;
   ::message::Error_manager* error_manager_;
+  int dispatch_task_type_;
   ::google::protobuf::int32 dispatch_source_;
   ::google::protobuf::int32 dispatch_destination_;
   int dispatch_device_target_status_;
   int dispatch_device_task_status_;
-  int dispatch_task_type_;
   int dispatch_device_type_;
   friend struct ::protobuf_dispatch_5fcontrol_2eproto::TableStruct;
   friend void ::protobuf_dispatch_5fcontrol_2eproto::InitDefaultsDispatch_control_request_msgImpl();
@@ -874,6 +876,13 @@ class Dispatch_control_response_msg : public ::google::protobuf::Message /* @@pr
   ::message::Error_manager* mutable_error_manager();
   void set_allocated_error_manager(::message::Error_manager* error_manager);
 
+  // optional .message.Dispatch_task_type dispatch_task_type = 3;
+  bool has_dispatch_task_type() const;
+  void clear_dispatch_task_type();
+  static const int kDispatchTaskTypeFieldNumber = 3;
+  ::message::Dispatch_task_type dispatch_task_type() const;
+  void set_dispatch_task_type(::message::Dispatch_task_type value);
+
   // optional int32 dispatch_source = 5;
   bool has_dispatch_source() const;
   void clear_dispatch_source();
@@ -902,13 +911,6 @@ class Dispatch_control_response_msg : public ::google::protobuf::Message /* @@pr
   ::message::Dispatch_device_task_status dispatch_device_task_status() const;
   void set_dispatch_device_task_status(::message::Dispatch_device_task_status value);
 
-  // optional .message.Dispatch_task_type dispatch_task_type = 3;
-  bool has_dispatch_task_type() const;
-  void clear_dispatch_task_type();
-  static const int kDispatchTaskTypeFieldNumber = 3;
-  ::message::Dispatch_task_type dispatch_task_type() const;
-  void set_dispatch_task_type(::message::Dispatch_task_type value);
-
   // optional .message.Dispatch_device_type dispatch_device_type = 4;
   bool has_dispatch_device_type() const;
   void clear_dispatch_device_type();
@@ -946,11 +948,11 @@ class Dispatch_control_response_msg : public ::google::protobuf::Message /* @@pr
   ::google::protobuf::internal::ArenaStringPtr command_key_;
   ::message::Base_info* base_info_;
   ::message::Error_manager* error_manager_;
+  int dispatch_task_type_;
   ::google::protobuf::int32 dispatch_source_;
   ::google::protobuf::int32 dispatch_destination_;
   int dispatch_device_target_status_;
   int dispatch_device_task_status_;
-  int dispatch_task_type_;
   int dispatch_device_type_;
   friend struct ::protobuf_dispatch_5fcontrol_2eproto::TableStruct;
   friend void ::protobuf_dispatch_5fcontrol_2eproto::InitDefaultsDispatch_control_response_msgImpl();
@@ -1081,16 +1083,16 @@ inline void Dispatch_plan_request_msg::set_allocated_command_key(::std::string*
 
 // optional .message.Dispatch_task_type dispatch_task_type = 3;
 inline bool Dispatch_plan_request_msg::has_dispatch_task_type() const {
-  return (_has_bits_[0] & 0x00000020u) != 0;
+  return (_has_bits_[0] & 0x00000008u) != 0;
 }
 inline void Dispatch_plan_request_msg::set_has_dispatch_task_type() {
-  _has_bits_[0] |= 0x00000020u;
+  _has_bits_[0] |= 0x00000008u;
 }
 inline void Dispatch_plan_request_msg::clear_has_dispatch_task_type() {
-  _has_bits_[0] &= ~0x00000020u;
+  _has_bits_[0] &= ~0x00000008u;
 }
 inline void Dispatch_plan_request_msg::clear_dispatch_task_type() {
-  dispatch_task_type_ = 101;
+  dispatch_task_type_ = 0;
   clear_has_dispatch_task_type();
 }
 inline ::message::Dispatch_task_type Dispatch_plan_request_msg::dispatch_task_type() const {
@@ -1106,13 +1108,13 @@ inline void Dispatch_plan_request_msg::set_dispatch_task_type(::message::Dispatc
 
 // optional int32 dispatch_source = 4;
 inline bool Dispatch_plan_request_msg::has_dispatch_source() const {
-  return (_has_bits_[0] & 0x00000008u) != 0;
+  return (_has_bits_[0] & 0x00000010u) != 0;
 }
 inline void Dispatch_plan_request_msg::set_has_dispatch_source() {
-  _has_bits_[0] |= 0x00000008u;
+  _has_bits_[0] |= 0x00000010u;
 }
 inline void Dispatch_plan_request_msg::clear_has_dispatch_source() {
-  _has_bits_[0] &= ~0x00000008u;
+  _has_bits_[0] &= ~0x00000010u;
 }
 inline void Dispatch_plan_request_msg::clear_dispatch_source() {
   dispatch_source_ = 0;
@@ -1130,13 +1132,13 @@ inline void Dispatch_plan_request_msg::set_dispatch_source(::google::protobuf::i
 
 // optional int32 dispatch_destination = 5;
 inline bool Dispatch_plan_request_msg::has_dispatch_destination() const {
-  return (_has_bits_[0] & 0x00000010u) != 0;
+  return (_has_bits_[0] & 0x00000020u) != 0;
 }
 inline void Dispatch_plan_request_msg::set_has_dispatch_destination() {
-  _has_bits_[0] |= 0x00000010u;
+  _has_bits_[0] |= 0x00000020u;
 }
 inline void Dispatch_plan_request_msg::clear_has_dispatch_destination() {
-  _has_bits_[0] &= ~0x00000010u;
+  _has_bits_[0] &= ~0x00000020u;
 }
 inline void Dispatch_plan_request_msg::clear_dispatch_destination() {
   dispatch_destination_ = 0;
@@ -1321,16 +1323,16 @@ inline void Dispatch_plan_response_msg::set_allocated_command_key(::std::string*
 
 // optional .message.Dispatch_task_type dispatch_task_type = 3;
 inline bool Dispatch_plan_response_msg::has_dispatch_task_type() const {
-  return (_has_bits_[0] & 0x00000020u) != 0;
+  return (_has_bits_[0] & 0x00000008u) != 0;
 }
 inline void Dispatch_plan_response_msg::set_has_dispatch_task_type() {
-  _has_bits_[0] |= 0x00000020u;
+  _has_bits_[0] |= 0x00000008u;
 }
 inline void Dispatch_plan_response_msg::clear_has_dispatch_task_type() {
-  _has_bits_[0] &= ~0x00000020u;
+  _has_bits_[0] &= ~0x00000008u;
 }
 inline void Dispatch_plan_response_msg::clear_dispatch_task_type() {
-  dispatch_task_type_ = 101;
+  dispatch_task_type_ = 0;
   clear_has_dispatch_task_type();
 }
 inline ::message::Dispatch_task_type Dispatch_plan_response_msg::dispatch_task_type() const {
@@ -1346,13 +1348,13 @@ inline void Dispatch_plan_response_msg::set_dispatch_task_type(::message::Dispat
 
 // optional int32 dispatch_source = 4;
 inline bool Dispatch_plan_response_msg::has_dispatch_source() const {
-  return (_has_bits_[0] & 0x00000008u) != 0;
+  return (_has_bits_[0] & 0x00000010u) != 0;
 }
 inline void Dispatch_plan_response_msg::set_has_dispatch_source() {
-  _has_bits_[0] |= 0x00000008u;
+  _has_bits_[0] |= 0x00000010u;
 }
 inline void Dispatch_plan_response_msg::clear_has_dispatch_source() {
-  _has_bits_[0] &= ~0x00000008u;
+  _has_bits_[0] &= ~0x00000010u;
 }
 inline void Dispatch_plan_response_msg::clear_dispatch_source() {
   dispatch_source_ = 0;
@@ -1370,13 +1372,13 @@ inline void Dispatch_plan_response_msg::set_dispatch_source(::google::protobuf::
 
 // optional int32 dispatch_destination = 5;
 inline bool Dispatch_plan_response_msg::has_dispatch_destination() const {
-  return (_has_bits_[0] & 0x00000010u) != 0;
+  return (_has_bits_[0] & 0x00000020u) != 0;
 }
 inline void Dispatch_plan_response_msg::set_has_dispatch_destination() {
-  _has_bits_[0] |= 0x00000010u;
+  _has_bits_[0] |= 0x00000020u;
 }
 inline void Dispatch_plan_response_msg::clear_has_dispatch_destination() {
-  _has_bits_[0] &= ~0x00000010u;
+  _has_bits_[0] &= ~0x00000020u;
 }
 inline void Dispatch_plan_response_msg::clear_dispatch_destination() {
   dispatch_destination_ = 0;
@@ -1561,16 +1563,16 @@ inline void Dispatch_control_request_msg::set_allocated_command_key(::std::strin
 
 // required .message.Dispatch_task_type dispatch_task_type = 3;
 inline bool Dispatch_control_request_msg::has_dispatch_task_type() const {
-  return (_has_bits_[0] & 0x00000080u) != 0;
+  return (_has_bits_[0] & 0x00000008u) != 0;
 }
 inline void Dispatch_control_request_msg::set_has_dispatch_task_type() {
-  _has_bits_[0] |= 0x00000080u;
+  _has_bits_[0] |= 0x00000008u;
 }
 inline void Dispatch_control_request_msg::clear_has_dispatch_task_type() {
-  _has_bits_[0] &= ~0x00000080u;
+  _has_bits_[0] &= ~0x00000008u;
 }
 inline void Dispatch_control_request_msg::clear_dispatch_task_type() {
-  dispatch_task_type_ = 101;
+  dispatch_task_type_ = 0;
   clear_has_dispatch_task_type();
 }
 inline ::message::Dispatch_task_type Dispatch_control_request_msg::dispatch_task_type() const {
@@ -1611,13 +1613,13 @@ inline void Dispatch_control_request_msg::set_dispatch_device_type(::message::Di
 
 // optional int32 dispatch_source = 5;
 inline bool Dispatch_control_request_msg::has_dispatch_source() const {
-  return (_has_bits_[0] & 0x00000008u) != 0;
+  return (_has_bits_[0] & 0x00000010u) != 0;
 }
 inline void Dispatch_control_request_msg::set_has_dispatch_source() {
-  _has_bits_[0] |= 0x00000008u;
+  _has_bits_[0] |= 0x00000010u;
 }
 inline void Dispatch_control_request_msg::clear_has_dispatch_source() {
-  _has_bits_[0] &= ~0x00000008u;
+  _has_bits_[0] &= ~0x00000010u;
 }
 inline void Dispatch_control_request_msg::clear_dispatch_source() {
   dispatch_source_ = 0;
@@ -1635,13 +1637,13 @@ inline void Dispatch_control_request_msg::set_dispatch_source(::google::protobuf
 
 // optional int32 dispatch_destination = 6;
 inline bool Dispatch_control_request_msg::has_dispatch_destination() const {
-  return (_has_bits_[0] & 0x00000010u) != 0;
+  return (_has_bits_[0] & 0x00000020u) != 0;
 }
 inline void Dispatch_control_request_msg::set_has_dispatch_destination() {
-  _has_bits_[0] |= 0x00000010u;
+  _has_bits_[0] |= 0x00000020u;
 }
 inline void Dispatch_control_request_msg::clear_has_dispatch_destination() {
-  _has_bits_[0] &= ~0x00000010u;
+  _has_bits_[0] &= ~0x00000020u;
 }
 inline void Dispatch_control_request_msg::clear_dispatch_destination() {
   dispatch_destination_ = 0;
@@ -1709,13 +1711,13 @@ inline void Dispatch_control_request_msg::set_allocated_error_manager(::message:
 
 // optional .message.Dispatch_device_target_status dispatch_device_target_status = 8;
 inline bool Dispatch_control_request_msg::has_dispatch_device_target_status() const {
-  return (_has_bits_[0] & 0x00000020u) != 0;
+  return (_has_bits_[0] & 0x00000040u) != 0;
 }
 inline void Dispatch_control_request_msg::set_has_dispatch_device_target_status() {
-  _has_bits_[0] |= 0x00000020u;
+  _has_bits_[0] |= 0x00000040u;
 }
 inline void Dispatch_control_request_msg::clear_has_dispatch_device_target_status() {
-  _has_bits_[0] &= ~0x00000020u;
+  _has_bits_[0] &= ~0x00000040u;
 }
 inline void Dispatch_control_request_msg::clear_dispatch_device_target_status() {
   dispatch_device_target_status_ = 0;
@@ -1734,13 +1736,13 @@ inline void Dispatch_control_request_msg::set_dispatch_device_target_status(::me
 
 // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
 inline bool Dispatch_control_request_msg::has_dispatch_device_task_status() const {
-  return (_has_bits_[0] & 0x00000040u) != 0;
+  return (_has_bits_[0] & 0x00000080u) != 0;
 }
 inline void Dispatch_control_request_msg::set_has_dispatch_device_task_status() {
-  _has_bits_[0] |= 0x00000040u;
+  _has_bits_[0] |= 0x00000080u;
 }
 inline void Dispatch_control_request_msg::clear_has_dispatch_device_task_status() {
-  _has_bits_[0] &= ~0x00000040u;
+  _has_bits_[0] &= ~0x00000080u;
 }
 inline void Dispatch_control_request_msg::clear_dispatch_device_task_status() {
   dispatch_device_task_status_ = 0;
@@ -1876,16 +1878,16 @@ inline void Dispatch_control_response_msg::set_allocated_command_key(::std::stri
 
 // optional .message.Dispatch_task_type dispatch_task_type = 3;
 inline bool Dispatch_control_response_msg::has_dispatch_task_type() const {
-  return (_has_bits_[0] & 0x00000080u) != 0;
+  return (_has_bits_[0] & 0x00000008u) != 0;
 }
 inline void Dispatch_control_response_msg::set_has_dispatch_task_type() {
-  _has_bits_[0] |= 0x00000080u;
+  _has_bits_[0] |= 0x00000008u;
 }
 inline void Dispatch_control_response_msg::clear_has_dispatch_task_type() {
-  _has_bits_[0] &= ~0x00000080u;
+  _has_bits_[0] &= ~0x00000008u;
 }
 inline void Dispatch_control_response_msg::clear_dispatch_task_type() {
-  dispatch_task_type_ = 101;
+  dispatch_task_type_ = 0;
   clear_has_dispatch_task_type();
 }
 inline ::message::Dispatch_task_type Dispatch_control_response_msg::dispatch_task_type() const {
@@ -1926,13 +1928,13 @@ inline void Dispatch_control_response_msg::set_dispatch_device_type(::message::D
 
 // optional int32 dispatch_source = 5;
 inline bool Dispatch_control_response_msg::has_dispatch_source() const {
-  return (_has_bits_[0] & 0x00000008u) != 0;
+  return (_has_bits_[0] & 0x00000010u) != 0;
 }
 inline void Dispatch_control_response_msg::set_has_dispatch_source() {
-  _has_bits_[0] |= 0x00000008u;
+  _has_bits_[0] |= 0x00000010u;
 }
 inline void Dispatch_control_response_msg::clear_has_dispatch_source() {
-  _has_bits_[0] &= ~0x00000008u;
+  _has_bits_[0] &= ~0x00000010u;
 }
 inline void Dispatch_control_response_msg::clear_dispatch_source() {
   dispatch_source_ = 0;
@@ -1950,13 +1952,13 @@ inline void Dispatch_control_response_msg::set_dispatch_source(::google::protobu
 
 // optional int32 dispatch_destination = 6;
 inline bool Dispatch_control_response_msg::has_dispatch_destination() const {
-  return (_has_bits_[0] & 0x00000010u) != 0;
+  return (_has_bits_[0] & 0x00000020u) != 0;
 }
 inline void Dispatch_control_response_msg::set_has_dispatch_destination() {
-  _has_bits_[0] |= 0x00000010u;
+  _has_bits_[0] |= 0x00000020u;
 }
 inline void Dispatch_control_response_msg::clear_has_dispatch_destination() {
-  _has_bits_[0] &= ~0x00000010u;
+  _has_bits_[0] &= ~0x00000020u;
 }
 inline void Dispatch_control_response_msg::clear_dispatch_destination() {
   dispatch_destination_ = 0;
@@ -2024,13 +2026,13 @@ inline void Dispatch_control_response_msg::set_allocated_error_manager(::message
 
 // optional .message.Dispatch_device_target_status dispatch_device_target_status = 8;
 inline bool Dispatch_control_response_msg::has_dispatch_device_target_status() const {
-  return (_has_bits_[0] & 0x00000020u) != 0;
+  return (_has_bits_[0] & 0x00000040u) != 0;
 }
 inline void Dispatch_control_response_msg::set_has_dispatch_device_target_status() {
-  _has_bits_[0] |= 0x00000020u;
+  _has_bits_[0] |= 0x00000040u;
 }
 inline void Dispatch_control_response_msg::clear_has_dispatch_device_target_status() {
-  _has_bits_[0] &= ~0x00000020u;
+  _has_bits_[0] &= ~0x00000040u;
 }
 inline void Dispatch_control_response_msg::clear_dispatch_device_target_status() {
   dispatch_device_target_status_ = 0;
@@ -2049,13 +2051,13 @@ inline void Dispatch_control_response_msg::set_dispatch_device_target_status(::m
 
 // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
 inline bool Dispatch_control_response_msg::has_dispatch_device_task_status() const {
-  return (_has_bits_[0] & 0x00000040u) != 0;
+  return (_has_bits_[0] & 0x00000080u) != 0;
 }
 inline void Dispatch_control_response_msg::set_has_dispatch_device_task_status() {
-  _has_bits_[0] |= 0x00000040u;
+  _has_bits_[0] |= 0x00000080u;
 }
 inline void Dispatch_control_response_msg::clear_has_dispatch_device_task_status() {
-  _has_bits_[0] &= ~0x00000040u;
+  _has_bits_[0] &= ~0x00000080u;
 }
 inline void Dispatch_control_response_msg::clear_dispatch_device_task_status() {
   dispatch_device_task_status_ = 0;

+ 16 - 12
message/dispatch_control.proto

@@ -6,6 +6,8 @@ import "message_base.proto";
 //调度任务的类型
 enum Dispatch_task_type
 {
+    DISPATCH_TASK_TYPE_UNKNOW               = 0;
+
     DISPATCH_PLAN_STORE                     = 101;  //总指令, 存车
     DISPATCH_PLAN_PICKUP                    = 102;  //总指令, 取车
 
@@ -23,6 +25,7 @@ enum Dispatch_task_type
     CARRIER_STORE_CAR_TO_PARKINGSPACE_EX    = 122;   //搬运器把车存到停车位上(例如:小跑车夹车后,搬运器移动到56号停车位,然后小跑车将车存入车位,之后搬运器退回至56车位外面即可)
 
     CARRIER_PICKUP_CAR_FROM_PARKINGSPACE    = 13;   //搬运器从停车位上取车(例如:搬运器移动到56号停车位,然后小跑车将车从车位取出,之后搬运器退回至电梯井)
+    CARRIER_PICKUP_CAR_FROM_PARKINGSPACE_EX = 133;   //搬运器从停车位上取车(例如:搬运器移动到56号停车位,然后小跑车将车从车位取出,之后搬运器退回至56车位外面即可)
     CARRIER_DELIVER_CAR_TO_ROBOT            = 14;   //搬运器把车交付给机器手(例如:搬运器移动到3号入口的上方,小跑车松夹杆,然后等待机器手把车从中跑车上取走)
     CARRIER_MOVE                            = 15;   //搬运器的自由移动(可以提前到2楼来准备接车,或者为了避让就退回至电梯井)(小跑车不进行取车和存车)
 
@@ -45,7 +48,8 @@ enum Dispatch_task_type
     DISPATCH_RESERVED                       = 50;   //预留
 
     //存车顺序  1->11->2->12
-    //取车顺序  13->14->3->15->4
+    //1~6取车顺序  13->14->3->15->4
+    //7取车顺序    13->12
 }
 
 //调度设备的类型
@@ -81,21 +85,21 @@ enum Dispatch_device_target_status
 //调度设备的任务状态
 enum Dispatch_device_task_status
 {
-        E_TASK_CREATED            = 0;      		//任务创建; 发送方
+        E_TASK_CREATED              = 0;      		//任务创建; 发送方
 
-        E_TASK_ISSUE				= 1; 			//任务下发; 发送方
-        E_TASK_SIGNED             = 2;      		//已签收; 接收方
-        E_TASK_WORKING            = 3;      		//处理中; 接收方
-        E_TASK_OVER               = 4;   			//已结束; 接收方
-        E_TASK_STOP				= 5; 			//任务暂停; 接收方
+        E_TASK_ISSUE		        = 1; 			//任务下发; 发送方
+        E_TASK_SIGNED               = 2;      		//已签收; 接收方
+        E_TASK_WORKING              = 3;      		//处理中; 接收方
+        E_TASK_OVER                 = 4;   			//已结束; 接收方
+        E_TASK_STOP		            = 5; 			//任务暂停; 接收方
 
-    	E_TASK_ERROR              = 11;			//任务错误; 接收方
+    	E_TASK_ERROR                = 11;			//任务错误; 接收方
 
     	E_TASK_CANCEL				= 21;			//任务取消; 发送方
-    	E_TASK_DEAD               = 22;           //任务死亡; 接收方
+    	E_TASK_DEAD                 = 22;           //任务死亡; 接收方
 
-    	E_TASK_WITHDRAW			= 31; 			//任务收回; 发送方
-    	E_TASK_FREE				= 32; 			//任务释放; 接收方
+    	E_TASK_WITHDRAW		        = 31; 			//任务收回; 发送方
+    	E_TASK_FREE			        = 32; 			//任务释放; 接收方
 
 
      //发送方 写 E_TASK_CREATED
@@ -106,7 +110,7 @@ enum Dispatch_device_task_status
 
 
 
-//调度总规划的请求(用于启动整个调度算法)(调度管理->调度算法)
+//调度总规划的请求, 用于启动整个调度算法(调度管理->调度算法)
 message Dispatch_plan_request_msg
 {
     required Base_info                  base_info=1;                     //消息类型

+ 2 - 2
message/dispatch_message.proto

@@ -151,7 +151,7 @@ message Dispatch_terminal_status_msg
 }
 
 
-//执行搬运请求
+//执行搬运请求(主控->调度管理)
 message Dispatch_request_msg
 {
     required Base_info                  base_info=1;                            //消息类型
@@ -163,7 +163,7 @@ message Dispatch_request_msg
     optional Locate_information         locate_information=6;                   //汽车测量信息, 只有停车时有数据, 取车时没有数据.
 }
 
-//搬运动作执行完成后反馈结果
+//搬运动作执行完成后反馈结果(调度管理->主控)
 message Dispatch_response_msg
 {
     required Base_info                  base_info=1;                    //消息类型

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 381 - 298
message/message_base.pb.cc


+ 198 - 125
message/message_base.pb.h

@@ -108,6 +108,7 @@ enum Message_type {
   eParkspace_force_update_response_msg = 57,
   eParkspace_confirm_alloc_request_msg = 58,
   eParkspace_confirm_alloc_response_msg = 59,
+  eParkspace_allocation_data_msg = 60,
   eStore_command_request_msg = 65,
   eStore_command_response_msg = 66,
   ePickup_command_request_msg = 67,
@@ -206,14 +207,15 @@ inline bool Error_level_Parse(
     Error_level_descriptor(), name, value);
 }
 enum Parkspace_status {
-  eParkspace_empty = 0,
-  eParkspace_occupied = 1,
-  eParkspace_reserved = 2,
-  eParkspace_locked = 3,
-  eParkspace_error = 4
+  eParkspace_status_unknow = 0,
+  eParkspace_empty = 1,
+  eParkspace_occupied = 2,
+  eParkspace_reserved = 3,
+  eParkspace_locked = 4,
+  eParkspace_error = 5
 };
 bool Parkspace_status_IsValid(int value);
-const Parkspace_status Parkspace_status_MIN = eParkspace_empty;
+const Parkspace_status Parkspace_status_MIN = eParkspace_status_unknow;
 const Parkspace_status Parkspace_status_MAX = eParkspace_error;
 const int Parkspace_status_ARRAYSIZE = Parkspace_status_MAX + 1;
 
@@ -228,11 +230,12 @@ inline bool Parkspace_status_Parse(
     Parkspace_status_descriptor(), name, value);
 }
 enum Direction {
+  eDirection_unknow = 0,
   eForward = 1,
   eBackward = 2
 };
 bool Direction_IsValid(int value);
-const Direction Direction_MIN = eForward;
+const Direction Direction_MIN = eDirection_unknow;
 const Direction Direction_MAX = eBackward;
 const int Direction_ARRAYSIZE = Direction_MAX + 1;
 
@@ -247,13 +250,14 @@ inline bool Direction_Parse(
     Direction_descriptor(), name, value);
 }
 enum Parkspace_path {
+  UNKNOW_PATH = 0,
   OPTIMAL_PATH = 1,
   LEFT_PATH = 2,
   RIGHT_PATH = 3,
   TEMPORARY_CACHE_PATH = 4
 };
 bool Parkspace_path_IsValid(int value);
-const Parkspace_path Parkspace_path_MIN = OPTIMAL_PATH;
+const Parkspace_path Parkspace_path_MIN = UNKNOW_PATH;
 const Parkspace_path Parkspace_path_MAX = TEMPORARY_CACHE_PATH;
 const int Parkspace_path_ARRAYSIZE = Parkspace_path_MAX + 1;
 
@@ -268,12 +272,13 @@ inline bool Parkspace_path_Parse(
     Parkspace_path_descriptor(), name, value);
 }
 enum Parkspace_type {
+  UNKNOW_PARKSPACE_TYPE = 0,
   MIN_PARKINGSPACE = 1,
   MID_PARKINGSPACE = 2,
   BIG_PARKINGSPACE = 3
 };
 bool Parkspace_type_IsValid(int value);
-const Parkspace_type Parkspace_type_MIN = MIN_PARKINGSPACE;
+const Parkspace_type Parkspace_type_MIN = UNKNOW_PARKSPACE_TYPE;
 const Parkspace_type Parkspace_type_MAX = BIG_PARKINGSPACE;
 const int Parkspace_type_ARRAYSIZE = Parkspace_type_MAX + 1;
 
@@ -433,28 +438,28 @@ class Base_info : public ::google::protobuf::Message /* @@protoc_insertion_point
 
   // accessors -------------------------------------------------------
 
-  // required .message.Message_type msg_type = 1;
+  // required .message.Message_type msg_type = 1 [default = eBase_msg];
   bool has_msg_type() const;
   void clear_msg_type();
   static const int kMsgTypeFieldNumber = 1;
   ::message::Message_type msg_type() const;
   void set_msg_type(::message::Message_type value);
 
-  // optional int32 timeout_ms = 2;
+  // optional int32 timeout_ms = 2 [default = 0];
   bool has_timeout_ms() const;
   void clear_timeout_ms();
   static const int kTimeoutMsFieldNumber = 2;
   ::google::protobuf::int32 timeout_ms() const;
   void set_timeout_ms(::google::protobuf::int32 value);
 
-  // required .message.Communicator sender = 3;
+  // required .message.Communicator sender = 3 [default = eEmpty];
   bool has_sender() const;
   void clear_sender();
   static const int kSenderFieldNumber = 3;
   ::message::Communicator sender() const;
   void set_sender(::message::Communicator value);
 
-  // required .message.Communicator receiver = 4;
+  // required .message.Communicator receiver = 4 [default = eEmpty];
   bool has_receiver() const;
   void clear_receiver();
   static const int kReceiverFieldNumber = 4;
@@ -688,7 +693,7 @@ class Error_manager : public ::google::protobuf::Message /* @@protoc_insertion_p
 
   // accessors -------------------------------------------------------
 
-  // optional string error_description = 3;
+  // optional string error_description = 3 [default = ""];
   bool has_error_description() const;
   void clear_error_description();
   static const int kErrorDescriptionFieldNumber = 3;
@@ -703,14 +708,14 @@ class Error_manager : public ::google::protobuf::Message /* @@protoc_insertion_p
   ::std::string* release_error_description();
   void set_allocated_error_description(::std::string* error_description);
 
-  // required int32 error_code = 1;
+  // required int32 error_code = 1 [default = 0];
   bool has_error_code() const;
   void clear_error_code();
   static const int kErrorCodeFieldNumber = 1;
   ::google::protobuf::int32 error_code() const;
   void set_error_code(::google::protobuf::int32 value);
 
-  // optional .message.Error_level error_level = 2;
+  // optional .message.Error_level error_level = 2 [default = NORMAL];
   bool has_error_level() const;
   void clear_error_level();
   static const int kErrorLevelFieldNumber = 2;
@@ -826,70 +831,70 @@ class Locate_information : public ::google::protobuf::Message /* @@protoc_insert
 
   // accessors -------------------------------------------------------
 
-  // optional float locate_x = 1;
+  // optional float locate_x = 1 [default = 0];
   bool has_locate_x() const;
   void clear_locate_x();
   static const int kLocateXFieldNumber = 1;
   float locate_x() const;
   void set_locate_x(float value);
 
-  // optional float locate_y = 2;
+  // optional float locate_y = 2 [default = 0];
   bool has_locate_y() const;
   void clear_locate_y();
   static const int kLocateYFieldNumber = 2;
   float locate_y() const;
   void set_locate_y(float value);
 
-  // optional float locate_angle = 3;
+  // optional float locate_angle = 3 [default = 0];
   bool has_locate_angle() const;
   void clear_locate_angle();
   static const int kLocateAngleFieldNumber = 3;
   float locate_angle() const;
   void set_locate_angle(float value);
 
-  // optional float locate_length = 4;
+  // optional float locate_length = 4 [default = 0];
   bool has_locate_length() const;
   void clear_locate_length();
   static const int kLocateLengthFieldNumber = 4;
   float locate_length() const;
   void set_locate_length(float value);
 
-  // optional float locate_width = 5;
+  // optional float locate_width = 5 [default = 0];
   bool has_locate_width() const;
   void clear_locate_width();
   static const int kLocateWidthFieldNumber = 5;
   float locate_width() const;
   void set_locate_width(float value);
 
-  // optional float locate_height = 6;
+  // optional float locate_height = 6 [default = 0];
   bool has_locate_height() const;
   void clear_locate_height();
   static const int kLocateHeightFieldNumber = 6;
   float locate_height() const;
   void set_locate_height(float value);
 
-  // optional float locate_wheel_base = 7;
+  // optional float locate_wheel_base = 7 [default = 0];
   bool has_locate_wheel_base() const;
   void clear_locate_wheel_base();
   static const int kLocateWheelBaseFieldNumber = 7;
   float locate_wheel_base() const;
   void set_locate_wheel_base(float value);
 
-  // optional float locate_wheel_width = 8;
+  // optional float locate_wheel_width = 8 [default = 0];
   bool has_locate_wheel_width() const;
   void clear_locate_wheel_width();
   static const int kLocateWheelWidthFieldNumber = 8;
   float locate_wheel_width() const;
   void set_locate_wheel_width(float value);
 
-  // optional bool locate_correct = 9;
+  // optional bool locate_correct = 9 [default = false];
   bool has_locate_correct() const;
   void clear_locate_correct();
   static const int kLocateCorrectFieldNumber = 9;
   bool locate_correct() const;
   void set_locate_correct(bool value);
 
-  // optional float locate_front_theta = 10;
+  // optional float locate_front_theta = 10 [default = 0];
   bool has_locate_front_theta() const;
   void clear_locate_front_theta();
   static const int kLocateFrontThetaFieldNumber = 10;
@@ -1026,7 +1031,7 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
 
   // accessors -------------------------------------------------------
 
-  // optional string license = 4;
+  // optional string license = 4 [default = ""];
   bool has_license() const;
   void clear_license();
   static const int kLicenseFieldNumber = 4;
@@ -1041,27 +1046,41 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
   ::std::string* release_license();
   void set_allocated_license(::std::string* license);
 
-  // optional float car_length = 1;
+  // optional float car_length = 1 [default = 0];
   bool has_car_length() const;
   void clear_car_length();
   static const int kCarLengthFieldNumber = 1;
   float car_length() const;
   void set_car_length(float value);
 
-  // optional float car_width = 2;
+  // optional float car_width = 2 [default = 0];
   bool has_car_width() const;
   void clear_car_width();
   static const int kCarWidthFieldNumber = 2;
   float car_width() const;
   void set_car_width(float value);
 
-  // optional float car_height = 3;
+  // optional float car_height = 3 [default = 0];
   bool has_car_height() const;
   void clear_car_height();
   static const int kCarHeightFieldNumber = 3;
   float car_height() const;
   void set_car_height(float value);
 
+  // optional float car_wheel_base = 5 [default = 0];
+  bool has_car_wheel_base() const;
+  void clear_car_wheel_base();
+  static const int kCarWheelBaseFieldNumber = 5;
+  float car_wheel_base() const;
+  void set_car_wheel_base(float value);
+
+  // optional float car_wheel_width = 6 [default = 0];
+  bool has_car_wheel_width() const;
+  void clear_car_wheel_width();
+  static const int kCarWheelWidthFieldNumber = 6;
+  float car_wheel_width() const;
+  void set_car_wheel_width(float value);
+
   // @@protoc_insertion_point(class_scope:message.Car_info)
  private:
   void set_has_car_length();
@@ -1072,6 +1091,10 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
   void clear_has_car_height();
   void set_has_license();
   void clear_has_license();
+  void set_has_car_wheel_base();
+  void clear_has_car_wheel_base();
+  void set_has_car_wheel_width();
+  void clear_has_car_wheel_width();
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
@@ -1080,6 +1103,8 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
   float car_length_;
   float car_width_;
   float car_height_;
+  float car_wheel_base_;
+  float car_wheel_width_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
   friend void ::protobuf_message_5fbase_2eproto::InitDefaultsCar_infoImpl();
 };
@@ -1174,7 +1199,7 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
 
   // accessors -------------------------------------------------------
 
-  // optional string entry_time = 10;
+  // optional string entry_time = 10 [default = ""];
   bool has_entry_time() const;
   void clear_entry_time();
   static const int kEntryTimeFieldNumber = 10;
@@ -1189,7 +1214,7 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
   ::std::string* release_entry_time();
   void set_allocated_entry_time(::std::string* entry_time);
 
-  // optional string leave_time = 11;
+  // optional string leave_time = 11 [default = ""];
   bool has_leave_time() const;
   void clear_leave_time();
   static const int kLeaveTimeFieldNumber = 11;
@@ -1213,90 +1238,90 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
   ::message::Car_info* mutable_car_info();
   void set_allocated_car_info(::message::Car_info* car_info);
 
-  // optional int32 parkspace_id = 1;
+  // optional int32 parkspace_id = 1 [default = 0];
   bool has_parkspace_id() const;
   void clear_parkspace_id();
   static const int kParkspaceIdFieldNumber = 1;
   ::google::protobuf::int32 parkspace_id() const;
   void set_parkspace_id(::google::protobuf::int32 value);
 
-  // optional int32 index = 2;
+  // optional int32 index = 2 [default = 0];
   bool has_index() const;
   void clear_index();
   static const int kIndexFieldNumber = 2;
   ::google::protobuf::int32 index() const;
   void set_index(::google::protobuf::int32 value);
 
-  // optional int32 floor = 4;
+  // optional .message.Direction direction = 3 [default = eDirection_unknow];
+  bool has_direction() const;
+  void clear_direction();
+  static const int kDirectionFieldNumber = 3;
+  ::message::Direction direction() const;
+  void set_direction(::message::Direction value);
+
+  // optional int32 floor = 4 [default = 0];
   bool has_floor() const;
   void clear_floor();
   static const int kFloorFieldNumber = 4;
   ::google::protobuf::int32 floor() const;
   void set_floor(::google::protobuf::int32 value);
 
-  // optional float length = 5;
+  // optional float length = 5 [default = 0];
   bool has_length() const;
   void clear_length();
   static const int kLengthFieldNumber = 5;
   float length() const;
   void set_length(float value);
 
-  // optional float width = 6;
+  // optional float width = 6 [default = 0];
   bool has_width() const;
   void clear_width();
   static const int kWidthFieldNumber = 6;
   float width() const;
   void set_width(float value);
 
-  // optional float height = 7;
+  // optional float height = 7 [default = 0];
   bool has_height() const;
   void clear_height();
   static const int kHeightFieldNumber = 7;
   float height() const;
   void set_height(float value);
 
-  // optional .message.Parkspace_status parkspace_status = 8;
+  // optional .message.Parkspace_status parkspace_status = 8 [default = eParkspace_status_unknow];
   bool has_parkspace_status() const;
   void clear_parkspace_status();
   static const int kParkspaceStatusFieldNumber = 8;
   ::message::Parkspace_status parkspace_status() const;
   void set_parkspace_status(::message::Parkspace_status value);
 
-  // optional int32 block_id = 12;
+  // optional int32 block_id = 12 [default = 0];
   bool has_block_id() const;
   void clear_block_id();
   static const int kBlockIdFieldNumber = 12;
   ::google::protobuf::int32 block_id() const;
   void set_block_id(::google::protobuf::int32 value);
 
-  // optional float path_estimate_time = 14;
+  // optional .message.Parkspace_path parkspace_path = 13 [default = UNKNOW_PATH];
+  bool has_parkspace_path() const;
+  void clear_parkspace_path();
+  static const int kParkspacePathFieldNumber = 13;
+  ::message::Parkspace_path parkspace_path() const;
+  void set_parkspace_path(::message::Parkspace_path value);
+
+  // optional float path_estimate_time = 14 [default = 0];
   bool has_path_estimate_time() const;
   void clear_path_estimate_time();
   static const int kPathEstimateTimeFieldNumber = 14;
   float path_estimate_time() const;
   void set_path_estimate_time(float value);
 
-  // optional .message.Parkspace_status parkspace_status_target = 15;
+  // optional .message.Parkspace_status parkspace_status_target = 15 [default = eParkspace_status_unknow];
   bool has_parkspace_status_target() const;
   void clear_parkspace_status_target();
   static const int kParkspaceStatusTargetFieldNumber = 15;
   ::message::Parkspace_status parkspace_status_target() const;
   void set_parkspace_status_target(::message::Parkspace_status value);
 
-  // optional .message.Direction direction = 3;
-  bool has_direction() const;
-  void clear_direction();
-  static const int kDirectionFieldNumber = 3;
-  ::message::Direction direction() const;
-  void set_direction(::message::Direction value);
-
-  // optional .message.Parkspace_path parkspace_path = 13;
-  bool has_parkspace_path() const;
-  void clear_parkspace_path();
-  static const int kParkspacePathFieldNumber = 13;
-  ::message::Parkspace_path parkspace_path() const;
-  void set_parkspace_path(::message::Parkspace_path value);
-
   // @@protoc_insertion_point(class_scope:message.Parkspace_info)
  private:
   void set_has_parkspace_id();
@@ -1338,16 +1363,16 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
   ::message::Car_info* car_info_;
   ::google::protobuf::int32 parkspace_id_;
   ::google::protobuf::int32 index_;
+  int direction_;
   ::google::protobuf::int32 floor_;
   float length_;
   float width_;
   float height_;
   int parkspace_status_;
   ::google::protobuf::int32 block_id_;
+  int parkspace_path_;
   float path_estimate_time_;
   int parkspace_status_target_;
-  int direction_;
-  int parkspace_path_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
   friend void ::protobuf_message_5fbase_2eproto::InitDefaultsParkspace_infoImpl();
 };
@@ -1362,7 +1387,7 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
 #endif  // __GNUC__
 // Base_info
 
-// required .message.Message_type msg_type = 1;
+// required .message.Message_type msg_type = 1 [default = eBase_msg];
 inline bool Base_info::has_msg_type() const {
   return (_has_bits_[0] & 0x00000001u) != 0;
 }
@@ -1387,7 +1412,7 @@ inline void Base_info::set_msg_type(::message::Message_type value) {
   // @@protoc_insertion_point(field_set:message.Base_info.msg_type)
 }
 
-// optional int32 timeout_ms = 2;
+// optional int32 timeout_ms = 2 [default = 0];
 inline bool Base_info::has_timeout_ms() const {
   return (_has_bits_[0] & 0x00000002u) != 0;
 }
@@ -1411,7 +1436,7 @@ inline void Base_info::set_timeout_ms(::google::protobuf::int32 value) {
   // @@protoc_insertion_point(field_set:message.Base_info.timeout_ms)
 }
 
-// required .message.Communicator sender = 3;
+// required .message.Communicator sender = 3 [default = eEmpty];
 inline bool Base_info::has_sender() const {
   return (_has_bits_[0] & 0x00000004u) != 0;
 }
@@ -1436,7 +1461,7 @@ inline void Base_info::set_sender(::message::Communicator value) {
   // @@protoc_insertion_point(field_set:message.Base_info.sender)
 }
 
-// required .message.Communicator receiver = 4;
+// required .message.Communicator receiver = 4 [default = eEmpty];
 inline bool Base_info::has_receiver() const {
   return (_has_bits_[0] & 0x00000008u) != 0;
 }
@@ -1523,7 +1548,7 @@ inline void Base_msg::set_allocated_base_info(::message::Base_info* base_info) {
 
 // Error_manager
 
-// required int32 error_code = 1;
+// required int32 error_code = 1 [default = 0];
 inline bool Error_manager::has_error_code() const {
   return (_has_bits_[0] & 0x00000002u) != 0;
 }
@@ -1547,7 +1572,7 @@ inline void Error_manager::set_error_code(::google::protobuf::int32 value) {
   // @@protoc_insertion_point(field_set:message.Error_manager.error_code)
 }
 
-// optional .message.Error_level error_level = 2;
+// optional .message.Error_level error_level = 2 [default = NORMAL];
 inline bool Error_manager::has_error_level() const {
   return (_has_bits_[0] & 0x00000004u) != 0;
 }
@@ -1572,7 +1597,7 @@ inline void Error_manager::set_error_level(::message::Error_level value) {
   // @@protoc_insertion_point(field_set:message.Error_manager.error_level)
 }
 
-// optional string error_description = 3;
+// optional string error_description = 3 [default = ""];
 inline bool Error_manager::has_error_description() const {
   return (_has_bits_[0] & 0x00000001u) != 0;
 }
@@ -1639,7 +1664,7 @@ inline void Error_manager::set_allocated_error_description(::std::string* error_
 
 // Locate_information
 
-// optional float locate_x = 1;
+// optional float locate_x = 1 [default = 0];
 inline bool Locate_information::has_locate_x() const {
   return (_has_bits_[0] & 0x00000001u) != 0;
 }
@@ -1663,7 +1688,7 @@ inline void Locate_information::set_locate_x(float value) {
   // @@protoc_insertion_point(field_set:message.Locate_information.locate_x)
 }
 
-// optional float locate_y = 2;
+// optional float locate_y = 2 [default = 0];
 inline bool Locate_information::has_locate_y() const {
   return (_has_bits_[0] & 0x00000002u) != 0;
 }
@@ -1687,7 +1712,7 @@ inline void Locate_information::set_locate_y(float value) {
   // @@protoc_insertion_point(field_set:message.Locate_information.locate_y)
 }
 
-// optional float locate_angle = 3;
+// optional float locate_angle = 3 [default = 0];
 inline bool Locate_information::has_locate_angle() const {
   return (_has_bits_[0] & 0x00000004u) != 0;
 }
@@ -1711,7 +1736,7 @@ inline void Locate_information::set_locate_angle(float value) {
   // @@protoc_insertion_point(field_set:message.Locate_information.locate_angle)
 }
 
-// optional float locate_length = 4;
+// optional float locate_length = 4 [default = 0];
 inline bool Locate_information::has_locate_length() const {
   return (_has_bits_[0] & 0x00000008u) != 0;
 }
@@ -1735,7 +1760,7 @@ inline void Locate_information::set_locate_length(float value) {
   // @@protoc_insertion_point(field_set:message.Locate_information.locate_length)
 }
 
-// optional float locate_width = 5;
+// optional float locate_width = 5 [default = 0];
 inline bool Locate_information::has_locate_width() const {
   return (_has_bits_[0] & 0x00000010u) != 0;
 }
@@ -1759,7 +1784,7 @@ inline void Locate_information::set_locate_width(float value) {
   // @@protoc_insertion_point(field_set:message.Locate_information.locate_width)
 }
 
-// optional float locate_height = 6;
+// optional float locate_height = 6 [default = 0];
 inline bool Locate_information::has_locate_height() const {
   return (_has_bits_[0] & 0x00000020u) != 0;
 }
@@ -1783,7 +1808,7 @@ inline void Locate_information::set_locate_height(float value) {
   // @@protoc_insertion_point(field_set:message.Locate_information.locate_height)
 }
 
-// optional float locate_wheel_base = 7;
+// optional float locate_wheel_base = 7 [default = 0];
 inline bool Locate_information::has_locate_wheel_base() const {
   return (_has_bits_[0] & 0x00000040u) != 0;
 }
@@ -1807,7 +1832,7 @@ inline void Locate_information::set_locate_wheel_base(float value) {
   // @@protoc_insertion_point(field_set:message.Locate_information.locate_wheel_base)
 }
 
-// optional float locate_wheel_width = 8;
+// optional float locate_wheel_width = 8 [default = 0];
 inline bool Locate_information::has_locate_wheel_width() const {
   return (_has_bits_[0] & 0x00000080u) != 0;
 }
@@ -1831,7 +1856,7 @@ inline void Locate_information::set_locate_wheel_width(float value) {
   // @@protoc_insertion_point(field_set:message.Locate_information.locate_wheel_width)
 }
 
-// optional bool locate_correct = 9;
+// optional bool locate_correct = 9 [default = false];
 inline bool Locate_information::has_locate_correct() const {
   return (_has_bits_[0] & 0x00000100u) != 0;
 }
@@ -1855,7 +1880,7 @@ inline void Locate_information::set_locate_correct(bool value) {
   // @@protoc_insertion_point(field_set:message.Locate_information.locate_correct)
 }
 
-// optional float locate_front_theta = 10;
+// optional float locate_front_theta = 10 [default = 0];
 inline bool Locate_information::has_locate_front_theta() const {
   return (_has_bits_[0] & 0x00000200u) != 0;
 }
@@ -1883,7 +1908,7 @@ inline void Locate_information::set_locate_front_theta(float value) {
 
 // Car_info
 
-// optional float car_length = 1;
+// optional float car_length = 1 [default = 0];
 inline bool Car_info::has_car_length() const {
   return (_has_bits_[0] & 0x00000002u) != 0;
 }
@@ -1907,7 +1932,7 @@ inline void Car_info::set_car_length(float value) {
   // @@protoc_insertion_point(field_set:message.Car_info.car_length)
 }
 
-// optional float car_width = 2;
+// optional float car_width = 2 [default = 0];
 inline bool Car_info::has_car_width() const {
   return (_has_bits_[0] & 0x00000004u) != 0;
 }
@@ -1931,7 +1956,7 @@ inline void Car_info::set_car_width(float value) {
   // @@protoc_insertion_point(field_set:message.Car_info.car_width)
 }
 
-// optional float car_height = 3;
+// optional float car_height = 3 [default = 0];
 inline bool Car_info::has_car_height() const {
   return (_has_bits_[0] & 0x00000008u) != 0;
 }
@@ -1955,7 +1980,7 @@ inline void Car_info::set_car_height(float value) {
   // @@protoc_insertion_point(field_set:message.Car_info.car_height)
 }
 
-// optional string license = 4;
+// optional string license = 4 [default = ""];
 inline bool Car_info::has_license() const {
   return (_has_bits_[0] & 0x00000001u) != 0;
 }
@@ -2018,11 +2043,59 @@ inline void Car_info::set_allocated_license(::std::string* license) {
   // @@protoc_insertion_point(field_set_allocated:message.Car_info.license)
 }
 
+// optional float car_wheel_base = 5 [default = 0];
+inline bool Car_info::has_car_wheel_base() const {
+  return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void Car_info::set_has_car_wheel_base() {
+  _has_bits_[0] |= 0x00000010u;
+}
+inline void Car_info::clear_has_car_wheel_base() {
+  _has_bits_[0] &= ~0x00000010u;
+}
+inline void Car_info::clear_car_wheel_base() {
+  car_wheel_base_ = 0;
+  clear_has_car_wheel_base();
+}
+inline float Car_info::car_wheel_base() const {
+  // @@protoc_insertion_point(field_get:message.Car_info.car_wheel_base)
+  return car_wheel_base_;
+}
+inline void Car_info::set_car_wheel_base(float value) {
+  set_has_car_wheel_base();
+  car_wheel_base_ = value;
+  // @@protoc_insertion_point(field_set:message.Car_info.car_wheel_base)
+}
+
+// optional float car_wheel_width = 6 [default = 0];
+inline bool Car_info::has_car_wheel_width() const {
+  return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void Car_info::set_has_car_wheel_width() {
+  _has_bits_[0] |= 0x00000020u;
+}
+inline void Car_info::clear_has_car_wheel_width() {
+  _has_bits_[0] &= ~0x00000020u;
+}
+inline void Car_info::clear_car_wheel_width() {
+  car_wheel_width_ = 0;
+  clear_has_car_wheel_width();
+}
+inline float Car_info::car_wheel_width() const {
+  // @@protoc_insertion_point(field_get:message.Car_info.car_wheel_width)
+  return car_wheel_width_;
+}
+inline void Car_info::set_car_wheel_width(float value) {
+  set_has_car_wheel_width();
+  car_wheel_width_ = value;
+  // @@protoc_insertion_point(field_set:message.Car_info.car_wheel_width)
+}
+
 // -------------------------------------------------------------------
 
 // Parkspace_info
 
-// optional int32 parkspace_id = 1;
+// optional int32 parkspace_id = 1 [default = 0];
 inline bool Parkspace_info::has_parkspace_id() const {
   return (_has_bits_[0] & 0x00000008u) != 0;
 }
@@ -2046,7 +2119,7 @@ inline void Parkspace_info::set_parkspace_id(::google::protobuf::int32 value) {
   // @@protoc_insertion_point(field_set:message.Parkspace_info.parkspace_id)
 }
 
-// optional int32 index = 2;
+// optional int32 index = 2 [default = 0];
 inline bool Parkspace_info::has_index() const {
   return (_has_bits_[0] & 0x00000010u) != 0;
 }
@@ -2070,18 +2143,18 @@ inline void Parkspace_info::set_index(::google::protobuf::int32 value) {
   // @@protoc_insertion_point(field_set:message.Parkspace_info.index)
 }
 
-// optional .message.Direction direction = 3;
+// optional .message.Direction direction = 3 [default = eDirection_unknow];
 inline bool Parkspace_info::has_direction() const {
-  return (_has_bits_[0] & 0x00002000u) != 0;
+  return (_has_bits_[0] & 0x00000020u) != 0;
 }
 inline void Parkspace_info::set_has_direction() {
-  _has_bits_[0] |= 0x00002000u;
+  _has_bits_[0] |= 0x00000020u;
 }
 inline void Parkspace_info::clear_has_direction() {
-  _has_bits_[0] &= ~0x00002000u;
+  _has_bits_[0] &= ~0x00000020u;
 }
 inline void Parkspace_info::clear_direction() {
-  direction_ = 1;
+  direction_ = 0;
   clear_has_direction();
 }
 inline ::message::Direction Parkspace_info::direction() const {
@@ -2095,15 +2168,15 @@ inline void Parkspace_info::set_direction(::message::Direction value) {
   // @@protoc_insertion_point(field_set:message.Parkspace_info.direction)
 }
 
-// optional int32 floor = 4;
+// optional int32 floor = 4 [default = 0];
 inline bool Parkspace_info::has_floor() const {
-  return (_has_bits_[0] & 0x00000020u) != 0;
+  return (_has_bits_[0] & 0x00000040u) != 0;
 }
 inline void Parkspace_info::set_has_floor() {
-  _has_bits_[0] |= 0x00000020u;
+  _has_bits_[0] |= 0x00000040u;
 }
 inline void Parkspace_info::clear_has_floor() {
-  _has_bits_[0] &= ~0x00000020u;
+  _has_bits_[0] &= ~0x00000040u;
 }
 inline void Parkspace_info::clear_floor() {
   floor_ = 0;
@@ -2119,15 +2192,15 @@ inline void Parkspace_info::set_floor(::google::protobuf::int32 value) {
   // @@protoc_insertion_point(field_set:message.Parkspace_info.floor)
 }
 
-// optional float length = 5;
+// optional float length = 5 [default = 0];
 inline bool Parkspace_info::has_length() const {
-  return (_has_bits_[0] & 0x00000040u) != 0;
+  return (_has_bits_[0] & 0x00000080u) != 0;
 }
 inline void Parkspace_info::set_has_length() {
-  _has_bits_[0] |= 0x00000040u;
+  _has_bits_[0] |= 0x00000080u;
 }
 inline void Parkspace_info::clear_has_length() {
-  _has_bits_[0] &= ~0x00000040u;
+  _has_bits_[0] &= ~0x00000080u;
 }
 inline void Parkspace_info::clear_length() {
   length_ = 0;
@@ -2143,15 +2216,15 @@ inline void Parkspace_info::set_length(float value) {
   // @@protoc_insertion_point(field_set:message.Parkspace_info.length)
 }
 
-// optional float width = 6;
+// optional float width = 6 [default = 0];
 inline bool Parkspace_info::has_width() const {
-  return (_has_bits_[0] & 0x00000080u) != 0;
+  return (_has_bits_[0] & 0x00000100u) != 0;
 }
 inline void Parkspace_info::set_has_width() {
-  _has_bits_[0] |= 0x00000080u;
+  _has_bits_[0] |= 0x00000100u;
 }
 inline void Parkspace_info::clear_has_width() {
-  _has_bits_[0] &= ~0x00000080u;
+  _has_bits_[0] &= ~0x00000100u;
 }
 inline void Parkspace_info::clear_width() {
   width_ = 0;
@@ -2167,15 +2240,15 @@ inline void Parkspace_info::set_width(float value) {
   // @@protoc_insertion_point(field_set:message.Parkspace_info.width)
 }
 
-// optional float height = 7;
+// optional float height = 7 [default = 0];
 inline bool Parkspace_info::has_height() const {
-  return (_has_bits_[0] & 0x00000100u) != 0;
+  return (_has_bits_[0] & 0x00000200u) != 0;
 }
 inline void Parkspace_info::set_has_height() {
-  _has_bits_[0] |= 0x00000100u;
+  _has_bits_[0] |= 0x00000200u;
 }
 inline void Parkspace_info::clear_has_height() {
-  _has_bits_[0] &= ~0x00000100u;
+  _has_bits_[0] &= ~0x00000200u;
 }
 inline void Parkspace_info::clear_height() {
   height_ = 0;
@@ -2191,15 +2264,15 @@ inline void Parkspace_info::set_height(float value) {
   // @@protoc_insertion_point(field_set:message.Parkspace_info.height)
 }
 
-// optional .message.Parkspace_status parkspace_status = 8;
+// optional .message.Parkspace_status parkspace_status = 8 [default = eParkspace_status_unknow];
 inline bool Parkspace_info::has_parkspace_status() const {
-  return (_has_bits_[0] & 0x00000200u) != 0;
+  return (_has_bits_[0] & 0x00000400u) != 0;
 }
 inline void Parkspace_info::set_has_parkspace_status() {
-  _has_bits_[0] |= 0x00000200u;
+  _has_bits_[0] |= 0x00000400u;
 }
 inline void Parkspace_info::clear_has_parkspace_status() {
-  _has_bits_[0] &= ~0x00000200u;
+  _has_bits_[0] &= ~0x00000400u;
 }
 inline void Parkspace_info::clear_parkspace_status() {
   parkspace_status_ = 0;
@@ -2270,7 +2343,7 @@ inline void Parkspace_info::set_allocated_car_info(::message::Car_info* car_info
   // @@protoc_insertion_point(field_set_allocated:message.Parkspace_info.car_info)
 }
 
-// optional string entry_time = 10;
+// optional string entry_time = 10 [default = ""];
 inline bool Parkspace_info::has_entry_time() const {
   return (_has_bits_[0] & 0x00000001u) != 0;
 }
@@ -2333,7 +2406,7 @@ inline void Parkspace_info::set_allocated_entry_time(::std::string* entry_time)
   // @@protoc_insertion_point(field_set_allocated:message.Parkspace_info.entry_time)
 }
 
-// optional string leave_time = 11;
+// optional string leave_time = 11 [default = ""];
 inline bool Parkspace_info::has_leave_time() const {
   return (_has_bits_[0] & 0x00000002u) != 0;
 }
@@ -2396,15 +2469,15 @@ inline void Parkspace_info::set_allocated_leave_time(::std::string* leave_time)
   // @@protoc_insertion_point(field_set_allocated:message.Parkspace_info.leave_time)
 }
 
-// optional int32 block_id = 12;
+// optional int32 block_id = 12 [default = 0];
 inline bool Parkspace_info::has_block_id() const {
-  return (_has_bits_[0] & 0x00000400u) != 0;
+  return (_has_bits_[0] & 0x00000800u) != 0;
 }
 inline void Parkspace_info::set_has_block_id() {
-  _has_bits_[0] |= 0x00000400u;
+  _has_bits_[0] |= 0x00000800u;
 }
 inline void Parkspace_info::clear_has_block_id() {
-  _has_bits_[0] &= ~0x00000400u;
+  _has_bits_[0] &= ~0x00000800u;
 }
 inline void Parkspace_info::clear_block_id() {
   block_id_ = 0;
@@ -2420,18 +2493,18 @@ inline void Parkspace_info::set_block_id(::google::protobuf::int32 value) {
   // @@protoc_insertion_point(field_set:message.Parkspace_info.block_id)
 }
 
-// optional .message.Parkspace_path parkspace_path = 13;
+// optional .message.Parkspace_path parkspace_path = 13 [default = UNKNOW_PATH];
 inline bool Parkspace_info::has_parkspace_path() const {
-  return (_has_bits_[0] & 0x00004000u) != 0;
+  return (_has_bits_[0] & 0x00001000u) != 0;
 }
 inline void Parkspace_info::set_has_parkspace_path() {
-  _has_bits_[0] |= 0x00004000u;
+  _has_bits_[0] |= 0x00001000u;
 }
 inline void Parkspace_info::clear_has_parkspace_path() {
-  _has_bits_[0] &= ~0x00004000u;
+  _has_bits_[0] &= ~0x00001000u;
 }
 inline void Parkspace_info::clear_parkspace_path() {
-  parkspace_path_ = 1;
+  parkspace_path_ = 0;
   clear_has_parkspace_path();
 }
 inline ::message::Parkspace_path Parkspace_info::parkspace_path() const {
@@ -2445,15 +2518,15 @@ inline void Parkspace_info::set_parkspace_path(::message::Parkspace_path value)
   // @@protoc_insertion_point(field_set:message.Parkspace_info.parkspace_path)
 }
 
-// optional float path_estimate_time = 14;
+// optional float path_estimate_time = 14 [default = 0];
 inline bool Parkspace_info::has_path_estimate_time() const {
-  return (_has_bits_[0] & 0x00000800u) != 0;
+  return (_has_bits_[0] & 0x00002000u) != 0;
 }
 inline void Parkspace_info::set_has_path_estimate_time() {
-  _has_bits_[0] |= 0x00000800u;
+  _has_bits_[0] |= 0x00002000u;
 }
 inline void Parkspace_info::clear_has_path_estimate_time() {
-  _has_bits_[0] &= ~0x00000800u;
+  _has_bits_[0] &= ~0x00002000u;
 }
 inline void Parkspace_info::clear_path_estimate_time() {
   path_estimate_time_ = 0;
@@ -2469,15 +2542,15 @@ inline void Parkspace_info::set_path_estimate_time(float value) {
   // @@protoc_insertion_point(field_set:message.Parkspace_info.path_estimate_time)
 }
 
-// optional .message.Parkspace_status parkspace_status_target = 15;
+// optional .message.Parkspace_status parkspace_status_target = 15 [default = eParkspace_status_unknow];
 inline bool Parkspace_info::has_parkspace_status_target() const {
-  return (_has_bits_[0] & 0x00001000u) != 0;
+  return (_has_bits_[0] & 0x00004000u) != 0;
 }
 inline void Parkspace_info::set_has_parkspace_status_target() {
-  _has_bits_[0] |= 0x00001000u;
+  _has_bits_[0] |= 0x00004000u;
 }
 inline void Parkspace_info::clear_has_parkspace_status_target() {
-  _has_bits_[0] &= ~0x00001000u;
+  _has_bits_[0] &= ~0x00004000u;
 }
 inline void Parkspace_info::clear_parkspace_status_target() {
   parkspace_status_target_ = 0;

+ 48 - 41
message/message_base.proto

@@ -30,6 +30,7 @@ enum Message_type
     eParkspace_force_update_response_msg = 0x39;//手动修改车位反馈消息
     eParkspace_confirm_alloc_request_msg = 0x3A;//确认分配车位请求消息
     eParkspace_confirm_alloc_response_msg = 0x3B;//确认分配车位反馈消息
+    eParkspace_allocation_data_msg = 0x3C;     //车位分配模块车位数据消息
 
 
     eStore_command_request_msg=0x41;        //终端停车请求消息
@@ -82,10 +83,10 @@ enum Communicator
 ////base message 用于解析未知类型的消息
 message Base_info
 {
-    required Message_type               msg_type=1;
-    optional int32                      timeout_ms=2;
-    required Communicator               sender=3;                       //发送者
-    required Communicator               receiver=4;                     //接收者
+    required Message_type               msg_type=1[default = eBase_msg];
+    optional int32                      timeout_ms=2[default = 0];
+    required Communicator               sender=3[default = eEmpty];                       //发送者
+    required Communicator               receiver=4[default = eEmpty];                     //接收者
 }
 
 // 事件,停车或者取车
@@ -118,48 +119,52 @@ enum Error_level
 
 message Error_manager
 {
-    required int32                      error_code = 1;
-    optional Error_level                error_level = 2;
-    optional string                     error_description = 3;
+    required int32                      error_code = 1[default = 0];
+    optional Error_level                error_level = 2[default = NORMAL];
+    optional string                     error_description = 3[default = ""];
 }
 
 //测量结果结构体
 message Locate_information
 {
-    optional float locate_x = 1;				//整车的中心点x值; 四轮的中心
-    optional float locate_y = 2;				//整车的中心点y值; 四轮的中心
-    optional float locate_angle = 3;			//整车的旋转角; 四轮的旋转角
-    optional float locate_length = 4;		    //整车的长度; 用于规避碰撞
-    optional float locate_width = 5;			//整车的宽度; 用于规避碰撞
-    optional float locate_height = 6;		    //整车的高度; 用于规避碰撞
-    optional float locate_wheel_base = 7;	    //整车的轮距; 前后轮的距离; 用于机器人或agv的抓车
-    optional float locate_wheel_width = 8;	    //整车的轮距; 左右轮的距离; 用于机器人或agv的抓车
-    optional bool locate_correct = 9;		    //整车的校准标记位
-
-    optional float locate_front_theta = 10;	    //整车的前轮的旋转角
+    optional float locate_x = 1[default = 0];				//整车的中心点x值; 四轮的中心
+    optional float locate_y = 2[default = 0];				//整车的中心点y值; 四轮的中心
+    optional float locate_angle = 3[default = 0];			//整车的旋转角; 四轮的旋转角
+    optional float locate_length = 4[default = 0];		    //整车的长度; 用于规避碰撞
+    optional float locate_width = 5[default = 0];			//整车的宽度; 用于规避碰撞
+    optional float locate_height = 6[default = 0];		    //整车的高度; 用于规避碰撞
+    optional float locate_wheel_base = 7[default = 0];	    //整车的轮距; 前后轮的距离; 用于机器人或agv的抓车
+    optional float locate_wheel_width = 8[default = 0];	    //整车的轮距; 左右轮的距离; 用于机器人或agv的抓车
+    optional bool locate_correct = 9[default = false];		    //整车的校准标记位
+
+    optional float locate_front_theta = 10[default = 0];	    //整车的前轮的旋转角
 }
 
 //车辆基本信息
 message Car_info
 {
-    optional float                      car_length=1;           //车长
-    optional float                      car_width=2;            //车宽
-    optional float                      car_height=3;           //车高
-    optional string                     license=4;              //车辆凭证号
+    optional float                      car_length=1[default = 0];           //车长
+    optional float                      car_width=2[default = 0];            //车宽
+    optional float                      car_height=3[default = 0];           //车高
+    optional string                     license=4[default = ""];              //车辆凭证号
+    optional float                      car_wheel_base = 5[default = 0];	    //整车的轮距; 前后轮的距离; 用于机器人或agv的抓车
+    optional float                      car_wheel_width = 6[default = 0];	//整车的轮距; 左右轮的距离; 用于机器人或agv的抓车
 }
 
 //车位状态枚举
 enum Parkspace_status
 {
-    eParkspace_empty            = 0;         //空闲,可分配
-    eParkspace_occupied         = 1;         //被占用,不可分配
-    eParkspace_reserved         = 2;         //被预约,预约车辆可分配
-    eParkspace_locked           = 3;         //临时锁定,不可分配
-    eParkspace_error            = 4;         //车位机械结构或硬件故障
+    eParkspace_status_unknow    = 0;
+    eParkspace_empty            = 1;         //空闲,可分配
+    eParkspace_occupied         = 2;         //被占用,不可分配
+    eParkspace_reserved         = 3;         //被预约,预约车辆可分配
+    eParkspace_locked           = 4;         //临时锁定,不可分配
+    eParkspace_error            = 5;         //车位机械结构或硬件故障
 }
 
 enum Direction
 {
+    eDirection_unknow = 0;
     eForward = 1;
     eBackward = 2;
 }
@@ -167,6 +172,7 @@ enum Direction
 //车位分配路线(根据中跑车的路线来定)
 enum Parkspace_path
 {
+	UNKNOW_PATH = 0;
     OPTIMAL_PATH = 1;
     LEFT_PATH = 2;
     RIGHT_PATH = 3;
@@ -176,6 +182,7 @@ enum Parkspace_path
 //车位类型
 enum Parkspace_type
 {
+    UNKNOW_PARKSPACE_TYPE = 0;
     MIN_PARKINGSPACE = 1;//小车位
     MID_PARKINGSPACE = 2;//中车位
     BIG_PARKINGSPACE = 3;//大车位
@@ -184,22 +191,22 @@ enum Parkspace_type
 //单个车位基本信息与状态信息,车位信息以及车位上的车辆信息
 message Parkspace_info
 {
-    optional int32              parkspace_id=1;         //车位编号
-    optional int32              index=2;                //同层编号
-    optional Direction          direction=3;            //前后
-    optional int32              floor=4;                //楼层
-    optional float              length=5;               //车位长
-    optional float              width=6;                //车位宽
-    optional float              height=7;               //车位高
-    optional Parkspace_status   parkspace_status=8;     //车位当前状态
+    optional int32              parkspace_id=1[default = 0];         //车位编号
+    optional int32              index=2[default = 0];                //同层编号
+    optional Direction          direction=3[default = eDirection_unknow];            //前后
+    optional int32              floor=4[default = 0];                //楼层
+    optional float              length=5[default = 0];               //车位长
+    optional float              width=6[default = 0];                //车位宽
+    optional float              height=7[default = 0];               //车位高
+    optional Parkspace_status   parkspace_status=8[default = eParkspace_status_unknow];     //车位当前状态
     optional Car_info           car_info=9;              //当前车位存入车辆的凭证号
-    optional string             entry_time=10;          //入场时间
-    optional string             leave_time=11;          //离场时间
-    optional int32              block_id=12;            //区块编号
+    optional string             entry_time=10[default = ""];          //入场时间
+    optional string             leave_time=11[default = ""];          //离场时间
+    optional int32              block_id=12[default = 0];            //区块编号
 
-    optional Parkspace_path     parkspace_path = 13;            // 车位分配路线
-    optional float              path_estimate_time = 14;        //车位分配路线 time(s)
-    optional Parkspace_status   parkspace_status_target=15;     //车位目标状态
+    optional Parkspace_path     parkspace_path = 13[default = UNKNOW_PATH];            // 车位分配路线
+    optional float              path_estimate_time = 14[default = 0];        //车位分配路线 time(s)
+    optional Parkspace_status   parkspace_status_target=15[default = eParkspace_status_unknow];     //车位目标状态
 }
 
 /*

+ 1 - 0
proto.sh

@@ -7,6 +7,7 @@ protoc -I=./snap7_communication snap7_communication.proto --cpp_out=./snap7_comm
 
 
 protoc -I=./message dispatch_control.proto --cpp_out=./message
+protoc -I=./dispatch dispatch_parameter.proto --cpp_out=./dispatch
 
 
 

+ 19 - 1
snap7_communication/snap7_communication_base.cpp

@@ -92,6 +92,23 @@ Error_manager Snap7_communication_base::communication_uninit()
 	return Error_code::SUCCESS;
 }
 
+
+
+//唤醒s7通信线程
+Error_manager Snap7_communication_base::communication_start()
+{
+	m_communication_condition.notify_all(true);
+	return Error_code::SUCCESS;
+}
+//停止s7通信线程
+Error_manager Snap7_communication_base::communication_stop()
+{
+	m_communication_condition.notify_all(false);
+	return Error_code::SUCCESS;
+}
+
+
+
 Snap7_communication_base::Communication_statu Snap7_communication_base::get_status()
 {
 	return m_communication_status;
@@ -148,12 +165,13 @@ void Snap7_communication_base::communication_thread()
 Error_manager t_error;
 	while (m_communication_condition.is_alive())
 	{
-		m_communication_condition.wait_for_ex(std::chrono::milliseconds(m_communication_delay_time_ms));
+		m_communication_condition.wait();
 
 		//s7的通信时间较长, 所以将发送和接受分开
 		//发送多个时, 必须加锁后一起发送, 不允许分段写入, 防止数据错误
 		if ( m_communication_condition.is_alive() )
 		{
+			std::this_thread::sleep_for(std::chrono::milliseconds(m_communication_delay_time_ms));
 			std::this_thread::yield();
 			switch ( m_communication_status )
 			{

+ 6 - 0
snap7_communication/snap7_communication_base.h

@@ -49,6 +49,12 @@ public://API functions
 	virtual Error_manager communication_init_from_protobuf(Snap7_communication_proto::Snap7_communication_parameter_all& snap7_communication_parameter_all);
 	//反初始化 通信 模块。
 	virtual Error_manager communication_uninit();
+
+	//唤醒s7通信线程
+	virtual Error_manager communication_start();
+	//停止s7通信线程
+	virtual Error_manager communication_stop();
+
 public://get or set member variable
 	Communication_statu get_status();
 protected://member functions

+ 342 - 19
tool/common_data.cpp

@@ -1,32 +1,355 @@
 //
 // Created by huli on 2020/9/8.
 //
-float center_x;				//整车的中心点x值, 四轮的中心
-float center_y;				//整车的中心点y值, 四轮的中心
-float car_angle;			//整车的车身旋转角,
-float car_length;			//整车的长度, 用于规避碰撞
-float car_width;			//整车的宽度, 用于规避碰撞
-float car_height;			//整车的高度, 用于规避碰撞
-float wheel_base;			//整车的轮距, 前后轮的距离, 用于机器人或agv的抓车
-float wheel_width;			//整车的轮距, 左右轮的距离, 用于机器人或agv的抓车
-float front_theta;			//整车的前轮的旋转角
-
-bool correctness;			//整车的校准标记位
 
 #include "common_data.h"
 
-void Common_data::copy_data(Car_measure_information& car_measure_information_in, Car_wheel_information& car_wheel_information_out)
+void Common_data::copy_data(Car_measure_information& car_measure_information_out, const message::Locate_information& locate_information_in)
+{
+	if ( locate_information_in.has_locate_x() )
+	{
+		car_measure_information_out.center_x = locate_information_in.locate_x();
+	}
+	else
+	{
+		car_measure_information_out.center_x = 0;
+	}
+	if ( locate_information_in.has_locate_y() )
+	{
+		car_measure_information_out.center_y = locate_information_in.locate_y();
+	}
+	else
+	{
+		car_measure_information_out.center_y = 0;
+	}
+	if ( locate_information_in.has_locate_angle() )
+	{
+		car_measure_information_out.car_angle = locate_information_in.locate_angle();
+	}
+	else
+	{
+		car_measure_information_out.car_angle = 0;
+	}
+	if ( locate_information_in.has_locate_length() )
+	{
+		car_measure_information_out.car_length = locate_information_in.locate_length();
+	}
+	else
+	{
+		car_measure_information_out.car_length = 0;
+	}
+	if ( locate_information_in.has_locate_width() )
+	{
+		car_measure_information_out.car_width = locate_information_in.locate_width();
+	}
+	else
+	{
+		car_measure_information_out.car_width = 0;
+	}
+	if ( locate_information_in.has_locate_height() )
+	{
+		car_measure_information_out.car_height = locate_information_in.locate_height();
+	}
+	else
+	{
+		car_measure_information_out.car_height = 0;
+	}
+	if ( locate_information_in.has_locate_wheel_base() )
+	{
+		car_measure_information_out.car_wheel_base = locate_information_in.locate_wheel_base();
+	}
+	else
+	{
+		car_measure_information_out.car_wheel_base = 0;
+	}
+	if ( locate_information_in.has_locate_wheel_width() )
+	{
+		car_measure_information_out.car_wheel_width = locate_information_in.locate_wheel_width();
+	}
+	else
+	{
+		car_measure_information_out.car_wheel_width = 0;
+	}
+	if ( locate_information_in.has_locate_front_theta() )
+	{
+		car_measure_information_out.car_front_theta = locate_information_in.locate_front_theta();
+	}
+	else
+	{
+		car_measure_information_out.car_front_theta = 0;
+	}
+	if ( locate_information_in.has_locate_correct() )
+	{
+		car_measure_information_out.correctness = locate_information_in.locate_correct();
+	}
+	else
+	{
+		car_measure_information_out.correctness = false;
+	}
+}
+void Common_data::copy_data(message::Locate_information& locate_information_out, const Car_measure_information& car_measure_information_in)
+{
+	locate_information_out.set_locate_x(car_measure_information_in.center_x);
+	locate_information_out.set_locate_y(car_measure_information_in.center_y);
+	locate_information_out.set_locate_angle(car_measure_information_in.car_angle);
+	locate_information_out.set_locate_length(car_measure_information_in.car_length);
+	locate_information_out.set_locate_width(car_measure_information_in.car_width);
+	locate_information_out.set_locate_height(car_measure_information_in.car_height);
+	locate_information_out.set_locate_wheel_base(car_measure_information_in.car_wheel_base);
+	locate_information_out.set_locate_wheel_width(car_measure_information_in.car_wheel_width);
+	locate_information_out.set_locate_front_theta(car_measure_information_in.car_front_theta);
+	locate_information_out.set_locate_correct(car_measure_information_in.correctness);
+}
+
+void Common_data::copy_data(Car_information& car_information_out, const message::Car_info& car_info_in)
+{
+	if ( car_info_in.has_license() )
+	{
+		car_information_out.license = car_info_in.license();
+	}
+	else
+	{
+		car_information_out.license.clear();
+	}
+	if ( car_info_in.has_car_length() )
+	{
+		car_information_out.car_length = car_info_in.car_length();
+	}
+	else
+	{
+		car_information_out.car_length = 0;
+	}
+	if ( car_info_in.has_car_width() )
+	{
+		car_information_out.car_width = car_info_in.car_width();
+	}
+	else
+	{
+		car_information_out.car_width = 0;
+	}
+	if ( car_info_in.has_car_height() )
+	{
+		car_information_out.car_height = car_info_in.car_height();
+	}
+	else
+	{
+		car_information_out.car_height = 0;
+	}
+	if ( car_info_in.has_car_wheel_base() )
+	{
+		car_information_out.car_wheel_base = car_info_in.car_wheel_base();
+	}
+	else
+	{
+		car_information_out.car_wheel_base = 0;
+	}
+	if ( car_info_in.has_car_wheel_width() )
+	{
+		car_information_out.car_wheel_width = car_info_in.car_wheel_width();
+	}
+	else
+	{
+		car_information_out.car_wheel_width = 0;
+	}
+}
+void Common_data::copy_data(message::Car_info& car_info_out, const Car_information& car_information_in)
+{
+	car_info_out.set_license(car_information_in.license);
+	car_info_out.set_car_length(car_information_in.car_length);
+	car_info_out.set_car_width(car_information_in.car_width);
+	car_info_out.set_car_height(car_information_in.car_height);
+	car_info_out.set_car_wheel_base(car_information_in.car_wheel_base);
+	car_info_out.set_car_wheel_width(car_information_in.car_wheel_width);
+}
+
+void Common_data::copy_data(Parkspace_information& parkspace_information_out, const message::Parkspace_info& parkspace_info_in)
+{
+	if ( parkspace_info_in.has_parkspace_id() )
+	{
+		parkspace_information_out.parkspace_id = parkspace_info_in.parkspace_id();
+	}
+	else
+	{
+		parkspace_information_out.parkspace_id = 0;
+	}
+	if ( parkspace_info_in.has_block_id() )
+	{
+		parkspace_information_out.block_id = parkspace_info_in.block_id();
+	}
+	else
+	{
+		parkspace_information_out.block_id = 0;
+	}
+	if ( parkspace_info_in.has_floor() )
+	{
+		parkspace_information_out.floor_id = parkspace_info_in.floor();
+	}
+	else
+	{
+		parkspace_information_out.floor_id = 0;
+	}
+	if ( parkspace_info_in.has_index() )
+	{
+		parkspace_information_out.room_id = parkspace_info_in.index();
+	}
+	else
+	{
+		parkspace_information_out.room_id = 0;
+	}
+	if ( parkspace_info_in.has_direction() )
+	{
+		parkspace_information_out.direction = (Common_data::Direction)parkspace_info_in.direction();
+	}
+	else
+	{
+		parkspace_information_out.direction = DIRECTION_UNKNOW;
+	}
+	if ( parkspace_info_in.has_length() )
+	{
+		parkspace_information_out.parkspace_length = parkspace_info_in.length();
+	}
+	else
+	{
+		parkspace_information_out.parkspace_length = 0;
+	}
+	if ( parkspace_info_in.has_width() )
+	{
+		parkspace_information_out.parkspace_width = parkspace_info_in.width();
+	}
+	else
+	{
+		parkspace_information_out.parkspace_width = 0;
+	}
+	if ( parkspace_info_in.has_height() )
+	{
+		parkspace_information_out.parkspace_height = parkspace_info_in.height();
+	}
+	else
+	{
+		parkspace_information_out.parkspace_height = 0;
+	}
+	if ( parkspace_info_in.has_parkspace_status() )
+	{
+		parkspace_information_out.parkspace_status = (Common_data::Parkspace_status)parkspace_info_in.parkspace_status();
+	}
+	else
+	{
+		parkspace_information_out.parkspace_status = PARKSPACE_EMPTY;
+	}
+	if ( parkspace_info_in.has_car_info() )
+	{
+		copy_data(parkspace_information_out.car_information, (message::Car_info&) parkspace_info_in.car_info());
+	}
+	else
+	{
+		Car_information temp;
+		parkspace_information_out.car_information = temp;
+	}
+	if ( parkspace_info_in.has_entry_time() )
+	{
+		parkspace_information_out.car_entry_time = parkspace_info_in.entry_time();
+	}
+	else
+	{
+		parkspace_information_out.car_entry_time.clear();
+	}
+	if ( parkspace_info_in.has_leave_time() )
+	{
+		parkspace_information_out.car_leave_time = parkspace_info_in.leave_time();
+	}
+	else
+	{
+		parkspace_information_out.car_leave_time.clear();
+	}
+	if ( parkspace_info_in.has_parkspace_path() )
+	{
+		parkspace_information_out.parkspace_path = (Common_data::Parkspace_path)parkspace_info_in.parkspace_path();
+	}
+	else
+	{
+		parkspace_information_out.parkspace_path = UNKNOW_PATH;
+	}
+	if ( parkspace_info_in.has_path_estimate_time() )
+	{
+		parkspace_information_out.path_estimate_time = parkspace_info_in.path_estimate_time();
+	}
+	else
+	{
+		parkspace_information_out.car_leave_time.clear();
+	}
+	if ( parkspace_info_in.has_parkspace_status_target() )
+	{
+		parkspace_information_out.parkspace_status_target = (Common_data::Parkspace_status)parkspace_info_in.parkspace_status_target();
+	}
+	else
+	{
+		parkspace_information_out.parkspace_status_target = PARKSPACE_EMPTY;
+	}
+}
+void Common_data::copy_data(message::Parkspace_info& parkspace_info_out, const Parkspace_information& parkspace_information_in)
+{
+	parkspace_info_out.set_parkspace_id(parkspace_information_in.parkspace_id);
+	parkspace_info_out.set_block_id(parkspace_information_in.block_id);
+	parkspace_info_out.set_floor(parkspace_information_in.floor_id);
+	parkspace_info_out.set_index(parkspace_information_in.room_id);
+	parkspace_info_out.set_direction((message::Direction)parkspace_information_in.direction);
+	parkspace_info_out.set_length(parkspace_information_in.parkspace_length);
+	parkspace_info_out.set_width(parkspace_information_in.parkspace_width);
+	parkspace_info_out.set_height(parkspace_information_in.parkspace_height);
+	parkspace_info_out.set_parkspace_status((message::Parkspace_status)parkspace_information_in.parkspace_status);
+	copy_data(*parkspace_info_out.mutable_car_info(), parkspace_information_in.car_information);
+	parkspace_info_out.set_entry_time(parkspace_information_in.car_entry_time);
+	parkspace_info_out.set_leave_time(parkspace_information_in.car_leave_time);
+	parkspace_info_out.set_parkspace_path((message::Parkspace_path)parkspace_information_in.parkspace_path);
+	parkspace_info_out.set_path_estimate_time(parkspace_information_in.path_estimate_time);
+	parkspace_info_out.set_parkspace_status_target((message::Parkspace_status)parkspace_information_in.parkspace_status_target);
+}
+
+
+
+
+
+
+
+
+
+void Common_data::transform_data(Car_information& car_information_out, const Car_measure_information& car_measure_information_in)
+{
+	car_information_out.license.clear();
+	car_information_out.car_length = car_measure_information_in.car_length;
+	car_information_out.car_width = car_measure_information_in.car_width;
+	car_information_out.car_height = car_measure_information_in.car_height;
+	car_information_out.car_wheel_base = car_measure_information_in.car_wheel_base;
+	car_information_out.car_wheel_width = car_measure_information_in.car_wheel_width;
+}
+void Common_data::transform_data(Car_measure_information& car_measure_information_out, const Car_information& car_informatio_in)
+{
+	car_measure_information_out.center_x = 0;
+	car_measure_information_out.center_y = 0;
+	car_measure_information_out.car_angle = 0;
+	car_measure_information_out.car_length = car_informatio_in.car_length;
+	car_measure_information_out.car_width = car_informatio_in.car_width;
+	car_measure_information_out.car_height = car_informatio_in.car_height;
+	car_measure_information_out.car_wheel_base = car_informatio_in.car_wheel_base;
+	car_measure_information_out.car_wheel_width = car_informatio_in.car_wheel_width;
+	car_measure_information_out.car_front_theta = 0;
+	car_measure_information_out.correctness = false;
+
+
+}
+
+void Common_data::transform_data(Car_wheel_information& car_wheel_information_out, const Car_measure_information& car_measure_information_in)
 {
 	car_wheel_information_out.center_x = car_measure_information_in.center_x;
 	car_wheel_information_out.center_y = car_measure_information_in.center_y;
 	car_wheel_information_out.car_angle = car_measure_information_in.car_angle;
 
-	car_wheel_information_out.wheel_base = car_measure_information_in.wheel_base;
-	car_wheel_information_out.wheel_width = car_measure_information_in.wheel_width;
-	car_wheel_information_out.front_theta = car_measure_information_in.front_theta;
+	car_wheel_information_out.car_wheel_base = car_measure_information_in.car_wheel_base;
+	car_wheel_information_out.car_wheel_width = car_measure_information_in.car_wheel_width;
+	car_wheel_information_out.car_front_theta = car_measure_information_in.car_front_theta;
 	car_wheel_information_out.correctness = car_measure_information_in.correctness;
 }
-void Common_data::copy_data(Car_wheel_information& car_wheel_information_in, Car_measure_information& car_measure_information_out)
+void Common_data::transform_data(Car_measure_information& car_measure_information_out, const Car_wheel_information& car_wheel_information_in)
 {
 	car_measure_information_out.center_x = car_wheel_information_in.center_x;
 	car_measure_information_out.center_y = car_wheel_information_in.center_y;
@@ -34,8 +357,8 @@ void Common_data::copy_data(Car_wheel_information& car_wheel_information_in, Car
 	car_measure_information_out.car_length = 0;
 	car_measure_information_out.car_width = 0;
 	car_measure_information_out.car_height = 0;
-	car_measure_information_out.wheel_base = car_wheel_information_in.wheel_base;
-	car_measure_information_out.wheel_width = car_wheel_information_in.wheel_width;
-	car_measure_information_out.front_theta = car_wheel_information_in.front_theta;
+	car_measure_information_out.car_wheel_base = car_wheel_information_in.car_wheel_base;
+	car_measure_information_out.car_wheel_width = car_wheel_information_in.car_wheel_width;
+	car_measure_information_out.car_front_theta = car_wheel_information_in.car_front_theta;
 	car_measure_information_out.correctness = car_wheel_information_in.correctness;
 }

+ 97 - 8
tool/common_data.h

@@ -5,6 +5,8 @@
 #ifndef NNXX_TESTS_COMMON_DATA_H
 #define NNXX_TESTS_COMMON_DATA_H
 
+#include <string>
+#include "../message/message_base.pb.h"
 
 class Common_data
 {
@@ -12,6 +14,11 @@ public:
 	//万集雷达扫描周期66ms, (频率15hz), 一般设置大一些
 #define WANJI_716_SCAN_CYCLE_MS 		70
 
+//车位表
+#define PARKSPACE_ID_BASE							0
+#define PASSAGEWAY_ID_BASE							1100
+
+
 
 	//整车的测量信息
 	struct Car_measure_information
@@ -22,9 +29,9 @@ public:
 		float car_length = 0;			//整车的长度, 用于规避碰撞
 		float car_width = 0;			//整车的宽度, 用于规避碰撞
 		float car_height = 0;			//整车的高度, 用于规避碰撞
-		float wheel_base = 0;			//整车的轮距, 前后轮的距离, 用于机器人或agv的抓车
-		float wheel_width = 0;			//整车的轮距, 左右轮的距离, 用于机器人或agv的抓车
-		float front_theta = 0;			//整车的前轮的旋转角
+		float car_wheel_base = 0;			//整车的轮距, 前后轮的距离, 用于机器人或agv的抓车
+		float car_wheel_width = 0;			//整车的轮距, 左右轮的距离, 用于机器人或agv的抓车
+		float car_front_theta = 0;			//整车的前轮的旋转角
 
 		bool correctness = false;			//整车的校准标记位
 
@@ -37,17 +44,99 @@ public:
 		float center_y = 0;				//整车的中心点y值, 四轮的中心
 		float car_angle = 0;			//整车的车身旋转角,
 
-		float wheel_base = 0;			//整车的轮距, 前后轮的距离, 用于机器人或agv的抓车
-		float wheel_width = 0;			//整车的轮距, 左右轮的距离, 用于机器人或agv的抓车
-		float front_theta = 0;			//整车的前轮的旋转角
+		float car_wheel_base = 0;			//整车的轮距, 前后轮的距离, 用于机器人或agv的抓车
+		float car_wheel_width = 0;			//整车的轮距, 左右轮的距离, 用于机器人或agv的抓车
+		float car_front_theta = 0;			//整车的前轮的旋转角
 
 		bool correctness = false;			//整车的校准标记位
 
 	};
 
+	struct Car_information
+	{
+		std::string                license;              //车辆凭证号
+		float                      car_length=0;           //车长
+		float                      car_width=0;            //车宽
+		float                      car_height=0;           //车高
+		float                      car_wheel_base = 0;	    //整车的轮距; 前后轮的距离; 用于机器人或agv的抓车
+		float                      car_wheel_width = 0;	//整车的轮距; 左右轮的距离; 用于机器人或agv的抓车
+	};
+
+
+//车位状态枚举
+	enum Parkspace_status
+	{
+		PARKSPACE_STATUS_UNKNOW		= 0,
+		PARKSPACE_EMPTY     		= 1,         //空闲,可分配
+		PARKSPACE_OCCUPIED    		= 2,         //被占用,不可分配
+		PARKSPACE_RESERVED  		= 3,         //被预约,预约车辆可分配, 暂时不用
+		PARKSPACE_LOCKED 			= 4,         //临时锁定,不可分配
+		PARKSPACE_ERROR 			= 5,         //车位机械结构或硬件故障
+	};
+
+	enum Direction
+	{
+		DIRECTION_UNKNOW = 0,
+		DIRECTION_FORWARD = 1,
+		DIRECTION_BACKWARD = 2,
+	};
+
+//车位分配路线(根据中跑车的路线来定)
+	enum Parkspace_path
+	{
+		UNKNOW_PATH = 0,
+		OPTIMAL_PATH = 1,
+		LEFT_PATH = 2,
+		RIGHT_PATH = 3,
+		TEMPORARY_CACHE_PATH = 4,
+
+	};
+//车位类型
+	enum Parkspace_type
+	{
+		UNKNOW_PARKSPACE_TYPE = 0,
+		MIN_PARKINGSPACE = 1,//小车位
+		MID_PARKINGSPACE = 2,//中车位
+		BIG_PARKINGSPACE = 3,//大车位
+	};
+
+	//单个车位基本信息与状态信息,车位信息以及车位上的车辆信息
+	struct Parkspace_information
+	{
+		int              	parkspace_id=0;         //车位编号
+
+		int              	block_id=0;            //区块编号
+		int              	floor_id=0;                //楼层
+		int              	room_id=0;                //同层编号
+		Direction    		direction=DIRECTION_UNKNOW;            //前后
+
+		float              	parkspace_length=0;               //车位长
+		float              	parkspace_width=0;                //车位宽
+		float              	parkspace_height=0;               //车位高
+		Parkspace_status   	parkspace_status=PARKSPACE_EMPTY;     //车位当前状态
+
+		Car_information    	car_information;              //当前车位存入车辆的凭证号
+		std::string        	car_entry_time;          //入场时间
+		std::string        	car_leave_time;          //离场时间
+
+		Parkspace_path     	parkspace_path = UNKNOW_PATH;            // 车位分配路线
+		float              	path_estimate_time = 0;        //车位分配路线 time(s)
+		Parkspace_status   	parkspace_status_target=PARKSPACE_EMPTY;     //车位目标状态
+	};
+
+	static void copy_data(Car_measure_information& car_measure_information_out, const message::Locate_information& locate_information_in);
+	static void copy_data(message::Locate_information& locate_information_out, const Car_measure_information& car_measure_information_in);
+	static void copy_data(Car_information& car_information_out, const message::Car_info& car_info_in);
+	static void copy_data(message::Car_info& car_info_out, const Car_information& car_information_in);
+	static void copy_data(Parkspace_information& parkspace_information_out, const message::Parkspace_info& parkspace_info_in);
+	static void copy_data(message::Parkspace_info& parkspace_info_out, const Parkspace_information& parkspace_information_in);
+
+
+	static void transform_data(Car_information& car_information_out, const Car_measure_information& car_measure_information_in);
+	static void transform_data(Car_measure_information& car_measure_information_out, const Car_information& car_informatio_in);
+	static void transform_data(Car_wheel_information& car_wheel_information_out, const Car_measure_information& car_measure_information_in);
+	static void transform_data(Car_measure_information& car_measure_information_out, const Car_wheel_information& car_wheel_information_in);
 
-	static void copy_data(Car_measure_information& car_measure_information_in, Car_wheel_information& car_wheel_information_out);
-	static void copy_data(Car_wheel_information& car_wheel_information_in, Car_measure_information& car_measure_information_out);