浏览代码

20210317, 优化通信协议的message

huli 4 年之前
父节点
当前提交
285dba43ec
共有 9 个文件被更改,包括 555 次插入190 次删除
  1. 1 1
      dispatch/carrier.h
  2. 1 50
      dispatch/catcher.cpp
  3. 1 1
      dispatch/catcher.h
  4. 3 2
      dispatch/dispatch_manager.h
  5. 1 1
      dispatch/passageway.h
  6. 194 40
      main.cpp
  7. 200 76
      message/dispatch_control.pb.cc
  8. 122 19
      message/dispatch_control.pb.h
  9. 32 0
      message/dispatch_control.proto

+ 1 - 1
dispatch/carrier.h

@@ -35,7 +35,7 @@ protected://member functions
 	//取消下发的指令, 子类必须重载, 用来向下发送命令取消任务.
 	Error_manager cancel_command();
 protected://member variable
-
+public:
 	//调度下发到plc
 	std::string							m_request_key;				//请求唯一码, 用作识别
 	//请求的目标坐标和动作

+ 1 - 50
dispatch/catcher.cpp

@@ -202,7 +202,7 @@ Error_manager Catcher::update_device_communication()
 		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);
+		m_actual_error_description = (char*)(tp_catcher_status_from_plc_to_dispatch->m_actual_error_description-2);
 
 		//重连之后,搬运器状态   E_DISCONNECT  ->>  E_THREE_LEVEL_WORK
 		if ( m_dispatch_device_status == Dispatch_device_base::E_DISCONNECT )
@@ -217,55 +217,6 @@ Error_manager Catcher::update_device_communication()
 	//else 继续等待,直到消息刷新或者超时.
 
 
-
-//
-//	std::cout << " huli test :::: " << " *********************************************** = " << std::endl;
-//	std::cout << " huli test :::: " << " m_dispatch_device_status = " << m_dispatch_device_status << std::endl;
-//	int heat = m_last_heartbeat;
-//	std::cout << " huli test :::: " << " m_last_heartbeat = " << heat << std::endl;
-//	std::cout << " huli test :::: " << " m_actual_device_status = " << m_actual_device_status << std::endl;
-//	std::cout << " huli test :::: " << " m_actual_load_status = " << m_actual_load_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_b = " << m_actual_b << std::endl;
-//	std::cout << " huli test :::: " << " m_actual_z = " << m_actual_z << std::endl;
-//	std::cout << " huli test :::: " << " m_actual_d1 = " << m_actual_d1 << std::endl;
-//	std::cout << " huli test :::: " << " m_actual_d2 = " << m_actual_d2 << std::endl;
-//	std::cout << " huli test :::: " << " m_actual_clamp_motion1 = " << m_actual_clamp_motion1 << std::endl;
-//	std::cout << " huli test :::: " << " m_actual_clamp_motion2 = " << m_actual_clamp_motion2 << std::endl;
-//	std::cout << " huli test :::: " << " m_actual_clamp_motion3 = " << m_actual_clamp_motion3 << std::endl;
-//	std::cout << " huli test :::: " << " m_actual_clamp_motion4 = " << m_actual_clamp_motion4 << std::endl;
-//	unsigned int error32 = m_actual_error_code[3];
-//	error32 = (error32<<8) | m_actual_error_code[2];
-//	error32 = (error32<<8) | m_actual_error_code[1];
-//	error32 = (error32<<8) | m_actual_error_code[0];
-//	std::cout << " huli test :::: " << " m_actual_error_code = " << error32 << std::endl;
-//	for (int i = 0; i < 50; ++i)
-//	{
-//		printf("0x%x ", m_actual_error_code[i]);
-//	}
-//	std::cout <<  std::endl;
-//
-//	unsigned int warn32 = m_actual_warning_code[3];
-//	warn32 = (warn32<<8) | m_actual_warning_code[2];
-//	warn32 = (warn32<<8) | m_actual_warning_code[1];
-//	warn32 = (warn32<<8) | m_actual_warning_code[0];
-//	std::cout << " huli test :::: " << " m_actual_warning_code = " << warn32 << std::endl;
-//	for (int i = 0; i < 50; ++i)
-//	{
-//		printf("0x%x ", m_actual_warning_code[i]);
-//	}
-//	std::cout <<  std::endl;
-//	std::cout << " huli test :::: " << " m_actual_error_description = " << m_actual_error_description << std::endl;
-//
-//	for (int i = 0; i < 256; ++i)
-//	{
-//		printf("0x%x ", m_actual_error_description[i]);
-//	}
-//	std::cout <<  std::endl;
-
-
 	return Error_code::SUCCESS;
 }
 //从内存中读数据到任务单, 子类必须重载

+ 1 - 1
dispatch/catcher.h

@@ -34,7 +34,7 @@ protected://member functions
 	Error_manager cancel_command();
 protected://member variable
 
-
+public:
 	//调度下发到plc
 	std::string							m_request_key;				//请求唯一码, 用作识别
 	//请求的目标坐标和动作

+ 3 - 2
dispatch/dispatch_manager.h

@@ -10,8 +10,9 @@
 #include "../tool/singleton.h"
 #include "../tool/thread_condition.h"
 
-#include "../dispatch/carrier_base.h"
+#include "../dispatch/carrier.h"
 #include "../dispatch/catcher.h"
+#include "../dispatch/passageway.h"
 #include <vector>
 #include <glog/logging.h>
 
@@ -90,7 +91,7 @@ protected://member variable
 
 
 	int 										m_carrier_number;					//搬运器的数量, 默认3个
-	std::vector<Carrier_base*>					m_carrier_vector;					//搬运器的对象实例,内存由本类管理
+	std::vector<Carrier*>					m_carrier_vector;					//搬运器的对象实例,内存由本类管理
 
 
 

+ 1 - 1
dispatch/passageway.h

@@ -32,7 +32,7 @@ protected://member functions
 	//取消下发的指令, 子类必须重载, 用来向下发送命令取消任务.
 	Error_manager cancel_command();
 protected://member variable
-
+public:
 	//调度下发到plc
 	std::string							m_request_key;				//请求唯一码, 用作识别
 	//请求的目标坐标和动作

+ 194 - 40
main.cpp

@@ -112,8 +112,8 @@ int main(int argc,char* argv[])
 	std::cout << " huli test :::: " << " t_error = " << t_error << std::endl;
 	std::this_thread::sleep_for(std::chrono::seconds(2));
 
-	std::shared_ptr<Task_Base> tp_task_Base(new Catcher_task);
-	Catcher_task * tp_catcher_task = (Catcher_task *)tp_task_Base.get();
+	std::shared_ptr<Task_Base> tp_task_Base1(new Catcher_task);
+	Catcher_task * tp_catcher_task = (Catcher_task *)tp_task_Base1.get();
 	tp_catcher_task->task_init(NULL,std::chrono::milliseconds(15000));
 	tp_catcher_task->m_request_key = "ABCDEF";
 	tp_catcher_task->m_request_x = 123;
@@ -124,12 +124,12 @@ int main(int argc,char* argv[])
 	tp_catcher_task->m_request_d2 = 444;
 	tp_catcher_task->m_request_wheelbase = 555;
 	tp_catcher_task->m_request_clamp_motion = Catcher_task::E_CLAMP_LOOSE;
-	t_error = t_catcher.execute_task(tp_task_Base, Dispatch_device_base::E_ONE_LEVEL);
+	t_error = t_catcher.execute_task(tp_task_Base1, Dispatch_device_base::E_ONE_LEVEL);
 	std::cout << " huli test :::: " << " t_error = " << t_error << std::endl;
 	std::cout << " ---------------------------------------------------" << std::endl;
 
