Selaa lähdekoodia

20210507, 版本代码同步

huli 4 vuotta sitten
vanhempi
commit
311cdc0a00

+ 2 - 2
communication/communication_socket_base.cpp

@@ -57,8 +57,8 @@ Error_manager Communication_socket_base::communication_init_from_protobuf(Commun
 			return t_error;
 		}
 	}
-	std::cout << "communication_parameter_all.communication_parameters().connect_string_vector_size() " <<
-		communication_parameter_all.communication_parameters().connect_string_vector_size()<< std::endl;
+//	std::cout << "communication_parameter_all.communication_parameters().connect_string_vector_size() " <<
+//		communication_parameter_all.communication_parameters().connect_string_vector_size()<< std::endl;
 	for(int i=0;i<communication_parameter_all.communication_parameters().connect_string_vector_size();++i)
 	{
 		t_error = communication_connect( communication_parameter_all.communication_parameters().connect_string_vector(i) );

+ 72 - 66
dispatch/carrier.cpp

@@ -160,83 +160,86 @@ Error_manager Carrier::update_device_communication()
 	Dispatch_communication::Carrier_status_from_plc_to_dispatch *tp_carrier_status_from_plc_to_dispatch =
 	& Dispatch_communication::get_instance_references().m_carrier_status_from_plc_to_dispatch[m_device_id];
 
-	//	int heartbeat = tp_carrier_status_from_plc_to_dispatch->m_heartbeat;
-	//	std::cout << " huli test :::: " << " heartbeat = " << heartbeat << std::endl;
-
-	//通过心跳帧来判断通信是否正常
-	if ( m_last_heartbeat != tp_carrier_status_from_plc_to_dispatch->m_heartbeat )
+	//设备异常  //注注注注注注注注意了, ==的优先级比&要高.
+	if ( (tp_carrier_status_from_plc_to_dispatch->m_safe_status & 0x02) == 0 )
 	{
-		m_last_heartbeat = tp_carrier_status_from_plc_to_dispatch->m_heartbeat;
-		m_status_updata_time = std::chrono::system_clock::now();
-
-//		int safe_status = tp_carrier_status_from_plc_to_dispatch->m_safe_status;
-//		std::cout << " huli test :::: " << " m_safe_status = " << safe_status << std::endl;
-//		int work_status = tp_carrier_status_from_plc_to_dispatch->m_work_status;
-//		std::cout << " huli test :::: " << " m_work_status = " << work_status << std::endl;
-
-		//设备异常  //注注注注注注注注意了, ==的优先级比&要高.
-		if ( (tp_carrier_status_from_plc_to_dispatch->m_safe_status & 0x02) == 0 )
-		{
-			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_EMERGENCY_STOP;
-			m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
-		}
-		else if ( (tp_carrier_status_from_plc_to_dispatch->m_safe_status & 0x01) == 0 )
+		m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_EMERGENCY_STOP;
+		m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
+	}
+	else if ( (tp_carrier_status_from_plc_to_dispatch->m_safe_status & 0x01) == 0 )
+	{
+		m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_FAULT;
+		m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
+	}
+	else if ( (tp_carrier_status_from_plc_to_dispatch->m_safe_status & 0x08) == 0 )
+	{
+		m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_COLLISION;
+		m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
+	}
+		//正常状态
+	else
+	{
+		if (tp_carrier_status_from_plc_to_dispatch->m_work_status == 1)
 		{
-			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_FAULT;
-			m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
+			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_WORKING;
 		}
-		else if ( (tp_carrier_status_from_plc_to_dispatch->m_safe_status & 0x08) == 0 )
+		else if(tp_carrier_status_from_plc_to_dispatch->m_work_status == 2)
 		{
-			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_COLLISION;
-			m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
+			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_READY;
 		}
-			//正常状态
-		else
+		else if(tp_carrier_status_from_plc_to_dispatch->m_work_status == 0)
 		{
-			if (tp_carrier_status_from_plc_to_dispatch->m_work_status == 1)
-			{
-				m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_WORKING;
-			}
-			else if(tp_carrier_status_from_plc_to_dispatch->m_work_status == 2)
-			{
-				m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_READY;
-			}
-			else if(tp_carrier_status_from_plc_to_dispatch->m_work_status == 0)
-			{
-				m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_UNKNOWN;
-			}
-
-			//故障恢复之后   E_FAULT  ->>  E_THREE_LEVEL_WORK
-			if ( m_dispatch_device_status == Dispatch_device_base::DISPATCH_DEVICE_FAULT )
-			{
-				m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_THREE_LEVEL_WORK;
-			}
-			//else 流程状态维持不变
+			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_UNKNOWN;
 		}
 
-		m_actual_load_status = (Dispatch_device_base::Load_status)tp_carrier_status_from_plc_to_dispatch->m_actual_load_status;
-		m_actual_x = tp_carrier_status_from_plc_to_dispatch->m_actual_x;
-		m_actual_y = tp_carrier_status_from_plc_to_dispatch->m_actual_y;
-		if ( m_device_id == 2 )
+		//故障恢复之后   E_FAULT  ->>  E_THREE_LEVEL_WORK
+		if ( m_dispatch_device_status == Dispatch_device_base::DISPATCH_DEVICE_FAULT )
 		{
-			m_actual_z = Dispatch_coordinates::get_instance_references().m_carrier_3th_floor_z;
-		}
-		else
-		{
-			m_actual_z = tp_carrier_status_from_plc_to_dispatch->m_actual_z;
+			m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_THREE_LEVEL_WORK;
 		}
-		m_actual_y1 = tp_carrier_status_from_plc_to_dispatch->m_actual_y1;
-		m_actual_y2 = tp_carrier_status_from_plc_to_dispatch->m_actual_y2;
-		m_actual_clamp_motion1 = (Dispatch_device_base::Clamp_motion)tp_carrier_status_from_plc_to_dispatch->m_actual_clamp_motion1;
-		m_actual_clamp_motion2 = (Dispatch_device_base::Clamp_motion)tp_carrier_status_from_plc_to_dispatch->m_actual_clamp_motion2;
-		m_actual_small_sports_car_motion = (Dispatch_device_base::Small_sports_car_motion)tp_carrier_status_from_plc_to_dispatch->m_actual_small_sports_car_motion;
-		m_actual_joint_motion_x1 = (Dispatch_device_base::Joint_motion)tp_carrier_status_from_plc_to_dispatch->m_actual_joint_motion_x1;
-		m_actual_joint_motion_x2 = (Dispatch_device_base::Joint_motion)tp_carrier_status_from_plc_to_dispatch->m_actual_joint_motion_x2;
-		memcpy(m_actual_error_code, tp_carrier_status_from_plc_to_dispatch->m_actual_error_code, 50);
-		memcpy(m_actual_warning_code, tp_carrier_status_from_plc_to_dispatch->m_actual_warning_code, 50);
-		m_actual_error_description = (char*)(tp_carrier_status_from_plc_to_dispatch->m_actual_error_description-2);
-		update_actual_coordinates_id();
+		//else 流程状态维持不变
+	}
+
+	m_actual_load_status = (Dispatch_device_base::Load_status)tp_carrier_status_from_plc_to_dispatch->m_actual_load_status;
+	m_actual_x = tp_carrier_status_from_plc_to_dispatch->m_actual_x;
+	m_actual_y = tp_carrier_status_from_plc_to_dispatch->m_actual_y;
+	if ( m_device_id == 2 )
+	{
+		m_actual_z = Dispatch_coordinates::get_instance_references().m_carrier_3th_floor_z;
+	}
+	else
+	{
+		m_actual_z = tp_carrier_status_from_plc_to_dispatch->m_actual_z;
+	}
+	m_actual_y1 = tp_carrier_status_from_plc_to_dispatch->m_actual_y1;
+	m_actual_y2 = tp_carrier_status_from_plc_to_dispatch->m_actual_y2;
+	m_actual_clamp_motion1 = (Dispatch_device_base::Clamp_motion)tp_carrier_status_from_plc_to_dispatch->m_actual_clamp_motion1;
+	m_actual_clamp_motion2 = (Dispatch_device_base::Clamp_motion)tp_carrier_status_from_plc_to_dispatch->m_actual_clamp_motion2;
+	m_actual_small_sports_car_motion = (Dispatch_device_base::Small_sports_car_motion)tp_carrier_status_from_plc_to_dispatch->m_actual_small_sports_car_motion;
+	m_actual_joint_motion_x1 = (Dispatch_device_base::Joint_motion)tp_carrier_status_from_plc_to_dispatch->m_actual_joint_motion_x1;
+	m_actual_joint_motion_x2 = (Dispatch_device_base::Joint_motion)tp_carrier_status_from_plc_to_dispatch->m_actual_joint_motion_x2;
+	memcpy(m_actual_error_code, tp_carrier_status_from_plc_to_dispatch->m_actual_error_code, 50);
+	memcpy(m_actual_warning_code, tp_carrier_status_from_plc_to_dispatch->m_actual_warning_code, 50);
+	m_actual_error_description = (char*)(tp_carrier_status_from_plc_to_dispatch->m_actual_error_description-2);
+	update_actual_coordinates_id();
+
+
+	//通过心跳帧来判断通信是否正常
+	if ( m_last_heartbeat != tp_carrier_status_from_plc_to_dispatch->m_heartbeat )
+	{
+		m_last_heartbeat = tp_carrier_status_from_plc_to_dispatch->m_heartbeat;
+		m_status_updata_time = std::chrono::system_clock::now();
 
+//		std::cout << " 111111111111111111111111111 = " << 123 << std::endl;
+//		std::cout << " tp_carrier_request_from_dispatch_to_plc_for_key->m_request_key = " << tp_carrier_request_from_dispatch_to_plc_for_key->m_request_key << std::endl;
+//		std::cout << " tp_carrier_response_from_plc_to_dispatch->m_respons_key = " << tp_carrier_response_from_plc_to_dispatch->m_respons_key << std::endl;
+//		int a = tp_carrier_status_from_plc_to_dispatch->m_work_status;
+//		std::cout << " tp_carrier_status_from_plc_to_dispatch->m_work_status = " << a << std::endl;
+//		std::cout << " m_request_key = " << m_request_key << std::endl;
+//		std::cout << " m_respons_key = " << m_respons_key << std::endl;
+//		std::cout << " m_actual_device_status = " << m_actual_device_status << std::endl;
+//		std::cout << " 111111111111111111111111111 = " << 456 << std::endl;
+		
 		//重连之后,搬运器状态   E_DISCONNECT  ->>  E_THREE_LEVEL_WORK
 		if ( m_dispatch_device_status == Dispatch_device_base::DISPATCH_DEVICE_DISCONNECT )
 		{
@@ -312,6 +315,7 @@ Error_manager Carrier::check_and_read_memory_to_task(std::shared_ptr<Task_Base>
 			std::cout << " huli test :::: " << " m_request_wheelbase = " << m_request_wheelbase << std::endl;
 			std::cout << " huli test :::: " << " m_request_y1 = " << m_request_y1 << std::endl;
 			std::cout << " huli test :::: " << " m_request_y2 = " << m_request_y2 << std::endl;
+			std::cout << " m_request_joint_motion_x = " << m_request_joint_motion_x << std::endl;
 
 			std::cout << " huli test :::: " << " m_respons_key = " << m_respons_key << std::endl;
 			std::cout << " huli test :::: " << " m_respons_status = " << m_respons_status << std::endl;
@@ -322,7 +326,9 @@ Error_manager Carrier::check_and_read_memory_to_task(std::shared_ptr<Task_Base>
 			std::cout << " huli test :::: " << " m_respons_wheelbase = " << m_respons_wheelbase << std::endl;
 			std::cout << " huli test :::: " << " m_respons_y1 = " << m_respons_y1 << std::endl;
 			std::cout << " huli test :::: " << " m_respons_y2 = " << m_respons_y2 << std::endl;
+			std::cout << " m_respons_joint_motion_x = " << m_respons_joint_motion_x << std::endl;
 
+			std::cout << " m_actual_device_status = " << m_actual_device_status << std::endl;
 			std::cout << " huli test :::: " << " m_actual_x = " << m_actual_x << std::endl;
 			std::cout << " huli test :::: " << " m_actual_y = " << m_actual_y << std::endl;
 			std::cout << " huli test :::: " << " m_actual_z = " << m_actual_z << std::endl;

+ 64 - 73
dispatch/catcher.cpp

@@ -148,91 +148,82 @@ Error_manager Catcher::update_device_communication()
 	Dispatch_communication::Catcher_status_from_plc_to_dispatch *tp_catcher_status_from_plc_to_dispatch =
 	& Dispatch_communication::get_instance_references().m_catcher_status_from_plc_to_dispatch[m_device_id];
 
-//	int heartbeat = tp_catcher_status_from_plc_to_dispatch->m_heartbeat;
-//	std::cout << " huli test :::: " << " heartbeat = " << heartbeat << std::endl;
-
-	//通过心跳帧来判断通信是否正常
-	if ( m_last_heartbeat != tp_catcher_status_from_plc_to_dispatch->m_heartbeat )
+	//设备异常  //注注注注注注注注意了, ==的优先级比&要高.
+	if ( (tp_catcher_status_from_plc_to_dispatch->m_safe_status & 0x02) == 0 )
 	{
-		m_last_heartbeat = tp_catcher_status_from_plc_to_dispatch->m_heartbeat;
-		m_status_updata_time = std::chrono::system_clock::now();
-
-//		int safe_status = tp_catcher_status_from_plc_to_dispatch->m_safe_status;
-//		std::cout << " huli test :::: " << " m_safe_status = " << safe_status << std::endl;
-//		int work_status = tp_catcher_status_from_plc_to_dispatch->m_work_status;
-//		std::cout << " huli test :::: " << " m_work_status = " << work_status << std::endl;
-
-		//设备异常  //注注注注注注注注意了, ==的优先级比&要高.
-		if ( (tp_catcher_status_from_plc_to_dispatch->m_safe_status & 0x02) == 0 )
-		{
-			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_EMERGENCY_STOP;
-			m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
-		}
-		else if ( (tp_catcher_status_from_plc_to_dispatch->m_safe_status & 0x01) == 0 )
-		{
-			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_FAULT;
-			m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
-		}
-		else if ( (tp_catcher_status_from_plc_to_dispatch->m_safe_status & 0x08) == 0 )
-		{
-			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_COLLISION;
-			m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
-		}
+		m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_EMERGENCY_STOP;
+		m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
+	}
+	else if ( (tp_catcher_status_from_plc_to_dispatch->m_safe_status & 0x01) == 0 )
+	{
+		m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_FAULT;
+		m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
+	}
+	else if ( (tp_catcher_status_from_plc_to_dispatch->m_safe_status & 0x08) == 0 )
+	{
+		m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_COLLISION;
+		m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
+	}
 		//正常状态
-		else
+	else
+	{
+		if (tp_catcher_status_from_plc_to_dispatch->m_work_status == 1)
 		{
-			if (tp_catcher_status_from_plc_to_dispatch->m_work_status == 1)
-			{
-				m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_WORKING;
-			}
-			else if(tp_catcher_status_from_plc_to_dispatch->m_work_status == 2)
-			{
-				m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_READY;
-			}
-			else if(tp_catcher_status_from_plc_to_dispatch->m_work_status == 0)
-			{
-				m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_UNKNOWN;
-			}
-
-			//故障恢复之后   E_FAULT  ->>  E_THREE_LEVEL_WORK
-			if ( m_dispatch_device_status == Dispatch_device_base::DISPATCH_DEVICE_FAULT )
-			{
-				m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_THREE_LEVEL_WORK;
-			}
-			//else 流程状态维持不变
+			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_WORKING;
 		}
-
-		m_actual_load_status = (Dispatch_device_base::Load_status)tp_catcher_status_from_plc_to_dispatch->m_actual_load_status;
-		m_actual_x = tp_catcher_status_from_plc_to_dispatch->m_actual_x;
-		m_actual_y = tp_catcher_status_from_plc_to_dispatch->m_actual_y;
-		m_actual_b = tp_catcher_status_from_plc_to_dispatch->m_actual_b;
-		m_actual_z = tp_catcher_status_from_plc_to_dispatch->m_actual_z;
-		m_actual_d1 = tp_catcher_status_from_plc_to_dispatch->m_actual_d1;
-		m_actual_d2 = tp_catcher_status_from_plc_to_dispatch->m_actual_d2;
-		m_actual_clamp_motion1 = (Dispatch_device_base::Clamp_motion)tp_catcher_status_from_plc_to_dispatch->m_actual_clamp_motion1;
-		m_actual_clamp_motion2 = (Dispatch_device_base::Clamp_motion)tp_catcher_status_from_plc_to_dispatch->m_actual_clamp_motion2;
-		m_actual_clamp_motion3 = (Dispatch_device_base::Clamp_motion)tp_catcher_status_from_plc_to_dispatch->m_actual_clamp_motion3;
-		m_actual_clamp_motion4 = (Dispatch_device_base::Clamp_motion)tp_catcher_status_from_plc_to_dispatch->m_actual_clamp_motion4;
-		memcpy(m_actual_error_code, tp_catcher_status_from_plc_to_dispatch->m_actual_error_code, 50);
-		memcpy(m_actual_warning_code, tp_catcher_status_from_plc_to_dispatch->m_actual_warning_code, 50);
-		m_actual_error_description = (char*)(tp_catcher_status_from_plc_to_dispatch->m_actual_error_description-2);
-		update_actual_coordinates_id();
-
-		//机器手朝向
-		if ( m_actual_b >= CATCHER_DIRECTION_POSITIVE_MIN && m_actual_b <= CATCHER_DIRECTION_POSITIVE_MAX )
+		else if(tp_catcher_status_from_plc_to_dispatch->m_work_status == 2)
 		{
-			m_catcher_direction = CATCHER_DIRECTION_POSITIVE;
+			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_READY;
 		}
-		else if ( m_actual_b >= CATCHER_DIRECTION_NEGATIVE_MIN && m_actual_b <= CATCHER_DIRECTION_NEGATIVE_MAX )
+		else if(tp_catcher_status_from_plc_to_dispatch->m_work_status == 0)
 		{
-			m_catcher_direction = CATCHER_DIRECTION_NEGATIVE;
+			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_UNKNOWN;
 		}
-		else
+
+		//故障恢复之后   E_FAULT  ->>  E_THREE_LEVEL_WORK
+		if ( m_dispatch_device_status == Dispatch_device_base::DISPATCH_DEVICE_FAULT )
 		{
-			m_catcher_direction = CATCHER_DIRECTION_UNKNOW;
+			m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_THREE_LEVEL_WORK;
 		}
+		//else 流程状态维持不变
+	}
+
+	m_actual_load_status = (Dispatch_device_base::Load_status)tp_catcher_status_from_plc_to_dispatch->m_actual_load_status;
+	m_actual_x = tp_catcher_status_from_plc_to_dispatch->m_actual_x;
+	m_actual_y = tp_catcher_status_from_plc_to_dispatch->m_actual_y;
+	m_actual_b = tp_catcher_status_from_plc_to_dispatch->m_actual_b;
+	m_actual_z = tp_catcher_status_from_plc_to_dispatch->m_actual_z;
+	m_actual_d1 = tp_catcher_status_from_plc_to_dispatch->m_actual_d1;
+	m_actual_d2 = tp_catcher_status_from_plc_to_dispatch->m_actual_d2;
+	m_actual_clamp_motion1 = (Dispatch_device_base::Clamp_motion)tp_catcher_status_from_plc_to_dispatch->m_actual_clamp_motion1;
+	m_actual_clamp_motion2 = (Dispatch_device_base::Clamp_motion)tp_catcher_status_from_plc_to_dispatch->m_actual_clamp_motion2;
+	m_actual_clamp_motion3 = (Dispatch_device_base::Clamp_motion)tp_catcher_status_from_plc_to_dispatch->m_actual_clamp_motion3;
+	m_actual_clamp_motion4 = (Dispatch_device_base::Clamp_motion)tp_catcher_status_from_plc_to_dispatch->m_actual_clamp_motion4;
+	memcpy(m_actual_error_code, tp_catcher_status_from_plc_to_dispatch->m_actual_error_code, 50);
+	memcpy(m_actual_warning_code, tp_catcher_status_from_plc_to_dispatch->m_actual_warning_code, 50);
+	m_actual_error_description = (char*)(tp_catcher_status_from_plc_to_dispatch->m_actual_error_description-2);
+	update_actual_coordinates_id();
+
+	//机器手朝向
+	if ( m_actual_b >= CATCHER_DIRECTION_POSITIVE_MIN && m_actual_b <= CATCHER_DIRECTION_POSITIVE_MAX )
+	{
+		m_catcher_direction = CATCHER_DIRECTION_POSITIVE;
+	}
+	else if ( m_actual_b >= CATCHER_DIRECTION_NEGATIVE_MIN && m_actual_b <= CATCHER_DIRECTION_NEGATIVE_MAX )
+	{
+		m_catcher_direction = CATCHER_DIRECTION_NEGATIVE;
+	}
+	else
+	{
+		m_catcher_direction = CATCHER_DIRECTION_UNKNOW;
+	}
 
 
+	//通过心跳帧来判断通信是否正常
+	if ( m_last_heartbeat != tp_catcher_status_from_plc_to_dispatch->m_heartbeat )
+	{
+		m_last_heartbeat = tp_catcher_status_from_plc_to_dispatch->m_heartbeat;
+		m_status_updata_time = std::chrono::system_clock::now();
 
 		//重连之后,搬运器状态   E_DISCONNECT  ->>  E_THREE_LEVEL_WORK
 		if ( m_dispatch_device_status == Dispatch_device_base::DISPATCH_DEVICE_DISCONNECT )

+ 5 - 1
dispatch/dispatch_device_base.h

@@ -23,6 +23,9 @@ public:
 	//设备底层通信延时5000ms
 #define	COMMUNICATION_OVER_TIME_MS	5000
 
+//调度默认 差值 2mm (运动过程中进行比较, 对精度要求较高)
+#define DISPATCH_DEFAULT_DIFFERENCE							2
+
 	//设备状态,这个类的总状态,这里指工作任务流程
 	enum Dispatch_device_status
 	{
@@ -208,7 +211,7 @@ protected://member functions
 
 protected://member variable
 	std::atomic<Dispatch_device_status>			m_dispatch_device_status;			//设备总状态, 控制任务流程(长流程)
-	int 								m_device_id;				//设备id,
+	int 								m_device_id;				//设备id, 索引
 	std::mutex							m_lock;	//锁
 
 
@@ -218,6 +221,7 @@ protected://member variable
 	std::thread*        				mp_execute_thread;   			//执行的线程指针,内存由本类管理
 	Thread_condition					m_execute_condition;			//执行的条件变量
 
+	std::string							m_command_key_one_level;		//设备任务的唯一码, (用作任务预约)
 	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;		//设备的核心任务, (锁定位置进行抓车和放车, 最高任务, 不允许打断和被打断)

+ 71 - 21
dispatch/dispatch_manager.cpp

@@ -66,7 +66,7 @@ Error_manager Dispatch_manager::dispatch_manager_init(int dispatch_id)
 		m_process_thread_queue->Start(48);
 	}
 
-	
+
 	m_dispatch_manager_status = E_DISPATCH_MANAGER_READY;
 	return Error_code::SUCCESS;
 }
@@ -126,7 +126,7 @@ Error_manager Dispatch_manager::dispatch_manager_uninit()
 //对外的接口函数,负责接受并处理任务单,
 Error_manager Dispatch_manager::execute_task(Dispatch_manager::Dispatch_motion_direction dispatch_motion_direction)
 {
-return Error_code::SUCCESS;
+	return Error_code::SUCCESS;
 //	std::this_thread::sleep_for(std::chrono::seconds(rand()%3+3));
 
 	if ( dispatch_motion_direction == E_PICKUP_CAR )
@@ -141,12 +141,12 @@ return Error_code::SUCCESS;
 
 	if ( t_probability%100 >=20 )
 	{
-	    return Error_code::SUCCESS;
+		return Error_code::SUCCESS;
 	}
 	else
 	{
-	    return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
-	    					" Dispatch_manager::execute_task() error ");
+		return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+							 " Dispatch_manager::execute_task() error ");
 	}
 }
 
@@ -237,7 +237,7 @@ Error_manager Dispatch_manager::check_status()
 //调度模块 //执行搬运请求(主控->调度管理)
 Error_manager Dispatch_manager::execute_for_dispatch_request_msg(message::Dispatch_request_msg& dispatch_request_msg)
 {
-	LOG(INFO) << " ---Dispatch_manager::execute_for_dispatch_request_msg--- "<< this;
+	LOG(INFO) << " ---Dispatch_manager::execute_for_dispatch_request_msg--- "<< dispatch_request_msg.DebugString() << " "<< this;
 	LOG(INFO) << " dispatch_request_msg->m_command_key =  "<<dispatch_request_msg.command_key()<< "   "<< this;
 
 	Error_manager t_error;
@@ -250,25 +250,73 @@ Error_manager Dispatch_manager::execute_for_dispatch_request_msg(message::Dispat
 		return t_error;
 	}
 
-	std::unique_lock<std::mutex> t_lock(m_lock);
-	//流程缓存到map
-	if ( tp_dispatch_process->m_dispatch_process_type == Dispatch_process::Dispatch_process_type::DISPATCH_PROCESS_STORE )
-	{
-		m_key_to_dispatch_process_store_map[tp_dispatch_process->m_command_key] = tp_dispatch_process;
+	{//加锁
+		std::unique_lock<std::mutex> t_lock(m_lock);
+		//流程缓存到map
+		if (tp_dispatch_process->m_dispatch_process_type ==
+			Dispatch_process::Dispatch_process_type::DISPATCH_PROCESS_STORE)
+		{
+			if (m_key_to_dispatch_process_store_map.find(tp_dispatch_process->m_command_key) !=
+				m_key_to_dispatch_process_store_map.end())
+			{
+				t_error = Error_manager(Error_code::DISPATCH_PROCESS_COMMAND_KEY_REPEAT, Error_level::MINOR_ERROR,
+										" tp_dispatch_process->m_command_key is repeat ");
+			}
+			else
+			{
+				m_key_to_dispatch_process_store_map[tp_dispatch_process->m_command_key] = tp_dispatch_process;
+			}
+		}
+		else if (tp_dispatch_process->m_dispatch_process_type ==
+				 Dispatch_process::Dispatch_process_type::DISPATCH_PROCESS_PICKUP)
+		{
+			if (m_key_to_dispatch_process_pickup_map.find(tp_dispatch_process->m_command_key) !=
+				m_key_to_dispatch_process_pickup_map.end())
+			{
+				t_error = Error_manager(Error_code::DISPATCH_PROCESS_COMMAND_KEY_REPEAT, Error_level::MINOR_ERROR,
+										" tp_dispatch_process->m_command_key is repeat ");
+			}
+			else
+			{
+				m_key_to_dispatch_process_pickup_map[tp_dispatch_process->m_command_key] = tp_dispatch_process;
+			}
+		}
+		else
+		{
+			t_error = Error_manager(Error_code::DISPATCH_PROCESS_TASK_STATUS_ERROR, Error_level::MINOR_ERROR,
+									" tp_dispatch_process->m_dispatch_process_type PARAMRTER ERROR ");
+		}
 	}
-	else if( tp_dispatch_process->m_dispatch_process_type == Dispatch_process::Dispatch_process_type::DISPATCH_PROCESS_PICKUP )
+
+	if ( t_error != Error_code::SUCCESS )
 	{
-		m_key_to_dispatch_process_pickup_map[tp_dispatch_process->m_command_key] = tp_dispatch_process;
+		delete(tp_dispatch_process);
+		send_dispatch_response_msg_with_error(dispatch_request_msg, t_error);
+		return t_error;
 	}
 	else
 	{
-		delete(tp_dispatch_process);
-	    return Error_manager(Error_code::DISPATCH_PROCESS_TASK_STATUS_ERROR, Error_level::MINOR_ERROR,
-	    					" tp_dispatch_process->m_dispatch_process_type PARAMRTER ERROR ");
+		//把流程添加到 调度线程池里面, 里面的线程池会自动回收调度流程的内存
+		m_process_thread_queue->AddTask(tp_dispatch_process);
 	}
-	
-	//把流程添加到 调度线程池里面, 里面的线程池会自动回收调度流程的内存
-	m_process_thread_queue->AddTask(tp_dispatch_process);
+
+	return Error_code::SUCCESS;
+}
+//调度模块 答复数据异常
+Error_manager Dispatch_manager::send_dispatch_response_msg_with_error(message::Dispatch_request_msg &dispatch_request_msg, Error_manager error)
+{
+	message::Dispatch_response_msg t_dispatch_response_msg;
+	t_dispatch_response_msg.mutable_base_info()->set_msg_type(message::Message_type::eDispatch_response_msg);
+	t_dispatch_response_msg.mutable_base_info()->set_timeout_ms(dispatch_request_msg.base_info().timeout_ms());
+	t_dispatch_response_msg.mutable_base_info()->set_sender(message::Communicator::eDispatch_manager);
+	t_dispatch_response_msg.mutable_base_info()->set_receiver(message::Communicator::eMain);
+	t_dispatch_response_msg.set_command_key(dispatch_request_msg.command_key());
+
+	t_dispatch_response_msg.mutable_error_manager()->set_error_code(error.get_error_code());
+	t_dispatch_response_msg.mutable_error_manager()->set_error_level((message::Error_level)error.get_error_level());
+	t_dispatch_response_msg.mutable_error_manager()->set_error_description(error.get_error_description(), error.get_description_length());
+
+	System_communication::get_instance_references().encapsulate_msg(t_dispatch_response_msg.SerializeAsString());
 	return Error_code::SUCCESS;
 }
 
@@ -342,9 +390,10 @@ Error_manager Dispatch_manager::execute_for_dispatch_control_request_msg(message
 			{
 				Dispatch_process::Dispatch_control_node t_dispatch_control_node;
 				iter->second->m_dispatch_control_node_map[t_dispatch_device_type] = t_dispatch_control_node;
+				iter->second->m_dispatch_control_node_map[t_dispatch_device_type].m_dispatch_control_status = Dispatch_process::Dispatch_control_status::DISPATCH_CONTROL_READY;
 			}
 			iter->second->m_dispatch_control_node_map[t_dispatch_device_type].m_dispatch_control_request_msg = dispatch_control_request_msg;
-			iter->second->m_dispatch_control_node_map[t_dispatch_device_type].m_dispatch_control_status = Dispatch_process::Dispatch_control_status::DISPATCH_CONTROL_READY;
+//			iter->second->m_dispatch_control_node_map[t_dispatch_device_type].m_dispatch_control_status = Dispatch_process::Dispatch_control_status::DISPATCH_CONTROL_READY;
 			return Error_code::SUCCESS;
 		}
 	}
@@ -364,9 +413,10 @@ Error_manager Dispatch_manager::execute_for_dispatch_control_request_msg(message
 			{
 				Dispatch_process::Dispatch_control_node t_dispatch_control_node;
 				iter->second->m_dispatch_control_node_map[t_dispatch_device_type] = t_dispatch_control_node;
+				iter->second->m_dispatch_control_node_map[t_dispatch_device_type].m_dispatch_control_status = Dispatch_process::Dispatch_control_status::DISPATCH_CONTROL_READY;
 			}
 			iter->second->m_dispatch_control_node_map[t_dispatch_device_type].m_dispatch_control_request_msg = dispatch_control_request_msg;
-			iter->second->m_dispatch_control_node_map[t_dispatch_device_type].m_dispatch_control_status = Dispatch_process::Dispatch_control_status::DISPATCH_CONTROL_READY;
+//			iter->second->m_dispatch_control_node_map[t_dispatch_device_type].m_dispatch_control_status = Dispatch_process::Dispatch_control_status::DISPATCH_CONTROL_READY;
 			return Error_code::SUCCESS;
 		}
 	}

+ 6 - 0
dispatch/dispatch_manager.h

@@ -89,6 +89,12 @@ public://API functions
 
 	//调度模块 //执行搬运请求(主控->调度管理)
 	Error_manager execute_for_dispatch_request_msg(message::Dispatch_request_msg &dispatch_request_msg);
+	//调度模块 答复数据异常
+	Error_manager send_dispatch_response_msg_with_error(message::Dispatch_request_msg &dispatch_request_msg, Error_manager error);
+
+
+
+
 	//调度模块 //调度总规划的答复(调度算法->调度管理)
 	Error_manager execute_for_dispatch_plan_response_msg(message::Dispatch_plan_response_msg &dispatch_plan_response_msg);
 	//调度模块 //调度控制的任务请求(调度算法->调度管理)

+ 289 - 15
dispatch/dispatch_parameter.pb.cc

@@ -344,6 +344,7 @@ void InitDefaultsDispatch_coordinates_parameter_all() {
 }
 
 ::google::protobuf::Metadata file_level_metadata[12];
+const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
 
 const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dispatch_proto::Catcher_parameter, _has_bits_),
@@ -514,6 +515,12 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dispatch_proto::Dispatch_coordinates_parameter_all, carrier_default_y_leave_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dispatch_proto::Dispatch_coordinates_parameter_all, carrier_default_x_left_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dispatch_proto::Dispatch_coordinates_parameter_all, carrier_default_x_right_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dispatch_proto::Dispatch_coordinates_parameter_all, passageway_terminal_id_min_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dispatch_proto::Dispatch_coordinates_parameter_all, passageway_terminal_id_max_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dispatch_proto::Dispatch_coordinates_parameter_all, passageway_terminal_number_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dispatch_proto::Dispatch_coordinates_parameter_all, passageway_functioning_patterns_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dispatch_proto::Dispatch_coordinates_parameter_all, car_wheel_base_min_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dispatch_proto::Dispatch_coordinates_parameter_all, car_wheel_base_max_),
   ~0u,
   ~0u,
   ~0u,