-	char zxczxcxzc ;
-	std::cin >> zxczxcxzc ;
+	char zxczxcxzc1 ;
+	std::cin >> zxczxcxzc1 ;
 
 	while ( 1 )
 	{
@@ -137,7 +137,6 @@ int main(int argc,char* argv[])
 		std::cout << " huli test :::: " << " tp_catcher_task->get_task_statu = " << tp_catcher_task->get_task_statu() << std::endl;
 		std::cout << " huli test :::: " << " tp_catcher_task->m_respons_status = " << tp_catcher_task->m_respons_status << std::endl;
 
-
 		std::cout << " huli test :::: " << " m_respons_key = " << tp_catcher_task->m_respons_key << std::endl;
 		std::cout << " huli test :::: " << " m_respons_status = " << tp_catcher_task->m_respons_status << std::endl;
 		std::cout << " huli test :::: " << " m_respons_x = " << tp_catcher_task->m_respons_x << std::endl;
@@ -148,13 +147,47 @@ int main(int argc,char* argv[])
 		std::cout << " huli test :::: " << " m_respons_d2 = " << tp_catcher_task->m_respons_d2 << std::endl;
 		std::cout << " huli test :::: " << " m_respons_wheelbase = " << tp_catcher_task->m_respons_wheelbase << std::endl;
 		std::cout << " huli test :::: " << " m_respons_clamp_motion = " << tp_catcher_task->m_respons_clamp_motion << std::endl;
+		std::cout << " ---------------------------------------------------" << std::endl;
+
 
 
+
+		std::cout << " huli test :::: " << " *********************************************** = " << std::endl;
 		std::cout << " huli test :::: " << " t_carrier_base.get_carrier_status() = " << t_catcher.get_dispatch_device_status() << std::endl;
-		std::cout << " huli test :::: " << " t_carrier_base.get_carrier_status() = " << t_catcher.get_actual_device_status() << std::endl;
+		int heat = t_catcher.m_last_heartbeat;
+		std::cout << " huli test :::: " << " m_last_heartbeat = " << heat << std::endl;
+		std::cout << " huli test :::: " << " m_actual_device_status = " << t_catcher.m_actual_device_status << std::endl;
+		std::cout << " huli test :::: " << " m_actual_load_status = " << t_catcher.m_actual_load_status << std::endl;
+		std::cout << " huli test :::: " << " m_actual_x = " << t_catcher.m_actual_x << std::endl;
+		std::cout << " huli test :::: " << " m_actual_y = " << t_catcher.m_actual_y << std::endl;
+		std::cout << " huli test :::: " << " m_actual_b = " << t_catcher.m_actual_b << std::endl;
+		std::cout << " huli test :::: " << " m_actual_z = " << t_catcher.m_actual_z << std::endl;
+		std::cout << " huli test :::: " << " m_actual_d1 = " << t_catcher.m_actual_d1 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_d2 = " << t_catcher.m_actual_d2 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_clamp_motion1 = " << t_catcher.m_actual_clamp_motion1 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_clamp_motion2 = " << t_catcher.m_actual_clamp_motion2 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_clamp_motion3 = " << t_catcher.m_actual_clamp_motion3 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_clamp_motion4 = " << t_catcher.m_actual_clamp_motion4 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_error_code = " <<  std::endl;
+		for (int i = 0; i < 50; ++i)
+		{
+			printf("0x%x ", t_catcher.m_actual_error_code[i]);
+		}
+		std::cout <<  std::endl;
+
+		std::cout << " huli test :::: " << " m_actual_warning_code = " <<  std::endl;
+		for (int i = 0; i < 50; ++i)
+		{
+			printf("0x%x ", t_catcher.m_actual_warning_code[i]);
+		}
+		std::cout <<  std::endl;
+		std::cout << " huli test :::: " << " m_actual_error_description = " << t_catcher.m_actual_error_description << std::endl;
+
+		std::cout << " huli test :::: " << " *********************************************** = " << std::endl;
+
+
 
 
-		std::cout << " ---------------------------------------------------" << std::endl;
 		std::this_thread::sleep_for(std::chrono::milliseconds(1000));
 
 	}
@@ -164,54 +197,95 @@ int main(int argc,char* argv[])
 
 
 
-	Catcher t_catcher;
-	t_error = t_catcher.dispatch_device_base_init(1);
+	Carrier t_carrier;
+	t_error = t_carrier.dispatch_device_base_init(1);
 	std::cout << " huli test :::: " << " t_error = " << t_error << std::endl;
 	std::this_thread::sleep_for(std::chrono::seconds(2));
 
-	std::shared_ptr<Task_Base> tp_task_Base(new Catcher_task);
-	Catcher_task * tp_catcher_task = (Catcher_task *)tp_task_Base.get();
-	tp_catcher_task->task_init(NULL,std::chrono::milliseconds(15000));
-	tp_catcher_task->m_request_key = "ABCDEF";
-	tp_catcher_task->m_request_x = 123;
-	tp_catcher_task->m_request_y = 456;
-	tp_catcher_task->m_request_b = 80;
-	tp_catcher_task->m_request_z = 789;
-	tp_catcher_task->m_request_d1 = 333;
-	tp_catcher_task->m_request_d2 = 444;
-	tp_catcher_task->m_request_wheelbase = 555;
-	tp_catcher_task->m_request_clamp_motion = Catcher_task::E_CLAMP_LOOSE;
-	t_error = t_catcher.execute_task(tp_task_Base, Dispatch_device_base::E_ONE_LEVEL);
+	std::shared_ptr<Task_Base> tp_task_Base2(new Carrier_task);
+	Carrier_task * tp_carrier_task = (Carrier_task *)tp_task_Base2.get();
+	tp_carrier_task->task_init(NULL,std::chrono::milliseconds(15000));
+	tp_carrier_task->m_request_key = "ABCDEF";
+	tp_carrier_task->m_request_x = 123;
+	tp_carrier_task->m_request_y = 456;
+	tp_carrier_task->m_request_z = 789;
+	tp_carrier_task->m_request_y1 = 333;
+	tp_carrier_task->m_request_y2 = 444;
+	tp_carrier_task->m_request_clamp_motion = Carrier_task::E_CLAMP_LOOSE;
+	tp_carrier_task->m_request_joint_motion_x = Carrier_task::E_JOINT_HOLD_OUT;
+	tp_carrier_task->m_request_joint_motion_y = Carrier_task::E_JOINT_HOLD_OUT;
+	tp_carrier_task->m_request_space_id = 555;
+	tp_carrier_task->m_request_floor_id = 555;
+	tp_carrier_task->m_request_wheelbase = 555;
+
+	t_error = t_carrier.execute_task(tp_task_Base2, Dispatch_device_base::E_ONE_LEVEL);
 	std::cout << " huli test :::: " << " t_error = " << t_error << std::endl;
 	std::cout << " ---------------------------------------------------" << std::endl;
 
-	char zxczxcxzc ;
-	std::cin >> zxczxcxzc ;
+	char zxczxcxzc2 ;
+	std::cin >> zxczxcxzc2 ;
 
 	while ( 1 )
 	{
 		std::cout << " huli test :::: " << "  ===================================== "   << std::endl;
-		std::cout << " huli test :::: " << " tp_catcher_task->get_task_statu = " << tp_catcher_task->get_task_statu() << std::endl;
-		std::cout << " huli test :::: " << " tp_catcher_task->m_respons_status = " << tp_catcher_task->m_respons_status << std::endl;
+		std::cout << " huli test :::: " << " tp_carrier_task->get_task_statu = " << tp_carrier_task->get_task_statu() << std::endl;
+		std::cout << " huli test :::: " << " tp_carrier_task->m_respons_status = " << tp_carrier_task->m_respons_status << std::endl;
+
+
+		std::cout << " huli test :::: " << " m_respons_key = " << tp_carrier_task->m_respons_key << std::endl;
+		std::cout << " huli test :::: " << " m_respons_status = " << tp_carrier_task->m_respons_status << std::endl;
+		std::cout << " huli test :::: " << " m_respons_x = " << tp_carrier_task->m_respons_x << std::endl;
+		std::cout << " huli test :::: " << " m_respons_y = " << tp_carrier_task->m_respons_y << std::endl;
+		std::cout << " huli test :::: " << " m_respons_z = " << tp_carrier_task->m_respons_z << std::endl;
+		std::cout << " huli test :::: " << " m_respons_y1 = " << tp_carrier_task->m_respons_y1 << std::endl;
+		std::cout << " huli test :::: " << " m_respons_y2 = " << tp_carrier_task->m_respons_y2 << std::endl;
+		std::cout << " huli test :::: " << " m_respons_clamp_motion = " << tp_carrier_task->m_respons_clamp_motion << std::endl;
+		std::cout << " huli test :::: " << " m_respons_joint_motion_x = " << tp_carrier_task->m_respons_joint_motion_x << std::endl;
+		std::cout << " huli test :::: " << " m_respons_joint_motion_y = " << tp_carrier_task->m_respons_joint_motion_y << std::endl;
+		std::cout << " huli test :::: " << " m_respons_space_id = " << tp_carrier_task->m_respons_space_id << std::endl;
+		std::cout << " huli test :::: " << " m_respons_floor_id = " << tp_carrier_task->m_respons_floor_id << std::endl;
+		std::cout << " huli test :::: " << " m_respons_wheelbase = " << tp_carrier_task->m_respons_wheelbase << std::endl;
+		std::cout << " ---------------------------------------------------" << std::endl;
 
 
-		std::cout << " huli test :::: " << " m_respons_key = " << tp_catcher_task->m_respons_key << std::endl;
-		std::cout << " huli test :::: " << " m_respons_status = " << tp_catcher_task->m_respons_status << std::endl;
-		std::cout << " huli test :::: " << " m_respons_x = " << tp_catcher_task->m_respons_x << std::endl;
-		std::cout << " huli test :::: " << " m_respons_y = " << tp_catcher_task->m_respons_y << std::endl;
-		std::cout << " huli test :::: " << " m_respons_b = " << tp_catcher_task->m_respons_b << std::endl;
-		std::cout << " huli test :::: " << " m_respons_z = " << tp_catcher_task->m_respons_z << std::endl;
-		std::cout << " huli test :::: " << " m_respons_d1 = " << tp_catcher_task->m_respons_d1 << std::endl;
-		std::cout << " huli test :::: " << " m_respons_d2 = " << tp_catcher_task->m_respons_d2 << std::endl;
-		std::cout << " huli test :::: " << " m_respons_wheelbase = " << tp_catcher_task->m_respons_wheelbase << std::endl;
-		std::cout << " huli test :::: " << " m_respons_clamp_motion = " << tp_catcher_task->m_respons_clamp_motion << std::endl;
 
 
-		std::cout << " huli test :::: " << " t_carrier_base.get_carrier_status() = " << t_catcher.get_dispatch_device_status() << std::endl;
-		std::cout << " huli test :::: " << " t_carrier_base.get_carrier_status() = " << t_catcher.get_actual_device_status() << std::endl;
+
+		std::cout << " huli test :::: " << " *********************************************** = " << std::endl;
+		std::cout << " huli test :::: " << " t_carrier_base.get_carrier_status() = " << t_carrier.get_dispatch_device_status() << std::endl;
+		int heat = t_carrier.m_last_heartbeat;
+		std::cout << " huli test :::: " << " m_last_heartbeat = " << heat << std::endl;
+		std::cout << " huli test :::: " << " m_actual_device_status = " << t_carrier.m_actual_device_status << std::endl;
+		std::cout << " huli test :::: " << " m_actual_load_status = " << t_carrier.m_actual_load_status << std::endl;
+		std::cout << " huli test :::: " << " m_actual_x = " << t_carrier.m_actual_x << std::endl;
+		std::cout << " huli test :::: " << " m_actual_y = " << t_carrier.m_actual_y << std::endl;
+		std::cout << " huli test :::: " << " m_actual_z = " << t_carrier.m_actual_z << std::endl;
+		std::cout << " huli test :::: " << " m_actual_y1 = " << t_carrier.m_actual_y1 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_y2 = " << t_carrier.m_actual_y2 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_clamp_motion1 = " << t_carrier.m_actual_clamp_motion1 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_clamp_motion2 = " << t_carrier.m_actual_clamp_motion2 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_small_sports_car_motion = " << t_carrier.m_actual_small_sports_car_motion << std::endl;
+		std::cout << " huli test :::: " << " m_actual_joint_motion_x1 = " << t_carrier.m_actual_joint_motion_x1 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_joint_motion_x2 = " << t_carrier.m_actual_joint_motion_x2 << std::endl;
+		std::cout << " huli test :::: " << " m_actual_error_code = " <<  std::endl;
+		for (int i = 0; i < 50; ++i)
+		{
+			printf("0x%x ", t_carrier.m_actual_error_code[i]);
+		}
+		std::cout <<  std::endl;
+
+		std::cout << " huli test :::: " << " m_actual_warning_code = " <<  std::endl;
+		for (int i = 0; i < 50; ++i)
+		{
+			printf("0x%x ", t_carrier.m_actual_warning_code[i]);
+		}
+		std::cout <<  std::endl;
+		std::cout << " huli test :::: " << " m_actual_error_description = " << t_carrier.m_actual_error_description << std::endl;
+
+		std::cout << " huli test :::: " << " *********************************************** = " << std::endl;
+
 
 
-		std::cout << " ---------------------------------------------------" << std::endl;
 		std::this_thread::sleep_for(std::chrono::milliseconds(1000));
 
 	}
@@ -221,6 +295,86 @@ int main(int argc,char* argv[])
 
 
 
+
+	Passageway t_passageway;
+	t_error = t_passageway.dispatch_device_base_init(1);
+	std::cout << " huli test :::: " << " t_error = " << t_error << std::endl;
+	std::this_thread::sleep_for(std::chrono::seconds(2));
+
+	std::shared_ptr<Task_Base> tp_task_Base3(new Passageway_task);
+	Passageway_task * tp_passageway_task = (Passageway_task *)tp_task_Base3.get();
+	tp_passageway_task->task_init(NULL,std::chrono::milliseconds(15000));
+	tp_passageway_task->m_request_key = "ABCDEF";
+	tp_passageway_task->m_request_inside_door_motion = Passageway_task::DOOR_OPEN;
+	tp_passageway_task->m_request_outside_door_motion = Passageway_task::DOOR_CLOSE;
+	tp_passageway_task->m_request_turntable_direction = Passageway_task::TURNTABLE_DIRECTION_OUTSIDE;
+
+	t_error = t_passageway.execute_task(tp_task_Base3, Dispatch_device_base::E_ONE_LEVEL);
+	std::cout << " huli test :::: " << " t_error = " << t_error << std::endl;
+	std::cout << " ---------------------------------------------------" << std::endl;
+
+	char zxczxcxzc3 ;
+	std::cin >> zxczxcxzc3 ;
+
+	while ( 1 )
+	{
+		std::cout << " huli test :::: " << "  ===================================== "   << std::endl;
+		std::cout << " huli test :::: " << " tp_passageway_task->get_task_statu = " << tp_passageway_task->get_task_statu() << std::endl;
+		std::cout << " huli test :::: " << " tp_passageway_task->m_respons_status = " << tp_passageway_task->m_respons_status << std::endl;
+
+
+		std::cout << " huli test :::: " << " m_respons_key = " << tp_passageway_task->m_respons_key << std::endl;
+		std::cout << " huli test :::: " << " m_respons_status = " << tp_passageway_task->m_respons_status << std::endl;
+		std::cout << " huli test :::: " << " m_respons_inside_door_motion = " << tp_passageway_task->m_respons_inside_door_motion << std::endl;
+		std::cout << " huli test :::: " << " m_respons_outside_door_motion = " << tp_passageway_task->m_respons_outside_door_motion << std::endl;
+		std::cout << " huli test :::: " << " m_respons_turntable_direction = " << tp_passageway_task->m_respons_turntable_direction << std::endl;
+		std::cout << " ---------------------------------------------------" << std::endl;
+
+
+
+
+
+		std::cout << " huli test :::: " << " *********************************************** = " << std::endl;
+		std::cout << " huli test :::: " << " t_passageway_base.get_passageway_status() = " << t_passageway.get_dispatch_device_status() << std::endl;
+		int heat = t_passageway.m_last_heartbeat;
+		std::cout << " huli test :::: " << " m_last_heartbeat = " << heat << std::endl;
+		std::cout << " huli test :::: " << " m_actual_device_status = " << t_passageway.m_actual_device_status << std::endl;
+		std::cout << " huli test :::: " << " m_actual_inside_load_status = " << t_passageway.m_actual_inside_load_status << std::endl;
+		std::cout << " huli test :::: " << " m_actual_outside_load_status = " << t_passageway.m_actual_outside_load_status << std::endl;
+		std::cout << " huli test :::: " << " m_actual_front_overstep_the_boundary = " << t_passageway.m_actual_front_overstep_the_boundary << std::endl;
+		std::cout << " huli test :::: " << " m_actual_back_overstep_the_boundary = " << t_passageway.m_actual_back_overstep_the_boundary << std::endl;
+		std::cout << " huli test :::: " << " m_actual_height_overstep_the_boundary = " << t_passageway.m_actual_height_overstep_the_boundary << std::endl;
+		std::cout << " huli test :::: " << " m_actual_outside_door_sensor = " << t_passageway.m_actual_outside_door_sensor << std::endl;
+		std::cout << " huli test :::: " << " m_actual_inside_door_motion = " << t_passageway.m_actual_inside_door_motion << std::endl;
+		std::cout << " huli test :::: " << " m_actual_outside_door_motion = " << t_passageway.m_actual_outside_door_motion << std::endl;
+		std::cout << " huli test :::: " << " m_actual_turntable_load_status = " << t_passageway.m_actual_turntable_load_status << std::endl;
+		std::cout << " huli test :::: " << " m_actual_turntable_direction = " << t_passageway.m_actual_turntable_direction << std::endl;
+		std::cout << " huli test :::: " << " m_actual_error_code = " <<  std::endl;
+		for (int i = 0; i < 50; ++i)
+		{
+			printf("0x%x ", t_passageway.m_actual_error_code[i]);
+		}
+		std::cout <<  std::endl;
+
+		std::cout << " huli test :::: " << " m_actual_warning_code = " <<  std::endl;
+		for (int i = 0; i < 50; ++i)
+		{
+			printf("0x%x ", t_passageway.m_actual_warning_code[i]);
+		}
+		std::cout <<  std::endl;
+		std::cout << " huli test :::: " << " m_actual_error_description = " << t_passageway.m_actual_error_description << std::endl;
+
+		std::cout << " huli test :::: " << " *********************************************** = " << std::endl;
+
+
+
+		std::this_thread::sleep_for(std::chrono::milliseconds(1000));
+
+	}
+
+
+
+
 
 
 