@@ -544,6 +551,12 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   23,
   24,
   25,
+  26,
+  27,
+  28,
+  ~0u,
+  29,
+  30,
 };
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
   { 0, 6, sizeof(::Dispatch_proto::Catcher_parameter)},
@@ -557,7 +570,7 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROT
   { 90, 101, sizeof(::Dispatch_proto::Carrier_box_parameter)},
   { 107, 118, sizeof(::Dispatch_proto::Catcher_box_parameter)},
   { 124, 131, sizeof(::Dispatch_proto::Axis_range_parameter)},
-  { 133, 168, sizeof(::Dispatch_proto::Dispatch_coordinates_parameter_all)},
+  { 133, 174, sizeof(::Dispatch_proto::Dispatch_coordinates_parameter_all)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
@@ -580,7 +593,7 @@ void protobuf_AssignDescriptors() {
   ::google::protobuf::MessageFactory* factory = NULL;
   AssignDescriptors(
       "dispatch_parameter.proto", schemas, file_default_instances, TableStruct::offsets, factory,
-      file_level_metadata, NULL, NULL);
+      file_level_metadata, file_level_enum_descriptors, NULL);
 }
 
 void protobuf_AssignDescriptorsOnce() {
@@ -627,7 +640,7 @@ void AddDescriptorsImpl() {
       "\004 \001(\005:\0071000000\022\027\n\005z_min\030\005 \001(\005:\010-1000000\022"
       "\026\n\005z_max\030\006 \001(\005:\0071000000\"C\n\024Axis_range_pa"
       "rameter\022\025\n\003min\030\001 \001(\005:\010-1000000\022\024\n\003max\030\002 "
-      "\001(\005:\0071000000\"\317\t\n\"Dispatch_coordinates_pa"
+      "\001(\005:\0071000000\"\314\013\n\"Dispatch_coordinates_pa"
       "rameter_all\022Y\n packspace_coordinates_par"
       "ameters\030\001 \003(\0132/.Dispatch_proto.Packspace"
       "_coordinates_parameter\022[\n!passageway_coo"
@@ -658,10 +671,21 @@ void AddDescriptorsImpl() {
       "carrier_default_y_back\030\033 \001(\005\022\037\n\027carrier_"
       "default_y_leave\030\034 \001(\005\022\036\n\026carrier_default"
       "_x_left\030\035 \001(\005\022\037\n\027carrier_default_x_right"
-      "\030\036 \001(\005"
+      "\030\036 \001(\005\022\"\n\032passageway_terminal_id_min\030\037 \001"
+      "(\005\022\"\n\032passageway_terminal_id_max\030  \001(\005\022\""
+      "\n\032passageway_terminal_number\030! \001(\005\022W\n\037pa"
+      "ssageway_functioning_patterns\030\" \003(\0162..Di"
+      "spatch_proto.Passageway_functioning_patt"
+      "ern\022\032\n\022car_wheel_base_min\030# \001(\005\022\032\n\022car_w"
+      "heel_base_max\030$ \001(\005*\321\001\n\036Passageway_funct"
+      "ioning_pattern\022*\n&PASSAGEWAY_FUNCTIONING"
+      "_PATTERN_UNKNOWN\020\000\022(\n$PASSAGEWAY_FUNCTIO"
+      "NING_PATTERN_INLET\020\001\022)\n%PASSAGEWAY_FUNCT"
+      "IONING_PATTERN_OUTLET\020\002\022.\n*PASSAGEWAY_FU"
+      "NCTIONING_PATTERN_BIDIRECTION\020\003"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 2446);
+      descriptor, 2911);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "dispatch_parameter.proto", &protobuf_RegisterTypes);
 }
@@ -678,6 +702,22 @@ struct StaticDescriptorInitializer {
 } static_descriptor_initializer;
 }  // namespace protobuf_dispatch_5fparameter_2eproto
 namespace Dispatch_proto {
+const ::google::protobuf::EnumDescriptor* Passageway_functioning_pattern_descriptor() {
+  protobuf_dispatch_5fparameter_2eproto::protobuf_AssignDescriptorsOnce();
+  return protobuf_dispatch_5fparameter_2eproto::file_level_enum_descriptors[0];
+}
+bool Passageway_functioning_pattern_IsValid(int value) {
+  switch (value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+      return true;
+    default:
+      return false;
+  }
+}
+
 
 // ===================================================================
 
@@ -4574,6 +4614,12 @@ const int Dispatch_coordinates_parameter_all::kCarrierDefaultYBackFieldNumber;
 const int Dispatch_coordinates_parameter_all::kCarrierDefaultYLeaveFieldNumber;
 const int Dispatch_coordinates_parameter_all::kCarrierDefaultXLeftFieldNumber;
 const int Dispatch_coordinates_parameter_all::kCarrierDefaultXRightFieldNumber;
+const int Dispatch_coordinates_parameter_all::kPassagewayTerminalIdMinFieldNumber;
+const int Dispatch_coordinates_parameter_all::kPassagewayTerminalIdMaxFieldNumber;
+const int Dispatch_coordinates_parameter_all::kPassagewayTerminalNumberFieldNumber;
+const int Dispatch_coordinates_parameter_all::kPassagewayFunctioningPatternsFieldNumber;
+const int Dispatch_coordinates_parameter_all::kCarWheelBaseMinFieldNumber;
+const int Dispatch_coordinates_parameter_all::kCarWheelBaseMaxFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Dispatch_coordinates_parameter_all::Dispatch_coordinates_parameter_all()
@@ -4592,7 +4638,8 @@ Dispatch_coordinates_parameter_all::Dispatch_coordinates_parameter_all(const Dis
       packspace_coordinates_parameters_(from.packspace_coordinates_parameters_),
       passageway_coordinates_parameters_(from.passageway_coordinates_parameters_),
       carrier_coordinates_parameters_(from.carrier_coordinates_parameters_),
-      catcher_coordinates_parameters_(from.catcher_coordinates_parameters_) {
+      catcher_coordinates_parameters_(from.catcher_coordinates_parameters_),
+      passageway_functioning_patterns_(from.passageway_functioning_patterns_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   if (from.has_carrier_box_parameters()) {
     carrier_box_parameters_ = new ::Dispatch_proto::Carrier_box_parameter(*from.carrier_box_parameters_);
@@ -4605,16 +4652,16 @@ Dispatch_coordinates_parameter_all::Dispatch_coordinates_parameter_all(const Dis
     catcher_box_parameters_ = NULL;
   }
   ::memcpy(&catcher_b_min_, &from.catcher_b_min_,
-    static_cast<size_t>(reinterpret_cast<char*>(&carrier_default_x_right_) -
-    reinterpret_cast<char*>(&catcher_b_min_)) + sizeof(carrier_default_x_right_));
+    static_cast<size_t>(reinterpret_cast<char*>(&car_wheel_base_max_) -
+    reinterpret_cast<char*>(&catcher_b_min_)) + sizeof(car_wheel_base_max_));
   // @@protoc_insertion_point(copy_constructor:Dispatch_proto.Dispatch_coordinates_parameter_all)
 }
 
 void Dispatch_coordinates_parameter_all::SharedCtor() {
   _cached_size_ = 0;
   ::memset(&carrier_box_parameters_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&carrier_default_x_right_) -
-      reinterpret_cast<char*>(&carrier_box_parameters_)) + sizeof(carrier_default_x_right_));
+      reinterpret_cast<char*>(&car_wheel_base_max_) -
+      reinterpret_cast<char*>(&carrier_box_parameters_)) + sizeof(car_wheel_base_max_));
 }
 
 Dispatch_coordinates_parameter_all::~Dispatch_coordinates_parameter_all() {
@@ -4660,6 +4707,7 @@ void Dispatch_coordinates_parameter_all::Clear() {
   passageway_coordinates_parameters_.Clear();
   carrier_coordinates_parameters_.Clear();
   catcher_coordinates_parameters_.Clear();
+  passageway_functioning_patterns_.Clear();
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 3u) {
     if (cached_has_bits & 0x00000001u) {
@@ -4686,10 +4734,10 @@ void Dispatch_coordinates_parameter_all::Clear() {
         reinterpret_cast<char*>(&carrier_default_y_leave_) -
         reinterpret_cast<char*>(&carrier_4th_floor_z_)) + sizeof(carrier_default_y_leave_));
   }
-  if (cached_has_bits & 50331648u) {
+  if (cached_has_bits & 2130706432u) {
     ::memset(&carrier_default_x_left_, 0, static_cast<size_t>(
-        reinterpret_cast<char*>(&carrier_default_x_right_) -
-        reinterpret_cast<char*>(&carrier_default_x_left_)) + sizeof(carrier_default_x_right_));
+        reinterpret_cast<char*>(&car_wheel_base_max_) -
+        reinterpret_cast<char*>(&carrier_default_x_left_)) + sizeof(car_wheel_base_max_));
   }
   _has_bits_.Clear();
   _internal_metadata_.Clear();