+ 200 - 76
message/dispatch_control.pb.cc

@@ -135,7 +135,7 @@ void InitDefaultsDispatch_control_response_msg() {
 }
 
 ::google::protobuf::Metadata file_level_metadata[4];
-const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[3];
+const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[4];
 
 const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_plan_request_msg, _has_bits_),
@@ -185,14 +185,16 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_request_msg, dispatch_destination_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_request_msg, error_manager_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_request_msg, dispatch_device_target_status_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_request_msg, dispatch_device_task_status_),
   1,
   0,
-  6,
   7,
+  8,
   3,
   4,
   2,
   5,
+  6,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_response_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_response_msg, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -206,20 +208,22 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_response_msg, dispatch_destination_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_response_msg, error_manager_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_response_msg, dispatch_device_target_status_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_control_response_msg, dispatch_device_task_status_),
   1,
   0,
-  6,
   7,
+  8,
   3,
   4,
   2,
   5,
+  6,
 };
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
   { 0, 11, sizeof(::message::Dispatch_plan_request_msg)},
   { 17, 28, sizeof(::message::Dispatch_plan_response_msg)},
-  { 34, 47, sizeof(::message::Dispatch_control_request_msg)},
-  { 55, 68, sizeof(::message::Dispatch_control_response_msg)},
+  { 34, 48, sizeof(::message::Dispatch_control_request_msg)},
+  { 57, 71, sizeof(::message::Dispatch_control_response_msg)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
@@ -264,7 +268,7 @@ void AddDescriptorsImpl() {
       "patch_task_type\030\003 \001(\0162\033.message.Dispatch"
       "_task_type\022\027\n\017dispatch_source\030\004 \001(\005\022\034\n\024d"
       "ispatch_destination\030\005 \001(\005\022-\n\rerror_manag"
-      "er\030\006 \001(\0132\026.message.Error_manager\"\205\003\n\034Dis"
+      "er\030\006 \001(\0132\026.message.Error_manager\"\320\003\n\034Dis"
       "patch_control_request_msg\022%\n\tbase_info\030\001"
       " \002(\0132\022.message.Base_info\022\023\n\013command_key\030"
       "\002 \002(\t\0227\n\022dispatch_task_type\030\003 \002(\0162\033.mess"
@@ -274,47 +278,58 @@ void AddDescriptorsImpl() {
       "_destination\030\006 \001(\005\022-\n\rerror_manager\030\007 \001("
       "\0132\026.message.Error_manager\022M\n\035dispatch_de"
       "vice_target_status\030\010 \001(\0162&.message.Dispa"
-      "tch_device_target_status\"\206\003\n\035Dispatch_co"
-      "ntrol_response_msg\022%\n\tbase_info\030\001 \002(\0132\022."
-      "message.Base_info\022\023\n\013command_key\030\002 \002(\t\0227"
-      "\n\022dispatch_task_type\030\003 \001(\0162\033.message.Dis"
-      "patch_task_type\022;\n\024dispatch_device_type\030"
-      "\004 \001(\0162\035.message.Dispatch_device_type\022\027\n\017"
-      "dispatch_source\030\005 \001(\005\022\034\n\024dispatch_destin"
-      "ation\030\006 \001(\005\022-\n\rerror_manager\030\007 \001(\0132\026.mes"
-      "sage.Error_manager\022M\n\035dispatch_device_ta"
-      "rget_status\030\010 \001(\0162&.message.Dispatch_dev"
-      "ice_target_status*\333\005\n\022Dispatch_task_type"
-      "\022\027\n\023DISPATCH_PLAN_STORE\020e\022\030\n\024DISPATCH_PL"
-      "AN_PICKUP\020f\022\036\n\032ROBOT_CATCH_CAR_FROM_INLE"
-      "T\020\001\022\034\n\030ROBOT_PUT_CAR_TO_CARRIER\020\002\022 \n\034ROB"
-      "OT_CATCH_CAR_FROM_CARRIER\020\003\022\033\n\027ROBOT_PUT"
-      "_CAR_TO_OUTLET\020\004\022\016\n\nROBOT_MOVE\020\005\022\"\n\036CARR"
-      "IER_RECEIVE_CAR_FROM_ROBOT\020\013\022%\n!CARRIER_"
-      "STORE_CAR_TO_PARKINGSPACE\020\014\022(\n$CARRIER_S"
-      "TORE_CAR_TO_PARKINGSPACE_EX\020z\022(\n$CARRIER"
-      "_PICKUP_CAR_FROM_PARKINGSPACE\020\r\022 \n\034CARRI"
-      "ER_DELIVER_CAR_TO_ROBOT\020\016\022\020\n\014CARRIER_MOV"
-      "E\020\017\022 \n\034PASSAGEWAY_OPEN_OUTSIDE_DOOR\020\025\022!\n"
-      "\035PASSAGEWAY_CLOSE_OUTSIDE_DOOR\020\026\022\037\n\033PASS"
-      "AGEWAY_OPEN_INSIDE_DOOR\020\027\022 \n\034PASSAGEWAY_"
-      "CLOSE_INSIDE_DOOR\020\030\022*\n&PASSAGEWAY_ROTATE"
-      "_TURNTABLE_TO_CARRIER\020\031\022)\n%PASSAGEWAY_RO"
-      "TATE_TURNTABLE_TO_OUTLET\020\032\022\023\n\017DISPATCH_F"
-      "INISH\020\036\022\023\n\017DISPATCH_CANCEL\020\037\022\022\n\016DISPATCH"
-      "_PAUSE\020(\022\025\n\021DISPATCH_RESERVED\0202*\370\001\n\024Disp"
-      "atch_device_type\022\013\n\007ROBOT_1\020e\022\013\n\007ROBOT_2"
-      "\020f\022\016\n\tCARRIER_1\020\310\001\022\016\n\tCARRIER_2\020\317\001\022\016\n\tCA"
-      "RRIER_3\020\313\001\022\021\n\014PASSAGEWAY_0\020\254\002\022\021\n\014PASSAGE"
-      "WAY_1\020\255\002\022\021\n\014PASSAGEWAY_2\020\256\002\022\021\n\014PASSAGEWA"
-      "Y_3\020\257\002\022\021\n\014PASSAGEWAY_4\020\260\002\022\021\n\014PASSAGEWAY_"
-      "5\020\261\002\022\021\n\014PASSAGEWAY_6\020\262\002\022\021\n\014PASSAGEWAY_7\020"
-      "\263\002*^\n\035Dispatch_device_target_status\022\014\n\010E"
-      "_UNKNOW\020\000\022\n\n\006E_IDLE\020\001\022\n\n\006E_BUSY\020\002\022\013\n\007E_R"
-      "EADY\020\003\022\n\n\006E_WAIT\020\004"
+      "tch_device_target_status\022I\n\033dispatch_dev"
+      "ice_task_status\030\t \001(\0162$.message.Dispatch"
+      "_device_task_status\"\321\003\n\035Dispatch_control"
+      "_response_msg\022%\n\tbase_info\030\001 \002(\0132\022.messa"
+      "ge.Base_info\022\023\n\013command_key\030\002 \002(\t\0227\n\022dis"
+      "patch_task_type\030\003 \001(\0162\033.message.Dispatch"
+      "_task_type\022;\n\024dispatch_device_type\030\004 \001(\016"
+      "2\035.message.Dispatch_device_type\022\027\n\017dispa"
+      "tch_source\030\005 \001(\005\022\034\n\024dispatch_destination"
+      "\030\006 \001(\005\022-\n\rerror_manager\030\007 \001(\0132\026.message."
+      "Error_manager\022M\n\035dispatch_device_target_"
+      "status\030\010 \001(\0162&.message.Dispatch_device_t"
+      "arget_status\022I\n\033dispatch_device_task_sta"
+      "tus\030\t \001(\0162$.message.Dispatch_device_task"
+      "_status*\333\005\n\022Dispatch_task_type\022\027\n\023DISPAT"
+      "CH_PLAN_STORE\020e\022\030\n\024DISPATCH_PLAN_PICKUP\020"
+      "f\022\036\n\032ROBOT_CATCH_CAR_FROM_INLET\020\001\022\034\n\030ROB"
+      "OT_PUT_CAR_TO_CARRIER\020\002\022 \n\034ROBOT_CATCH_C"
+      "AR_FROM_CARRIER\020\003\022\033\n\027ROBOT_PUT_CAR_TO_OU"
+      "TLET\020\004\022\016\n\nROBOT_MOVE\020\005\022\"\n\036CARRIER_RECEIV"
+      "E_CAR_FROM_ROBOT\020\013\022%\n!CARRIER_STORE_CAR_"
+      "TO_PARKINGSPACE\020\014\022(\n$CARRIER_STORE_CAR_T"
+      "O_PARKINGSPACE_EX\020z\022(\n$CARRIER_PICKUP_CA"
+      "R_FROM_PARKINGSPACE\020\r\022 \n\034CARRIER_DELIVER"
+      "_CAR_TO_ROBOT\020\016\022\020\n\014CARRIER_MOVE\020\017\022 \n\034PAS"
+      "SAGEWAY_OPEN_OUTSIDE_DOOR\020\025\022!\n\035PASSAGEWA"
+      "Y_CLOSE_OUTSIDE_DOOR\020\026\022\037\n\033PASSAGEWAY_OPE"
+      "N_INSIDE_DOOR\020\027\022 \n\034PASSAGEWAY_CLOSE_INSI"
+      "DE_DOOR\020\030\022*\n&PASSAGEWAY_ROTATE_TURNTABLE"
+      "_TO_CARRIER\020\031\022)\n%PASSAGEWAY_ROTATE_TURNT"
+      "ABLE_TO_OUTLET\020\032\022\023\n\017DISPATCH_FINISH\020\036\022\023\n"
+      "\017DISPATCH_CANCEL\020\037\022\022\n\016DISPATCH_PAUSE\020(\022\025"
+      "\n\021DISPATCH_RESERVED\0202*\370\001\n\024Dispatch_devic"
+      "e_type\022\013\n\007ROBOT_1\020e\022\013\n\007ROBOT_2\020f\022\016\n\tCARR"
+      "IER_1\020\310\001\022\016\n\tCARRIER_2\020\317\001\022\016\n\tCARRIER_3\020\313\001"
+      "\022\021\n\014PASSAGEWAY_0\020\254\002\022\021\n\014PASSAGEWAY_1\020\255\002\022\021"
+      "\n\014PASSAGEWAY_2\020\256\002\022\021\n\014PASSAGEWAY_3\020\257\002\022\021\n\014"
+      "PASSAGEWAY_4\020\260\002\022\021\n\014PASSAGEWAY_5\020\261\002\022\021\n\014PA"
+      "SSAGEWAY_6\020\262\002\022\021\n\014PASSAGEWAY_7\020\263\002*\244\001\n\035Dis"
+      "patch_device_target_status\022\032\n\026E_TARGET_S"
+      "TATUS_UNKNOW\020\000\022\030\n\024E_TARGET_STATUS_IDLE\020\001"
+      "\022\030\n\024E_TARGET_STATUS_BUSY\020\002\022\031\n\025E_TARGET_S"
+      "TATUS_READY\020\003\022\030\n\024E_TARGET_STATUS_WAIT\020\004*"
+      "\350\001\n\033Dispatch_device_task_status\022\022\n\016E_TAS"
+      "K_CREATED\020\000\022\020\n\014E_TASK_ISSUE\020\001\022\021\n\rE_TASK_"
+      "SIGNED\020\002\022\022\n\016E_TASK_WORKING\020\003\022\017\n\013E_TASK_O"
+      "VER\020\004\022\017\n\013E_TASK_STOP\020\005\022\020\n\014E_TASK_ERROR\020\013"
+      "\022\021\n\rE_TASK_CANCEL\020\025\022\017\n\013E_TASK_DEAD\020\026\022\023\n\017"
+      "E_TASK_WITHDRAW\020\037\022\017\n\013E_TASK_FREE\020 "
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 2418);
+      descriptor, 2874);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "dispatch_control.proto", &protobuf_RegisterTypes);
   ::protobuf_message_5fbase_2eproto::AddDescriptors();
@@ -409,6 +424,29 @@ bool Dispatch_device_target_status_IsValid(int value) {
   }
 }
 
+const ::google::protobuf::EnumDescriptor* Dispatch_device_task_status_descriptor() {
+  protobuf_dispatch_5fcontrol_2eproto::protobuf_AssignDescriptorsOnce();
+  return protobuf_dispatch_5fcontrol_2eproto::file_level_enum_descriptors[3];
+}
+bool Dispatch_device_task_status_IsValid(int value) {
+  switch (value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+    case 4:
+    case 5:
+    case 11:
+    case 21:
+    case 22:
+    case 31:
+    case 32:
+      return true;
+    default:
+      return false;
+  }
+}
+
 
 // ===================================================================
 
@@ -1503,6 +1541,7 @@ const int Dispatch_control_request_msg::kDispatchSourceFieldNumber;
 const int Dispatch_control_request_msg::kDispatchDestinationFieldNumber;
 const int Dispatch_control_request_msg::kErrorManagerFieldNumber;
 const int Dispatch_control_request_msg::kDispatchDeviceTargetStatusFieldNumber;
+const int Dispatch_control_request_msg::kDispatchDeviceTaskStatusFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Dispatch_control_request_msg::Dispatch_control_request_msg()
@@ -1543,8 +1582,8 @@ void Dispatch_control_request_msg::SharedCtor() {
   _cached_size_ = 0;
   command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&base_info_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&dispatch_device_target_status_) -
-      reinterpret_cast<char*>(&base_info_)) + sizeof(dispatch_device_target_status_));
+      reinterpret_cast<char*>(&dispatch_device_task_status_) -
+      reinterpret_cast<char*>(&base_info_)) + sizeof(dispatch_device_task_status_));
   dispatch_task_type_ = 101;
   dispatch_device_type_ = 101;
 }
@@ -1606,11 +1645,11 @@ void Dispatch_control_request_msg::Clear() {
   }
   if (cached_has_bits & 248u) {
     ::memset(&dispatch_source_, 0, static_cast<size_t>(
-        reinterpret_cast<char*>(&dispatch_device_target_status_) -
-        reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_device_target_status_));
+        reinterpret_cast<char*>(&dispatch_device_task_status_) -
+        reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_device_task_status_));
     dispatch_task_type_ = 101;
-    dispatch_device_type_ = 101;
   }
+  dispatch_device_type_ = 101;
   _has_bits_.Clear();
   _internal_metadata_.Clear();
 }
@@ -1753,6 +1792,26 @@ bool Dispatch_control_request_msg::MergePartialFromCodedStream(
         break;
       }
 
+      // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+      case 9: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::message::Dispatch_device_task_status_IsValid(value)) {
+            set_dispatch_device_task_status(static_cast< ::message::Dispatch_device_task_status >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(
+                9, static_cast< ::google::protobuf::uint64>(value));
+          }
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
       default: {
       handle_unusual:
         if (tag == 0) {
@@ -1797,13 +1856,13 @@ void Dispatch_control_request_msg::SerializeWithCachedSizes(
   }
 
   // required .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000040u) {
+  if (cached_has_bits & 0x00000080u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       3, this->dispatch_task_type(), output);
   }
 
   // optional .message.Dispatch_device_type dispatch_device_type = 4;
-  if (cached_has_bits & 0x00000080u) {
+  if (cached_has_bits & 0x00000100u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       4, this->dispatch_device_type(), output);
   }
@@ -1830,6 +1889,12 @@ void Dispatch_control_request_msg::SerializeWithCachedSizes(
       8, this->dispatch_device_target_status(), output);
   }
 
+  // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+  if (cached_has_bits & 0x00000040u) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      9, this->dispatch_device_task_status(), output);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
         _internal_metadata_.unknown_fields(), output);
@@ -1864,13 +1929,13 @@ void Dispatch_control_request_msg::SerializeWithCachedSizes(
   }
 
   // required .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000040u) {
+  if (cached_has_bits & 0x00000080u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       3, this->dispatch_task_type(), target);
   }
 
   // optional .message.Dispatch_device_type dispatch_device_type = 4;
-  if (cached_has_bits & 0x00000080u) {
+  if (cached_has_bits & 0x00000100u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       4, this->dispatch_device_type(), target);
   }
@@ -1898,6 +1963,12 @@ void Dispatch_control_request_msg::SerializeWithCachedSizes(
       8, this->dispatch_device_target_status(), target);
   }
 
+  // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+  if (cached_has_bits & 0x00000040u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+      9, this->dispatch_device_task_status(), target);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
         _internal_metadata_.unknown_fields(), target);
@@ -1941,7 +2012,7 @@ size_t Dispatch_control_request_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
         _internal_metadata_.unknown_fields());
   }