@@ -5109,6 +5157,105 @@ bool Dispatch_coordinates_parameter_all::MergePartialFromCodedStream(
         break;
       }
 
+      // optional int32 passageway_terminal_id_min = 31;
+      case 31: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(248u /* 248 & 0xFF */)) {
+          set_has_passageway_terminal_id_min();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+                 input, &passageway_terminal_id_min_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // optional int32 passageway_terminal_id_max = 32;
+      case 32: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(0u /* 256 & 0xFF */)) {
+          set_has_passageway_terminal_id_max();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+                 input, &passageway_terminal_id_max_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // optional int32 passageway_terminal_number = 33;
+      case 33: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(8u /* 264 & 0xFF */)) {
+          set_has_passageway_terminal_number();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+                 input, &passageway_terminal_number_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // repeated .Dispatch_proto.Passageway_functioning_pattern passageway_functioning_patterns = 34;
+      case 34: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(16u /* 272 & 0xFF */)) {
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::Dispatch_proto::Passageway_functioning_pattern_IsValid(value)) {
+            add_passageway_functioning_patterns(static_cast< ::Dispatch_proto::Passageway_functioning_pattern >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(
+                34, static_cast< ::google::protobuf::uint64>(value));
+          }
+        } else if (
+            static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(18u /* 274 & 0xFF */)) {
+          DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
+                 input,
+                 34,
+                 ::Dispatch_proto::Passageway_functioning_pattern_IsValid,
+                 mutable_unknown_fields(),
+                 this->mutable_passageway_functioning_patterns())));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // optional int32 car_wheel_base_min = 35;
+      case 35: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(24u /* 280 & 0xFF */)) {
+          set_has_car_wheel_base_min();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+                 input, &car_wheel_base_min_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // optional int32 car_wheel_base_max = 36;
+      case 36: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(32u /* 288 & 0xFF */)) {
+          set_has_car_wheel_base_max();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+                 input, &car_wheel_base_max_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
       default: {
       handle_unusual:
         if (tag == 0) {
@@ -5296,6 +5443,37 @@ void Dispatch_coordinates_parameter_all::SerializeWithCachedSizes(
     ::google::protobuf::internal::WireFormatLite::WriteInt32(30, this->carrier_default_x_right(), output);
   }
 
+  // optional int32 passageway_terminal_id_min = 31;
+  if (cached_has_bits & 0x04000000u) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(31, this->passageway_terminal_id_min(), output);
+  }
+
+  // optional int32 passageway_terminal_id_max = 32;
+  if (cached_has_bits & 0x08000000u) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(32, this->passageway_terminal_id_max(), output);
+  }
+
+  // optional int32 passageway_terminal_number = 33;
+  if (cached_has_bits & 0x10000000u) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(33, this->passageway_terminal_number(), output);
+  }
+
+  // repeated .Dispatch_proto.Passageway_functioning_pattern passageway_functioning_patterns = 34;
+  for (int i = 0, n = this->passageway_functioning_patterns_size(); i < n; i++) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      34, this->passageway_functioning_patterns(i), output);
+  }
+
+  // optional int32 car_wheel_base_min = 35;
+  if (cached_has_bits & 0x20000000u) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(35, this->car_wheel_base_min(), output);
+  }
+
+  // optional int32 car_wheel_base_max = 36;
+  if (cached_has_bits & 0x40000000u) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(36, this->car_wheel_base_max(), output);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
         _internal_metadata_.unknown_fields(), output);
@@ -5477,6 +5655,35 @@ void Dispatch_coordinates_parameter_all::SerializeWithCachedSizes(
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(30, this->carrier_default_x_right(), target);
   }
 
+  // optional int32 passageway_terminal_id_min = 31;
+  if (cached_has_bits & 0x04000000u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(31, this->passageway_terminal_id_min(), target);
+  }
+
+  // optional int32 passageway_terminal_id_max = 32;
+  if (cached_has_bits & 0x08000000u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(32, this->passageway_terminal_id_max(), target);
+  }
+
+  // optional int32 passageway_terminal_number = 33;
+  if (cached_has_bits & 0x10000000u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(33, this->passageway_terminal_number(), target);
+  }
+
+  // repeated .Dispatch_proto.Passageway_functioning_pattern passageway_functioning_patterns = 34;
+  target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+    34, this->passageway_functioning_patterns_, target);
+
+  // optional int32 car_wheel_base_min = 35;
+  if (cached_has_bits & 0x20000000u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(35, this->car_wheel_base_min(), target);
+  }
+
+  // optional int32 car_wheel_base_max = 36;
+  if (cached_has_bits & 0x40000000u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(36, this->car_wheel_base_max(), target);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
         _internal_metadata_.unknown_fields(), target);
@@ -5538,6 +5745,16 @@ size_t Dispatch_coordinates_parameter_all::ByteSizeLong() const {
     }
   }
 