-  if (((_has_bits_[0] & 0x00000043) ^ 0x00000043) == 0) {  // All required fields are present.
+  if (((_has_bits_[0] & 0x00000083) ^ 0x00000083) == 0) {  // All required fields are present.
     // required string command_key = 2;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::StringSize(
@@ -1959,7 +2030,7 @@ size_t Dispatch_control_request_msg::ByteSizeLong() const {
   } else {
     total_size += RequiredFieldsByteSizeFallback();
   }
-  if (_has_bits_[0 / 32] & 60u) {
+  if (_has_bits_[0 / 32] & 124u) {
     // optional .message.Error_manager error_manager = 7;
     if (has_error_manager()) {
       total_size += 1 +
@@ -1987,6 +2058,12 @@ size_t Dispatch_control_request_msg::ByteSizeLong() const {
         ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_device_target_status());
     }
 
+    // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+    if (has_dispatch_device_task_status()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_device_task_status());
+    }
+
   }
   // optional .message.Dispatch_device_type dispatch_device_type = 4;
   if (has_dispatch_device_type()) {
@@ -2045,13 +2122,16 @@ void Dispatch_control_request_msg::MergeFrom(const Dispatch_control_request_msg&
       dispatch_device_target_status_ = from.dispatch_device_target_status_;
     }
     if (cached_has_bits & 0x00000040u) {
-      dispatch_task_type_ = from.dispatch_task_type_;
+      dispatch_device_task_status_ = from.dispatch_device_task_status_;
     }
     if (cached_has_bits & 0x00000080u) {
-      dispatch_device_type_ = from.dispatch_device_type_;
+      dispatch_task_type_ = from.dispatch_task_type_;
     }
     _has_bits_[0] |= cached_has_bits;
   }
+  if (cached_has_bits & 0x00000100u) {
+    set_dispatch_device_type(from.dispatch_device_type());
+  }
 }
 
 void Dispatch_control_request_msg::CopyFrom(const ::google::protobuf::Message& from) {
@@ -2069,7 +2149,7 @@ void Dispatch_control_request_msg::CopyFrom(const Dispatch_control_request_msg&
 }
 
 bool Dispatch_control_request_msg::IsInitialized() const {
-  if ((_has_bits_[0] & 0x00000043) != 0x00000043) return false;
+  if ((_has_bits_[0] & 0x00000083) != 0x00000083) return false;
   if (has_base_info()) {
     if (!this->base_info_->IsInitialized()) return false;
   }
@@ -2091,6 +2171,7 @@ void Dispatch_control_request_msg::InternalSwap(Dispatch_control_request_msg* ot
   swap(dispatch_source_, other->dispatch_source_);
   swap(dispatch_destination_, other->dispatch_destination_);
   swap(dispatch_device_target_status_, other->dispatch_device_target_status_);
+  swap(dispatch_device_task_status_, other->dispatch_device_task_status_);
   swap(dispatch_task_type_, other->dispatch_task_type_);
   swap(dispatch_device_type_, other->dispatch_device_type_);
   swap(_has_bits_[0], other->_has_bits_[0]);
@@ -2129,6 +2210,7 @@ const int Dispatch_control_response_msg::kDispatchSourceFieldNumber;
 const int Dispatch_control_response_msg::kDispatchDestinationFieldNumber;
 const int Dispatch_control_response_msg::kErrorManagerFieldNumber;
 const int Dispatch_control_response_msg::kDispatchDeviceTargetStatusFieldNumber;
+const int Dispatch_control_response_msg::kDispatchDeviceTaskStatusFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Dispatch_control_response_msg::Dispatch_control_response_msg()
@@ -2169,8 +2251,8 @@ void Dispatch_control_response_msg::SharedCtor() {
   _cached_size_ = 0;
   command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&base_info_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&dispatch_device_target_status_) -
-      reinterpret_cast<char*>(&base_info_)) + sizeof(dispatch_device_target_status_));
+      reinterpret_cast<char*>(&dispatch_device_task_status_) -
+      reinterpret_cast<char*>(&base_info_)) + sizeof(dispatch_device_task_status_));
   dispatch_task_type_ = 101;
   dispatch_device_type_ = 101;
 }
@@ -2232,11 +2314,11 @@ void Dispatch_control_response_msg::Clear() {
   }
   if (cached_has_bits & 248u) {
     ::memset(&dispatch_source_, 0, static_cast<size_t>(
-        reinterpret_cast<char*>(&dispatch_device_target_status_) -
-        reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_device_target_status_));
+        reinterpret_cast<char*>(&dispatch_device_task_status_) -
+        reinterpret_cast<char*>(&dispatch_source_)) + sizeof(dispatch_device_task_status_));
     dispatch_task_type_ = 101;
-    dispatch_device_type_ = 101;
   }
+  dispatch_device_type_ = 101;
   _has_bits_.Clear();
   _internal_metadata_.Clear();
 }
@@ -2379,6 +2461,26 @@ bool Dispatch_control_response_msg::MergePartialFromCodedStream(
         break;
       }
 
+      // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+      case 9: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::message::Dispatch_device_task_status_IsValid(value)) {
+            set_dispatch_device_task_status(static_cast< ::message::Dispatch_device_task_status >(value));
+          } else {
+            mutable_unknown_fields()->AddVarint(
+                9, static_cast< ::google::protobuf::uint64>(value));
+          }
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
       default: {
       handle_unusual:
         if (tag == 0) {
@@ -2423,13 +2525,13 @@ void Dispatch_control_response_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000040u) {
+  if (cached_has_bits & 0x00000080u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       3, this->dispatch_task_type(), output);
   }
 
   // optional .message.Dispatch_device_type dispatch_device_type = 4;
-  if (cached_has_bits & 0x00000080u) {
+  if (cached_has_bits & 0x00000100u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       4, this->dispatch_device_type(), output);
   }
@@ -2456,6 +2558,12 @@ void Dispatch_control_response_msg::SerializeWithCachedSizes(
       8, this->dispatch_device_target_status(), output);
   }
 
+  // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+  if (cached_has_bits & 0x00000040u) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      9, this->dispatch_device_task_status(), output);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
         _internal_metadata_.unknown_fields(), output);
@@ -2490,13 +2598,13 @@ void Dispatch_control_response_msg::SerializeWithCachedSizes(
   }
 
   // optional .message.Dispatch_task_type dispatch_task_type = 3;
-  if (cached_has_bits & 0x00000040u) {
+  if (cached_has_bits & 0x00000080u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       3, this->dispatch_task_type(), target);
   }
 
   // optional .message.Dispatch_device_type dispatch_device_type = 4;
-  if (cached_has_bits & 0x00000080u) {
+  if (cached_has_bits & 0x00000100u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       4, this->dispatch_device_type(), target);
   }
@@ -2524,6 +2632,12 @@ void Dispatch_control_response_msg::SerializeWithCachedSizes(
       8, this->dispatch_device_target_status(), target);
   }
 
+  // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+  if (cached_has_bits & 0x00000040u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+      9, this->dispatch_device_task_status(), target);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
         _internal_metadata_.unknown_fields(), target);
@@ -2603,19 +2717,25 @@ size_t Dispatch_control_response_msg::ByteSizeLong() const {
         ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_device_target_status());
     }
 
-    // optional .message.Dispatch_task_type dispatch_task_type = 3;
-    if (has_dispatch_task_type()) {
+    // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+    if (has_dispatch_device_task_status()) {
       total_size += 1 +
-        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_task_type());
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_device_task_status());
     }
 
-    // optional .message.Dispatch_device_type dispatch_device_type = 4;
-    if (has_dispatch_device_type()) {
+    // optional .message.Dispatch_task_type dispatch_task_type = 3;
+    if (has_dispatch_task_type()) {
       total_size += 1 +
-        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_device_type());
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_task_type());
     }
 
   }
+  // optional .message.Dispatch_device_type dispatch_device_type = 4;
+  if (has_dispatch_device_type()) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_device_type());
+  }
+
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
   _cached_size_ = cached_size;
@@ -2667,13 +2787,16 @@ void Dispatch_control_response_msg::MergeFrom(const Dispatch_control_response_ms
       dispatch_device_target_status_ = from.dispatch_device_target_status_;
     }
     if (cached_has_bits & 0x00000040u) {
-      dispatch_task_type_ = from.dispatch_task_type_;
+      dispatch_device_task_status_ = from.dispatch_device_task_status_;
     }
     if (cached_has_bits & 0x00000080u) {
-      dispatch_device_type_ = from.dispatch_device_type_;
+      dispatch_task_type_ = from.dispatch_task_type_;
     }
     _has_bits_[0] |= cached_has_bits;
   }