+  // repeated .Dispatch_proto.Passageway_functioning_pattern passageway_functioning_patterns = 34;
+  {
+    size_t data_size = 0;
+    unsigned int count = static_cast<unsigned int>(this->passageway_functioning_patterns_size());for (unsigned int i = 0; i < count; i++) {
+      data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
+        this->passageway_functioning_patterns(static_cast<int>(i)));
+    }
+    total_size += (2UL * count) + data_size;
+  }
+
   if (_has_bits_[0 / 32] & 255u) {
     // optional .Dispatch_proto.Carrier_box_parameter carrier_box_parameters = 5;
     if (has_carrier_box_parameters()) {
@@ -5712,7 +5929,7 @@ size_t Dispatch_coordinates_parameter_all::ByteSizeLong() const {
     }
 
   }
-  if (_has_bits_[24 / 32] & 50331648u) {
+  if (_has_bits_[24 / 32] & 2130706432u) {
     // optional int32 carrier_default_x_left = 29;
     if (has_carrier_default_x_left()) {
       total_size += 2 +
@@ -5727,6 +5944,41 @@ size_t Dispatch_coordinates_parameter_all::ByteSizeLong() const {
           this->carrier_default_x_right());
     }
 
+    // optional int32 passageway_terminal_id_min = 31;
+    if (has_passageway_terminal_id_min()) {
+      total_size += 2 +
+        ::google::protobuf::internal::WireFormatLite::Int32Size(
+          this->passageway_terminal_id_min());
+    }
+
+    // optional int32 passageway_terminal_id_max = 32;
+    if (has_passageway_terminal_id_max()) {
+      total_size += 2 +
+        ::google::protobuf::internal::WireFormatLite::Int32Size(
+          this->passageway_terminal_id_max());
+    }
+
+    // optional int32 passageway_terminal_number = 33;
+    if (has_passageway_terminal_number()) {
+      total_size += 2 +
+        ::google::protobuf::internal::WireFormatLite::Int32Size(
+          this->passageway_terminal_number());
+    }
+
+    // optional int32 car_wheel_base_min = 35;
+    if (has_car_wheel_base_min()) {
+      total_size += 2 +
+        ::google::protobuf::internal::WireFormatLite::Int32Size(
+          this->car_wheel_base_min());
+    }
+
+    // optional int32 car_wheel_base_max = 36;
+    if (has_car_wheel_base_max()) {
+      total_size += 2 +
+        ::google::protobuf::internal::WireFormatLite::Int32Size(
+          this->car_wheel_base_max());
+    }
+
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
@@ -5761,6 +6013,7 @@ void Dispatch_coordinates_parameter_all::MergeFrom(const Dispatch_coordinates_pa
   passageway_coordinates_parameters_.MergeFrom(from.passageway_coordinates_parameters_);
   carrier_coordinates_parameters_.MergeFrom(from.carrier_coordinates_parameters_);
   catcher_coordinates_parameters_.MergeFrom(from.catcher_coordinates_parameters_);
+  passageway_functioning_patterns_.MergeFrom(from.passageway_functioning_patterns_);
   cached_has_bits = from._has_bits_[0];
   if (cached_has_bits & 255u) {
     if (cached_has_bits & 0x00000001u) {
@@ -5843,13 +6096,28 @@ void Dispatch_coordinates_parameter_all::MergeFrom(const Dispatch_coordinates_pa
     }
     _has_bits_[0] |= cached_has_bits;
   }
-  if (cached_has_bits & 50331648u) {
+  if (cached_has_bits & 2130706432u) {
     if (cached_has_bits & 0x01000000u) {
       carrier_default_x_left_ = from.carrier_default_x_left_;
     }
     if (cached_has_bits & 0x02000000u) {
       carrier_default_x_right_ = from.carrier_default_x_right_;
     }
+    if (cached_has_bits & 0x04000000u) {
+      passageway_terminal_id_min_ = from.passageway_terminal_id_min_;
+    }
+    if (cached_has_bits & 0x08000000u) {
+      passageway_terminal_id_max_ = from.passageway_terminal_id_max_;
+    }
+    if (cached_has_bits & 0x10000000u) {
+      passageway_terminal_number_ = from.passageway_terminal_number_;
+    }
+    if (cached_has_bits & 0x20000000u) {
+      car_wheel_base_min_ = from.car_wheel_base_min_;
+    }
+    if (cached_has_bits & 0x40000000u) {
+      car_wheel_base_max_ = from.car_wheel_base_max_;
+    }
     _has_bits_[0] |= cached_has_bits;
   }
 }
@@ -5882,6 +6150,7 @@ void Dispatch_coordinates_parameter_all::InternalSwap(Dispatch_coordinates_param
   passageway_coordinates_parameters_.InternalSwap(&other->passageway_coordinates_parameters_);
   carrier_coordinates_parameters_.InternalSwap(&other->carrier_coordinates_parameters_);
   catcher_coordinates_parameters_.InternalSwap(&other->catcher_coordinates_parameters_);
+  passageway_functioning_patterns_.InternalSwap(&other->passageway_functioning_patterns_);
   swap(carrier_box_parameters_, other->carrier_box_parameters_);
   swap(catcher_box_parameters_, other->catcher_box_parameters_);
   swap(catcher_b_min_, other->catcher_b_min_);
@@ -5908,6 +6177,11 @@ void Dispatch_coordinates_parameter_all::InternalSwap(Dispatch_coordinates_param
   swap(carrier_default_y_leave_, other->carrier_default_y_leave_);
   swap(carrier_default_x_left_, other->carrier_default_x_left_);
   swap(carrier_default_x_right_, other->carrier_default_x_right_);
+  swap(passageway_terminal_id_min_, other->passageway_terminal_id_min_);
+  swap(passageway_terminal_id_max_, other->passageway_terminal_id_max_);
+  swap(passageway_terminal_number_, other->passageway_terminal_number_);
+  swap(car_wheel_base_min_, other->car_wheel_base_min_);
+  swap(car_wheel_base_max_, other->car_wheel_base_max_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
   swap(_cached_size_, other->_cached_size_);

+ 247 - 0
dispatch/dispatch_parameter.pb.h

@@ -28,6 +28,7 @@
 #include <google/protobuf/message.h>
 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
 #include <google/protobuf/extension_set.h>  // IWYU pragma: export
+#include <google/protobuf/generated_enum_reflection.h>
 #include <google/protobuf/unknown_field_set.h>
 // @@protoc_insertion_point(includes)
 
@@ -121,6 +122,27 @@ extern Passageway_parameterDefaultTypeInternal _Passageway_parameter_default_ins
 }  // namespace Dispatch_proto
 namespace Dispatch_proto {
 
+enum Passageway_functioning_pattern {
+  PASSAGEWAY_FUNCTIONING_PATTERN_UNKNOWN = 0,
+  PASSAGEWAY_FUNCTIONING_PATTERN_INLET = 1,
+  PASSAGEWAY_FUNCTIONING_PATTERN_OUTLET = 2,
+  PASSAGEWAY_FUNCTIONING_PATTERN_BIDIRECTION = 3
+};
+bool Passageway_functioning_pattern_IsValid(int value);
+const Passageway_functioning_pattern Passageway_functioning_pattern_MIN = PASSAGEWAY_FUNCTIONING_PATTERN_UNKNOWN;
+const Passageway_functioning_pattern Passageway_functioning_pattern_MAX = PASSAGEWAY_FUNCTIONING_PATTERN_BIDIRECTION;
+const int Passageway_functioning_pattern_ARRAYSIZE = Passageway_functioning_pattern_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* Passageway_functioning_pattern_descriptor();
+inline const ::std::string& Passageway_functioning_pattern_Name(Passageway_functioning_pattern value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    Passageway_functioning_pattern_descriptor(), value);
+}
+inline bool Passageway_functioning_pattern_Parse(
+    const ::std::string& name, Passageway_functioning_pattern* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<Passageway_functioning_pattern>(
+    Passageway_functioning_pattern_descriptor(), name, value);
+}
 // ===================================================================
 
 class Catcher_parameter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Dispatch_proto.Catcher_parameter) */ {
@@ -1762,6 +1784,16 @@ class Dispatch_coordinates_parameter_all : public ::google::protobuf::Message /*
   const ::google::protobuf::RepeatedPtrField< ::Dispatch_proto::Catcher_coordinates_parameter >&
       catcher_coordinates_parameters() const;
 
+  // repeated .Dispatch_proto.Passageway_functioning_pattern passageway_functioning_patterns = 34;
+  int passageway_functioning_patterns_size() const;
+  void clear_passageway_functioning_patterns();
+  static const int kPassagewayFunctioningPatternsFieldNumber = 34;
+  ::Dispatch_proto::Passageway_functioning_pattern passageway_functioning_patterns(int index) const;
+  void set_passageway_functioning_patterns(int index, ::Dispatch_proto::Passageway_functioning_pattern value);
+  void add_passageway_functioning_patterns(::Dispatch_proto::Passageway_functioning_pattern value);
+  const ::google::protobuf::RepeatedField<int>& passageway_functioning_patterns() const;
+  ::google::protobuf::RepeatedField<int>* mutable_passageway_functioning_patterns();
+
   // optional .Dispatch_proto.Carrier_box_parameter carrier_box_parameters = 5;
   bool has_carrier_box_parameters() const;
   void clear_carrier_box_parameters();
@@ -1948,6 +1980,41 @@ class Dispatch_coordinates_parameter_all : public ::google::protobuf::Message /*
   ::google::protobuf::int32 carrier_default_x_right() const;
   void set_carrier_default_x_right(::google::protobuf::int32 value);
 
+  // optional int32 passageway_terminal_id_min = 31;
+  bool has_passageway_terminal_id_min() const;
+  void clear_passageway_terminal_id_min();
+  static const int kPassagewayTerminalIdMinFieldNumber = 31;
+  ::google::protobuf::int32 passageway_terminal_id_min() const;
+  void set_passageway_terminal_id_min(::google::protobuf::int32 value);
+
+  // optional int32 passageway_terminal_id_max = 32;
+  bool has_passageway_terminal_id_max() const;
+  void clear_passageway_terminal_id_max();
+  static const int kPassagewayTerminalIdMaxFieldNumber = 32;
+  ::google::protobuf::int32 passageway_terminal_id_max() const;
+  void set_passageway_terminal_id_max(::google::protobuf::int32 value);
+
+  // optional int32 passageway_terminal_number = 33;
+  bool has_passageway_terminal_number() const;
+  void clear_passageway_terminal_number();
+  static const int kPassagewayTerminalNumberFieldNumber = 33;
+  ::google::protobuf::int32 passageway_terminal_number() const;
+  void set_passageway_terminal_number(::google::protobuf::int32 value);
+
+  // optional int32 car_wheel_base_min = 35;
+  bool has_car_wheel_base_min() const;
+  void clear_car_wheel_base_min();
+  static const int kCarWheelBaseMinFieldNumber = 35;
+  ::google::protobuf::int32 car_wheel_base_min() const;
+  void set_car_wheel_base_min(::google::protobuf::int32 value);
+
+  // optional int32 car_wheel_base_max = 36;
+  bool has_car_wheel_base_max() const;
+  void clear_car_wheel_base_max();
+  static const int kCarWheelBaseMaxFieldNumber = 36;
+  ::google::protobuf::int32 car_wheel_base_max() const;
+  void set_car_wheel_base_max(::google::protobuf::int32 value);
+
   // @@protoc_insertion_point(class_scope:Dispatch_proto.Dispatch_coordinates_parameter_all)
  private:
   void set_has_carrier_box_parameters();
@@ -2002,6 +2069,16 @@ class Dispatch_coordinates_parameter_all : public ::google::protobuf::Message /*
   void clear_has_carrier_default_x_left();
   void set_has_carrier_default_x_right();
   void clear_has_carrier_default_x_right();
+  void set_has_passageway_terminal_id_min();
+  void clear_has_passageway_terminal_id_min();
+  void set_has_passageway_terminal_id_max();
+  void clear_has_passageway_terminal_id_max();
+  void set_has_passageway_terminal_number();
+  void clear_has_passageway_terminal_number();
+  void set_has_car_wheel_base_min();
+  void clear_has_car_wheel_base_min();
+  void set_has_car_wheel_base_max();
+  void clear_has_car_wheel_base_max();
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
@@ -2010,6 +2087,7 @@ class Dispatch_coordinates_parameter_all : public ::google::protobuf::Message /*
   ::google::protobuf::RepeatedPtrField< ::Dispatch_proto::Passageway_coordinates_parameter > passageway_coordinates_parameters_;
   ::google::protobuf::RepeatedPtrField< ::Dispatch_proto::Carrier_coordinates_parameter > carrier_coordinates_parameters_;
   ::google::protobuf::RepeatedPtrField< ::Dispatch_proto::Catcher_coordinates_parameter > catcher_coordinates_parameters_;
+  ::google::protobuf::RepeatedField<int> passageway_functioning_patterns_;
   ::Dispatch_proto::Carrier_box_parameter* carrier_box_parameters_;
   ::Dispatch_proto::Catcher_box_parameter* catcher_box_parameters_;
   ::google::protobuf::int32 catcher_b_min_;
@@ -2036,6 +2114,11 @@ class Dispatch_coordinates_parameter_all : public ::google::protobuf::Message /*
   ::google::protobuf::int32 carrier_default_y_leave_;
   ::google::protobuf::int32 carrier_default_x_left_;
   ::google::protobuf::int32 carrier_default_x_right_;
+  ::google::protobuf::int32 passageway_terminal_id_min_;
+  ::google::protobuf::int32 passageway_terminal_id_max_;
+  ::google::protobuf::int32 passageway_terminal_number_;
+  ::google::protobuf::int32 car_wheel_base_min_;
+  ::google::protobuf::int32 car_wheel_base_max_;
   friend struct ::protobuf_dispatch_5fparameter_2eproto::TableStruct;
   friend void ::protobuf_dispatch_5fparameter_2eproto::InitDefaultsDispatch_coordinates_parameter_allImpl();
 };
@@ -3852,6 +3935,158 @@ inline void Dispatch_coordinates_parameter_all::set_carrier_default_x_right(::go
   // @@protoc_insertion_point(field_set:Dispatch_proto.Dispatch_coordinates_parameter_all.carrier_default_x_right)
 }
 
+// optional int32 passageway_terminal_id_min = 31;
+inline bool Dispatch_coordinates_parameter_all::has_passageway_terminal_id_min() const {
+  return (_has_bits_[0] & 0x04000000u) != 0;
+}
+inline void Dispatch_coordinates_parameter_all::set_has_passageway_terminal_id_min() {
+  _has_bits_[0] |= 0x04000000u;
+}
+inline void Dispatch_coordinates_parameter_all::clear_has_passageway_terminal_id_min() {
+  _has_bits_[0] &= ~0x04000000u;
+}
+inline void Dispatch_coordinates_parameter_all::clear_passageway_terminal_id_min() {
+  passageway_terminal_id_min_ = 0;
+  clear_has_passageway_terminal_id_min();
+}
+inline ::google::protobuf::int32 Dispatch_coordinates_parameter_all::passageway_terminal_id_min() const {
+  // @@protoc_insertion_point(field_get:Dispatch_proto.Dispatch_coordinates_parameter_all.passageway_terminal_id_min)
+  return passageway_terminal_id_min_;
+}
+inline void Dispatch_coordinates_parameter_all::set_passageway_terminal_id_min(::google::protobuf::int32 value) {
+  set_has_passageway_terminal_id_min();
+  passageway_terminal_id_min_ = value;
+  // @@protoc_insertion_point(field_set:Dispatch_proto.Dispatch_coordinates_parameter_all.passageway_terminal_id_min)
+}
+
+// optional int32 passageway_terminal_id_max = 32;
+inline bool Dispatch_coordinates_parameter_all::has_passageway_terminal_id_max() const {
+  return (_has_bits_[0] & 0x08000000u) != 0;
+}
+inline void Dispatch_coordinates_parameter_all::set_has_passageway_terminal_id_max() {
+  _has_bits_[0] |= 0x08000000u;
+}
+inline void Dispatch_coordinates_parameter_all::clear_has_passageway_terminal_id_max() {
+  _has_bits_[0] &= ~0x08000000u;
+}
+inline void Dispatch_coordinates_parameter_all::clear_passageway_terminal_id_max() {
+  passageway_terminal_id_max_ = 0;
+  clear_has_passageway_terminal_id_max();
+}
+inline ::google::protobuf::int32 Dispatch_coordinates_parameter_all::passageway_terminal_id_max() const {
+  // @@protoc_insertion_point(field_get:Dispatch_proto.Dispatch_coordinates_parameter_all.passageway_terminal_id_max)
+  return passageway_terminal_id_max_;
+}
+inline void Dispatch_coordinates_parameter_all::set_passageway_terminal_id_max(::google::protobuf::int32 value) {
+  set_has_passageway_terminal_id_max();
+  passageway_terminal_id_max_ = value;
+  // @@protoc_insertion_point(field_set:Dispatch_proto.Dispatch_coordinates_parameter_all.passageway_terminal_id_max)
+}
+
+// optional int32 passageway_terminal_number = 33;
+inline bool Dispatch_coordinates_parameter_all::has_passageway_terminal_number() const {
+  return (_has_bits_[0] & 0x10000000u) != 0;
+}
+inline void Dispatch_coordinates_parameter_all::set_has_passageway_terminal_number() {
+  _has_bits_[0] |= 0x10000000u;
+}
+inline void Dispatch_coordinates_parameter_all::clear_has_passageway_terminal_number() {
+  _has_bits_[0] &= ~0x10000000u;
+}
+inline void Dispatch_coordinates_parameter_all::clear_passageway_terminal_number() {
+  passageway_terminal_number_ = 0;
+  clear_has_passageway_terminal_number();
+}
+inline ::google::protobuf::int32 Dispatch_coordinates_parameter_all::passageway_terminal_number() const {
+  // @@protoc_insertion_point(field_get:Dispatch_proto.Dispatch_coordinates_parameter_all.passageway_terminal_number)
+  return passageway_terminal_number_;
+}
+inline void Dispatch_coordinates_parameter_all::set_passageway_terminal_number(::google::protobuf::int32 value) {
+  set_has_passageway_terminal_number();
+  passageway_terminal_number_ = value;
+  // @@protoc_insertion_point(field_set:Dispatch_proto.Dispatch_coordinates_parameter_all.passageway_terminal_number)
+}
+
+// repeated .Dispatch_proto.Passageway_functioning_pattern passageway_functioning_patterns = 34;
+inline int Dispatch_coordinates_parameter_all::passageway_functioning_patterns_size() const {
+  return passageway_functioning_patterns_.size();
+}
+inline void Dispatch_coordinates_parameter_all::clear_passageway_functioning_patterns() {
+  passageway_functioning_patterns_.Clear();
+}
+inline ::Dispatch_proto::Passageway_functioning_pattern Dispatch_coordinates_parameter_all::passageway_functioning_patterns(int index) const {
+  // @@protoc_insertion_point(field_get:Dispatch_proto.Dispatch_coordinates_parameter_all.passageway_functioning_patterns)
+  return static_cast< ::Dispatch_proto::Passageway_functioning_pattern >(passageway_functioning_patterns_.Get(index));
+}
+inline void Dispatch_coordinates_parameter_all::set_passageway_functioning_patterns(int index, ::Dispatch_proto::Passageway_functioning_pattern value) {
+  assert(::Dispatch_proto::Passageway_functioning_pattern_IsValid(value));
+  passageway_functioning_patterns_.Set(index, value);
+  // @@protoc_insertion_point(field_set:Dispatch_proto.Dispatch_coordinates_parameter_all.passageway_functioning_patterns)
+}
+inline void Dispatch_coordinates_parameter_all::add_passageway_functioning_patterns(::Dispatch_proto::Passageway_functioning_pattern value) {
+  assert(::Dispatch_proto::Passageway_functioning_pattern_IsValid(value));
+  passageway_functioning_patterns_.Add(value);
+  // @@protoc_insertion_point(field_add:Dispatch_proto.Dispatch_coordinates_parameter_all.passageway_functioning_patterns)
+}
+inline const ::google::protobuf::RepeatedField<int>&
+Dispatch_coordinates_parameter_all::passageway_functioning_patterns() const {
+  // @@protoc_insertion_point(field_list:Dispatch_proto.Dispatch_coordinates_parameter_all.passageway_functioning_patterns)
+  return passageway_functioning_patterns_;
+}
+inline ::google::protobuf::RepeatedField<int>*
+Dispatch_coordinates_parameter_all::mutable_passageway_functioning_patterns() {
+  // @@protoc_insertion_point(field_mutable_list:Dispatch_proto.Dispatch_coordinates_parameter_all.passageway_functioning_patterns)
+  return &passageway_functioning_patterns_;
+}
+
+// optional int32 car_wheel_base_min = 35;
+inline bool Dispatch_coordinates_parameter_all::has_car_wheel_base_min() const {
+  return (_has_bits_[0] & 0x20000000u) != 0;
+}
+inline void Dispatch_coordinates_parameter_all::set_has_car_wheel_base_min() {
+  _has_bits_[0] |= 0x20000000u;
+}
+inline void Dispatch_coordinates_parameter_all::clear_has_car_wheel_base_min() {
+  _has_bits_[0] &= ~0x20000000u;
+}
+inline void Dispatch_coordinates_parameter_all::clear_car_wheel_base_min() {
+  car_wheel_base_min_ = 0;
+  clear_has_car_wheel_base_min();
+}
+inline ::google::protobuf::int32 Dispatch_coordinates_parameter_all::car_wheel_base_min() const {
+  // @@protoc_insertion_point(field_get:Dispatch_proto.Dispatch_coordinates_parameter_all.car_wheel_base_min)
+  return car_wheel_base_min_;
+}
+inline void Dispatch_coordinates_parameter_all::set_car_wheel_base_min(::google::protobuf::int32 value) {
+  set_has_car_wheel_base_min();
+  car_wheel_base_min_ = value;
+  // @@protoc_insertion_point(field_set:Dispatch_proto.Dispatch_coordinates_parameter_all.car_wheel_base_min)
+}
+
+// optional int32 car_wheel_base_max = 36;
+inline bool Dispatch_coordinates_parameter_all::has_car_wheel_base_max() const {
+  return (_has_bits_[0] & 0x40000000u) != 0;
+}
+inline void Dispatch_coordinates_parameter_all::set_has_car_wheel_base_max() {
+  _has_bits_[0] |= 0x40000000u;
+}
+inline void Dispatch_coordinates_parameter_all::clear_has_car_wheel_base_max() {
+  _has_bits_[0] &= ~0x40000000u;
+}
+inline void Dispatch_coordinates_parameter_all::clear_car_wheel_base_max() {
+  car_wheel_base_max_ = 0;
+  clear_has_car_wheel_base_max();
+}
+inline ::google::protobuf::int32 Dispatch_coordinates_parameter_all::car_wheel_base_max() const {
+  // @@protoc_insertion_point(field_get:Dispatch_proto.Dispatch_coordinates_parameter_all.car_wheel_base_max)
+  return car_wheel_base_max_;
+}
+inline void Dispatch_coordinates_parameter_all::set_car_wheel_base_max(::google::protobuf::int32 value) {
+  set_has_car_wheel_base_max();
+  car_wheel_base_max_ = value;
+  // @@protoc_insertion_point(field_set:Dispatch_proto.Dispatch_coordinates_parameter_all.car_wheel_base_max)
+}
+
 #ifdef __GNUC__
   #pragma GCC diagnostic pop
 #endif  // __GNUC__
@@ -3882,6 +4117,18 @@ inline void Dispatch_coordinates_parameter_all::set_carrier_default_x_right(::go
 
 }  // namespace Dispatch_proto
 
+namespace google {
+namespace protobuf {
+
+template <> struct is_proto_enum< ::Dispatch_proto::Passageway_functioning_pattern> : ::google::protobuf::internal::true_type {};
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::Dispatch_proto::Passageway_functioning_pattern>() {
+  return ::Dispatch_proto::Passageway_functioning_pattern_descriptor();
+}
+
+}  // namespace protobuf
+}  // namespace google
+
 // @@protoc_insertion_point(global_scope)
 
 #endif  // PROTOBUF_dispatch_5fparameter_2eproto__INCLUDED

+ 18 - 0
dispatch/dispatch_parameter.proto

@@ -123,6 +123,14 @@ message Axis_range_parameter
     optional int32                  max = 2[default = 1000000];
 }
 
+//出入口的功能模式
+enum Passageway_functioning_pattern
+{
+    PASSAGEWAY_FUNCTIONING_PATTERN_UNKNOWN          = 0;    //未知
+    PASSAGEWAY_FUNCTIONING_PATTERN_INLET            = 1;    //单向入口
+    PASSAGEWAY_FUNCTIONING_PATTERN_OUTLET           = 2;    //单向出口
+    PASSAGEWAY_FUNCTIONING_PATTERN_BIDIRECTION      = 3;    //双向口
+}
 
 message Dispatch_coordinates_parameter_all
 {
@@ -166,4 +174,14 @@ message Dispatch_coordinates_parameter_all
 
     optional int32                                      carrier_default_x_left = 29;
     optional int32                                      carrier_default_x_right = 30;
+
+    optional int32                                      passageway_terminal_id_min = 31;
+    optional int32                                      passageway_terminal_id_max = 32;
+    optional int32                                      passageway_terminal_number = 33;
+    repeated Passageway_functioning_pattern             passageway_functioning_patterns = 34;
+
+    optional int32                                      car_wheel_base_min = 35;
+    optional int32                                      car_wheel_base_max = 36;
+
+
 }

+ 91 - 35
dispatch/dispatch_process.cpp

@@ -34,36 +34,82 @@ Error_manager Dispatch_process::Dispatch_process_init(message::Dispatch_request_
 	m_command_key = dispatch_request_msg.command_key();
 	m_start_time = std::chrono::system_clock::now();
 
+	//检查调度请求消息
+	if ( dispatch_request_msg.terminal_id() < Dispatch_coordinates::get_instance_references().m_passageway_terminal_id_min ||
+		 dispatch_request_msg.terminal_id() > Dispatch_coordinates::get_instance_references().m_passageway_terminal_id_max)
+	{
+		return Error_manager(Error_code::DISPATCH_PROCESS_INIT_ERROR, Error_level::MINOR_ERROR,
+							 " dispatch_request_msg.terminal_id() is error ");
+	}
+
+	//解析调度请求消息
 	if ( dispatch_request_msg.dispatch_motion_direction() == message::E_STORE_CAR )
 	{
+		//检查调度请求消息
+		if ( Dispatch_coordinates::get_instance_references().m_passageway_functioning_pattern_map[dispatch_request_msg.terminal_id()] != Dispatch_coordinates::PASSAGEWAY_FUNCTIONING_PATTERN_INLET &&
+			 Dispatch_coordinates::get_instance_references().m_passageway_functioning_pattern_map[dispatch_request_msg.terminal_id()] != Dispatch_coordinates::PASSAGEWAY_FUNCTIONING_PATTERN_BIDIRECTION )
+		{
+			return Error_manager(Error_code::DISPATCH_PROCESS_INIT_ERROR, Error_level::MINOR_ERROR,
+								 " m_passageway_functioning_pattern_map[dispatch_request_msg.terminal_id()] is error ");
+		}
+		//存车的车位可以是1~3个
+		if ( dispatch_request_msg.parkspace_info_ex_size() <=0 || dispatch_request_msg.parkspace_info_ex_size() >3 )
+		{
+			return Error_manager(Error_code::DISPATCH_PROCESS_INIT_ERROR, Error_level::MINOR_ERROR,
+								 " dispatch_request_msg.parkspace_info_ex_size() is error ");
+		}
+		if ( dispatch_request_msg.has_locate_information() == false )
+		{
+			return Error_manager(Error_code::DISPATCH_PROCESS_INIT_ERROR, Error_level::MINOR_ERROR,
+								 " dispatch_request_msg.has_locate_information() is error ");
+		}
+
 		m_dispatch_process_type = DISPATCH_PROCESS_STORE;
 		m_dispatch_source = dispatch_request_msg.terminal_id() + PASSAGEWAY_ID_BASE ;
-		m_dispatch_destination = dispatch_request_msg.parkspace_info().parkingspace_index_id() + PARKSPACE_ID_BASE;
-		Common_data::copy_data(m_parkspace_information, dispatch_request_msg.parkspace_info());
-		Common_data::scaling(m_parkspace_information, 1000);
+		//终点在运动过程中动态分配
+//		m_dispatch_destination = dispatch_request_msg.parkspace_info().parkingspace_index_id() + PARKSPACE_ID_BASE;
+//		Common_data::copy_data(m_parkspace_information, dispatch_request_msg.parkspace_info());
+//		Common_data::scaling(m_parkspace_information, 1000);
 		Common_data::copy_data(m_car_measure_information, dispatch_request_msg.locate_information());
 		Common_data::scaling(m_car_measure_information, 1000);
 		m_wheel_base = m_car_measure_information.car_wheel_base;
 	}
 	else if( dispatch_request_msg.dispatch_motion_direction() == message::E_PICKUP_CAR )
 	{
+		//检查调度请求消息
+		if ( Dispatch_coordinates::get_instance_references().m_passageway_functioning_pattern_map[dispatch_request_msg.terminal_id()] != Dispatch_coordinates::PASSAGEWAY_FUNCTIONING_PATTERN_OUTLET &&
+			 Dispatch_coordinates::get_instance_references().m_passageway_functioning_pattern_map[dispatch_request_msg.terminal_id()] != Dispatch_coordinates::PASSAGEWAY_FUNCTIONING_PATTERN_BIDIRECTION )
+		{
+			return Error_manager(Error_code::DISPATCH_PROCESS_INIT_ERROR, Error_level::MINOR_ERROR,
+								 " m_passageway_functioning_pattern_map[dispatch_request_msg.terminal_id()] is error ");
+		}
+		//取车的车位必须是1个
+		if ( dispatch_request_msg.parkspace_info_ex_size() != 1 )
+		{
+			return Error_manager(Error_code::DISPATCH_PROCESS_INIT_ERROR, Error_level::MINOR_ERROR,
+								 " dispatch_request_msg.parkspace_info_ex_size() is error ");
+		}
+
 		m_dispatch_process_type = DISPATCH_PROCESS_PICKUP;
 		m_dispatch_source = dispatch_request_msg.parkspace_info().parkingspace_index_id() + PARKSPACE_ID_BASE;
-		m_dispatch_destination = dispatch_request_msg.terminal_id() + PASSAGEWAY_ID_BASE ;
-		Common_data::copy_data(m_parkspace_information, dispatch_request_msg.parkspace_info());
+		//终点在运动过程中动态分配
+//		m_dispatch_destination = dispatch_request_msg.terminal_id() + PASSAGEWAY_ID_BASE ;
+		Common_data::copy_data(m_parkspace_information, dispatch_request_msg.parkspace_info_ex(0));
 		Common_data::scaling(m_parkspace_information, 1000);
 		m_wheel_base = m_parkspace_information.car_information.car_wheel_base;
 	}
 	else
 	{
 		m_dispatch_process_type = DISPATCH_PROCESS_TYPE_UNKNOW;
-		return Error_manager(Error_code::PARAMETER_ERROR, Error_level::MINOR_ERROR,
+		return Error_manager(Error_code::DISPATCH_PROCESS_INIT_ERROR, Error_level::MINOR_ERROR,
 							 "  Dispatch_process::Dispatch_process_init ERROR ");
 	}
 
-	if ( m_wheel_base < 1000 )
+	//轮距
+	if ( m_wheel_base < Dispatch_coordinates::get_instance_references().m_car_wheel_base_min ||
+		 m_wheel_base > Dispatch_coordinates::get_instance_references().m_car_wheel_base_max)
 	{
-		return Error_manager(Error_code::PARAMETER_ERROR, Error_level::MINOR_ERROR,
+		return Error_manager(Error_code::DISPATCH_PROCESS_INIT_ERROR, Error_level::MINOR_ERROR,
 							 "  m_wheel_base < 1000 ERROR ");
 	}
 	m_dispatch_request_msg = dispatch_request_msg;
@@ -77,12 +123,12 @@ Error_manager Dispatch_process::Dispatch_process_uninit()
 	std::unique_lock<std::mutex> t_lock(m_lock);
 	for (auto iter = m_dispatch_control_node_map.begin(); iter != m_dispatch_control_node_map.end(); ++iter)
 	{
-	    if ( iter->second.mp_dispatch_task.get() != NULL )
-	    {
+		if ( iter->second.mp_dispatch_task.get() != NULL )
+		{
 			iter->second.mp_dispatch_task->set_task_statu(Task_Base::Task_statu::TASK_WITHDRAW);
 			iter->second.mp_dispatch_task.reset();
 			iter->second.mp_dispatch_device.reset();
-	    }
+		}
 	}
 	return Error_code::SUCCESS;
 }
@@ -94,12 +140,12 @@ Error_manager Dispatch_process::check_process_ready()
 
 	if ( m_dispatch_process_status == DISPATCH_PROCESS_READY )
 	{
-	    return Error_code::SUCCESS;
+		return Error_code::SUCCESS;
 	}
 	else
 	{
-	    return Error_manager(Error_code::DISPATCH_PROCESS_IS_NOT_READY, Error_level::MINOR_ERROR,
-	    					" Dispatch_process::check_process_ready() fun error ");
+		return Error_manager(Error_code::DISPATCH_PROCESS_IS_NOT_READY, Error_level::MINOR_ERROR,
+							 " Dispatch_process::check_process_ready() fun error ");
 	}
 }
 
@@ -260,7 +306,7 @@ Error_manager Dispatch_process::dispatch_control_motion()
 				break;
 			}
 			case DISPATCH_CONTROL_CONNECT_DEVICE:
-		    {
+			{
 				//连接调度设备
 				t_error = connect_dispatch_device(iter->first, iter->second);
 				if ( t_error !=Error_code::SUCCESS)
@@ -275,9 +321,9 @@ Error_manager Dispatch_process::dispatch_control_motion()
 					iter->second.m_time_to_send_control_response = std::chrono::system_clock::now();
 				}
 				break;
-		    }
-		    case DISPATCH_CONTROL_WORKING:
-		    {
+			}
+			case DISPATCH_CONTROL_WORKING:
+			{
 				//执行调度控制指令, 并根据完成情况给答复
 				t_error = excute_dispatch_control(iter->first, iter->second);
 				if ( t_error == Error_code::NODATA )
@@ -299,7 +345,7 @@ Error_manager Dispatch_process::dispatch_control_motion()
 					iter->second.m_dispatch_control_status = DISPATCH_CONTROL_TASK_WITHDRAW;
 				}
 				break;
-		    }
+			}
 			case DISPATCH_CONTROL_TASK_WITHDRAW://流程 收回任务单
 			{
 				//发送调度控制答复, 发给调度控制的
@@ -330,10 +376,10 @@ Error_manager Dispatch_process::dispatch_control_motion()
 
 				break;
 			}
-		    default:
-		    {
-		        break;   
-		    }    
+			default:
+			{
+				break;
+			}
 		}
 	}
 	return Error_code::SUCCESS;
@@ -350,7 +396,7 @@ Error_manager Dispatch_process::wait_dispatch_control_request_msg(int dispatch_d
 	}
 	else
 	{
-	    return Error_code::NODATA;
+		return Error_code::NODATA;
 	}
 	return Error_code::SUCCESS;
 }
@@ -362,7 +408,7 @@ Error_manager Dispatch_process::connect_dispatch_device(int dispatch_device_type
 	Error_manager t_error;
 
 	if ( dispatch_device_type == message::Dispatch_device_type::ROBOT_1 ||
-	dispatch_device_type == message::Dispatch_device_type::ROBOT_2 )
+		 dispatch_device_type == message::Dispatch_device_type::ROBOT_2 )
 	{
 		//找到对应的设备
 		if ( dispatch_device_type == message::Dispatch_device_type::ROBOT_1 )
@@ -408,7 +454,7 @@ Error_manager Dispatch_process::connect_dispatch_device(int dispatch_device_type
 			std::cout << " huli test :::: " << " tp_catcher->check_status() = " << tp_catcher->check_status().to_string() << std::endl;
 			std::cout << " huli test :::: " << " tp_catcher->m_actual_device_status = " << tp_catcher->m_actual_device_status << std::endl;
 			t_error = Error_manager(Error_code::DISPATCH_PROCESS_DEVICE_STATUS_ERROR, Error_level::MINOR_ERROR,
-														  " tp_catcher->m_actual_device_status device_status error ");
+									" tp_catcher->m_actual_device_status device_status error ");
 			dispatch_control_node.m_error = t_error;
 			return t_error;
 		}
@@ -425,10 +471,10 @@ Error_manager Dispatch_process::connect_dispatch_device(int dispatch_device_type
 		std::cout << " huli test :::: " << " dispatch_control_node.m_destination_coordinates.z = " << dispatch_control_node.m_destination_coordinates.z << std::endl;
 		std::cout << " huli test :::: " << "*******************************************" << 123 << std::endl;
 	}
-	//搬运器的配置 准备工作
+		//搬运器的配置 准备工作
 	else if ( dispatch_device_type == message::Dispatch_device_type::CARRIER_1 ||
-		 dispatch_device_type == message::Dispatch_device_type::CARRIER_2 ||
-		 dispatch_device_type == message::Dispatch_device_type::CARRIER_3  )
+			  dispatch_device_type == message::Dispatch_device_type::CARRIER_2 ||
+			  dispatch_device_type == message::Dispatch_device_type::CARRIER_3  )
 	{
 		//找到对应的设备
 		if ( dispatch_device_type == message::Dispatch_device_type::CARRIER_1 )
@@ -482,7 +528,7 @@ Error_manager Dispatch_process::connect_dispatch_device(int dispatch_device_type
 			std::cout << " huli test :::: " << " tp_carrier->check_status() = " << tp_carrier->check_status().to_string() << std::endl;
 			std::cout << " huli test :::: " << " tp_carrier->m_actual_device_status = " << tp_carrier->m_actual_device_status << std::endl;
 			t_error = Error_manager(Error_code::DISPATCH_PROCESS_DEVICE_STATUS_ERROR, Error_level::MINOR_ERROR,
-								 " tp_carrier->m_actual_device_status device_status error ");
+									" tp_carrier->m_actual_device_status device_status error ");
 			dispatch_control_node.m_error = t_error;
 			return t_error;
 		}
@@ -562,8 +608,8 @@ Error_manager Dispatch_process::excute_dispatch_control(int dispatch_device_type
 
 			default:
 			{
-			return Error_manager(Error_code::DISPATCH_PROCESS_TASK_STATUS_ERROR, Error_level::MINOR_ERROR,
-								 "Dispatch_process::excute_dispatch_control() fun error ");
+				return Error_manager(Error_code::DISPATCH_PROCESS_TASK_STATUS_ERROR, Error_level::MINOR_ERROR,
+									 "Dispatch_process::excute_dispatch_control() fun error ");
 				break;
 			}
 		}
@@ -693,7 +739,7 @@ Error_manager Dispatch_process::disconnect_dispatch_device(int dispatch_device_t
 		}
 		else
 		{
-		    return Error_code::NODATA;
+			return Error_code::NODATA;
 		}
 	}
 	return Error_code::SUCCESS;
@@ -1504,6 +1550,11 @@ Error_manager Dispatch_process::excute_carrier_store_car_to_parkingspace(Dispatc
 			//检测正常, 直接跳过即可
 			tp_carrier_task->m_step +=2;
 		}
+		//注意了, 如果是去7号出口, 那么就直接跳过轮距修正和夹车.
+		else if(dispatch_control_node.m_dispatch_control_request_msg.dispatch_destination() == 1107)
+		{
+			tp_carrier_task->m_step = 7;
+		}
 		else
 		{
 			return Error_manager(Error_code::CARRIER_POSE_ERROR, Error_level::MINOR_ERROR,
@@ -1730,6 +1781,11 @@ Error_manager Dispatch_process::excute_carrier_store_car_to_parkingspace_ex(Disp
 			//检测正常, 直接跳过即可
 			tp_carrier_task->m_step +=2;
 		}
+		//注意了, 如果是去7号出口, 那么就直接跳过轮距修正和夹车.
+		else if(dispatch_control_node.m_dispatch_control_request_msg.dispatch_destination() == 1107)
+		{
+			tp_carrier_task->m_step = 7;
+		}
 		else
 		{
 			return Error_manager(Error_code::CARRIER_POSE_ERROR, Error_level::MINOR_ERROR,
@@ -2649,8 +2705,8 @@ Error_manager Dispatch_process::check_task_ex(std::shared_ptr<Task_Base> p_task,
 			return p_task->get_task_error_manager();
 		}
 		else if ( p_task->get_task_statu() == Task_Base::Task_statu::TASK_WORKING ||
-		p_task->get_task_statu() == Task_Base::Task_statu::TASK_SIGNED ||
-		p_task->get_task_statu() == Task_Base::Task_statu::TASK_CREATED)
+				  p_task->get_task_statu() == Task_Base::Task_statu::TASK_SIGNED ||
+				  p_task->get_task_statu() == Task_Base::Task_statu::TASK_CREATED)
 		{
 			//继续等待任务, 直到状态改变
 			return Error_code::NODATA;

+ 3 - 39
dispatch/dispatch_process.h

@@ -47,9 +47,9 @@ public:
 //调度指令超时时间  衰减值 在原有的基础上减少30秒
 #define DISPATCH_PROCESS_ATTENUATION_TIMEOUT_MS				10000
 
-//调度默认 差值 2mm
+//调度默认 差值 2mm (比较结果, 对精度要求较高)
 #define DISPATCH_DEFAULT_DIFFERENCE							2
-//调度默认 比值 1%
+//调度默认 比值 1% (比较结果, 对精度要求较高)
 #define DISPATCH_DEFAULT_RATE								0.01
 
 	//调度流程的状态, 控制步骤(对于整个大的调度任务)
@@ -242,7 +242,7 @@ public://member variable
 	Common_data::Car_measure_information	m_car_measure_information;	//整车的测量信息
 	Common_data::Parkspace_information		m_parkspace_information;	//单个车位基本信息与状态信息,车位信息以及车位上的车辆信息
 
-	std::string								m_command_key;						//任务唯一码
+	std::string								m_command_key;						//任务唯一码, 索引
 	int 									m_timeout_ms;						//超时时间,单位ms
 	std::chrono::system_clock::time_point	m_start_time;						//流程开始时间
 	Error_manager 							m_result;							//流程的执行结果
@@ -254,46 +254,10 @@ public://member variable
 	//调度控制的长流程节点map
 	std::map<int, Dispatch_control_node> 	m_dispatch_control_node_map;
 
-
-//
-//	//硬件资源
-//	std::shared_ptr<Dispatch_device_base>	mp_catcher;					//抓车器指针, 内存由Dispatch_manager来管理
-//	std::shared_ptr<Task_Base>				mp_catcher_task;			//抓车器任务, 内存由本模块管理
-//	std::shared_ptr<Dispatch_device_base>	mp_carrier0;				//搬运器指针, 内存由Dispatch_manager来管理
-//	std::shared_ptr<Task_Base>				mp_carrier_task0;			//搬运器任务, 内存由本模块管理
-//	std::shared_ptr<Dispatch_device_base>	mp_carrier7;				//搬运器指针, 内存由Dispatch_manager来管理
-//	std::shared_ptr<Task_Base>				mp_carrier_task7;			//搬运器任务, 内存由本模块管理
-//	std::shared_ptr<Dispatch_device_base>	mp_carrier3;				//搬运器指针, 内存由Dispatch_manager来管理
-//	std::shared_ptr<Task_Base>				mp_carrier_task3;			//搬运器任务, 内存由本模块管理
-//	std::shared_ptr<Dispatch_device_base>	mp_passageway;				//通道口指针, 内存由Dispatch_manager来管理
-//	std::shared_ptr<Task_Base>				mp_passageway_task;			//通道口任务, 内存由本模块管理
-
-
-
 	//通信缓存
 	message::Dispatch_request_msg			m_dispatch_request_msg;				//1执行搬运请求(主控->调度管理)
 	message::Dispatch_plan_request_msg		m_dispatch_plan_request_msg;		//2调度总规划的请求, 用于启动整个调度算法(调度管理->调度算法)
 
-//	message::Dispatch_control_request_msg	m_dispatch_control_request_msg_catcher;		//3调度控制的任务请求(调度算法->调度管理)
-//	message::Dispatch_control_response_msg	m_dispatch_control_response_msg_catcher;	//4调度控制的任务答复(调度管理->调度算法)
-//	Point3D_tool::Point3D					m_source_coordinates_catcher;				//起点 的坐标 (Dispatch_control 长流程的起点)
-//	Point3D_tool::Point3D					m_destination_coordinates_catcher;			//终点 的坐标 (Dispatch_control 长流程的终点)
-//
-//	message::Dispatch_control_request_msg	m_dispatch_control_request_msg_carrier0;		//3调度控制的任务请求(调度算法->调度管理)
-//	message::Dispatch_control_response_msg	m_dispatch_control_response_msg_carrier0;	//4调度控制的任务答复(调度管理->调度算法)
-//	Point3D_tool::Point3D					m_source_coordinates_carrier0;				//起点 的坐标 (Dispatch_control 长流程的起点)
-//	Point3D_tool::Point3D					m_destination_coordinates_carrier0;			//终点 的坐标 (Dispatch_control 长流程的终点)
-//
-//	message::Dispatch_control_request_msg	m_dispatch_control_request_msg_carrier7;		//3调度控制的任务请求(调度算法->调度管理)
-//	message::Dispatch_control_response_msg	m_dispatch_control_response_msg_carrier7;	//4调度控制的任务答复(调度管理->调度算法)
-//	Point3D_tool::Point3D					m_source_coordinates_carrier7;				//起点 的坐标 (Dispatch_control 长流程的起点)
-//	Point3D_tool::Point3D					m_destination_coordinates_carrier7;			//终点 的坐标 (Dispatch_control 长流程的终点)
-//
-//	message::Dispatch_control_request_msg	m_dispatch_control_request_msg_carrier3;		//3调度控制的任务请求(调度算法->调度管理)
-//	message::Dispatch_control_response_msg	m_dispatch_control_response_msg_carrier3;	//4调度控制的任务答复(调度管理->调度算法)
-//	Point3D_tool::Point3D					m_source_coordinates_carrier3;				//起点 的坐标 (Dispatch_control 长流程的起点)
-//	Point3D_tool::Point3D					m_destination_coordinates_carrier3;			//终点 的坐标 (Dispatch_control 长流程的终点)
-
 	message::Dispatch_plan_response_msg		m_dispatch_plan_response_msg;		//5调度总规划的答复(调度算法->调度管理)
 	message::Dispatch_response_msg			m_dispatch_response_msg;			//6搬运动作执行完成后反馈结果(调度管理->主控)
 	//流程通信顺序为  收1->发2  ->收3->发4->收3->发4->收3->发4.....  ->收5->发6

+ 132 - 132
dispatch/passageway.cpp

@@ -117,152 +117,152 @@ Error_manager Passageway::update_device_communication()
 	//状态消息, plc->调度
 	Dispatch_communication::Passageway_status_from_plc_to_dispatch *tp_passageway_status_from_plc_to_dispatch =
 	& Dispatch_communication::get_instance_references().m_passageway_status_from_plc_to_dispatch[m_device_id];
-	//通过心跳帧来判断通信是否正常
-	if ( m_last_heartbeat != tp_passageway_status_from_plc_to_dispatch->m_heartbeat )
+	//设备异常  //注注注注注注注注意了, ==的优先级比&要高.
+	if ( (tp_passageway_status_from_plc_to_dispatch->m_safe_status & 0x02) == 0 )
 	{
-		m_last_heartbeat = tp_passageway_status_from_plc_to_dispatch->m_heartbeat;
-		m_status_updata_time = std::chrono::system_clock::now();
-
-		//设备异常  //注注注注注注注注意了, ==的优先级比&要高.
-		if ( (tp_passageway_status_from_plc_to_dispatch->m_safe_status & 0x02) == 0 )
-		{
-			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_EMERGENCY_STOP;
-			m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
-		}
-		else if ( (tp_passageway_status_from_plc_to_dispatch->m_safe_status & 0x01) == 0 )
-		{
-			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_FAULT;
-			m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
-		}
-		else//正常状态
-		{
-			if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x20)== 1)
-			{
-				m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_WORKING;
-			}
-			else if( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x20)== 0)
-			{
-				m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_READY;
-			}
-			else
-			{
-				m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_UNKNOWN;
-			}
-
-
-			//故障恢复之后   E_FAULT  ->>  E_THREE_LEVEL_WORK
-			if ( m_dispatch_device_status == Dispatch_device_base::DISPATCH_DEVICE_FAULT )
-			{
-				m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_THREE_LEVEL_WORK;
-			}
-			//else 流程状态维持不变
-		}
-
-		//数据解析
-		if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x01)== 1)
-		{
-			m_actual_inside_load_status = Dispatch_device_base::HAVE_CAR;
-		}
-		else
-		{
-			m_actual_inside_load_status = Dispatch_device_base::NO_CAR;
-		}
-		if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x02)== 1)
-		{
-			m_actual_outside_load_status = Dispatch_device_base::HAVE_CAR;
-		}
-		else
-		{
-			m_actual_outside_load_status = Dispatch_device_base::NO_CAR;
-		}
-		if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x04)== 1)
-		{
-			m_actual_front_overstep_the_boundary = Dispatch_device_base::BOUNDARY_OVERSTEP;
-		}
-		else
-		{
-			m_actual_front_overstep_the_boundary = Dispatch_device_base::BOUNDARY_NORMAL;
-		}
-		if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x08)== 1)
-		{
-			m_actual_back_overstep_the_boundary = Dispatch_device_base::BOUNDARY_OVERSTEP;
-		}
-		else
-		{
-			m_actual_back_overstep_the_boundary = Dispatch_device_base::BOUNDARY_NORMAL;
-		}
-		if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x10)== 1)
-		{
-			m_actual_height_overstep_the_boundary = Dispatch_device_base::BOUNDARY_OVERSTEP;
-		}
-		else
+		m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_EMERGENCY_STOP;
+		m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
+	}
+	else if ( (tp_passageway_status_from_plc_to_dispatch->m_safe_status & 0x01) == 0 )
+	{
+		m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_FAULT;
+		m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_FAULT;
+	}
+	else//正常状态
+	{
+		if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x20)== 1)
 		{
-			m_actual_height_overstep_the_boundary = Dispatch_device_base::BOUNDARY_NORMAL;
+			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_WORKING;
 		}
-		if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x20)== 1)
+		else if( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x20)== 0)
 		{
-			m_actual_outside_door_sensor = Dispatch_device_base::HAVE_CAR;
+			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_READY;
 		}
 		else
 		{
-			m_actual_outside_door_sensor = Dispatch_device_base::NO_CAR;
+			m_actual_device_status = Dispatch_device_base::HARDWARE_DEVICE_UNKNOWN;
 		}
 
-		if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x40)== 1 &&
-			 (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x80)== 0)
-		{
-			m_actual_inside_door_motion = Dispatch_device_base::DOOR_OPEN;
-		}
-		else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x40)== 0 &&
-				  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x80)== 1)
-		{
-			m_actual_inside_door_motion = Dispatch_device_base::DOOR_CLOSE;
-		}
-		else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x40)== 1 &&
-				  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x80)== 1)
-		{
-			m_actual_inside_door_motion = Dispatch_device_base::DOOR_ERROR;
-		}
-		else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x40)== 0 &&
-				  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x80)== 0)
-		{
-			m_actual_inside_door_motion = Dispatch_device_base::DOOR_UNKNOWN;
-		}
 
-		if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x01)== 1 &&
-			 (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x02)== 0)
+		//故障恢复之后   E_FAULT  ->>  E_THREE_LEVEL_WORK
+		if ( m_dispatch_device_status == Dispatch_device_base::DISPATCH_DEVICE_FAULT )
 		{
-			m_actual_outside_door_motion = Dispatch_device_base::DOOR_OPEN;
-		}
-		else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x01)== 0 &&
-				  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x02)== 1)
-		{
-			m_actual_outside_door_motion = Dispatch_device_base::DOOR_CLOSE;
-		}
-		else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x01)== 1 &&
-				  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x02)== 1)
-		{
-			m_actual_outside_door_motion = Dispatch_device_base::DOOR_ERROR;
-		}
-		else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x01)== 0 &&
-				  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x02)== 0)
-		{
-			m_actual_outside_door_motion = Dispatch_device_base::DOOR_UNKNOWN;
+			m_dispatch_device_status = Dispatch_device_base::DISPATCH_DEVICE_THREE_LEVEL_WORK;
 		}
+		//else 流程状态维持不变
+	}
 
-		if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x03)== 1)
-		{
-			m_actual_turntable_load_status = Dispatch_device_base::HAVE_CAR;
-		}
-		else
-		{
-			m_actual_turntable_load_status = Dispatch_device_base::NO_CAR;
-		}
+	//数据解析
+	if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x01)== 1)
+	{
+		m_actual_inside_load_status = Dispatch_device_base::HAVE_CAR;
+	}
+	else
+	{
+		m_actual_inside_load_status = Dispatch_device_base::NO_CAR;
+	}
+	if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x02)== 1)
+	{
+		m_actual_outside_load_status = Dispatch_device_base::HAVE_CAR;
+	}
+	else
+	{
+		m_actual_outside_load_status = Dispatch_device_base::NO_CAR;
+	}
+	if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x04)== 1)
+	{
+		m_actual_front_overstep_the_boundary = Dispatch_device_base::BOUNDARY_OVERSTEP;
+	}
+	else
+	{
+		m_actual_front_overstep_the_boundary = Dispatch_device_base::BOUNDARY_NORMAL;
+	}
+	if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x08)== 1)
+	{
+		m_actual_back_overstep_the_boundary = Dispatch_device_base::BOUNDARY_OVERSTEP;
+	}
+	else
+	{
+		m_actual_back_overstep_the_boundary = Dispatch_device_base::BOUNDARY_NORMAL;
+	}
+	if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x10)== 1)
+	{
+		m_actual_height_overstep_the_boundary = Dispatch_device_base::BOUNDARY_OVERSTEP;
+	}
+	else
+	{
+		m_actual_height_overstep_the_boundary = Dispatch_device_base::BOUNDARY_NORMAL;
+	}
+	if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x20)== 1)
+	{
+		m_actual_outside_door_sensor = Dispatch_device_base::HAVE_CAR;
+	}
+	else
+	{
+		m_actual_outside_door_sensor = Dispatch_device_base::NO_CAR;
+	}
+
+	if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x40)== 1 &&
+		 (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x80)== 0)
+	{
+		m_actual_inside_door_motion = Dispatch_device_base::DOOR_OPEN;
+	}
+	else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x40)== 0 &&
+			  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x80)== 1)
+	{
+		m_actual_inside_door_motion = Dispatch_device_base::DOOR_CLOSE;
+	}
+	else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x40)== 1 &&
+			  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x80)== 1)
+	{
+		m_actual_inside_door_motion = Dispatch_device_base::DOOR_ERROR;
+	}
+	else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x40)== 0 &&
+			  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status1 & 0x80)== 0)
+	{
+		m_actual_inside_door_motion = Dispatch_device_base::DOOR_UNKNOWN;
+	}
+
+	if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x01)== 1 &&
+		 (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x02)== 0)
+	{
+		m_actual_outside_door_motion = Dispatch_device_base::DOOR_OPEN;
+	}
+	else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x01)== 0 &&
+			  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x02)== 1)
+	{
+		m_actual_outside_door_motion = Dispatch_device_base::DOOR_CLOSE;
+	}
+	else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x01)== 1 &&
+			  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x02)== 1)
+	{
+		m_actual_outside_door_motion = Dispatch_device_base::DOOR_ERROR;
+	}
+	else if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x01)== 0 &&
+			  (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x02)== 0)
+	{
+		m_actual_outside_door_motion = Dispatch_device_base::DOOR_UNKNOWN;
+	}
+
+	if ( (tp_passageway_status_from_plc_to_dispatch->m_sensor_status2 & 0x03)== 1)
+	{
+		m_actual_turntable_load_status = Dispatch_device_base::HAVE_CAR;
+	}
+	else
+	{
+		m_actual_turntable_load_status = Dispatch_device_base::NO_CAR;
+	}
 
-		m_actual_turntable_direction = (Dispatch_device_base::Turntable_direction)tp_passageway_status_from_plc_to_dispatch->m_actual_turntable_direction;
-		memcpy(m_actual_error_code, tp_passageway_status_from_plc_to_dispatch->m_actual_error_code, 50);
-		memcpy(m_actual_warning_code, tp_passageway_status_from_plc_to_dispatch->m_actual_warning_code, 50);
-		m_actual_error_description = (char*)(tp_passageway_status_from_plc_to_dispatch->m_actual_error_description-2);
+	m_actual_turntable_direction = (Dispatch_device_base::Turntable_direction)tp_passageway_status_from_plc_to_dispatch->m_actual_turntable_direction;
+	memcpy(m_actual_error_code, tp_passageway_status_from_plc_to_dispatch->m_actual_error_code, 50);
+	memcpy(m_actual_warning_code, tp_passageway_status_from_plc_to_dispatch->m_actual_warning_code, 50);
+	m_actual_error_description = (char*)(tp_passageway_status_from_plc_to_dispatch->m_actual_error_description-2);
+
+	//通过心跳帧来判断通信是否正常
+	if ( m_last_heartbeat != tp_passageway_status_from_plc_to_dispatch->m_heartbeat )
+	{
+		m_last_heartbeat = tp_passageway_status_from_plc_to_dispatch->m_heartbeat;
+		m_status_updata_time = std::chrono::system_clock::now();
 
 		//重连之后,搬运器状态   E_DISCONNECT  ->>  E_THREE_LEVEL_WORK
 		if ( m_dispatch_device_status == Dispatch_device_base::DISPATCH_DEVICE_DISCONNECT )

+ 2 - 0
error_code/error_code.h

@@ -348,6 +348,8 @@ enum Error_code
 	DISPATCH_PROCESS_DEVICE_TYPE_ERROR,					//调度流程, 设备类型错误
 	DISPATCH_PROCESS_DEVICE_STATUS_ERROR,				//调度流程, 设备状态错误
 	DISPATCH_PROCESS_TASK_STATUS_ERROR,					//调度流程, 任务类型错误
+	DISPATCH_PROCESS_COMMAND_KEY_REPEAT,				//调度流程, 唯一码错误
+	DISPATCH_PROCESS_INIT_ERROR,						//调度流程, 初始化错误
 
 
 	DISPATCH_DEVICE_ERROR_BASE								= 0x13030000,

+ 143 - 4
main.cpp

@@ -54,8 +54,54 @@ GOOGLE_GLOG_DLL_DECL void shut_down_logging(const char* data, int size)
 using namespace std;
 
 
-#define MAIN_TEST 1
+std::string sendMsg(int terminal_id,int parkingspace_index_id, float x, std::string key, message::Dispatch_motion_direction direction)
+{
 
+	message::Locate_information locateInformation;
+	message::Dispatch_request_msg dispatchRequestMsg;
+	message::Base_info t_base_info;
+	message::Car_info car_info;
+	message::Parkspace_info parkspace_info;
+	t_base_info.set_msg_type(message::eDispatch_request_msg);
+	t_base_info.set_sender(message::eMain);
+	t_base_info.set_receiver(message::eDispatch_manager);
+	t_base_info.set_timeout_ms(100000000);
+
+	car_info.set_car_height(1.6);
+	car_info.set_car_width(1.8);
+	car_info.set_license("鄂Awk123");
+	car_info.set_car_wheel_width(1.8);
+	car_info.set_car_wheel_base(2.8);
+
+	locateInformation.set_locate_x(x);
+	locateInformation.set_locate_y(3);
+	locateInformation.set_locate_angle(90);
+	locateInformation.set_locate_length(3.2);
+	locateInformation.set_locate_height(1.6);
+	locateInformation.set_locate_width(1.8);
+	locateInformation.set_locate_correct(true);
+	locateInformation.set_locate_wheel_width(1.8);
+	locateInformation.set_locate_wheel_base(2.8);
+
+	parkspace_info.set_parkingspace_index_id(parkingspace_index_id);
+	parkspace_info.set_parkingspace_room_id(1);
+	parkspace_info.set_parkingspace_direction(message::Direction::eForward);
+	parkspace_info.set_parkingspace_floor_id(3);
+	parkspace_info.set_parkingspace_height(1.5);
+	parkspace_info.set_parkingspace_width(1.5);
+	parkspace_info.set_parkingspace_status(message::Parkspace_status::eParkspace_empty);
+	parkspace_info.mutable_car_info()->CopyFrom(car_info);
+
+	dispatchRequestMsg.mutable_base_info()->CopyFrom(t_base_info);
+	dispatchRequestMsg.mutable_locate_information()->CopyFrom(locateInformation);
+	dispatchRequestMsg.set_command_key(key);
+	dispatchRequestMsg.set_dispatch_motion_direction(direction);
+	dispatchRequestMsg.set_terminal_id(terminal_id);
+	dispatchRequestMsg.mutable_parkspace_info()->CopyFrom(parkspace_info);
+
+	LOG(INFO) << dispatchRequestMsg.DebugString();
+	return dispatchRequestMsg.SerializeAsString();
+}
 int main(int argc,char* argv[])
 {
 	Error_manager t_error;
@@ -74,17 +120,110 @@ int main(int argc,char* argv[])
 
 
 
+	//	Dispatch_communication_test dispatchCommunicationTest;
+//	dispatchCommunicationTest.communication_init();
+//	std::this_thread::sleep_for(std::chrono::seconds(1));
+
+
+	nnxx::socket socket{nnxx::SP, nnxx::BUS};
+//
+
+	socket.bind("tcp://192.168.2.168:30000");
+	std::this_thread::sleep_for(std::chrono::seconds(1));
+//
+
+//	socket.send(sendMsg(1, 79, 7.755, "12345678901234567890123456_s1_wU", message::Dispatch_motion_direction::E_STORE_CAR));
+//	socket.send(sendMsg(2, 78, 11.055, "12345678901234567890123456_s2_wU", message::Dispatch_motion_direction::E_STORE_CAR));
+//	socket.send(sendMsg(3, 79, 14.655, "12345678901234567890123456_s3_wU", message::Dispatch_motion_direction::E_STORE_CAR));
+
+
+//	socket.send(sendMsg(4, 39, 17.955, "12345678901234567890123456_s4_wU", message::Dispatch_motion_direction::E_STORE_CAR));
+//	socket.send(sendMsg(5, 40, 21.555, "12345678901234567890123456_s5_wU", message::Dispatch_motion_direction::E_STORE_CAR));
+//	socket.send(sendMsg(6, 27, 24.855, "12345678901234567890123456_s6_wU", message::Dispatch_motion_direction::E_STORE_CAR));
+
+//	socket.send(sendMsg(1, 79, 7.755, "12345678901234567890123456_p1_wU", message::Dispatch_motion_direction::E_PICKUP_CAR));
+	socket.send(sendMsg(2, 37, 11.055, "12345678901234567890123456_p2_wU", message::Dispatch_motion_direction::E_PICKUP_CAR));
+	socket.send(sendMsg(3, 36, 14.655, "12345678901234567890123456_p3_wU", message::Dispatch_motion_direction::E_PICKUP_CAR));
+	socket.send(sendMsg(4, 19, 17.955, "12345678901234567890123456_p4_wU", message::Dispatch_motion_direction::E_PICKUP_CAR));
 
+	socket.send(sendMsg(5, 39, 21.555, "12345678901234567890123456_p5_wU", message::Dispatch_motion_direction::E_PICKUP_CAR));
+	socket.send(sendMsg(6, 40, 24.855, "12345678901234567890123456_p6_wU", message::Dispatch_motion_direction::E_PICKUP_CAR));
+//	socket.send(sendMsg(7, 39, 24.855, "12345678901234567890123456_p7_wU", message::Dispatch_motion_direction::E_PICKUP_CAR));
+
+//	std::this_thread::sleep_for(std::chrono::seconds(5));
+////
+//
+//	message::Dispatch_control_request_msg control_reqeust;
+//	control_reqeust.mutable_base_info()->set_msg_type(message::eDispatch_control_request_msg);
+//	control_reqeust.mutable_base_info()->set_sender(message::eDispatch_control);
+//	control_reqeust.mutable_base_info()->set_receiver(message::eDispatch_manager);
+//	control_reqeust.mutable_base_info()->set_timeout_ms(100000000);
+//	control_reqeust.set_command_key("12345678901234567890123456_p5_wU+120");
+//	control_reqeust.set_dispatch_task_type(message::ROBOT_MOVE);
+//	control_reqeust.set_dispatch_device_type(message::ROBOT_2);
+//	control_reqeust.set_dispatch_source(0);
+//	control_reqeust.set_dispatch_destination(1403);
+//	LOG(INFO) << control_reqeust.DebugString();
+//	socket.send(control_reqeust.SerializeAsString());
+
+	while (1)
+	{
+		std::this_thread::sleep_for(std::chrono::milliseconds(1));
+		std::string str;
+		message::Base_msg base_info;
+
+		str=socket.recv<std::string>(1);
+
+		if ( str.size() > 0 )
+		{
+			base_info.ParseFromString(str);
+			if ( base_info.base_info().msg_type() == message::eDispatch_manager_status_msg )
+			{
+//				std::cout << " Time_tool::get_instance_references().get_current_time_millisecond() = " << Time_tool::get_instance_references().get_current_time_millisecond() << std::endl;
+//				std::cout <<base_info.DebugString()<< std::endl;
+			}
+			else if ( base_info.base_info().msg_type() == message::eDispatch_control_response_msg )
+			{
+				message::Dispatch_control_response_msg t_dispatch_control_response_msg;
+				t_dispatch_control_response_msg.ParseFromString(str);
+				if ( t_dispatch_control_response_msg.dispatch_device_task_status() == message::Dispatch_device_task_status::E_TASK_OVER)
+				{
+					std::cout << " Time_tool::get_instance_references().get_current_time_millisecond() = " << Time_tool::get_instance_references().get_current_time_millisecond() << std::endl;
+					std::cout <<t_dispatch_control_response_msg.DebugString()<< std::endl;
+				}
+				else
+				{
+					std::cout << " Time_tool::get_instance_references().get_current_time_millisecond() = " << Time_tool::get_instance_references().get_current_time_millisecond() << std::endl;
+					std::cout <<t_dispatch_control_response_msg.DebugString()<< std::endl;
+				}
+			}
+			else if ( base_info.base_info().msg_type() == message::eDispatch_control_request_msg )
+			{
+				message::Dispatch_control_request_msg t_dispatch_control_request_msg;
+				t_dispatch_control_request_msg.ParseFromString(str);
+				std::cout << " Time_tool::get_instance_references().get_current_time_millisecond() = " << Time_tool::get_instance_references().get_current_time_millisecond() << std::endl;
+
+				std::cout <<t_dispatch_control_request_msg.DebugString()<< std::endl;
+			}
+			else
+			{	std::cout << " Time_tool::get_instance_references().get_current_time_millisecond() = " << Time_tool::get_instance_references().get_current_time_millisecond() << std::endl;
+
+				std::cout <<base_info.DebugString()<< std::endl;
+			}
+		}
+	}
+
+#define MAIN_TEST 1
 #ifdef MAIN_TEST
 	t_error = Dispatch_coordinates::get_instance_references().dispatch_coordinates_init();
-	std::cout << " huli test :::: " << " t_error.to = " << t_error.to_string() << std::endl;
+	std::cout << " huli test :::: " << " Dispatch_coordinates::get_instance_references().dispatch_coordinates_init() = " << t_error.to_string() << std::endl;
 
 	t_error = Dispatch_communication::get_instance_references().communication_init();
-	std::cout << " huli test :::: " << " t_error.to = " << t_error.to_string() << std::endl;
+	std::cout << " huli test :::: " << " Dispatch_communication::get_instance_references().communication_init() = " << t_error.to_string() << std::endl;
 	std::cout << "Dispatch_communication = " << Dispatch_communication::get_instance_references().get_status() << std::endl;
 
 	t_error = Dispatch_manager::get_instance_references().dispatch_manager_init(0);
-	std::cout << " huli test :::: " << " t_error.to = " << t_error.to_string() << std::endl;
+	std::cout << " huli test :::: " << " Dispatch_manager::get_instance_references().dispatch_manager_init(0) = " << t_error.to_string() << std::endl;
 	std::cout << "Dispatch_manager = " << Dispatch_manager::get_instance_references().get_dispatch_manager_status() << std::endl;
 
 	System_executor::get_instance_references().system_executor_init(10);

+ 281 - 130
message/dispatch_message.pb.cc

@@ -113,6 +113,7 @@ void InitDefaultsDispatch_response_msgImpl() {
 #endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   protobuf_message_5fbase_2eproto::InitDefaultsBase_info();
   protobuf_message_5fbase_2eproto::InitDefaultsError_manager();
+  protobuf_message_5fbase_2eproto::InitDefaultsParkspace_info();
   {
     void* ptr = &::message::_Dispatch_response_msg_default_instance_;
     new (ptr) ::message::Dispatch_response_msg();
@@ -241,12 +242,14 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, terminal_id_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, parkspace_info_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, locate_information_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, parkspace_info_ex_),
   1,
   0,
   4,
   5,
   2,
   3,
+  ~0u,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_response_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_response_msg, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -255,9 +258,13 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_response_msg, base_info_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_response_msg, command_key_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_response_msg, error_manager_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_response_msg, parkspace_info_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_response_msg, parkspace_info_ex_),
   1,
   0,
   2,
+  3,
+  ~0u,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Catcher_data, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Catcher_data, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -367,12 +374,12 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
 };
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
   { 0, 9, sizeof(::message::Dispatch_terminal_status_msg)},
-  { 13, 24, sizeof(::message::Dispatch_request_msg)},
-  { 30, 38, sizeof(::message::Dispatch_response_msg)},
-  { 41, 65, sizeof(::message::Catcher_data)},
-  { 84, 108, sizeof(::message::Carrier_data)},
-  { 127, 137, sizeof(::message::Dispatch_manager_status_msg)},
-  { 142, 147, sizeof(::message::Dispatch_manager_data_msg)},
+  { 13, 25, sizeof(::message::Dispatch_request_msg)},
+  { 32, 42, sizeof(::message::Dispatch_response_msg)},
+  { 47, 71, sizeof(::message::Catcher_data)},
+  { 90, 114, sizeof(::message::Carrier_data)},
+  { 133, 143, sizeof(::message::Dispatch_manager_status_msg)},
+  { 148, 153, sizeof(::message::Dispatch_manager_data_msg)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
@@ -414,110 +421,114 @@ void AddDescriptorsImpl() {
       "l_id\030\002 \002(\005\0221\n\017terminal_status\030\003 \002(\0162\030.me"
       "ssage.Terminal_status\022;\n\024passageway_dire"
       "ction\030\004 \002(\0162\035.message.Passageway_directi"
-      "on\"\230\002\n\024Dispatch_request_msg\022%\n\tbase_info"
+      "on\"\314\002\n\024Dispatch_request_msg\022%\n\tbase_info"
       "\030\001 \002(\0132\022.message.Base_info\022\023\n\013command_ke"
       "y\030\002 \002(\t\022E\n\031dispatch_motion_direction\030\003 \002"
       "(\0162\".message.Dispatch_motion_direction\022\023"
       "\n\013terminal_id\030\004 \002(\005\022/\n\016parkspace_info\030\005 "
-      "\002(\0132\027.message.Parkspace_info\0227\n\022locate_i"
+      "\001(\0132\027.message.Parkspace_info\0227\n\022locate_i"
       "nformation\030\006 \001(\0132\033.message.Locate_inform"
-      "ation\"\202\001\n\025Dispatch_response_msg\022%\n\tbase_"
-      "info\030\001 \002(\0132\022.message.Base_info\022\023\n\013comman"
-      "d_key\030\002 \002(\t\022-\n\rerror_manager\030\003 \002(\0132\026.mes"
-      "sage.Error_manager\"\313\005\n\014Catcher_data\022;\n\024d"
-      "ispatch_device_type\030\001 \002(\0162\035.message.Disp"
-      "atch_device_type\022\?\n\026dispatch_device_stat"
-      "us\030\002 \002(\0162\037.message.Dispatch_device_statu"
-      "s\022\021\n\tdevice_id\030\003 \002(\005\022=\n\024actual_device_st"
-      "atus\030\004 \001(\0162\037.message.Hardware_device_sta"
-      "tus\0220\n\022actual_load_status\030\005 \001(\0162\024.messag"
-      "e.Load_status\022\035\n\025actual_coordinates_id\030\006"
-      " \001(\005\022\020\n\010actual_x\030\007 \001(\002\022\020\n\010actual_y\030\010 \001(\002"
-      "\022\020\n\010actual_b\030\t \001(\002\022\020\n\010actual_z\030\n \001(\002\022\021\n\t"
-      "actual_d1\030\013 \001(\002\022\021\n\tactual_d2\030\014 \001(\002\0223\n\024ac"
-      "tual_clamp_motion1\030\r \001(\0162\025.message.Clamp"
-      "_motion\0223\n\024actual_clamp_motion2\030\016 \001(\0162\025."
+      "ation\0222\n\021parkspace_info_ex\030\007 \003(\0132\027.messa"
+      "ge.Parkspace_info\"\347\001\n\025Dispatch_response_"
+      "msg\022%\n\tbase_info\030\001 \002(\0132\022.message.Base_in"
+      "fo\022\023\n\013command_key\030\002 \002(\t\022-\n\rerror_manager"
+      "\030\003 \002(\0132\026.message.Error_manager\022/\n\016parksp"
+      "ace_info\030\004 \001(\0132\027.message.Parkspace_info\022"
+      "2\n\021parkspace_info_ex\030\005 \003(\0132\027.message.Par"
+      "kspace_info\"\313\005\n\014Catcher_data\022;\n\024dispatch"
+      "_device_type\030\001 \002(\0162\035.message.Dispatch_de"
+      "vice_type\022\?\n\026dispatch_device_status\030\002 \002("
+      "\0162\037.message.Dispatch_device_status\022\021\n\tde"
+      "vice_id\030\003 \002(\005\022=\n\024actual_device_status\030\004 "
+      "\001(\0162\037.message.Hardware_device_status\0220\n\022"
+      "actual_load_status\030\005 \001(\0162\024.message.Load_"
+      "status\022\035\n\025actual_coordinates_id\030\006 \001(\005\022\020\n"
+      "\010actual_x\030\007 \001(\002\022\020\n\010actual_y\030\010 \001(\002\022\020\n\010act"
+      "ual_b\030\t \001(\002\022\020\n\010actual_z\030\n \001(\002\022\021\n\tactual_"
+      "d1\030\013 \001(\002\022\021\n\tactual_d2\030\014 \001(\002\0223\n\024actual_cl"
+      "amp_motion1\030\r \001(\0162\025.message.Clamp_motion"
+      "\0223\n\024actual_clamp_motion2\030\016 \001(\0162\025.message"
+      ".Clamp_motion\0223\n\024actual_clamp_motion3\030\017 "
+      "\001(\0162\025.message.Clamp_motion\0223\n\024actual_cla"
+      "mp_motion4\030\020 \001(\0162\025.message.Clamp_motion\022"
+      "\031\n\021actual_error_code\030\021 \001(\t\022\033\n\023actual_war"
+      "ning_code\030\022 \001(\t\022 \n\030actual_error_descript"
+      "ion\030\023 \001(\t\"\207\006\n\014Carrier_data\022;\n\024dispatch_d"
+      "evice_type\030\001 \002(\0162\035.message.Dispatch_devi"
+      "ce_type\022\?\n\026dispatch_device_status\030\002 \002(\0162"
+      "\037.message.Dispatch_device_status\022\021\n\tdevi"
+      "ce_id\030\003 \002(\005\022=\n\024actual_device_status\030\004 \001("
+      "\0162\037.message.Hardware_device_status\0220\n\022ac"
+      "tual_load_status\030\005 \001(\0162\024.message.Load_st"
+      "atus\022\035\n\025actual_coordinates_id\030\006 \001(\005\022\020\n\010a"
+      "ctual_x\030\007 \001(\002\022\020\n\010actual_y\030\010 \001(\002\022\020\n\010actua"
+      "l_z\030\t \001(\002\022\021\n\tactual_y1\030\n \001(\002\022\021\n\tactual_y"
+      "2\030\013 \001(\002\0223\n\024actual_clamp_motion1\030\014 \001(\0162\025."
       "message.Clamp_motion\0223\n\024actual_clamp_mot"
-      "ion3\030\017 \001(\0162\025.message.Clamp_motion\0223\n\024act"
-      "ual_clamp_motion4\030\020 \001(\0162\025.message.Clamp_"
-      "motion\022\031\n\021actual_error_code\030\021 \001(\t\022\033\n\023act"
-      "ual_warning_code\030\022 \001(\t\022 \n\030actual_error_d"
-      "escription\030\023 \001(\t\"\207\006\n\014Carrier_data\022;\n\024dis"
-      "patch_device_type\030\001 \002(\0162\035.message.Dispat"
-      "ch_device_type\022\?\n\026dispatch_device_status"
-      "\030\002 \002(\0162\037.message.Dispatch_device_status\022"
-      "\021\n\tdevice_id\030\003 \002(\005\022=\n\024actual_device_stat"
-      "us\030\004 \001(\0162\037.message.Hardware_device_statu"
-      "s\0220\n\022actual_load_status\030\005 \001(\0162\024.message."
-      "Load_status\022\035\n\025actual_coordinates_id\030\006 \001"
-      "(\005\022\020\n\010actual_x\030\007 \001(\002\022\020\n\010actual_y\030\010 \001(\002\022\020"
-      "\n\010actual_z\030\t \001(\002\022\021\n\tactual_y1\030\n \001(\002\022\021\n\ta"
-      "ctual_y2\030\013 \001(\002\0223\n\024actual_clamp_motion1\030\014"
-      " \001(\0162\025.message.Clamp_motion\0223\n\024actual_cl"
-      "amp_motion2\030\r \001(\0162\025.message.Clamp_motion"
-      "\022H\n\036actual_small_sports_car_motion\030\016 \001(\016"
-      "2 .message.Small_sports_car_motion\0225\n\026ac"
-      "tual_joint_motion_x1\030\017 \001(\0162\025.message.Joi"
-      "nt_motion\0225\n\026actual_joint_motion_x2\030\020 \001("
-      "\0162\025.message.Joint_motion\022\031\n\021actual_error"
-      "_code\030\021 \001(\t\022\033\n\023actual_warning_code\030\022 \001(\t"
-      "\022 \n\030actual_error_description\030\023 \001(\t\"\376\001\n\033D"
-      "ispatch_manager_status_msg\022%\n\tbase_info\030"
-      "\001 \002(\0132\022.message.Base_info\022\023\n\013dispatch_id"
-      "\030\002 \002(\005\022A\n\027dispatch_manager_status\030\003 \002(\0162"
-      " .message.Dispatch_manager_status\022/\n\020cat"
-      "cher_data_map\030\004 \003(\0132\025.message.Catcher_da"
-      "ta\022/\n\020carrier_data_map\030\005 \003(\0132\025.message.C"
-      "arrier_data\"\033\n\031Dispatch_manager_data_msg"
-      "*\201\001\n\017Terminal_status\022\025\n\021E_TERMINAL_UNKNO"
-      "W\020\000\022\024\n\020E_TERMINAL_READY\020\001\022\024\n\020E_TERMINAL_"
-      "STORE\020\002\022\025\n\021E_TERMINAL_PICKUP\020\003\022\024\n\020E_TERM"
-      "INAL_FAULT\020\n*B\n\024Passageway_direction\022\013\n\007"
-      "E_INLET\020\000\022\014\n\010E_OUTLET\020\001\022\017\n\013E_BILATERAL\020\002"
-      "*>\n\031Dispatch_motion_direction\022\017\n\013E_STORE"
-      "_CAR\020\000\022\020\n\014E_PICKUP_CAR\020\001*\261\001\n\027Dispatch_ma"
-      "nager_status\022\035\n\031E_DISPATCH_MANAGER_UNKNO"
-      "W\020\000\022\034\n\030E_DISPATCH_MANAGER_READY\020\001\022\034\n\030E_D"
-      "ISPATCH_MANAGER_STORE\020\002\022\035\n\031E_DISPATCH_MA"
-      "NAGER_PICKUP\020\003\022\034\n\030E_DISPATCH_MANAGER_FAU"
-      "LT\020d*\200\003\n\026Dispatch_device_status\022\032\n\026DISPA"
-      "TCH_DEVICE_UNKNOW\020\000\022\031\n\025DISPATCH_DEVICE_R"
-      "EADY\020\001\022\030\n\024DISPATCH_DEVICE_BUSY\020\002\022\"\n\036DISP"
-      "ATCH_DEVICE_ONE_LEVEL_OVER\020\003\022\"\n\036DISPATCH"
-      "_DEVICE_ONE_LEVEL_WORK\020\004\022\"\n\036DISPATCH_DEV"
-      "ICE_TWO_LEVEL_OVER\020\005\022\"\n\036DISPATCH_DEVICE_"
-      "TWO_LEVEL_WORK\020\006\022$\n DISPATCH_DEVICE_THRE"
-      "E_LEVEL_OVER\020\007\022$\n DISPATCH_DEVICE_THREE_"
-      "LEVEL_WORK\020\010\022\031\n\025DISPATCH_DEVICE_FAULT\020d\022"
-      "\036\n\032DISPATCH_DEVICE_DISCONNECT\020e*n\n\023Dispa"
-      "tch_task_level\022\033\n\027DISPATCH_TASK_ONE_LEVE"
-      "L\020\001\022\033\n\027DISPATCH_TASK_TWO_LEVEL\020\002\022\035\n\031DISP"
-      "ATCH_TASK_THREE_LEVEL\020\003*K\n\014Clamp_motion\022"
-      "\025\n\021E_CLAMP_NO_ACTION\020\000\022\021\n\rE_CLAMP_TIGHT\020"
-      "\001\022\021\n\rE_CLAMP_LOOSE\020\002*R\n\014Joint_motion\022\025\n\021"
-      "E_JOINT_NO_ACTION\020\000\022\024\n\020E_JOINT_HOLD_OUT\020"
-      "\001\022\025\n\021E_JOINT_TAKE_BACK\020\002*y\n\027Small_sports"
-      "_car_motion\022\034\n\030E_SMALL_SPORTS_NO_ACTION\020"
-      "\000\022\037\n\033E_SMALL_SPORTS_CAR_GET_AWAY\020\001\022\037\n\033E_"
-      "SMALL_SPORTS_CAR_GET_BACK\020\002*l\n\016Respons_s"
-      "tatus\022\023\n\017RESPONS_WORKING\020\000\022\020\n\014RESPONS_OV"
-      "ER\020\001\022\027\n\023RESPONS_MINOR_ERROR\020d\022\032\n\026RESPONS"
-      "_CRITICAL_ERROR\020e*\252\001\n\026Hardware_device_st"
-      "atus\022\022\n\016DEVICE_UNKNOWN\020\000\022\020\n\014DEVICE_READY"
-      "\020\001\022\022\n\016DEVICE_WORKING\020\002\022\031\n\025DEVICE_EMERGEN"
-      "CY_STOP\020\003\022\023\n\017DEVICE_UNSAFETY\020\004\022\024\n\020DEVICE"
-      "_COLLISION\020\005\022\020\n\014DEVICE_FAULT\020\006*9\n\013Load_s"
-      "tatus\022\020\n\014LOAD_UNKNOWN\020\000\022\014\n\010HAVE_CAR\020\001\022\n\n"
-      "\006NO_CAR\020\002*w\n\023Turntable_direction\022\037\n\033TURN"
-      "TABLE_DIRECTION_UNKNOWN\020\000\022\036\n\032TURNTABLE_D"
-      "IRECTION_INSIDE\020\001\022\037\n\033TURNTABLE_DIRECTION"
-      "_OUTSIDE\020\002*N\n\013Door_motion\022\020\n\014DOOR_UNKNOW"
-      "N\020\000\022\r\n\tDOOR_OPEN\020\001\022\016\n\nDOOR_CLOSE\020\002\022\016\n\nDO"
-      "OR_ERROR\020\003*C\n\025Overstep_the_boundary\022\023\n\017B"
-      "OUNDARY_NORMAL\020\000\022\025\n\021BOUNDARY_OVERSTEP\020\001"
+      "ion2\030\r \001(\0162\025.message.Clamp_motion\022H\n\036act"
+      "ual_small_sports_car_motion\030\016 \001(\0162 .mess"
+      "age.Small_sports_car_motion\0225\n\026actual_jo"
+      "int_motion_x1\030\017 \001(\0162\025.message.Joint_moti"
+      "on\0225\n\026actual_joint_motion_x2\030\020 \001(\0162\025.mes"
+      "sage.Joint_motion\022\031\n\021actual_error_code\030\021"
+      " \001(\t\022\033\n\023actual_warning_code\030\022 \001(\t\022 \n\030act"
+      "ual_error_description\030\023 \001(\t\"\376\001\n\033Dispatch"
+      "_manager_status_msg\022%\n\tbase_info\030\001 \002(\0132\022"
+      ".message.Base_info\022\023\n\013dispatch_id\030\002 \002(\005\022"
+      "A\n\027dispatch_manager_status\030\003 \002(\0162 .messa"
+      "ge.Dispatch_manager_status\022/\n\020catcher_da"
+      "ta_map\030\004 \003(\0132\025.message.Catcher_data\022/\n\020c"
+      "arrier_data_map\030\005 \003(\0132\025.message.Carrier_"
+      "data\"\033\n\031Dispatch_manager_data_msg*\201\001\n\017Te"
+      "rminal_status\022\025\n\021E_TERMINAL_UNKNOW\020\000\022\024\n\020"
+      "E_TERMINAL_READY\020\001\022\024\n\020E_TERMINAL_STORE\020\002"
+      "\022\025\n\021E_TERMINAL_PICKUP\020\003\022\024\n\020E_TERMINAL_FA"
+      "ULT\020\n*B\n\024Passageway_direction\022\013\n\007E_INLET"
+      "\020\000\022\014\n\010E_OUTLET\020\001\022\017\n\013E_BILATERAL\020\002*>\n\031Dis"
+      "patch_motion_direction\022\017\n\013E_STORE_CAR\020\000\022"
+      "\020\n\014E_PICKUP_CAR\020\001*\261\001\n\027Dispatch_manager_s"
+      "tatus\022\035\n\031E_DISPATCH_MANAGER_UNKNOW\020\000\022\034\n\030"
+      "E_DISPATCH_MANAGER_READY\020\001\022\034\n\030E_DISPATCH"
+      "_MANAGER_STORE\020\002\022\035\n\031E_DISPATCH_MANAGER_P"
+      "ICKUP\020\003\022\034\n\030E_DISPATCH_MANAGER_FAULT\020d*\200\003"
+      "\n\026Dispatch_device_status\022\032\n\026DISPATCH_DEV"
+      "ICE_UNKNOW\020\000\022\031\n\025DISPATCH_DEVICE_READY\020\001\022"
+      "\030\n\024DISPATCH_DEVICE_BUSY\020\002\022\"\n\036DISPATCH_DE"
+      "VICE_ONE_LEVEL_OVER\020\003\022\"\n\036DISPATCH_DEVICE"
+      "_ONE_LEVEL_WORK\020\004\022\"\n\036DISPATCH_DEVICE_TWO"
+      "_LEVEL_OVER\020\005\022\"\n\036DISPATCH_DEVICE_TWO_LEV"
+      "EL_WORK\020\006\022$\n DISPATCH_DEVICE_THREE_LEVEL"
+      "_OVER\020\007\022$\n DISPATCH_DEVICE_THREE_LEVEL_W"
+      "ORK\020\010\022\031\n\025DISPATCH_DEVICE_FAULT\020d\022\036\n\032DISP"
+      "ATCH_DEVICE_DISCONNECT\020e*n\n\023Dispatch_tas"
+      "k_level\022\033\n\027DISPATCH_TASK_ONE_LEVEL\020\001\022\033\n\027"
+      "DISPATCH_TASK_TWO_LEVEL\020\002\022\035\n\031DISPATCH_TA"
+      "SK_THREE_LEVEL\020\003*K\n\014Clamp_motion\022\025\n\021E_CL"
+      "AMP_NO_ACTION\020\000\022\021\n\rE_CLAMP_TIGHT\020\001\022\021\n\rE_"
+      "CLAMP_LOOSE\020\002*R\n\014Joint_motion\022\025\n\021E_JOINT"
+      "_NO_ACTION\020\000\022\024\n\020E_JOINT_HOLD_OUT\020\001\022\025\n\021E_"
+      "JOINT_TAKE_BACK\020\002*y\n\027Small_sports_car_mo"
+      "tion\022\034\n\030E_SMALL_SPORTS_NO_ACTION\020\000\022\037\n\033E_"
+      "SMALL_SPORTS_CAR_GET_AWAY\020\001\022\037\n\033E_SMALL_S"
+      "PORTS_CAR_GET_BACK\020\002*l\n\016Respons_status\022\023"
+      "\n\017RESPONS_WORKING\020\000\022\020\n\014RESPONS_OVER\020\001\022\027\n"
+      "\023RESPONS_MINOR_ERROR\020d\022\032\n\026RESPONS_CRITIC"
+      "AL_ERROR\020e*\252\001\n\026Hardware_device_status\022\022\n"
+      "\016DEVICE_UNKNOWN\020\000\022\020\n\014DEVICE_READY\020\001\022\022\n\016D"
+      "EVICE_WORKING\020\002\022\031\n\025DEVICE_EMERGENCY_STOP"
+      "\020\003\022\023\n\017DEVICE_UNSAFETY\020\004\022\024\n\020DEVICE_COLLIS"
+      "ION\020\005\022\020\n\014DEVICE_FAULT\020\006*9\n\013Load_status\022\020"
+      "\n\014LOAD_UNKNOWN\020\000\022\014\n\010HAVE_CAR\020\001\022\n\n\006NO_CAR"
+      "\020\002*w\n\023Turntable_direction\022\037\n\033TURNTABLE_D"
+      "IRECTION_UNKNOWN\020\000\022\036\n\032TURNTABLE_DIRECTIO"
+      "N_INSIDE\020\001\022\037\n\033TURNTABLE_DIRECTION_OUTSID"
+      "E\020\002*N\n\013Door_motion\022\020\n\014DOOR_UNKNOWN\020\000\022\r\n\t"
+      "DOOR_OPEN\020\001\022\016\n\nDOOR_CLOSE\020\002\022\016\n\nDOOR_ERRO"
+      "R\020\003*C\n\025Overstep_the_boundary\022\023\n\017BOUNDARY"
+      "_NORMAL\020\000\022\025\n\021BOUNDARY_OVERSTEP\020\001"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 4319);
+      descriptor, 4472);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "dispatch_message.proto", &protobuf_RegisterTypes);
   ::protobuf_message_5fbase_2eproto::AddDescriptors();
@@ -1227,6 +1238,9 @@ void Dispatch_request_msg::clear_locate_information() {
   if (locate_information_ != NULL) locate_information_->Clear();
   clear_has_locate_information();
 }
+void Dispatch_request_msg::clear_parkspace_info_ex() {
+  parkspace_info_ex_.Clear();
+}
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Dispatch_request_msg::kBaseInfoFieldNumber;
 const int Dispatch_request_msg::kCommandKeyFieldNumber;
@@ -1234,6 +1248,7 @@ const int Dispatch_request_msg::kDispatchMotionDirectionFieldNumber;
 const int Dispatch_request_msg::kTerminalIdFieldNumber;
 const int Dispatch_request_msg::kParkspaceInfoFieldNumber;
 const int Dispatch_request_msg::kLocateInformationFieldNumber;
+const int Dispatch_request_msg::kParkspaceInfoExFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Dispatch_request_msg::Dispatch_request_msg()
@@ -1248,7 +1263,8 @@ Dispatch_request_msg::Dispatch_request_msg(const Dispatch_request_msg& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
       _has_bits_(from._has_bits_),
-      _cached_size_(0) {
+      _cached_size_(0),
+      parkspace_info_ex_(from.parkspace_info_ex_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.has_command_key()) {
@@ -1324,6 +1340,7 @@ void Dispatch_request_msg::Clear() {
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
 
+  parkspace_info_ex_.Clear();
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 15u) {
     if (cached_has_bits & 0x00000001u) {
@@ -1424,7 +1441,7 @@ bool Dispatch_request_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required .message.Parkspace_info parkspace_info = 5;
+      // optional .message.Parkspace_info parkspace_info = 5;
       case 5: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
@@ -1448,6 +1465,17 @@ bool Dispatch_request_msg::MergePartialFromCodedStream(
         break;
       }
 
+      // repeated .message.Parkspace_info parkspace_info_ex = 7;
+      case 7: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_parkspace_info_ex()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
       default: {
       handle_unusual:
         if (tag == 0) {
@@ -1502,7 +1530,7 @@ void Dispatch_request_msg::SerializeWithCachedSizes(
     ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->terminal_id(), output);
   }
 
-  // required .message.Parkspace_info parkspace_info = 5;
+  // optional .message.Parkspace_info parkspace_info = 5;
   if (cached_has_bits & 0x00000004u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
       5, *this->parkspace_info_, output);
@@ -1514,6 +1542,13 @@ void Dispatch_request_msg::SerializeWithCachedSizes(
       6, *this->locate_information_, output);
   }
 
+  // repeated .message.Parkspace_info parkspace_info_ex = 7;
+  for (unsigned int i = 0,
+      n = static_cast<unsigned int>(this->parkspace_info_ex_size()); i < n; i++) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      7, this->parkspace_info_ex(static_cast<int>(i)), output);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
         _internal_metadata_.unknown_fields(), output);
@@ -1558,7 +1593,7 @@ void Dispatch_request_msg::SerializeWithCachedSizes(
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->terminal_id(), target);
   }
 
-  // required .message.Parkspace_info parkspace_info = 5;
+  // optional .message.Parkspace_info parkspace_info = 5;
   if (cached_has_bits & 0x00000004u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
@@ -1572,6 +1607,14 @@ void Dispatch_request_msg::SerializeWithCachedSizes(
         6, *this->locate_information_, deterministic, target);
   }
 
+  // repeated .message.Parkspace_info parkspace_info_ex = 7;
+  for (unsigned int i = 0,
+      n = static_cast<unsigned int>(this->parkspace_info_ex_size()); i < n; i++) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        7, this->parkspace_info_ex(static_cast<int>(i)), deterministic, target);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
         _internal_metadata_.unknown_fields(), target);
@@ -1598,13 +1641,6 @@ size_t Dispatch_request_msg::RequiredFieldsByteSizeFallback() const {
         *this->base_info_);
   }
 
-  if (has_parkspace_info()) {
-    // required .message.Parkspace_info parkspace_info = 5;
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->parkspace_info_);
-  }
-
   if (has_dispatch_motion_direction()) {
     // required .message.Dispatch_motion_direction dispatch_motion_direction = 3;
     total_size += 1 +
@@ -1629,7 +1665,7 @@ size_t Dispatch_request_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
         _internal_metadata_.unknown_fields());
   }
-  if (((_has_bits_[0] & 0x00000037) ^ 0x00000037) == 0) {  // All required fields are present.
+  if (((_has_bits_[0] & 0x00000033) ^ 0x00000033) == 0) {  // All required fields are present.
     // required string command_key = 2;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::StringSize(
@@ -1640,11 +1676,6 @@ size_t Dispatch_request_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormatLite::MessageSize(
         *this->base_info_);
 
-    // required .message.Parkspace_info parkspace_info = 5;
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->parkspace_info_);
-
     // required .message.Dispatch_motion_direction dispatch_motion_direction = 3;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_motion_direction());
@@ -1657,13 +1688,33 @@ size_t Dispatch_request_msg::ByteSizeLong() const {
   } else {
     total_size += RequiredFieldsByteSizeFallback();
   }
-  // optional .message.Locate_information locate_information = 6;
-  if (has_locate_information()) {
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->locate_information_);
+  // repeated .message.Parkspace_info parkspace_info_ex = 7;
+  {
+    unsigned int count = static_cast<unsigned int>(this->parkspace_info_ex_size());
+    total_size += 1UL * count;
+    for (unsigned int i = 0; i < count; i++) {
+      total_size +=
+        ::google::protobuf::internal::WireFormatLite::MessageSize(
+          this->parkspace_info_ex(static_cast<int>(i)));
+    }
   }
 
+  if (_has_bits_[0 / 32] & 12u) {
+    // optional .message.Parkspace_info parkspace_info = 5;
+    if (has_parkspace_info()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::MessageSize(
+          *this->parkspace_info_);
+    }
+
+    // optional .message.Locate_information locate_information = 6;
+    if (has_locate_information()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::MessageSize(
+          *this->locate_information_);
+    }
+
+  }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
   _cached_size_ = cached_size;
@@ -1693,6 +1744,7 @@ void Dispatch_request_msg::MergeFrom(const Dispatch_request_msg& from) {
   ::google::protobuf::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
+  parkspace_info_ex_.MergeFrom(from.parkspace_info_ex_);
   cached_has_bits = from._has_bits_[0];
   if (cached_has_bits & 63u) {
     if (cached_has_bits & 0x00000001u) {
@@ -1733,7 +1785,7 @@ void Dispatch_request_msg::CopyFrom(const Dispatch_request_msg& from) {
 }
 
 bool Dispatch_request_msg::IsInitialized() const {
-  if ((_has_bits_[0] & 0x00000037) != 0x00000037) return false;
+  if ((_has_bits_[0] & 0x00000033) != 0x00000033) return false;
   if (has_base_info()) {
     if (!this->base_info_->IsInitialized()) return false;
   }
@@ -1746,6 +1798,7 @@ void Dispatch_request_msg::Swap(Dispatch_request_msg* other) {
 }
 void Dispatch_request_msg::InternalSwap(Dispatch_request_msg* other) {
   using std::swap;
+  parkspace_info_ex_.InternalSwap(&other->parkspace_info_ex_);
   command_key_.Swap(&other->command_key_);
   swap(base_info_, other->base_info_);
   swap(parkspace_info_, other->parkspace_info_);
@@ -1770,6 +1823,8 @@ void Dispatch_response_msg::InitAsDefaultInstance() {
       ::message::Base_info::internal_default_instance());
   ::message::_Dispatch_response_msg_default_instance_._instance.get_mutable()->error_manager_ = const_cast< ::message::Error_manager*>(
       ::message::Error_manager::internal_default_instance());
+  ::message::_Dispatch_response_msg_default_instance_._instance.get_mutable()->parkspace_info_ = const_cast< ::message::Parkspace_info*>(
+      ::message::Parkspace_info::internal_default_instance());
 }
 void Dispatch_response_msg::clear_base_info() {
   if (base_info_ != NULL) base_info_->Clear();
@@ -1779,10 +1834,19 @@ void Dispatch_response_msg::clear_error_manager() {
   if (error_manager_ != NULL) error_manager_->Clear();
   clear_has_error_manager();
 }
+void Dispatch_response_msg::clear_parkspace_info() {
+  if (parkspace_info_ != NULL) parkspace_info_->Clear();
+  clear_has_parkspace_info();
+}
+void Dispatch_response_msg::clear_parkspace_info_ex() {
+  parkspace_info_ex_.Clear();
+}
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Dispatch_response_msg::kBaseInfoFieldNumber;
 const int Dispatch_response_msg::kCommandKeyFieldNumber;
 const int Dispatch_response_msg::kErrorManagerFieldNumber;
+const int Dispatch_response_msg::kParkspaceInfoFieldNumber;
+const int Dispatch_response_msg::kParkspaceInfoExFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Dispatch_response_msg::Dispatch_response_msg()
@@ -1797,7 +1861,8 @@ Dispatch_response_msg::Dispatch_response_msg(const Dispatch_response_msg& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
       _has_bits_(from._has_bits_),
-      _cached_size_(0) {
+      _cached_size_(0),
+      parkspace_info_ex_(from.parkspace_info_ex_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.has_command_key()) {
@@ -1813,6 +1878,11 @@ Dispatch_response_msg::Dispatch_response_msg(const Dispatch_response_msg& from)
   } else {
     error_manager_ = NULL;
   }
+  if (from.has_parkspace_info()) {
+    parkspace_info_ = new ::message::Parkspace_info(*from.parkspace_info_);
+  } else {
+    parkspace_info_ = NULL;
+  }
   // @@protoc_insertion_point(copy_constructor:message.Dispatch_response_msg)
 }
 
@@ -1820,8 +1890,8 @@ void Dispatch_response_msg::SharedCtor() {
   _cached_size_ = 0;
   command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&base_info_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&error_manager_) -
-      reinterpret_cast<char*>(&base_info_)) + sizeof(error_manager_));
+      reinterpret_cast<char*>(&parkspace_info_) -
+      reinterpret_cast<char*>(&base_info_)) + sizeof(parkspace_info_));
 }
 
 Dispatch_response_msg::~Dispatch_response_msg() {
@@ -1833,6 +1903,7 @@ void Dispatch_response_msg::SharedDtor() {
   command_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (this != internal_default_instance()) delete base_info_;
   if (this != internal_default_instance()) delete error_manager_;
+  if (this != internal_default_instance()) delete parkspace_info_;
 }
 
 void Dispatch_response_msg::SetCachedSize(int size) const {
@@ -1864,8 +1935,9 @@ void Dispatch_response_msg::Clear() {
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
 
+  parkspace_info_ex_.Clear();
   cached_has_bits = _has_bits_[0];
-  if (cached_has_bits & 7u) {
+  if (cached_has_bits & 15u) {
     if (cached_has_bits & 0x00000001u) {
       GOOGLE_DCHECK(!command_key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
       (*command_key_.UnsafeRawStringPointer())->clear();
@@ -1878,6 +1950,10 @@ void Dispatch_response_msg::Clear() {
       GOOGLE_DCHECK(error_manager_ != NULL);
       error_manager_->Clear();
     }
+    if (cached_has_bits & 0x00000008u) {
+      GOOGLE_DCHECK(parkspace_info_ != NULL);
+      parkspace_info_->Clear();
+    }
   }
   _has_bits_.Clear();
   _internal_metadata_.Clear();
@@ -1933,6 +2009,29 @@ bool Dispatch_response_msg::MergePartialFromCodedStream(
         break;
       }
 
+      // optional .message.Parkspace_info parkspace_info = 4;
+      case 4: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_parkspace_info()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // repeated .message.Parkspace_info parkspace_info_ex = 5;
+      case 5: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_parkspace_info_ex()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
       default: {
       handle_unusual:
         if (tag == 0) {
@@ -1982,6 +2081,19 @@ void Dispatch_response_msg::SerializeWithCachedSizes(
       3, *this->error_manager_, output);
   }
 
+  // optional .message.Parkspace_info parkspace_info = 4;
+  if (cached_has_bits & 0x00000008u) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      4, *this->parkspace_info_, output);
+  }
+
+  // repeated .message.Parkspace_info parkspace_info_ex = 5;
+  for (unsigned int i = 0,
+      n = static_cast<unsigned int>(this->parkspace_info_ex_size()); i < n; i++) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      5, this->parkspace_info_ex(static_cast<int>(i)), output);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
         _internal_metadata_.unknown_fields(), output);
@@ -2022,6 +2134,21 @@ void Dispatch_response_msg::SerializeWithCachedSizes(
         3, *this->error_manager_, deterministic, target);
   }
 
+  // optional .message.Parkspace_info parkspace_info = 4;
+  if (cached_has_bits & 0x00000008u) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        4, *this->parkspace_info_, deterministic, target);
+  }
+
+  // repeated .message.Parkspace_info parkspace_info_ex = 5;
+  for (unsigned int i = 0,
+      n = static_cast<unsigned int>(this->parkspace_info_ex_size()); i < n; i++) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        5, this->parkspace_info_ex(static_cast<int>(i)), deterministic, target);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
         _internal_metadata_.unknown_fields(), target);
@@ -2085,6 +2212,24 @@ size_t Dispatch_response_msg::ByteSizeLong() const {
   } else {
     total_size += RequiredFieldsByteSizeFallback();
   }
+  // repeated .message.Parkspace_info parkspace_info_ex = 5;
+  {
+    unsigned int count = static_cast<unsigned int>(this->parkspace_info_ex_size());
+    total_size += 1UL * count;
+    for (unsigned int i = 0; i < count; i++) {
+      total_size +=
+        ::google::protobuf::internal::WireFormatLite::MessageSize(
+          this->parkspace_info_ex(static_cast<int>(i)));
+    }
+  }
+
+  // optional .message.Parkspace_info parkspace_info = 4;
+  if (has_parkspace_info()) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->parkspace_info_);
+  }
+
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
   _cached_size_ = cached_size;
@@ -2114,8 +2259,9 @@ void Dispatch_response_msg::MergeFrom(const Dispatch_response_msg& from) {
   ::google::protobuf::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
+  parkspace_info_ex_.MergeFrom(from.parkspace_info_ex_);
   cached_has_bits = from._has_bits_[0];
-  if (cached_has_bits & 7u) {
+  if (cached_has_bits & 15u) {
     if (cached_has_bits & 0x00000001u) {
       set_has_command_key();
       command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
@@ -2126,6 +2272,9 @@ void Dispatch_response_msg::MergeFrom(const Dispatch_response_msg& from) {
     if (cached_has_bits & 0x00000004u) {
       mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
     }
+    if (cached_has_bits & 0x00000008u) {
+      mutable_parkspace_info()->::message::Parkspace_info::MergeFrom(from.parkspace_info());
+    }
   }
 }
 
@@ -2160,9 +2309,11 @@ void Dispatch_response_msg::Swap(Dispatch_response_msg* other) {
 }
 void Dispatch_response_msg::InternalSwap(Dispatch_response_msg* other) {
   using std::swap;
+  parkspace_info_ex_.InternalSwap(&other->parkspace_info_ex_);
   command_key_.Swap(&other->command_key_);
   swap(base_info_, other->base_info_);
   swap(error_manager_, other->error_manager_);
+  swap(parkspace_info_, other->parkspace_info_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
   swap(_cached_size_, other->_cached_size_);

+ 144 - 2
message/dispatch_message.pb.h

@@ -646,6 +646,18 @@ class Dispatch_request_msg : public ::google::protobuf::Message /* @@protoc_inse
 
   // accessors -------------------------------------------------------
 
+  // repeated .message.Parkspace_info parkspace_info_ex = 7;
+  int parkspace_info_ex_size() const;
+  void clear_parkspace_info_ex();
+  static const int kParkspaceInfoExFieldNumber = 7;
+  const ::message::Parkspace_info& parkspace_info_ex(int index) const;
+  ::message::Parkspace_info* mutable_parkspace_info_ex(int index);
+  ::message::Parkspace_info* add_parkspace_info_ex();
+  ::google::protobuf::RepeatedPtrField< ::message::Parkspace_info >*
+      mutable_parkspace_info_ex();
+  const ::google::protobuf::RepeatedPtrField< ::message::Parkspace_info >&
+      parkspace_info_ex() const;
+
   // required string command_key = 2;
   bool has_command_key() const;
   void clear_command_key();
@@ -670,7 +682,7 @@ class Dispatch_request_msg : public ::google::protobuf::Message /* @@protoc_inse
   ::message::Base_info* mutable_base_info();
   void set_allocated_base_info(::message::Base_info* base_info);
 
-  // required .message.Parkspace_info parkspace_info = 5;
+  // optional .message.Parkspace_info parkspace_info = 5;
   bool has_parkspace_info() const;
   void clear_parkspace_info();
   static const int kParkspaceInfoFieldNumber = 5;
@@ -723,6 +735,7 @@ class Dispatch_request_msg : public ::google::protobuf::Message /* @@protoc_inse
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
+  ::google::protobuf::RepeatedPtrField< ::message::Parkspace_info > parkspace_info_ex_;
   ::google::protobuf::internal::ArenaStringPtr command_key_;
   ::message::Base_info* base_info_;
   ::message::Parkspace_info* parkspace_info_;
@@ -823,6 +836,18 @@ class Dispatch_response_msg : public ::google::protobuf::Message /* @@protoc_ins
 
   // accessors -------------------------------------------------------
 
+  // repeated .message.Parkspace_info parkspace_info_ex = 5;
+  int parkspace_info_ex_size() const;
+  void clear_parkspace_info_ex();
+  static const int kParkspaceInfoExFieldNumber = 5;
+  const ::message::Parkspace_info& parkspace_info_ex(int index) const;
+  ::message::Parkspace_info* mutable_parkspace_info_ex(int index);
+  ::message::Parkspace_info* add_parkspace_info_ex();
+  ::google::protobuf::RepeatedPtrField< ::message::Parkspace_info >*
+      mutable_parkspace_info_ex();
+  const ::google::protobuf::RepeatedPtrField< ::message::Parkspace_info >&
+      parkspace_info_ex() const;
+
   // required string command_key = 2;
   bool has_command_key() const;
   void clear_command_key();
@@ -856,6 +881,15 @@ class Dispatch_response_msg : public ::google::protobuf::Message /* @@protoc_ins
   ::message::Error_manager* mutable_error_manager();
   void set_allocated_error_manager(::message::Error_manager* error_manager);
 
+  // optional .message.Parkspace_info parkspace_info = 4;
+  bool has_parkspace_info() const;
+  void clear_parkspace_info();
+  static const int kParkspaceInfoFieldNumber = 4;
+  const ::message::Parkspace_info& parkspace_info() const;
+  ::message::Parkspace_info* release_parkspace_info();
+  ::message::Parkspace_info* mutable_parkspace_info();
+  void set_allocated_parkspace_info(::message::Parkspace_info* parkspace_info);
+
   // @@protoc_insertion_point(class_scope:message.Dispatch_response_msg)
  private:
   void set_has_base_info();
@@ -864,6 +898,8 @@ class Dispatch_response_msg : public ::google::protobuf::Message /* @@protoc_ins
   void clear_has_command_key();
   void set_has_error_manager();
   void clear_has_error_manager();
+  void set_has_parkspace_info();
+  void clear_has_parkspace_info();
 
   // helper for ByteSizeLong()
   size_t RequiredFieldsByteSizeFallback() const;
@@ -871,9 +907,11 @@ class Dispatch_response_msg : public ::google::protobuf::Message /* @@protoc_ins
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
+  ::google::protobuf::RepeatedPtrField< ::message::Parkspace_info > parkspace_info_ex_;
   ::google::protobuf::internal::ArenaStringPtr command_key_;
   ::message::Base_info* base_info_;
   ::message::Error_manager* error_manager_;
+  ::message::Parkspace_info* parkspace_info_;
   friend struct ::protobuf_dispatch_5fmessage_2eproto::TableStruct;
   friend void ::protobuf_dispatch_5fmessage_2eproto::InitDefaultsDispatch_response_msgImpl();
 };
@@ -2073,7 +2111,7 @@ inline void Dispatch_request_msg::set_terminal_id(::google::protobuf::int32 valu
   // @@protoc_insertion_point(field_set:message.Dispatch_request_msg.terminal_id)
 }
 
-// required .message.Parkspace_info parkspace_info = 5;
+// optional .message.Parkspace_info parkspace_info = 5;
 inline bool Dispatch_request_msg::has_parkspace_info() const {
   return (_has_bits_[0] & 0x00000004u) != 0;
 }
@@ -2173,6 +2211,33 @@ inline void Dispatch_request_msg::set_allocated_locate_information(::message::Lo
   // @@protoc_insertion_point(field_set_allocated:message.Dispatch_request_msg.locate_information)
 }
 
+// repeated .message.Parkspace_info parkspace_info_ex = 7;
+inline int Dispatch_request_msg::parkspace_info_ex_size() const {
+  return parkspace_info_ex_.size();
+}
+inline const ::message::Parkspace_info& Dispatch_request_msg::parkspace_info_ex(int index) const {
+  // @@protoc_insertion_point(field_get:message.Dispatch_request_msg.parkspace_info_ex)
+  return parkspace_info_ex_.Get(index);
+}
+inline ::message::Parkspace_info* Dispatch_request_msg::mutable_parkspace_info_ex(int index) {
+  // @@protoc_insertion_point(field_mutable:message.Dispatch_request_msg.parkspace_info_ex)
+  return parkspace_info_ex_.Mutable(index);
+}
+inline ::message::Parkspace_info* Dispatch_request_msg::add_parkspace_info_ex() {
+  // @@protoc_insertion_point(field_add:message.Dispatch_request_msg.parkspace_info_ex)
+  return parkspace_info_ex_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::message::Parkspace_info >*
+Dispatch_request_msg::mutable_parkspace_info_ex() {
+  // @@protoc_insertion_point(field_mutable_list:message.Dispatch_request_msg.parkspace_info_ex)
+  return &parkspace_info_ex_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::message::Parkspace_info >&
+Dispatch_request_msg::parkspace_info_ex() const {
+  // @@protoc_insertion_point(field_list:message.Dispatch_request_msg.parkspace_info_ex)
+  return parkspace_info_ex_;
+}
+
 // -------------------------------------------------------------------
 
 // Dispatch_response_msg
@@ -2340,6 +2405,83 @@ inline void Dispatch_response_msg::set_allocated_error_manager(::message::Error_
   // @@protoc_insertion_point(field_set_allocated:message.Dispatch_response_msg.error_manager)
 }
 
+// optional .message.Parkspace_info parkspace_info = 4;
+inline bool Dispatch_response_msg::has_parkspace_info() const {
+  return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void Dispatch_response_msg::set_has_parkspace_info() {
+  _has_bits_[0] |= 0x00000008u;
+}
+inline void Dispatch_response_msg::clear_has_parkspace_info() {
+  _has_bits_[0] &= ~0x00000008u;
+}
+inline const ::message::Parkspace_info& Dispatch_response_msg::parkspace_info() const {
+  const ::message::Parkspace_info* p = parkspace_info_;
+  // @@protoc_insertion_point(field_get:message.Dispatch_response_msg.parkspace_info)
+  return p != NULL ? *p : *reinterpret_cast<const ::message::Parkspace_info*>(
+      &::message::_Parkspace_info_default_instance_);
+}
+inline ::message::Parkspace_info* Dispatch_response_msg::release_parkspace_info() {
+  // @@protoc_insertion_point(field_release:message.Dispatch_response_msg.parkspace_info)
+  clear_has_parkspace_info();
+  ::message::Parkspace_info* temp = parkspace_info_;
+  parkspace_info_ = NULL;
+  return temp;
+}
+inline ::message::Parkspace_info* Dispatch_response_msg::mutable_parkspace_info() {
+  set_has_parkspace_info();
+  if (parkspace_info_ == NULL) {
+    parkspace_info_ = new ::message::Parkspace_info;
+  }
+  // @@protoc_insertion_point(field_mutable:message.Dispatch_response_msg.parkspace_info)
+  return parkspace_info_;
+}
+inline void Dispatch_response_msg::set_allocated_parkspace_info(::message::Parkspace_info* parkspace_info) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete reinterpret_cast< ::google::protobuf::MessageLite*>(parkspace_info_);
+  }
+  if (parkspace_info) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      parkspace_info = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, parkspace_info, submessage_arena);
+    }
+    set_has_parkspace_info();
+  } else {
+    clear_has_parkspace_info();
+  }
+  parkspace_info_ = parkspace_info;
+  // @@protoc_insertion_point(field_set_allocated:message.Dispatch_response_msg.parkspace_info)
+}
+
+// repeated .message.Parkspace_info parkspace_info_ex = 5;
+inline int Dispatch_response_msg::parkspace_info_ex_size() const {
+  return parkspace_info_ex_.size();
+}
+inline const ::message::Parkspace_info& Dispatch_response_msg::parkspace_info_ex(int index) const {
+  // @@protoc_insertion_point(field_get:message.Dispatch_response_msg.parkspace_info_ex)
+  return parkspace_info_ex_.Get(index);
+}
+inline ::message::Parkspace_info* Dispatch_response_msg::mutable_parkspace_info_ex(int index) {
+  // @@protoc_insertion_point(field_mutable:message.Dispatch_response_msg.parkspace_info_ex)
+  return parkspace_info_ex_.Mutable(index);
+}
+inline ::message::Parkspace_info* Dispatch_response_msg::add_parkspace_info_ex() {
+  // @@protoc_insertion_point(field_add:message.Dispatch_response_msg.parkspace_info_ex)
+  return parkspace_info_ex_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::message::Parkspace_info >*
+Dispatch_response_msg::mutable_parkspace_info_ex() {
+  // @@protoc_insertion_point(field_mutable_list:message.Dispatch_response_msg.parkspace_info_ex)
+  return &parkspace_info_ex_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::message::Parkspace_info >&
+Dispatch_response_msg::parkspace_info_ex() const {
+  // @@protoc_insertion_point(field_list:message.Dispatch_response_msg.parkspace_info_ex)
+  return parkspace_info_ex_;
+}
+
 // -------------------------------------------------------------------
 
 // Catcher_data

+ 8 - 1
message/dispatch_message.proto

@@ -50,8 +50,11 @@ message Dispatch_request_msg
 
     required Dispatch_motion_direction  dispatch_motion_direction=3;            //调度方向, 停车取车
     required int32                      terminal_id=4;                          //终端id, 出入口
-    required Parkspace_info             parkspace_info=5;                         //车位编号, 停车位
+    optional Parkspace_info             parkspace_info=5;                         //车位编号, 停车位
     optional Locate_information         locate_information=6;                   //汽车测量信息, 只有停车时有数据, 取车时没有数据.
+
+    repeated Parkspace_info             parkspace_info_ex=7;                         //车位编号, 停车位(B方案, 分配3个停车位)
+
 }
 
 //搬运动作执行完成后反馈结果(调度管理->主控)
@@ -60,6 +63,10 @@ message Dispatch_response_msg
     required Base_info                  base_info=1;                    //消息类型
     required string                     command_key=2;                   //指令唯一标识符id
     required Error_manager              error_manager = 3;
+
+    optional Parkspace_info             parkspace_info=4;                         //车位编号, 停车位
+    repeated Parkspace_info             parkspace_info_ex=5;                         //车位编号, 停车位(B方案, 分配3个停车位)
+
 }
 
 

+ 17 - 0
setting/dispatch_coordinates.prototxt

@@ -3304,3 +3304,20 @@ carrier_default_y_leave:9000
 carrier_default_x_left:1
 carrier_default_x_right:32600
 
+passageway_terminal_id_min:0
+passageway_terminal_id_max:7
+passageway_terminal_number:8
+passageway_functioning_patterns:PASSAGEWAY_FUNCTIONING_PATTERN_UNKNOWN
+passageway_functioning_patterns:PASSAGEWAY_FUNCTIONING_PATTERN_BIDIRECTION
+passageway_functioning_patterns:PASSAGEWAY_FUNCTIONING_PATTERN_BIDIRECTION
+passageway_functioning_patterns:PASSAGEWAY_FUNCTIONING_PATTERN_BIDIRECTION
+passageway_functioning_patterns:PASSAGEWAY_FUNCTIONING_PATTERN_BIDIRECTION
+passageway_functioning_patterns:PASSAGEWAY_FUNCTIONING_PATTERN_BIDIRECTION
+passageway_functioning_patterns:PASSAGEWAY_FUNCTIONING_PATTERN_BIDIRECTION
+passageway_functioning_patterns:PASSAGEWAY_FUNCTIONING_PATTERN_OUTLET
+
+car_wheel_base_min:1000
+car_wheel_base_max:4000
+
+
+

+ 0 - 3
system/system_executor.cpp

@@ -125,7 +125,6 @@ Error_manager System_executor::execute_msg(Communication_message* p_msg)
 				//针对消息类型, 对消息进行二次解析
 				if (t_dispatch_request_msg.ParseFromString(p_msg->get_message_buf()))
 				{
-					LOG(INFO) << " message::Dispatch_request_msg t_dispatch_request_msg =  "<< t_dispatch_request_msg.DebugString()<< " " << this;
 					//往线程池添加执行任务, 之后会唤醒一个线程去执行他.
 					m_thread_pool.enqueue(&System_executor::execute_for_dispatch_request_msg, this,
 										  t_dispatch_request_msg	);
@@ -143,7 +142,6 @@ Error_manager System_executor::execute_msg(Communication_message* p_msg)
 				//针对消息类型, 对消息进行二次解析
 				if (t_dispatch_plan_response_msg.ParseFromString(p_msg->get_message_buf()))
 				{
-					LOG(INFO) << " message::Dispatch_plan_response_msg t_dispatch_plan_response_msg =  "<< t_dispatch_plan_response_msg.DebugString()<< " " << this;
 					//往线程池添加执行任务, 之后会唤醒一个线程去执行他.
 					m_thread_pool.enqueue(&System_executor::execute_for_dispatch_plan_response_msg, this,
 										  t_dispatch_plan_response_msg	);
@@ -161,7 +159,6 @@ Error_manager System_executor::execute_msg(Communication_message* p_msg)
 				//针对消息类型, 对消息进行二次解析
 				if (t_dispatch_control_request_msg.ParseFromString(p_msg->get_message_buf()))
 				{
-					LOG(INFO) << " message::Dispatch_control_request_msg t_dispatch_control_request_msg =  "<< t_dispatch_control_request_msg.DebugString()<< " " << this;
 					//往线程池添加执行任务, 之后会唤醒一个线程去执行他.
 					m_thread_pool.enqueue(&System_executor::execute_for_dispatch_control_request_msg, this,
 										  t_dispatch_control_request_msg	);