+  if (cached_has_bits & 0x00000100u) {
+    set_dispatch_device_type(from.dispatch_device_type());
+  }
 }
 
 void Dispatch_control_response_msg::CopyFrom(const ::google::protobuf::Message& from) {
@@ -2713,6 +2836,7 @@ void Dispatch_control_response_msg::InternalSwap(Dispatch_control_response_msg*
   swap(dispatch_source_, other->dispatch_source_);
   swap(dispatch_destination_, other->dispatch_destination_);
   swap(dispatch_device_target_status_, other->dispatch_device_target_status_);
+  swap(dispatch_device_task_status_, other->dispatch_device_task_status_);
   swap(dispatch_task_type_, other->dispatch_task_type_);
   swap(dispatch_device_type_, other->dispatch_device_type_);
   swap(_has_bits_[0], other->_has_bits_[0]);

+ 122 - 19
message/dispatch_control.pb.h

@@ -146,15 +146,15 @@ inline bool Dispatch_device_type_Parse(
     Dispatch_device_type_descriptor(), name, value);
 }
 enum Dispatch_device_target_status {
-  E_UNKNOW = 0,
-  E_IDLE = 1,
-  E_BUSY = 2,
-  E_READY = 3,
-  E_WAIT = 4
+  E_TARGET_STATUS_UNKNOW = 0,
+  E_TARGET_STATUS_IDLE = 1,
+  E_TARGET_STATUS_BUSY = 2,
+  E_TARGET_STATUS_READY = 3,
+  E_TARGET_STATUS_WAIT = 4
 };
 bool Dispatch_device_target_status_IsValid(int value);
-const Dispatch_device_target_status Dispatch_device_target_status_MIN = E_UNKNOW;
-const Dispatch_device_target_status Dispatch_device_target_status_MAX = E_WAIT;
+const Dispatch_device_target_status Dispatch_device_target_status_MIN = E_TARGET_STATUS_UNKNOW;
+const Dispatch_device_target_status Dispatch_device_target_status_MAX = E_TARGET_STATUS_WAIT;
 const int Dispatch_device_target_status_ARRAYSIZE = Dispatch_device_target_status_MAX + 1;
 
 const ::google::protobuf::EnumDescriptor* Dispatch_device_target_status_descriptor();
@@ -167,6 +167,34 @@ inline bool Dispatch_device_target_status_Parse(
   return ::google::protobuf::internal::ParseNamedEnum<Dispatch_device_target_status>(
     Dispatch_device_target_status_descriptor(), name, value);
 }
+enum Dispatch_device_task_status {
+  E_TASK_CREATED = 0,
+  E_TASK_ISSUE = 1,
+  E_TASK_SIGNED = 2,
+  E_TASK_WORKING = 3,
+  E_TASK_OVER = 4,
+  E_TASK_STOP = 5,
+  E_TASK_ERROR = 11,
+  E_TASK_CANCEL = 21,
+  E_TASK_DEAD = 22,
+  E_TASK_WITHDRAW = 31,
+  E_TASK_FREE = 32
+};
+bool Dispatch_device_task_status_IsValid(int value);
+const Dispatch_device_task_status Dispatch_device_task_status_MIN = E_TASK_CREATED;
+const Dispatch_device_task_status Dispatch_device_task_status_MAX = E_TASK_FREE;
+const int Dispatch_device_task_status_ARRAYSIZE = Dispatch_device_task_status_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* Dispatch_device_task_status_descriptor();
+inline const ::std::string& Dispatch_device_task_status_Name(Dispatch_device_task_status value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    Dispatch_device_task_status_descriptor(), value);
+}
+inline bool Dispatch_device_task_status_Parse(
+    const ::std::string& name, Dispatch_device_task_status* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<Dispatch_device_task_status>(
+    Dispatch_device_task_status_descriptor(), name, value);
+}
 // ===================================================================
 
 class Dispatch_plan_request_msg : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:message.Dispatch_plan_request_msg) */ {
@@ -662,6 +690,13 @@ class Dispatch_control_request_msg : public ::google::protobuf::Message /* @@pro
   ::message::Dispatch_device_target_status dispatch_device_target_status() const;
   void set_dispatch_device_target_status(::message::Dispatch_device_target_status value);
 
+  // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+  bool has_dispatch_device_task_status() const;
+  void clear_dispatch_device_task_status();
+  static const int kDispatchDeviceTaskStatusFieldNumber = 9;
+  ::message::Dispatch_device_task_status dispatch_device_task_status() const;
+  void set_dispatch_device_task_status(::message::Dispatch_device_task_status value);
+
   // required .message.Dispatch_task_type dispatch_task_type = 3;
   bool has_dispatch_task_type() const;
   void clear_dispatch_task_type();
@@ -694,6 +729,8 @@ class Dispatch_control_request_msg : public ::google::protobuf::Message /* @@pro
   void clear_has_error_manager();
   void set_has_dispatch_device_target_status();
   void clear_has_dispatch_device_target_status();
+  void set_has_dispatch_device_task_status();
+  void clear_has_dispatch_device_task_status();
 
   // helper for ByteSizeLong()
   size_t RequiredFieldsByteSizeFallback() const;
@@ -707,6 +744,7 @@ class Dispatch_control_request_msg : public ::google::protobuf::Message /* @@pro
   ::google::protobuf::int32 dispatch_source_;
   ::google::protobuf::int32 dispatch_destination_;
   int dispatch_device_target_status_;
+  int dispatch_device_task_status_;
   int dispatch_task_type_;
   int dispatch_device_type_;
   friend struct ::protobuf_dispatch_5fcontrol_2eproto::TableStruct;
@@ -857,6 +895,13 @@ class Dispatch_control_response_msg : public ::google::protobuf::Message /* @@pr
   ::message::Dispatch_device_target_status dispatch_device_target_status() const;
   void set_dispatch_device_target_status(::message::Dispatch_device_target_status value);
 
+  // optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+  bool has_dispatch_device_task_status() const;
+  void clear_dispatch_device_task_status();
+  static const int kDispatchDeviceTaskStatusFieldNumber = 9;
+  ::message::Dispatch_device_task_status dispatch_device_task_status() const;
+  void set_dispatch_device_task_status(::message::Dispatch_device_task_status value);
+
   // optional .message.Dispatch_task_type dispatch_task_type = 3;
   bool has_dispatch_task_type() const;
   void clear_dispatch_task_type();
@@ -889,6 +934,8 @@ class Dispatch_control_response_msg : public ::google::protobuf::Message /* @@pr
   void clear_has_error_manager();
   void set_has_dispatch_device_target_status();
   void clear_has_dispatch_device_target_status();
+  void set_has_dispatch_device_task_status();
+  void clear_has_dispatch_device_task_status();
 
   // helper for ByteSizeLong()
   size_t RequiredFieldsByteSizeFallback() const;
@@ -902,6 +949,7 @@ class Dispatch_control_response_msg : public ::google::protobuf::Message /* @@pr
   ::google::protobuf::int32 dispatch_source_;
   ::google::protobuf::int32 dispatch_destination_;
   int dispatch_device_target_status_;
+  int dispatch_device_task_status_;
   int dispatch_task_type_;
   int dispatch_device_type_;
   friend struct ::protobuf_dispatch_5fcontrol_2eproto::TableStruct;
@@ -1513,13 +1561,13 @@ inline void Dispatch_control_request_msg::set_allocated_command_key(::std::strin
 
 // required .message.Dispatch_task_type dispatch_task_type = 3;
 inline bool Dispatch_control_request_msg::has_dispatch_task_type() const {
-  return (_has_bits_[0] & 0x00000040u) != 0;
+  return (_has_bits_[0] & 0x00000080u) != 0;
 }
 inline void Dispatch_control_request_msg::set_has_dispatch_task_type() {
-  _has_bits_[0] |= 0x00000040u;
+  _has_bits_[0] |= 0x00000080u;
 }
 inline void Dispatch_control_request_msg::clear_has_dispatch_task_type() {
-  _has_bits_[0] &= ~0x00000040u;
+  _has_bits_[0] &= ~0x00000080u;
 }
 inline void Dispatch_control_request_msg::clear_dispatch_task_type() {
   dispatch_task_type_ = 101;
@@ -1538,13 +1586,13 @@ inline void Dispatch_control_request_msg::set_dispatch_task_type(::message::Disp
 
 // optional .message.Dispatch_device_type dispatch_device_type = 4;
 inline bool Dispatch_control_request_msg::has_dispatch_device_type() const {
-  return (_has_bits_[0] & 0x00000080u) != 0;
+  return (_has_bits_[0] & 0x00000100u) != 0;
 }
 inline void Dispatch_control_request_msg::set_has_dispatch_device_type() {
-  _has_bits_[0] |= 0x00000080u;
+  _has_bits_[0] |= 0x00000100u;
 }
 inline void Dispatch_control_request_msg::clear_has_dispatch_device_type() {
-  _has_bits_[0] &= ~0x00000080u;
+  _has_bits_[0] &= ~0x00000100u;
 }
 inline void Dispatch_control_request_msg::clear_dispatch_device_type() {
   dispatch_device_type_ = 101;
@@ -1684,6 +1732,31 @@ inline void Dispatch_control_request_msg::set_dispatch_device_target_status(::me
   // @@protoc_insertion_point(field_set:message.Dispatch_control_request_msg.dispatch_device_target_status)
 }
 
+// optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+inline bool Dispatch_control_request_msg::has_dispatch_device_task_status() const {
+  return (_has_bits_[0] & 0x00000040u) != 0;
+}
+inline void Dispatch_control_request_msg::set_has_dispatch_device_task_status() {
+  _has_bits_[0] |= 0x00000040u;
+}
+inline void Dispatch_control_request_msg::clear_has_dispatch_device_task_status() {
+  _has_bits_[0] &= ~0x00000040u;
+}
+inline void Dispatch_control_request_msg::clear_dispatch_device_task_status() {
+  dispatch_device_task_status_ = 0;
+  clear_has_dispatch_device_task_status();
+}
+inline ::message::Dispatch_device_task_status Dispatch_control_request_msg::dispatch_device_task_status() const {
+  // @@protoc_insertion_point(field_get:message.Dispatch_control_request_msg.dispatch_device_task_status)
+  return static_cast< ::message::Dispatch_device_task_status >(dispatch_device_task_status_);
+}
+inline void Dispatch_control_request_msg::set_dispatch_device_task_status(::message::Dispatch_device_task_status value) {
+  assert(::message::Dispatch_device_task_status_IsValid(value));
+  set_has_dispatch_device_task_status();
+  dispatch_device_task_status_ = value;
+  // @@protoc_insertion_point(field_set:message.Dispatch_control_request_msg.dispatch_device_task_status)
+}
+
 // -------------------------------------------------------------------
 
 // Dispatch_control_response_msg
@@ -1803,13 +1876,13 @@ inline void Dispatch_control_response_msg::set_allocated_command_key(::std::stri
 
 // optional .message.Dispatch_task_type dispatch_task_type = 3;
 inline bool Dispatch_control_response_msg::has_dispatch_task_type() const {
-  return (_has_bits_[0] & 0x00000040u) != 0;
+  return (_has_bits_[0] & 0x00000080u) != 0;
 }
 inline void Dispatch_control_response_msg::set_has_dispatch_task_type() {
-  _has_bits_[0] |= 0x00000040u;
+  _has_bits_[0] |= 0x00000080u;
 }
 inline void Dispatch_control_response_msg::clear_has_dispatch_task_type() {
-  _has_bits_[0] &= ~0x00000040u;
+  _has_bits_[0] &= ~0x00000080u;
 }
 inline void Dispatch_control_response_msg::clear_dispatch_task_type() {
   dispatch_task_type_ = 101;
@@ -1828,13 +1901,13 @@ inline void Dispatch_control_response_msg::set_dispatch_task_type(::message::Dis
 
 // optional .message.Dispatch_device_type dispatch_device_type = 4;
 inline bool Dispatch_control_response_msg::has_dispatch_device_type() const {
-  return (_has_bits_[0] & 0x00000080u) != 0;
+  return (_has_bits_[0] & 0x00000100u) != 0;
 }
 inline void Dispatch_control_response_msg::set_has_dispatch_device_type() {
-  _has_bits_[0] |= 0x00000080u;
+  _has_bits_[0] |= 0x00000100u;
 }
 inline void Dispatch_control_response_msg::clear_has_dispatch_device_type() {
-  _has_bits_[0] &= ~0x00000080u;
+  _has_bits_[0] &= ~0x00000100u;
 }
 inline void Dispatch_control_response_msg::clear_dispatch_device_type() {
   dispatch_device_type_ = 101;
@@ -1974,6 +2047,31 @@ inline void Dispatch_control_response_msg::set_dispatch_device_target_status(::m
   // @@protoc_insertion_point(field_set:message.Dispatch_control_response_msg.dispatch_device_target_status)
 }
 
+// optional .message.Dispatch_device_task_status dispatch_device_task_status = 9;
+inline bool Dispatch_control_response_msg::has_dispatch_device_task_status() const {
+  return (_has_bits_[0] & 0x00000040u) != 0;
+}
+inline void Dispatch_control_response_msg::set_has_dispatch_device_task_status() {
+  _has_bits_[0] |= 0x00000040u;
+}
+inline void Dispatch_control_response_msg::clear_has_dispatch_device_task_status() {
+  _has_bits_[0] &= ~0x00000040u;
+}
+inline void Dispatch_control_response_msg::clear_dispatch_device_task_status() {
+  dispatch_device_task_status_ = 0;
+  clear_has_dispatch_device_task_status();
+}
+inline ::message::Dispatch_device_task_status Dispatch_control_response_msg::dispatch_device_task_status() const {
+  // @@protoc_insertion_point(field_get:message.Dispatch_control_response_msg.dispatch_device_task_status)
+  return static_cast< ::message::Dispatch_device_task_status >(dispatch_device_task_status_);
+}
+inline void Dispatch_control_response_msg::set_dispatch_device_task_status(::message::Dispatch_device_task_status value) {
+  assert(::message::Dispatch_device_task_status_IsValid(value));
+  set_has_dispatch_device_task_status();
+  dispatch_device_task_status_ = value;
+  // @@protoc_insertion_point(field_set:message.Dispatch_control_response_msg.dispatch_device_task_status)
+}
+
 #ifdef __GNUC__
   #pragma GCC diagnostic pop
 #endif  // __GNUC__
@@ -2006,6 +2104,11 @@ template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Dispatch_device_target_status>() {
   return ::message::Dispatch_device_target_status_descriptor();
 }
+template <> struct is_proto_enum< ::message::Dispatch_device_task_status> : ::google::protobuf::internal::true_type {};
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::message::Dispatch_device_task_status>() {
+  return ::message::Dispatch_device_task_status_descriptor();
+}
 
 }  // namespace protobuf
 }  // namespace google

+ 32 - 0
message/dispatch_control.proto

@@ -78,6 +78,34 @@ enum Dispatch_device_target_status
     E_TARGET_STATUS_WAIT               	    = 4;    //等待
 }
 
+//调度设备的任务状态
+enum Dispatch_device_task_status
+{
+        E_TASK_CREATED            = 0;      		//任务创建; 发送方
+
+        E_TASK_ISSUE				= 1; 			//任务下发; 发送方
+        E_TASK_SIGNED             = 2;      		//已签收; 接收方
+        E_TASK_WORKING            = 3;      		//处理中; 接收方
+        E_TASK_OVER               = 4;   			//已结束; 接收方
+        E_TASK_STOP				= 5; 			//任务暂停; 接收方
+
+    	E_TASK_ERROR              = 11;			//任务错误; 接收方
+
+    	E_TASK_CANCEL				= 21;			//任务取消; 发送方
+    	E_TASK_DEAD               = 22;           //任务死亡; 接收方
+
+    	E_TASK_WITHDRAW			= 31; 			//任务收回; 发送方
+    	E_TASK_FREE				= 32; 			//任务释放; 接收方
+
+
+     //发送方 写 E_TASK_CREATED
+     //接收方 收到之后 写 E_TASK_WORKING
+     //接受方每隔1秒 周期性反馈消息
+     //接受方完成任务后, 最后一次发送 E_TASK_OVER
+}
+
+
+
 //调度总规划的请求(用于启动整个调度算法)(调度管理->调度算法)
 message Dispatch_plan_request_msg
 {
@@ -118,6 +146,8 @@ message Dispatch_control_request_msg
     optional Error_manager              error_manager = 7;               //错误码,也是任务的完成结果(如果为0,则表示成功完成任务,非0则任务失败)
 
     optional Dispatch_device_target_status  dispatch_device_target_status = 8;  //调度设备的目标状态
+
+    optional Dispatch_device_task_status    dispatch_device_task_status = 9;//调度设备的任务状态
 }
 
 //调度控制的任务答复(调度管理->调度算法)
@@ -134,6 +164,8 @@ message Dispatch_control_response_msg
     optional Error_manager              error_manager = 7;               //错误码,也是任务的完成结果(如果为0,则表示成功完成任务,非0则任务失败)
 
     optional Dispatch_device_target_status  dispatch_device_target_status = 8;  //调度设备的目标状态
+    optional Dispatch_device_task_status    dispatch_device_task_status = 9;//调度设备的任务状态
+
 }