Bläddra i källkod

中控作为服务器,测量与调度状态增加terminal_id

zx 4 år sedan
förälder
incheckning
35459af96e

+ 36 - 36
CMakeLists.txt

@@ -66,27 +66,27 @@ target_link_libraries(process
         ${GLOG_LIBRARIES}
         )
 
-
-add_executable(locate_client
-        ./test/Locate_client.cpp
-        ./error_code/error_code.cpp
-        ${locate_src}
-        ${robot_src}
-        ${message_src}
-        ${TOOL_SRC}
-        ${TASK_QUEUE_SRC}
-        ${COMMUNICATION_SRC}
-        ${SYSTEM_SRC}
-        ${PARKSPACE_SRC}
-        ${DISPATCH_SRC}
-        )
-target_link_libraries(locate_client
-        nnxx
-        nanomsg
-        ${PROTOBUF_LIBRARIES}
-        /usr/local/lib/libglog.a
-        /usr/local/lib/libgflags.a
-        )
+#
+#add_executable(locate_client
+#        ./test/Locate_client.cpp
+#        ./error_code/error_code.cpp
+#        ${locate_src}
+#        ${robot_src}
+#        ${message_src}
+#        ${TOOL_SRC}
+#        ${TASK_QUEUE_SRC}
+#        ${COMMUNICATION_SRC}
+#        ${SYSTEM_SRC}
+#        ${PARKSPACE_SRC}
+#        ${DISPATCH_SRC}
+#        )
+#target_link_libraries(locate_client
+#        nnxx
+#        nanomsg
+#        ${PROTOBUF_LIBRARIES}
+#        /usr/local/lib/libglog.a
+#        /usr/local/lib/libgflags.a
+#        )
 
 
 add_executable(terminal
@@ -115,18 +115,18 @@ target_link_libraries(terminal
         )
 
 
-add_executable(locate_test
-        ./test/test_locate_sample.cpp
-        ./lidar_locate/Locate_communicator.cpp
-        ./error_code/error_code.cpp
-        ${message_src}
-        ${TOOL_SRC}
-        ${COMMUNICATION_SRC}
-        )
-target_link_libraries(locate_test
-        nnxx
-        nanomsg
-        ${PROTOBUF_LIBRARIES}
-        /usr/local/lib/libglog.a
-        /usr/local/lib/libgflags.a
-        )
+#add_executable(locate_test
+#        ./test/test_locate_sample.cpp
+#        ./lidar_locate/Locate_communicator.cpp
+#        ./error_code/error_code.cpp
+#        ${message_src}
+#        ${TOOL_SRC}
+#        ${COMMUNICATION_SRC}
+#        )
+#target_link_libraries(locate_test
+#        nnxx
+#        nanomsg
+#        ${PROTOBUF_LIBRARIES}
+#        /usr/local/lib/libglog.a
+#        /usr/local/lib/libgflags.a
+#        )

+ 4 - 4
dispatch/dispatch_communicator.cpp

@@ -47,7 +47,7 @@ Error_manager Dispatch_communicator::dispatch_request(message::Dispatch_request_
         if(m_response_table.find(request,response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_id())
+            if (response.has_base_info() && response.has_command_info())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -58,7 +58,7 @@ Error_manager Dispatch_communicator::dispatch_request(message::Dispatch_request_
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eDispatch ||
                     response_base.receiver() != message::eMain ||
-                    response.command_id() != request.command_id()) {
+                    response.command_info() != request.command_info()) {
                     return Error_manager(ERROR, MAJOR_ERROR,
                                          "dispatch response basemsg info error");
                 }
@@ -96,7 +96,7 @@ Error_manager Dispatch_communicator::cancel_request(message::Dispatch_request_ms
     }
     return SUCCESS;
 }
-Error_manager Dispatch_communicator::check_statu()
+Error_manager Dispatch_communicator::check_statu(int terminal_id)
 {
 
     std::chrono::system_clock::time_point time_now=std::chrono::system_clock::now();
@@ -230,6 +230,6 @@ message::Dispatch_request_msg Dispatch_communicator::create_request_by_response(
     baseInfo.set_sender(response.base_info().receiver());
     baseInfo.set_receiver(response.base_info().sender());
     request.mutable_base_info()->CopyFrom(baseInfo);
-    request.set_command_id(response.command_id());
+    request.mutable_command_info()->CopyFrom(response.command_info());
     return request;
 }

+ 1 - 1
dispatch/dispatch_communicator.h

@@ -26,7 +26,7 @@ public:
      * 提前取消请求
      */
     Error_manager cancel_request(message::Dispatch_request_msg& request);
-    Error_manager check_statu();
+    Error_manager check_statu(int terminal_id);
 
 
 protected:

+ 4 - 4
lidar_locate/Locate_communicator.cpp

@@ -76,7 +76,7 @@ Error_manager Locate_communicator::locate_request(message::Measure_request_msg&
         if(m_response_table.find(request,response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_id())
+            if (response.has_base_info() && response.has_command_info())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -87,7 +87,7 @@ Error_manager Locate_communicator::locate_request(message::Measure_request_msg&
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eMeasurer ||
                     response_base.receiver() != message::eMain ||
-                    response.command_id() != request.command_id()) {
+                    !(response.command_info() == request.command_info())) {
                     return Error_manager(LOCATER_MSG_RESPONSE_INFO_ERROR, MAJOR_ERROR,
                                          "measure response msg info error");
                 }
@@ -120,7 +120,7 @@ Error_manager Locate_communicator::check_executer(Communication_message* p_msg)
     return SUCCESS;
 }
 
-Error_manager Locate_communicator::check_statu()
+Error_manager Locate_communicator::check_statu(int terminal_id)
 {
     std::chrono::system_clock::time_point time_now=std::chrono::system_clock::now();
     auto durantion=time_now-m_statu_recv_time;
@@ -217,7 +217,7 @@ message::Measure_request_msg Locate_communicator::create_request_by_response(mes
     baseInfo.set_sender(response.base_info().receiver());
     baseInfo.set_receiver(response.base_info().sender());
     request.mutable_base_info()->CopyFrom(baseInfo);
-    request.set_command_id(response.command_id());
+    request.mutable_command_info()->CopyFrom(response.command_info());
     request.set_terminal_id(response.terminal_id());
     return request;
 }

+ 1 - 1
lidar_locate/Locate_communicator.h

@@ -32,7 +32,7 @@ public:
      * 提前取消请求
      */
     Error_manager cancel_request(message::Measure_request_msg& request);
-    Error_manager check_statu();
+    Error_manager check_statu(int terminal_id);
 
 
 

+ 21 - 52
main.cpp

@@ -8,7 +8,7 @@
 #include "system_communicator.h"
 #include "Locate_communicator.h"
 #include "command_manager.h"
-
+#include "proto_tool.h"
 #include "pathcreator.h"
 
 #include <Parkspace_communicator.h>
@@ -21,13 +21,6 @@ using google::protobuf::io::ZeroCopyOutputStream;
 using google::protobuf::io::CodedOutputStream;
 using google::protobuf::Message;
 
-#define MEASURE_CONNECT_STRING          "tcp://192.168.2.167:30001"
-#define DISPATCH_CONNECT_STRING         "tcp://192.168.2.167:30002"
-#define PARKSPACE_CONNECT_STRING        "tcp://192.168.2.125:30001"
-#define SYSTEM_BIND_STRING              "tcp://192.168.2.183:30001"
-
-#define INIT_TIME_OUT_SECONDS           300
-
 GOOGLE_GLOG_DLL_DECL void shut_down_logging(const char* data, int size);
 void init_glog();
 Error_manager init_communicators();
@@ -51,11 +44,21 @@ int main(int argc,char* argv[])
 
 Error_manager init_communicators()
 {
+    setting::System_setting system_setting;
+    if(! proto_tool::read_proto_param("./setting/system_setting.prototxt",system_setting) )
+    {
+        return Error_manager(COMMUNICATION_READ_PROTOBUF_ERROR,MINOR_ERROR,
+                             "Communication_socket_base read_proto_param  failed");
+    }
+
+    std::cout<<system_setting.DebugString()<<std::endl;
     ///初始化与终端通讯的对象
     if(System_communicator::get_instance_pointer()== nullptr)
         return FAILED;
-    System_communicator::get_instance_pointer()->communication_bind(SYSTEM_BIND_STRING);
-    LOG(INFO)<<"初始化通讯子节点......";
+    char bind_string[64]={0};
+    sprintf(bind_string,"tcp://%s:%d",system_setting.bind_ip().c_str(),system_setting.terminor_port());
+    System_communicator::get_instance_pointer()->communication_bind(bind_string);
+
     Error_manager code;
     /*
      * 初始化各个通讯模块,
@@ -63,7 +66,8 @@ Error_manager init_communicators()
 
     if(Locate_communicator::get_instance_pointer()== nullptr)
         return FAILED;
-    code=Locate_communicator::get_instance_pointer()->communication_connect(MEASURE_CONNECT_STRING);
+    sprintf(bind_string,"tcp://%s:%d",system_setting.bind_ip().c_str(),system_setting.measurer_port());
+    code=Locate_communicator::get_instance_pointer()->communication_bind(bind_string);
     if(code!=SUCCESS)
     {
         return code;
@@ -73,7 +77,8 @@ Error_manager init_communicators()
     //初始化车位分配通讯模块
     if(Parkspace_communicator::get_instance_pointer()== nullptr)
         return FAILED;
-    code=Parkspace_communicator::get_instance_pointer()->communication_connect(PARKSPACE_CONNECT_STRING);
+    sprintf(bind_string,"tcp://%s:%d",system_setting.bind_ip().c_str(),system_setting.park_space_port());
+    code=Parkspace_communicator::get_instance_pointer()->communication_bind(bind_string);
     if(code!=SUCCESS)
     {
         return code;
@@ -83,59 +88,23 @@ Error_manager init_communicators()
     /*
      * 初始化调度模块
      */
-    Dispatch_communicator::get_instance_pointer()->communication_connect(DISPATCH_CONNECT_STRING);
+    sprintf(bind_string,"tcp://%s:%d",system_setting.bind_ip().c_str(),system_setting.dispatcher_port());
+    Dispatch_communicator::get_instance_pointer()->communication_bind(bind_string);
     Dispatch_communicator::get_instance_pointer()->communication_run();
 
-    /*
-     * 此处添加等待各个通讯模块正常代码
-     */
-    std::chrono::system_clock::time_point t_start=std::chrono::system_clock::now();
-    std::chrono::system_clock::time_point t_end=std::chrono::system_clock::now();
-    Error_manager locate_code=ERROR,parkspace_code=ERROR,dispatch_code=ERROR;
-    do{
-        if(locate_code!=SUCCESS) {
-            locate_code = Locate_communicator::get_instance_pointer()->check_statu();
-            LOG_IF(INFO, locate_code == SUCCESS) << "测量模块初始化完成!!!";
-        }
-
-        if(parkspace_code!=SUCCESS) {
-            parkspace_code = Parkspace_communicator::get_instance_pointer()->check_statu();
-            LOG_IF(INFO, parkspace_code == SUCCESS) << "车位管理模块初始化完成!!!";
-        }
-
-        if(dispatch_code!=SUCCESS) {
-            dispatch_code = Dispatch_communicator::get_instance_pointer()->check_statu();
-            LOG_IF(INFO, dispatch_code == SUCCESS) << "调度模块初始化完成!!!";
-        }
-
-        if(locate_code==SUCCESS && parkspace_code==SUCCESS && dispatch_code==SUCCESS)
-            break;
-        t_end=std::chrono::system_clock::now();
-        usleep(1000*300);
-    }while(t_end-t_start<std::chrono::seconds(INIT_TIME_OUT_SECONDS));
-
-    LOG_IF(ERROR,locate_code!=SUCCESS)<<"测量节点连接超时";
-    LOG_IF(ERROR,parkspace_code!=SUCCESS)<<"车位管理节点连接超时";
-    LOG_IF(ERROR,dispatch_code!=SUCCESS)<<"调度节点连接超时";
-
-    if(!(locate_code==SUCCESS && parkspace_code==SUCCESS && dispatch_code==SUCCESS))
-    {
-        return Error_manager(ERROR,MAJOR_ERROR,"通讯节点初始化超时");
-    }
-
     /*
      * 初始化指令执行模块
      */
     if(Command_manager::get_instance_pointer()== nullptr)
         return Error_manager(FAILED,CRITICAL_ERROR,"创建指令执行模块失败");
-    code=Command_manager::get_instance_pointer()->init();
+    code=Command_manager::get_instance_pointer()->init(system_setting);
 
-    usleep(1000*1000);
 
     if(code!=SUCCESS)
     {
         return code;
     }
+    usleep(1000*1000);
     //运行接收指令通讯块,开始接收指令
     System_communicator::get_instance_pointer()->communication_run();
 

+ 91 - 42
message/dispatch_message.pb.cc

@@ -154,9 +154,11 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   ~0u,  // no _oneof_case_
   ~0u,  // no _weak_field_map_
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_status_msg, base_info_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_status_msg, terminal_id_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_status_msg, dispatch_manager_status_),
   0,
   1,
+  2,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -188,9 +190,9 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
 };
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
   { 0, 8, sizeof(::message::Carrier_position)},
-  { 11, 18, sizeof(::message::Dispatch_status_msg)},
-  { 20, 31, sizeof(::message::Dispatch_request_msg)},
-  { 37, 45, sizeof(::message::Dispatch_response_msg)},
+  { 11, 19, sizeof(::message::Dispatch_status_msg)},
+  { 22, 33, sizeof(::message::Dispatch_request_msg)},
+  { 39, 47, sizeof(::message::Dispatch_response_msg)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
@@ -224,34 +226,34 @@ void AddDescriptorsImpl() {
   static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
       "\n\026dispatch_message.proto\022\007message\032\022messa"
       "ge_base.proto\"3\n\020Carrier_position\022\t\n\001x\030\001"
-      " \002(\002\022\t\n\001y\030\002 \002(\002\022\t\n\001z\030\003 \002(\002\"\177\n\023Dispatch_s"
-      "tatus_msg\022%\n\tbase_info\030\001 \002(\0132\022.message.B"
-      "ase_info\022A\n\027dispatch_manager_status\030\002 \002("
-      "\0162 .message.Dispatch_manager_status\"\225\002\n\024"
-      "Dispatch_request_msg\022%\n\tbase_info\030\001 \002(\0132"
-      "\022.message.Base_info\022+\n\014command_info\030\002 \002("
-      "\0132\025.message.Command_info\022E\n\031dispatch_mot"
-      "ion_direction\030\003 \002(\0162\".message.Dispatch_m"
-      "otion_direction\022\023\n\013terminal_id\030\004 \002(\005\022\024\n\014"
-      "parkspace_id\030\005 \002(\005\0227\n\022locate_information"
-      "\030\006 \001(\0132\033.message.Locate_information\"\232\001\n\025"
-      "Dispatch_response_msg\022%\n\tbase_info\030\001 \002(\013"
-      "2\022.message.Base_info\022+\n\014command_info\030\002 \002"
-      "(\0132\025.message.Command_info\022-\n\rerror_manag"
-      "er\030\003 \002(\0132\026.message.Error_manager*\261\001\n\027Dis"
-      "patch_manager_status\022\035\n\031E_DISPATCH_MANAG"
-      "ER_UNKNOW\020\000\022\034\n\030E_DISPATCH_MANAGER_READY\020"
-      "\001\022\034\n\030E_DISPATCH_MANAGER_STORE\020\002\022\035\n\031E_DIS"
-      "PATCH_MANAGER_PICKUP\020\003\022\034\n\030E_DISPATCH_MAN"
-      "AGER_FAULT\020\n*{\n\016Carrier_status\022\024\n\020E_CARR"
-      "IER_UNKNOW\020\000\022\023\n\017E_CARRIER_READY\020\001\022\023\n\017E_C"
-      "ARRIER_STORE\020\002\022\024\n\020E_CARRIER_PICKUP\020\003\022\023\n\017"
-      "E_CARRIER_FAULT\020\n*>\n\031Dispatch_motion_dir"
-      "ection\022\017\n\013E_STORE_CAR\020\000\022\020\n\014E_PICKUP_CAR\020"
-      "\001"
+      " \002(\002\022\t\n\001y\030\002 \002(\002\022\t\n\001z\030\003 \002(\002\"\224\001\n\023Dispatch_"
+      "status_msg\022%\n\tbase_info\030\001 \002(\0132\022.message."
+      "Base_info\022\023\n\013terminal_id\030\002 \002(\005\022A\n\027dispat"
+      "ch_manager_status\030\003 \002(\0162 .message.Dispat"
+      "ch_manager_status\"\225\002\n\024Dispatch_request_m"
+      "sg\022%\n\tbase_info\030\001 \002(\0132\022.message.Base_inf"
+      "o\022+\n\014command_info\030\002 \002(\0132\025.message.Comman"
+      "d_info\022E\n\031dispatch_motion_direction\030\003 \002("
+      "\0162\".message.Dispatch_motion_direction\022\023\n"
+      "\013terminal_id\030\004 \002(\005\022\024\n\014parkspace_id\030\005 \002(\005"
+      "\0227\n\022locate_information\030\006 \001(\0132\033.message.L"
+      "ocate_information\"\232\001\n\025Dispatch_response_"
+      "msg\022%\n\tbase_info\030\001 \002(\0132\022.message.Base_in"
+      "fo\022+\n\014command_info\030\002 \002(\0132\025.message.Comma"
+      "nd_info\022-\n\rerror_manager\030\003 \002(\0132\026.message"
+      ".Error_manager*\261\001\n\027Dispatch_manager_stat"
+      "us\022\035\n\031E_DISPATCH_MANAGER_UNKNOW\020\000\022\034\n\030E_D"
+      "ISPATCH_MANAGER_READY\020\001\022\034\n\030E_DISPATCH_MA"
+      "NAGER_STORE\020\002\022\035\n\031E_DISPATCH_MANAGER_PICK"
+      "UP\020\003\022\034\n\030E_DISPATCH_MANAGER_FAULT\020\n*{\n\016Ca"
+      "rrier_status\022\024\n\020E_CARRIER_UNKNOW\020\000\022\023\n\017E_"
+      "CARRIER_READY\020\001\022\023\n\017E_CARRIER_STORE\020\002\022\024\n\020"
+      "E_CARRIER_PICKUP\020\003\022\023\n\017E_CARRIER_FAULT\020\n*"
+      ">\n\031Dispatch_motion_direction\022\017\n\013E_STORE_"
+      "CAR\020\000\022\020\n\014E_PICKUP_CAR\020\001"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 1041);
+      descriptor, 1063);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "dispatch_message.proto", &protobuf_RegisterTypes);
   ::protobuf_message_5fbase_2eproto::AddDescriptors();
@@ -672,6 +674,7 @@ void Dispatch_status_msg::clear_base_info() {
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Dispatch_status_msg::kBaseInfoFieldNumber;
+const int Dispatch_status_msg::kTerminalIdFieldNumber;
 const int Dispatch_status_msg::kDispatchManagerStatusFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
@@ -694,7 +697,9 @@ Dispatch_status_msg::Dispatch_status_msg(const Dispatch_status_msg& from)
   } else {
     base_info_ = NULL;
   }
-  dispatch_manager_status_ = from.dispatch_manager_status_;
+  ::memcpy(&terminal_id_, &from.terminal_id_,
+    static_cast<size_t>(reinterpret_cast<char*>(&dispatch_manager_status_) -
+    reinterpret_cast<char*>(&terminal_id_)) + sizeof(dispatch_manager_status_));
   // @@protoc_insertion_point(copy_constructor:message.Dispatch_status_msg)
 }
 
@@ -748,7 +753,11 @@ void Dispatch_status_msg::Clear() {
     GOOGLE_DCHECK(base_info_ != NULL);
     base_info_->Clear();
   }
-  dispatch_manager_status_ = 0;
+  if (cached_has_bits & 6u) {
+    ::memset(&terminal_id_, 0, static_cast<size_t>(
+        reinterpret_cast<char*>(&dispatch_manager_status_) -
+        reinterpret_cast<char*>(&terminal_id_)) + sizeof(dispatch_manager_status_));
+  }
   _has_bits_.Clear();
   _internal_metadata_.Clear();
 }
@@ -775,10 +784,24 @@ bool Dispatch_status_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required .message.Dispatch_manager_status dispatch_manager_status = 2;
+      // required int32 terminal_id = 2;
       case 2: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
+          set_has_terminal_id();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+                 input, &terminal_id_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // required .message.Dispatch_manager_status dispatch_manager_status = 3;
+      case 3: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
           int value;
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                    int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
@@ -787,7 +810,7 @@ bool Dispatch_status_msg::MergePartialFromCodedStream(
             set_dispatch_manager_status(static_cast< ::message::Dispatch_manager_status >(value));
           } else {
             mutable_unknown_fields()->AddVarint(
-                2, static_cast< ::google::protobuf::uint64>(value));
+                3, static_cast< ::google::protobuf::uint64>(value));
           }
         } else {
           goto handle_unusual;
@@ -828,10 +851,15 @@ void Dispatch_status_msg::SerializeWithCachedSizes(
       1, *this->base_info_, output);
   }
 
-  // required .message.Dispatch_manager_status dispatch_manager_status = 2;
+  // required int32 terminal_id = 2;
   if (cached_has_bits & 0x00000002u) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->terminal_id(), output);
+  }
+
+  // required .message.Dispatch_manager_status dispatch_manager_status = 3;
+  if (cached_has_bits & 0x00000004u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
-      2, this->dispatch_manager_status(), output);
+      3, this->dispatch_manager_status(), output);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -856,10 +884,15 @@ void Dispatch_status_msg::SerializeWithCachedSizes(
         1, *this->base_info_, deterministic, target);
   }
 
-  // required .message.Dispatch_manager_status dispatch_manager_status = 2;
+  // required int32 terminal_id = 2;
   if (cached_has_bits & 0x00000002u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->terminal_id(), target);
+  }
+
+  // required .message.Dispatch_manager_status dispatch_manager_status = 3;
+  if (cached_has_bits & 0x00000004u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
-      2, this->dispatch_manager_status(), target);
+      3, this->dispatch_manager_status(), target);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -881,8 +914,15 @@ size_t Dispatch_status_msg::RequiredFieldsByteSizeFallback() const {
         *this->base_info_);
   }
 
+  if (has_terminal_id()) {
+    // required int32 terminal_id = 2;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::Int32Size(
+        this->terminal_id());
+  }
+
   if (has_dispatch_manager_status()) {
-    // required .message.Dispatch_manager_status dispatch_manager_status = 2;
+    // required .message.Dispatch_manager_status dispatch_manager_status = 3;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_manager_status());
   }
@@ -898,13 +938,18 @@ size_t Dispatch_status_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
         _internal_metadata_.unknown_fields());
   }
-  if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) {  // All required fields are present.
+  if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) {  // All required fields are present.
     // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
         *this->base_info_);
 
-    // required .message.Dispatch_manager_status dispatch_manager_status = 2;
+    // required int32 terminal_id = 2;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::Int32Size(
+        this->terminal_id());
+
+    // required .message.Dispatch_manager_status dispatch_manager_status = 3;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::EnumSize(this->dispatch_manager_status());
 
@@ -941,11 +986,14 @@ void Dispatch_status_msg::MergeFrom(const Dispatch_status_msg& from) {
   (void) cached_has_bits;
 
   cached_has_bits = from._has_bits_[0];
-  if (cached_has_bits & 3u) {
+  if (cached_has_bits & 7u) {
     if (cached_has_bits & 0x00000001u) {
       mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
     }
     if (cached_has_bits & 0x00000002u) {
+      terminal_id_ = from.terminal_id_;
+    }
+    if (cached_has_bits & 0x00000004u) {
       dispatch_manager_status_ = from.dispatch_manager_status_;
     }
     _has_bits_[0] |= cached_has_bits;
@@ -967,7 +1015,7 @@ void Dispatch_status_msg::CopyFrom(const Dispatch_status_msg& from) {
 }
 
 bool Dispatch_status_msg::IsInitialized() const {
-  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
+  if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
   if (has_base_info()) {
     if (!this->base_info_->IsInitialized()) return false;
   }
@@ -981,6 +1029,7 @@ void Dispatch_status_msg::Swap(Dispatch_status_msg* other) {
 void Dispatch_status_msg::InternalSwap(Dispatch_status_msg* other) {
   using std::swap;
   swap(base_info_, other->base_info_);
+  swap(terminal_id_, other->terminal_id_);
   swap(dispatch_manager_status_, other->dispatch_manager_status_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);

+ 40 - 6
message/dispatch_message.pb.h

@@ -371,10 +371,17 @@ class Dispatch_status_msg : public ::google::protobuf::Message /* @@protoc_inser
   ::message::Base_info* mutable_base_info();
   void set_allocated_base_info(::message::Base_info* base_info);
 
-  // required .message.Dispatch_manager_status dispatch_manager_status = 2;
+  // required int32 terminal_id = 2;
+  bool has_terminal_id() const;
+  void clear_terminal_id();
+  static const int kTerminalIdFieldNumber = 2;
+  ::google::protobuf::int32 terminal_id() const;
+  void set_terminal_id(::google::protobuf::int32 value);
+
+  // required .message.Dispatch_manager_status dispatch_manager_status = 3;
   bool has_dispatch_manager_status() const;
   void clear_dispatch_manager_status();
-  static const int kDispatchManagerStatusFieldNumber = 2;
+  static const int kDispatchManagerStatusFieldNumber = 3;
   ::message::Dispatch_manager_status dispatch_manager_status() const;
   void set_dispatch_manager_status(::message::Dispatch_manager_status value);
 
@@ -382,6 +389,8 @@ class Dispatch_status_msg : public ::google::protobuf::Message /* @@protoc_inser
  private:
   void set_has_base_info();
   void clear_has_base_info();
+  void set_has_terminal_id();
+  void clear_has_terminal_id();
   void set_has_dispatch_manager_status();
   void clear_has_dispatch_manager_status();
 
@@ -392,6 +401,7 @@ class Dispatch_status_msg : public ::google::protobuf::Message /* @@protoc_inser
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
   ::message::Base_info* base_info_;
+  ::google::protobuf::int32 terminal_id_;
   int dispatch_manager_status_;
   friend struct ::protobuf_dispatch_5fmessage_2eproto::TableStruct;
   friend void ::protobuf_dispatch_5fmessage_2eproto::InitDefaultsDispatch_status_msgImpl();
@@ -841,16 +851,40 @@ inline void Dispatch_status_msg::set_allocated_base_info(::message::Base_info* b
   // @@protoc_insertion_point(field_set_allocated:message.Dispatch_status_msg.base_info)
 }
 
-// required .message.Dispatch_manager_status dispatch_manager_status = 2;
-inline bool Dispatch_status_msg::has_dispatch_manager_status() const {
+// required int32 terminal_id = 2;
+inline bool Dispatch_status_msg::has_terminal_id() const {
   return (_has_bits_[0] & 0x00000002u) != 0;
 }
-inline void Dispatch_status_msg::set_has_dispatch_manager_status() {
+inline void Dispatch_status_msg::set_has_terminal_id() {
   _has_bits_[0] |= 0x00000002u;
 }
-inline void Dispatch_status_msg::clear_has_dispatch_manager_status() {
+inline void Dispatch_status_msg::clear_has_terminal_id() {
   _has_bits_[0] &= ~0x00000002u;
 }
+inline void Dispatch_status_msg::clear_terminal_id() {
+  terminal_id_ = 0;
+  clear_has_terminal_id();
+}
+inline ::google::protobuf::int32 Dispatch_status_msg::terminal_id() const {
+  // @@protoc_insertion_point(field_get:message.Dispatch_status_msg.terminal_id)
+  return terminal_id_;
+}
+inline void Dispatch_status_msg::set_terminal_id(::google::protobuf::int32 value) {
+  set_has_terminal_id();
+  terminal_id_ = value;
+  // @@protoc_insertion_point(field_set:message.Dispatch_status_msg.terminal_id)
+}
+
+// required .message.Dispatch_manager_status dispatch_manager_status = 3;
+inline bool Dispatch_status_msg::has_dispatch_manager_status() const {
+  return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void Dispatch_status_msg::set_has_dispatch_manager_status() {
+  _has_bits_[0] |= 0x00000004u;
+}
+inline void Dispatch_status_msg::clear_has_dispatch_manager_status() {
+  _has_bits_[0] &= ~0x00000004u;
+}
 inline void Dispatch_status_msg::clear_dispatch_manager_status() {
   dispatch_manager_status_ = 0;
   clear_has_dispatch_manager_status();

+ 3 - 2
message/dispatch_message.proto

@@ -37,8 +37,9 @@ message Carrier_position
 message Dispatch_status_msg
 {
     required Base_info                  base_info=1;                    //消息类型
-    required Dispatch_manager_status    dispatch_manager_status = 2;    //调度管理 的状态
- //   repeated Carrier_status             carrier_status = 3;             //搬运器状态, 楚天有3套AGV系统
+    required int32                      terminal_id=2;
+    required Dispatch_manager_status    dispatch_manager_status = 3;    //调度管理 的状态
+ //   repeated Carrier_status             carrier_status = 4;             //搬运器状态, 楚天有3套AGV系统
 
 }
 

+ 135 - 91
message/measure_message.pb.cc

@@ -119,6 +119,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   ~0u,  // no _oneof_case_
   ~0u,  // no _weak_field_map_
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, base_info_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, terminal_id_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, laser_manager_status_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, laser_statu_vector_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, locate_manager_status_),
@@ -126,8 +127,9 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_status_msg, error_manager_),
   0,
   3,
-  ~0u,
   4,
+  ~0u,
+  5,
   1,
   2,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_request_msg, _has_bits_),
@@ -158,9 +160,9 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   3,
 };
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
-  { 0, 11, sizeof(::message::Measure_status_msg)},
-  { 17, 25, sizeof(::message::Measure_request_msg)},
-  { 28, 38, sizeof(::message::Measure_response_msg)},
+  { 0, 12, sizeof(::message::Measure_status_msg)},
+  { 19, 27, sizeof(::message::Measure_request_msg)},
+  { 30, 40, sizeof(::message::Measure_response_msg)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
@@ -192,38 +194,39 @@ void AddDescriptorsImpl() {
   InitDefaults();
   static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
       "\n\025measure_message.proto\022\007message\032\022messag"
-      "e_base.proto\"\332\002\n\022Measure_status_msg\022%\n\tb"
-      "ase_info\030\001 \002(\0132\022.message.Base_info\022;\n\024la"
-      "ser_manager_status\030\002 \002(\0162\035.message.Laser"
-      "_manager_status\0220\n\022laser_statu_vector\030\003 "
-      "\003(\0162\024.message.Laser_statu\022=\n\025locate_mana"
-      "ger_status\030\004 \002(\0162\036.message.Locate_manage"
-      "r_status\022@\n\033locate_information_realtime\030"
-      "\005 \001(\0132\033.message.Locate_information\022-\n\rer"
-      "ror_manager\030\006 \002(\0132\026.message.Error_manage"
-      "r\"~\n\023Measure_request_msg\022%\n\tbase_info\030\001 "
-      "\002(\0132\022.message.Base_info\022+\n\014command_info\030"
-      "\002 \002(\0132\025.message.Command_info\022\023\n\013terminal"
-      "_id\030\003 \002(\005\"\347\001\n\024Measure_response_msg\022%\n\tba"
-      "se_info\030\001 \002(\0132\022.message.Base_info\022+\n\014com"
-      "mand_info\030\002 \002(\0132\025.message.Command_info\022\023"
-      "\n\013terminal_id\030\003 \002(\005\0227\n\022locate_informatio"
-      "n\030\004 \001(\0132\033.message.Locate_information\022-\n\r"
-      "error_manager\030\005 \002(\0132\026.message.Error_mana"
-      "ger*\237\001\n\024Laser_manager_status\022\030\n\024LASER_MA"
-      "NAGER_UNKNOW\020\000\022\027\n\023LASER_MANAGER_READY\020\001\022"
-      "\035\n\031LASER_MANAGER_ISSUED_TASK\020\002\022\034\n\030LASER_"
-      "MANAGER_WAIT_REPLY\020\003\022\027\n\023LASER_MANAGER_FA"
-      "ULT\020\004*U\n\013Laser_statu\022\024\n\020LASER_DISCONNECT"
-      "\020\000\022\017\n\013LASER_READY\020\001\022\016\n\nLASER_BUSY\020\002\022\017\n\013L"
-      "ASER_FAULT\020\003*\261\001\n\025Locate_manager_status\022\031"
-      "\n\025LOCATE_MANAGER_UNKNOW\020\000\022\030\n\024LOCATE_MANA"
-      "GER_READY\020\001\022\027\n\023LOCATE_MANAGER_SIFT\020\002\022\026\n\022"
-      "LOCATE_MANAGER_CAR\020\003\022\030\n\024LOCATE_MANAGER_W"
-      "HEEL\020\004\022\030\n\024LOCATE_MANAGER_FAULT\020\005"
+      "e_base.proto\"\357\002\n\022Measure_status_msg\022%\n\tb"
+      "ase_info\030\001 \002(\0132\022.message.Base_info\022\023\n\013te"
+      "rminal_id\030\002 \002(\005\022;\n\024laser_manager_status\030"
+      "\003 \002(\0162\035.message.Laser_manager_status\0220\n\022"
+      "laser_statu_vector\030\004 \003(\0162\024.message.Laser"
+      "_statu\022=\n\025locate_manager_status\030\005 \002(\0162\036."
+      "message.Locate_manager_status\022@\n\033locate_"
+      "information_realtime\030\006 \001(\0132\033.message.Loc"
+      "ate_information\022-\n\rerror_manager\030\007 \002(\0132\026"
+      ".message.Error_manager\"~\n\023Measure_reques"
+      "t_msg\022%\n\tbase_info\030\001 \002(\0132\022.message.Base_"
+      "info\022+\n\014command_info\030\002 \002(\0132\025.message.Com"
+      "mand_info\022\023\n\013terminal_id\030\003 \002(\005\"\347\001\n\024Measu"
+      "re_response_msg\022%\n\tbase_info\030\001 \002(\0132\022.mes"
+      "sage.Base_info\022+\n\014command_info\030\002 \002(\0132\025.m"
+      "essage.Command_info\022\023\n\013terminal_id\030\003 \002(\005"
+      "\0227\n\022locate_information\030\004 \001(\0132\033.message.L"
+      "ocate_information\022-\n\rerror_manager\030\005 \002(\013"
+      "2\026.message.Error_manager*\237\001\n\024Laser_manag"
+      "er_status\022\030\n\024LASER_MANAGER_UNKNOW\020\000\022\027\n\023L"
+      "ASER_MANAGER_READY\020\001\022\035\n\031LASER_MANAGER_IS"
+      "SUED_TASK\020\002\022\034\n\030LASER_MANAGER_WAIT_REPLY\020"
+      "\003\022\027\n\023LASER_MANAGER_FAULT\020\004*U\n\013Laser_stat"
+      "u\022\024\n\020LASER_DISCONNECT\020\000\022\017\n\013LASER_READY\020\001"
+      "\022\016\n\nLASER_BUSY\020\002\022\017\n\013LASER_FAULT\020\003*\261\001\n\025Lo"
+      "cate_manager_status\022\031\n\025LOCATE_MANAGER_UN"
+      "KNOW\020\000\022\030\n\024LOCATE_MANAGER_READY\020\001\022\027\n\023LOCA"
+      "TE_MANAGER_SIFT\020\002\022\026\n\022LOCATE_MANAGER_CAR\020"
+      "\003\022\030\n\024LOCATE_MANAGER_WHEEL\020\004\022\030\n\024LOCATE_MA"
+      "NAGER_FAULT\020\005"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 1192);
+      descriptor, 1213);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "measure_message.proto", &protobuf_RegisterTypes);
   ::protobuf_message_5fbase_2eproto::AddDescriptors();
@@ -317,6 +320,7 @@ void Measure_status_msg::clear_error_manager() {
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Measure_status_msg::kBaseInfoFieldNumber;
+const int Measure_status_msg::kTerminalIdFieldNumber;
 const int Measure_status_msg::kLaserManagerStatusFieldNumber;
 const int Measure_status_msg::kLaserStatuVectorFieldNumber;
 const int Measure_status_msg::kLocateManagerStatusFieldNumber;
@@ -354,9 +358,9 @@ Measure_status_msg::Measure_status_msg(const Measure_status_msg& from)
   } else {
     error_manager_ = NULL;
   }
-  ::memcpy(&laser_manager_status_, &from.laser_manager_status_,
+  ::memcpy(&terminal_id_, &from.terminal_id_,
     static_cast<size_t>(reinterpret_cast<char*>(&locate_manager_status_) -
-    reinterpret_cast<char*>(&laser_manager_status_)) + sizeof(locate_manager_status_));
+    reinterpret_cast<char*>(&terminal_id_)) + sizeof(locate_manager_status_));
   // @@protoc_insertion_point(copy_constructor:message.Measure_status_msg)
 }
 
@@ -423,10 +427,10 @@ void Measure_status_msg::Clear() {
       error_manager_->Clear();
     }
   }
-  if (cached_has_bits & 24u) {
-    ::memset(&laser_manager_status_, 0, static_cast<size_t>(
+  if (cached_has_bits & 56u) {
+    ::memset(&terminal_id_, 0, static_cast<size_t>(
         reinterpret_cast<char*>(&locate_manager_status_) -
-        reinterpret_cast<char*>(&laser_manager_status_)) + sizeof(locate_manager_status_));
+        reinterpret_cast<char*>(&terminal_id_)) + sizeof(locate_manager_status_));
   }
   _has_bits_.Clear();
   _internal_metadata_.Clear();
@@ -454,10 +458,24 @@ bool Measure_status_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required .message.Laser_manager_status laser_manager_status = 2;
+      // required int32 terminal_id = 2;
       case 2: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
+          set_has_terminal_id();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+                 input, &terminal_id_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // required .message.Laser_manager_status laser_manager_status = 3;
+      case 3: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
           int value;
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                    int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
@@ -466,7 +484,7 @@ bool Measure_status_msg::MergePartialFromCodedStream(
             set_laser_manager_status(static_cast< ::message::Laser_manager_status >(value));
           } else {
             mutable_unknown_fields()->AddVarint(
-                2, static_cast< ::google::protobuf::uint64>(value));
+                3, static_cast< ::google::protobuf::uint64>(value));
           }
         } else {
           goto handle_unusual;
@@ -474,10 +492,10 @@ bool Measure_status_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // repeated .message.Laser_statu laser_statu_vector = 3;
-      case 3: {
+      // repeated .message.Laser_statu laser_statu_vector = 4;
+      case 4: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
+            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
           int value;
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                    int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
@@ -486,14 +504,14 @@ bool Measure_status_msg::MergePartialFromCodedStream(
             add_laser_statu_vector(static_cast< ::message::Laser_statu >(value));
           } else {
             mutable_unknown_fields()->AddVarint(
-                3, static_cast< ::google::protobuf::uint64>(value));
+                4, static_cast< ::google::protobuf::uint64>(value));
           }
         } else if (
             static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
+            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
           DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
                  input,
-                 3,
+                 4,
                  ::message::Laser_statu_IsValid,
                  mutable_unknown_fields(),
                  this->mutable_laser_statu_vector())));
@@ -503,10 +521,10 @@ bool Measure_status_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required .message.Locate_manager_status locate_manager_status = 4;
-      case 4: {
+      // required .message.Locate_manager_status locate_manager_status = 5;
+      case 5: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
+            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
           int value;
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                    int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
@@ -515,7 +533,7 @@ bool Measure_status_msg::MergePartialFromCodedStream(
             set_locate_manager_status(static_cast< ::message::Locate_manager_status >(value));
           } else {
             mutable_unknown_fields()->AddVarint(
-                4, static_cast< ::google::protobuf::uint64>(value));
+                5, static_cast< ::google::protobuf::uint64>(value));
           }
         } else {
           goto handle_unusual;
@@ -523,10 +541,10 @@ bool Measure_status_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // optional .message.Locate_information locate_information_realtime = 5;
-      case 5: {
+      // optional .message.Locate_information locate_information_realtime = 6;
+      case 6: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
+            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, mutable_locate_information_realtime()));
         } else {
@@ -535,10 +553,10 @@ bool Measure_status_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required .message.Error_manager error_manager = 6;
-      case 6: {
+      // required .message.Error_manager error_manager = 7;
+      case 7: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
+            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, mutable_error_manager()));
         } else {
@@ -580,34 +598,39 @@ void Measure_status_msg::SerializeWithCachedSizes(
       1, *this->base_info_, output);
   }
 
-  // required .message.Laser_manager_status laser_manager_status = 2;
+  // required int32 terminal_id = 2;
   if (cached_has_bits & 0x00000008u) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->terminal_id(), output);
+  }
+
+  // required .message.Laser_manager_status laser_manager_status = 3;
+  if (cached_has_bits & 0x00000010u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
-      2, this->laser_manager_status(), output);
+      3, this->laser_manager_status(), output);
   }
 
-  // repeated .message.Laser_statu laser_statu_vector = 3;
+  // repeated .message.Laser_statu laser_statu_vector = 4;
   for (int i = 0, n = this->laser_statu_vector_size(); i < n; i++) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
-      3, this->laser_statu_vector(i), output);
+      4, this->laser_statu_vector(i), output);
   }
 
-  // required .message.Locate_manager_status locate_manager_status = 4;
-  if (cached_has_bits & 0x00000010u) {
+  // required .message.Locate_manager_status locate_manager_status = 5;
+  if (cached_has_bits & 0x00000020u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
-      4, this->locate_manager_status(), output);
+      5, this->locate_manager_status(), output);
   }
 
-  // optional .message.Locate_information locate_information_realtime = 5;
+  // optional .message.Locate_information locate_information_realtime = 6;
   if (cached_has_bits & 0x00000002u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      5, *this->locate_information_realtime_, output);
+      6, *this->locate_information_realtime_, output);
   }
 
-  // required .message.Error_manager error_manager = 6;
+  // required .message.Error_manager error_manager = 7;
   if (cached_has_bits & 0x00000004u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      6, *this->error_manager_, output);
+      7, *this->error_manager_, output);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -632,34 +655,39 @@ void Measure_status_msg::SerializeWithCachedSizes(
         1, *this->base_info_, deterministic, target);
   }
 
-  // required .message.Laser_manager_status laser_manager_status = 2;
+  // required int32 terminal_id = 2;
   if (cached_has_bits & 0x00000008u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->terminal_id(), target);
+  }
+
+  // required .message.Laser_manager_status laser_manager_status = 3;
+  if (cached_has_bits & 0x00000010u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
-      2, this->laser_manager_status(), target);
+      3, this->laser_manager_status(), target);
   }
 
-  // repeated .message.Laser_statu laser_statu_vector = 3;
+  // repeated .message.Laser_statu laser_statu_vector = 4;
   target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
-    3, this->laser_statu_vector_, target);
+    4, this->laser_statu_vector_, target);
 
-  // required .message.Locate_manager_status locate_manager_status = 4;
-  if (cached_has_bits & 0x00000010u) {
+  // required .message.Locate_manager_status locate_manager_status = 5;
+  if (cached_has_bits & 0x00000020u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
-      4, this->locate_manager_status(), target);
+      5, this->locate_manager_status(), target);
   }
 
-  // optional .message.Locate_information locate_information_realtime = 5;
+  // optional .message.Locate_information locate_information_realtime = 6;
   if (cached_has_bits & 0x00000002u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
-        5, *this->locate_information_realtime_, deterministic, target);
+        6, *this->locate_information_realtime_, deterministic, target);
   }
 
-  // required .message.Error_manager error_manager = 6;
+  // required .message.Error_manager error_manager = 7;
   if (cached_has_bits & 0x00000004u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
-        6, *this->error_manager_, deterministic, target);
+        7, *this->error_manager_, deterministic, target);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -682,20 +710,27 @@ size_t Measure_status_msg::RequiredFieldsByteSizeFallback() const {
   }
 
   if (has_error_manager()) {
-    // required .message.Error_manager error_manager = 6;
+    // required .message.Error_manager error_manager = 7;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
         *this->error_manager_);
   }
 
+  if (has_terminal_id()) {
+    // required int32 terminal_id = 2;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::Int32Size(
+        this->terminal_id());
+  }
+
   if (has_laser_manager_status()) {
-    // required .message.Laser_manager_status laser_manager_status = 2;
+    // required .message.Laser_manager_status laser_manager_status = 3;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::EnumSize(this->laser_manager_status());
   }
 
   if (has_locate_manager_status()) {
-    // required .message.Locate_manager_status locate_manager_status = 4;
+    // required .message.Locate_manager_status locate_manager_status = 5;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::EnumSize(this->locate_manager_status());
   }
@@ -711,29 +746,34 @@ size_t Measure_status_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
         _internal_metadata_.unknown_fields());
   }
-  if (((_has_bits_[0] & 0x0000001d) ^ 0x0000001d) == 0) {  // All required fields are present.
+  if (((_has_bits_[0] & 0x0000003d) ^ 0x0000003d) == 0) {  // All required fields are present.
     // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
         *this->base_info_);
 
-    // required .message.Error_manager error_manager = 6;
+    // required .message.Error_manager error_manager = 7;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
         *this->error_manager_);
 
-    // required .message.Laser_manager_status laser_manager_status = 2;
+    // required int32 terminal_id = 2;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::Int32Size(
+        this->terminal_id());
+
+    // required .message.Laser_manager_status laser_manager_status = 3;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::EnumSize(this->laser_manager_status());
 
-    // required .message.Locate_manager_status locate_manager_status = 4;
+    // required .message.Locate_manager_status locate_manager_status = 5;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::EnumSize(this->locate_manager_status());
 
   } else {
     total_size += RequiredFieldsByteSizeFallback();
   }
-  // repeated .message.Laser_statu laser_statu_vector = 3;
+  // repeated .message.Laser_statu laser_statu_vector = 4;
   {
     size_t data_size = 0;
     unsigned int count = static_cast<unsigned int>(this->laser_statu_vector_size());for (unsigned int i = 0; i < count; i++) {
@@ -743,7 +783,7 @@ size_t Measure_status_msg::ByteSizeLong() const {
     total_size += (1UL * count) + data_size;
   }
 
-  // optional .message.Locate_information locate_information_realtime = 5;
+  // optional .message.Locate_information locate_information_realtime = 6;
   if (has_locate_information_realtime()) {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
@@ -781,7 +821,7 @@ void Measure_status_msg::MergeFrom(const Measure_status_msg& from) {
 
   laser_statu_vector_.MergeFrom(from.laser_statu_vector_);
   cached_has_bits = from._has_bits_[0];
-  if (cached_has_bits & 31u) {
+  if (cached_has_bits & 63u) {
     if (cached_has_bits & 0x00000001u) {
       mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
     }
@@ -792,9 +832,12 @@ void Measure_status_msg::MergeFrom(const Measure_status_msg& from) {
       mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
     }
     if (cached_has_bits & 0x00000008u) {
-      laser_manager_status_ = from.laser_manager_status_;
+      terminal_id_ = from.terminal_id_;
     }
     if (cached_has_bits & 0x00000010u) {
+      laser_manager_status_ = from.laser_manager_status_;
+    }
+    if (cached_has_bits & 0x00000020u) {
       locate_manager_status_ = from.locate_manager_status_;
     }
     _has_bits_[0] |= cached_has_bits;
@@ -816,7 +859,7 @@ void Measure_status_msg::CopyFrom(const Measure_status_msg& from) {
 }
 
 bool Measure_status_msg::IsInitialized() const {
-  if ((_has_bits_[0] & 0x0000001d) != 0x0000001d) return false;
+  if ((_has_bits_[0] & 0x0000003d) != 0x0000003d) return false;
   if (has_base_info()) {
     if (!this->base_info_->IsInitialized()) return false;
   }
@@ -836,6 +879,7 @@ void Measure_status_msg::InternalSwap(Measure_status_msg* other) {
   swap(base_info_, other->base_info_);
   swap(locate_information_realtime_, other->locate_information_realtime_);
   swap(error_manager_, other->error_manager_);
+  swap(terminal_id_, other->terminal_id_);
   swap(laser_manager_status_, other->laser_manager_status_);
   swap(locate_manager_status_, other->locate_manager_status_);
   swap(_has_bits_[0], other->_has_bits_[0]);

+ 55 - 21
message/measure_message.pb.h

@@ -226,10 +226,10 @@ class Measure_status_msg : public ::google::protobuf::Message /* @@protoc_insert
 
   // accessors -------------------------------------------------------
 
-  // repeated .message.Laser_statu laser_statu_vector = 3;
+  // repeated .message.Laser_statu laser_statu_vector = 4;
   int laser_statu_vector_size() const;
   void clear_laser_statu_vector();
-  static const int kLaserStatuVectorFieldNumber = 3;
+  static const int kLaserStatuVectorFieldNumber = 4;
   ::message::Laser_statu laser_statu_vector(int index) const;
   void set_laser_statu_vector(int index, ::message::Laser_statu value);
   void add_laser_statu_vector(::message::Laser_statu value);
@@ -245,35 +245,42 @@ class Measure_status_msg : public ::google::protobuf::Message /* @@protoc_insert
   ::message::Base_info* mutable_base_info();
   void set_allocated_base_info(::message::Base_info* base_info);
 
-  // optional .message.Locate_information locate_information_realtime = 5;
+  // optional .message.Locate_information locate_information_realtime = 6;
   bool has_locate_information_realtime() const;
   void clear_locate_information_realtime();
-  static const int kLocateInformationRealtimeFieldNumber = 5;
+  static const int kLocateInformationRealtimeFieldNumber = 6;
   const ::message::Locate_information& locate_information_realtime() const;
   ::message::Locate_information* release_locate_information_realtime();
   ::message::Locate_information* mutable_locate_information_realtime();
   void set_allocated_locate_information_realtime(::message::Locate_information* locate_information_realtime);
 
-  // required .message.Error_manager error_manager = 6;
+  // required .message.Error_manager error_manager = 7;
   bool has_error_manager() const;
   void clear_error_manager();
-  static const int kErrorManagerFieldNumber = 6;
+  static const int kErrorManagerFieldNumber = 7;
   const ::message::Error_manager& error_manager() const;
   ::message::Error_manager* release_error_manager();
   ::message::Error_manager* mutable_error_manager();
   void set_allocated_error_manager(::message::Error_manager* error_manager);
 
-  // required .message.Laser_manager_status laser_manager_status = 2;
+  // required int32 terminal_id = 2;
+  bool has_terminal_id() const;
+  void clear_terminal_id();
+  static const int kTerminalIdFieldNumber = 2;
+  ::google::protobuf::int32 terminal_id() const;
+  void set_terminal_id(::google::protobuf::int32 value);
+
+  // required .message.Laser_manager_status laser_manager_status = 3;
   bool has_laser_manager_status() const;
   void clear_laser_manager_status();
-  static const int kLaserManagerStatusFieldNumber = 2;
+  static const int kLaserManagerStatusFieldNumber = 3;
   ::message::Laser_manager_status laser_manager_status() const;
   void set_laser_manager_status(::message::Laser_manager_status value);
 
-  // required .message.Locate_manager_status locate_manager_status = 4;
+  // required .message.Locate_manager_status locate_manager_status = 5;
   bool has_locate_manager_status() const;
   void clear_locate_manager_status();
-  static const int kLocateManagerStatusFieldNumber = 4;
+  static const int kLocateManagerStatusFieldNumber = 5;
   ::message::Locate_manager_status locate_manager_status() const;
   void set_locate_manager_status(::message::Locate_manager_status value);
 
@@ -281,6 +288,8 @@ class Measure_status_msg : public ::google::protobuf::Message /* @@protoc_insert
  private:
   void set_has_base_info();
   void clear_has_base_info();
+  void set_has_terminal_id();
+  void clear_has_terminal_id();
   void set_has_laser_manager_status();
   void clear_has_laser_manager_status();
   void set_has_locate_manager_status();
@@ -300,6 +309,7 @@ class Measure_status_msg : public ::google::protobuf::Message /* @@protoc_insert
   ::message::Base_info* base_info_;
   ::message::Locate_information* locate_information_realtime_;
   ::message::Error_manager* error_manager_;
+  ::google::protobuf::int32 terminal_id_;
   int laser_manager_status_;
   int locate_manager_status_;
   friend struct ::protobuf_measure_5fmessage_2eproto::TableStruct;
@@ -664,16 +674,40 @@ inline void Measure_status_msg::set_allocated_base_info(::message::Base_info* ba
   // @@protoc_insertion_point(field_set_allocated:message.Measure_status_msg.base_info)
 }
 
-// required .message.Laser_manager_status laser_manager_status = 2;
-inline bool Measure_status_msg::has_laser_manager_status() const {
+// required int32 terminal_id = 2;
+inline bool Measure_status_msg::has_terminal_id() const {
   return (_has_bits_[0] & 0x00000008u) != 0;
 }
-inline void Measure_status_msg::set_has_laser_manager_status() {
+inline void Measure_status_msg::set_has_terminal_id() {
   _has_bits_[0] |= 0x00000008u;
 }
-inline void Measure_status_msg::clear_has_laser_manager_status() {
+inline void Measure_status_msg::clear_has_terminal_id() {
   _has_bits_[0] &= ~0x00000008u;
 }
+inline void Measure_status_msg::clear_terminal_id() {
+  terminal_id_ = 0;
+  clear_has_terminal_id();
+}
+inline ::google::protobuf::int32 Measure_status_msg::terminal_id() const {
+  // @@protoc_insertion_point(field_get:message.Measure_status_msg.terminal_id)
+  return terminal_id_;
+}
+inline void Measure_status_msg::set_terminal_id(::google::protobuf::int32 value) {
+  set_has_terminal_id();
+  terminal_id_ = value;
+  // @@protoc_insertion_point(field_set:message.Measure_status_msg.terminal_id)
+}
+
+// required .message.Laser_manager_status laser_manager_status = 3;
+inline bool Measure_status_msg::has_laser_manager_status() const {
+  return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void Measure_status_msg::set_has_laser_manager_status() {
+  _has_bits_[0] |= 0x00000010u;
+}
+inline void Measure_status_msg::clear_has_laser_manager_status() {
+  _has_bits_[0] &= ~0x00000010u;
+}
 inline void Measure_status_msg::clear_laser_manager_status() {
   laser_manager_status_ = 0;
   clear_has_laser_manager_status();
@@ -689,7 +723,7 @@ inline void Measure_status_msg::set_laser_manager_status(::message::Laser_manage
   // @@protoc_insertion_point(field_set:message.Measure_status_msg.laser_manager_status)
 }
 
-// repeated .message.Laser_statu laser_statu_vector = 3;
+// repeated .message.Laser_statu laser_statu_vector = 4;
 inline int Measure_status_msg::laser_statu_vector_size() const {
   return laser_statu_vector_.size();
 }
@@ -721,15 +755,15 @@ Measure_status_msg::mutable_laser_statu_vector() {
   return &laser_statu_vector_;
 }
 
-// required .message.Locate_manager_status locate_manager_status = 4;
+// required .message.Locate_manager_status locate_manager_status = 5;
 inline bool Measure_status_msg::has_locate_manager_status() const {
-  return (_has_bits_[0] & 0x00000010u) != 0;
+  return (_has_bits_[0] & 0x00000020u) != 0;
 }
 inline void Measure_status_msg::set_has_locate_manager_status() {
-  _has_bits_[0] |= 0x00000010u;
+  _has_bits_[0] |= 0x00000020u;
 }
 inline void Measure_status_msg::clear_has_locate_manager_status() {
-  _has_bits_[0] &= ~0x00000010u;
+  _has_bits_[0] &= ~0x00000020u;
 }
 inline void Measure_status_msg::clear_locate_manager_status() {
   locate_manager_status_ = 0;
@@ -746,7 +780,7 @@ inline void Measure_status_msg::set_locate_manager_status(::message::Locate_mana
   // @@protoc_insertion_point(field_set:message.Measure_status_msg.locate_manager_status)
 }
 
-// optional .message.Locate_information locate_information_realtime = 5;
+// optional .message.Locate_information locate_information_realtime = 6;
 inline bool Measure_status_msg::has_locate_information_realtime() const {
   return (_has_bits_[0] & 0x00000002u) != 0;
 }
@@ -796,7 +830,7 @@ inline void Measure_status_msg::set_allocated_locate_information_realtime(::mess
   // @@protoc_insertion_point(field_set_allocated:message.Measure_status_msg.locate_information_realtime)
 }
 
-// required .message.Error_manager error_manager = 6;
+// required .message.Error_manager error_manager = 7;
 inline bool Measure_status_msg::has_error_manager() const {
   return (_has_bits_[0] & 0x00000004u) != 0;
 }

+ 6 - 6
message/measure_message.proto

@@ -37,13 +37,13 @@ enum Locate_manager_status
 message Measure_status_msg
 {
     required Base_info                  base_info=1;                 //消息类型
+    required int32                      terminal_id=2;
+    required Laser_manager_status       laser_manager_status = 3;
+    repeated Laser_statu                laser_statu_vector = 4;
+    required Locate_manager_status      locate_manager_status = 5;
 
-    required Laser_manager_status       laser_manager_status = 2;
-    repeated Laser_statu                laser_statu_vector = 3;
-    required Locate_manager_status      locate_manager_status = 4;
-
-    optional Locate_information         locate_information_realtime=5;  //地面雷达的 实时定位信息
-    required Error_manager              error_manager = 6;
+    optional Locate_information         locate_information_realtime=6;  //地面雷达的 实时定位信息
+    required Error_manager              error_manager = 7;
 }
 
 

+ 83 - 83
message/message_base.pb.cc

@@ -229,7 +229,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   ~0u,  // no _oneof_case_
   ~0u,  // no _weak_field_map_
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_info, time_),
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_info, location_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_info, place_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_info, event_),
   0,
   1,
@@ -362,62 +362,62 @@ void AddDescriptorsImpl() {
       "nfo\022\'\n\010msg_type\030\001 \002(\0162\025.message.Message_"
       "type\022\022\n\ntimeout_ms\030\002 \001(\005\022%\n\006sender\030\003 \002(\016"
       "2\025.message.Communicator\022\'\n\010receiver\030\004 \002("
-      "\0162\025.message.Communicator\"M\n\014Command_info"
-      "\022\014\n\004time\030\001 \002(\t\022\020\n\010location\030\002 \002(\t\022\035\n\005even"
-      "t\030\003 \002(\0162\016.message.Event\"1\n\010Base_msg\022%\n\tb"
-      "ase_info\030\001 \002(\0132\022.message.Base_info\"i\n\rEr"
-      "ror_manager\022\022\n\nerror_code\030\001 \002(\005\022)\n\013error"
-      "_level\030\002 \001(\0162\024.message.Error_level\022\031\n\021er"
-      "ror_description\030\003 \001(\t\"\341\001\n\022Locate_informa"
-      "tion\022\020\n\010locate_x\030\001 \001(\002\022\020\n\010locate_y\030\002 \001(\002"
-      "\022\024\n\014locate_angle\030\003 \001(\002\022\025\n\rlocate_length\030"
-      "\004 \001(\002\022\024\n\014locate_width\030\005 \001(\002\022\025\n\rlocate_he"
-      "ight\030\006 \001(\002\022\031\n\021locate_wheel_base\030\007 \001(\002\022\032\n"
-      "\022locate_wheel_width\030\010 \001(\002\022\026\n\016locate_corr"
-      "ect\030\t \001(\010\"V\n\010Car_info\022\022\n\ncar_length\030\001 \001("
-      "\002\022\021\n\tcar_width\030\002 \001(\002\022\022\n\ncar_height\030\003 \001(\002"
-      "\022\017\n\007license\030\004 \001(\t\"\234\002\n\016Parkspace_info\022\024\n\014"
-      "parkspace_id\030\001 \001(\005\022\r\n\005index\030\002 \001(\005\022%\n\tdir"
-      "ection\030\003 \001(\0162\022.message.Direction\022\r\n\005floo"
-      "r\030\004 \001(\005\022\016\n\006length\030\005 \001(\002\022\r\n\005width\030\006 \001(\002\022\016"
-      "\n\006height\030\007 \001(\002\0223\n\020parkspace_status\030\010 \001(\016"
-      "2\031.message.Parkspace_status\022#\n\010car_info\030"
-      "\t \001(\0132\021.message.Car_info\022\022\n\nentry_time\030\n"
-      " \001(\t\022\022\n\nleave_time\030\013 \001(\t*\276\006\n\014Message_typ"
-      "e\022\r\n\teBase_msg\020\000\022\020\n\014eCommand_msg\020\001\022\026\n\022eL"
-      "ocate_status_msg\020\021\022\027\n\023eLocate_request_ms"
-      "g\020\022\022\030\n\024eLocate_response_msg\020\023\022\030\n\024eDispat"
-      "ch_status_msg\020!\022\031\n\025eDispatch_request_msg"
-      "\020\"\022\032\n\026eDispatch_response_msg\020#\022$\n eParks"
-      "pace_allocation_status_msg\0201\022%\n!eParkspa"
-      "ce_allocation_request_msg\0202\022&\n\"eParkspac"
-      "e_allocation_response_msg\0203\022!\n\035eParkspac"
-      "e_search_request_msg\0204\022\"\n\036eParkspace_sea"
-      "rch_response_msg\0205\022\"\n\036eParkspace_release"
-      "_request_msg\0206\022#\n\037eParkspace_release_res"
-      "ponse_msg\0207\022\'\n#eParkspace_force_update_r"
-      "equest_msg\0208\022(\n$eParkspace_force_update_"
-      "response_msg\0209\022(\n$eParkspace_confirm_all"
-      "oc_request_msg\020:\022)\n%eParkspace_confirm_a"
-      "lloc_response_msg\020;\022\036\n\032eStore_command_re"
-      "quest_msg\020A\022\037\n\033eStore_command_response_m"
-      "sg\020B\022\037\n\033ePickup_command_request_msg\020C\022 \n"
-      "\034ePickup_command_response_msg\020D\022\037\n\032eStor"
-      "ing_process_statu_msg\020\220\001\022\037\n\032ePicking_pro"
-      "cess_statu_msg\020\221\001*f\n\014Communicator\022\n\n\006eEm"
-      "pty\020\000\022\t\n\005eMain\020\001\022\016\n\teTerminor\020\200\002\022\017\n\nePar"
-      "kspace\020\200\004\022\016\n\teMeasurer\020\200\006\022\016\n\teDispatch\020\200"
-      "\010*#\n\005Event\022\014\n\010eStoring\020\001\022\014\n\010ePicking\020\002*e"
-      "\n\013Error_level\022\n\n\006NORMAL\020\000\022\024\n\020NEGLIGIBLE_"
-      "ERROR\020\001\022\017\n\013MINOR_ERROR\020\002\022\017\n\013MAJOR_ERROR\020"
-      "\003\022\022\n\016CRITICAL_ERROR\020\004*q\n\020Parkspace_statu"
-      "s\022\024\n\020eParkspace_empty\020\000\022\027\n\023eParkspace_oc"
-      "cupied\020\001\022\030\n\024eParkspace_reserverd\020\002\022\024\n\020eP"
-      "arkspace_error\020\003*(\n\tDirection\022\014\n\010eForwar"
-      "d\020\001\022\r\n\teBackward\020\002"
+      "\0162\025.message.Communicator\"J\n\014Command_info"
+      "\022\014\n\004time\030\001 \002(\t\022\r\n\005place\030\002 \002(\t\022\035\n\005event\030\003"
+      " \002(\0162\016.message.Event\"1\n\010Base_msg\022%\n\tbase"
+      "_info\030\001 \002(\0132\022.message.Base_info\"i\n\rError"
+      "_manager\022\022\n\nerror_code\030\001 \002(\005\022)\n\013error_le"
+      "vel\030\002 \001(\0162\024.message.Error_level\022\031\n\021error"
+      "_description\030\003 \001(\t\"\341\001\n\022Locate_informatio"
+      "n\022\020\n\010locate_x\030\001 \001(\002\022\020\n\010locate_y\030\002 \001(\002\022\024\n"
+      "\014locate_angle\030\003 \001(\002\022\025\n\rlocate_length\030\004 \001"
+      "(\002\022\024\n\014locate_width\030\005 \001(\002\022\025\n\rlocate_heigh"
+      "t\030\006 \001(\002\022\031\n\021locate_wheel_base\030\007 \001(\002\022\032\n\022lo"
+      "cate_wheel_width\030\010 \001(\002\022\026\n\016locate_correct"
+      "\030\t \001(\010\"V\n\010Car_info\022\022\n\ncar_length\030\001 \001(\002\022\021"
+      "\n\tcar_width\030\002 \001(\002\022\022\n\ncar_height\030\003 \001(\002\022\017\n"
+      "\007license\030\004 \001(\t\"\234\002\n\016Parkspace_info\022\024\n\014par"
+      "kspace_id\030\001 \001(\005\022\r\n\005index\030\002 \001(\005\022%\n\tdirect"
+      "ion\030\003 \001(\0162\022.message.Direction\022\r\n\005floor\030\004"
+      " \001(\005\022\016\n\006length\030\005 \001(\002\022\r\n\005width\030\006 \001(\002\022\016\n\006h"
+      "eight\030\007 \001(\002\0223\n\020parkspace_status\030\010 \001(\0162\031."
+      "message.Parkspace_status\022#\n\010car_info\030\t \001"
+      "(\0132\021.message.Car_info\022\022\n\nentry_time\030\n \001("
+      "\t\022\022\n\nleave_time\030\013 \001(\t*\276\006\n\014Message_type\022\r"
+      "\n\teBase_msg\020\000\022\020\n\014eCommand_msg\020\001\022\026\n\022eLoca"
+      "te_status_msg\020\021\022\027\n\023eLocate_request_msg\020\022"
+      "\022\030\n\024eLocate_response_msg\020\023\022\030\n\024eDispatch_"
+      "status_msg\020!\022\031\n\025eDispatch_request_msg\020\"\022"
+      "\032\n\026eDispatch_response_msg\020#\022$\n eParkspac"
+      "e_allocation_status_msg\0201\022%\n!eParkspace_"
+      "allocation_request_msg\0202\022&\n\"eParkspace_a"
+      "llocation_response_msg\0203\022!\n\035eParkspace_s"
+      "earch_request_msg\0204\022\"\n\036eParkspace_search"
+      "_response_msg\0205\022\"\n\036eParkspace_release_re"
+      "quest_msg\0206\022#\n\037eParkspace_release_respon"
+      "se_msg\0207\022\'\n#eParkspace_force_update_requ"
+      "est_msg\0208\022(\n$eParkspace_force_update_res"
+      "ponse_msg\0209\022(\n$eParkspace_confirm_alloc_"
+      "request_msg\020:\022)\n%eParkspace_confirm_allo"
+      "c_response_msg\020;\022\036\n\032eStore_command_reque"
+      "st_msg\020A\022\037\n\033eStore_command_response_msg\020"
+      "B\022\037\n\033ePickup_command_request_msg\020C\022 \n\034eP"
+      "ickup_command_response_msg\020D\022\037\n\032eStoring"
+      "_process_statu_msg\020\220\001\022\037\n\032ePicking_proces"
+      "s_statu_msg\020\221\001*f\n\014Communicator\022\n\n\006eEmpty"
+      "\020\000\022\t\n\005eMain\020\001\022\016\n\teTerminor\020\200\002\022\017\n\neParksp"
+      "ace\020\200\004\022\016\n\teMeasurer\020\200\006\022\016\n\teDispatch\020\200\010*#"
+      "\n\005Event\022\014\n\010eStoring\020\001\022\014\n\010ePicking\020\002*e\n\013E"
+      "rror_level\022\n\n\006NORMAL\020\000\022\024\n\020NEGLIGIBLE_ERR"
+      "OR\020\001\022\017\n\013MINOR_ERROR\020\002\022\017\n\013MAJOR_ERROR\020\003\022\022"
+      "\n\016CRITICAL_ERROR\020\004*q\n\020Parkspace_status\022\024"
+      "\n\020eParkspace_empty\020\000\022\027\n\023eParkspace_occup"
+      "ied\020\001\022\030\n\024eParkspace_reserverd\020\002\022\024\n\020ePark"
+      "space_error\020\003*(\n\tDirection\022\014\n\010eForward\020\001"
+      "\022\r\n\teBackward\020\002"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 2258);
+      descriptor, 2255);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "message_base.proto", &protobuf_RegisterTypes);
 }
@@ -965,7 +965,7 @@ void Command_info::InitAsDefaultInstance() {
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Command_info::kTimeFieldNumber;
-const int Command_info::kLocationFieldNumber;
+const int Command_info::kPlaceFieldNumber;
 const int Command_info::kEventFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
@@ -987,9 +987,9 @@ Command_info::Command_info(const Command_info& from)
   if (from.has_time()) {
     time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.time_);
   }
-  location_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  if (from.has_location()) {
-    location_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.location_);
+  place_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.has_place()) {
+    place_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.place_);
   }
   event_ = from.event_;
   // @@protoc_insertion_point(copy_constructor:message.Command_info)
@@ -998,7 +998,7 @@ Command_info::Command_info(const Command_info& from)
 void Command_info::SharedCtor() {
   _cached_size_ = 0;
   time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  location_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  place_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   event_ = 1;
 }
 
@@ -1009,7 +1009,7 @@ Command_info::~Command_info() {
 
 void Command_info::SharedDtor() {
   time_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  location_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  place_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 
 void Command_info::SetCachedSize(int size) const {
@@ -1048,8 +1048,8 @@ void Command_info::Clear() {
       (*time_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000002u) {
-      GOOGLE_DCHECK(!location_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
-      (*location_.UnsafeRawStringPointer())->clear();
+      GOOGLE_DCHECK(!place_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*place_.UnsafeRawStringPointer())->clear();
     }
     event_ = 1;
   }
@@ -1083,16 +1083,16 @@ bool Command_info::MergePartialFromCodedStream(
         break;
       }
 
-      // required string location = 2;
+      // required string place = 2;
       case 2: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
-                input, this->mutable_location()));
+                input, this->mutable_place()));
           ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
-            this->location().data(), static_cast<int>(this->location().length()),
+            this->place().data(), static_cast<int>(this->place().length()),
             ::google::protobuf::internal::WireFormat::PARSE,
-            "message.Command_info.location");
+            "message.Command_info.place");
         } else {
           goto handle_unusual;
         }
@@ -1156,14 +1156,14 @@ void Command_info::SerializeWithCachedSizes(
       1, this->time(), output);
   }
 
-  // required string location = 2;
+  // required string place = 2;
   if (cached_has_bits & 0x00000002u) {
     ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
-      this->location().data(), static_cast<int>(this->location().length()),
+      this->place().data(), static_cast<int>(this->place().length()),
       ::google::protobuf::internal::WireFormat::SERIALIZE,
-      "message.Command_info.location");
+      "message.Command_info.place");
     ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
-      2, this->location(), output);
+      2, this->place(), output);
   }
 
   // required .message.Event event = 3;
@@ -1198,15 +1198,15 @@ void Command_info::SerializeWithCachedSizes(
         1, this->time(), target);
   }
 
-  // required string location = 2;
+  // required string place = 2;
   if (cached_has_bits & 0x00000002u) {
     ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
-      this->location().data(), static_cast<int>(this->location().length()),
+      this->place().data(), static_cast<int>(this->place().length()),
       ::google::protobuf::internal::WireFormat::SERIALIZE,
-      "message.Command_info.location");
+      "message.Command_info.place");
     target =
       ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
-        2, this->location(), target);
+        2, this->place(), target);
   }
 
   // required .message.Event event = 3;
@@ -1234,11 +1234,11 @@ size_t Command_info::RequiredFieldsByteSizeFallback() const {
         this->time());
   }
 
-  if (has_location()) {
-    // required string location = 2;
+  if (has_place()) {
+    // required string place = 2;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::StringSize(
-        this->location());
+        this->place());
   }
 
   if (has_event()) {
@@ -1264,10 +1264,10 @@ size_t Command_info::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormatLite::StringSize(
         this->time());
 
-    // required string location = 2;
+    // required string place = 2;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::StringSize(
-        this->location());
+        this->place());
 
     // required .message.Event event = 3;
     total_size += 1 +
@@ -1312,8 +1312,8 @@ void Command_info::MergeFrom(const Command_info& from) {
       time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.time_);
     }
     if (cached_has_bits & 0x00000002u) {
-      set_has_location();
-      location_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.location_);
+      set_has_place();
+      place_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.place_);
     }
     if (cached_has_bits & 0x00000004u) {
       event_ = from.event_;
@@ -1348,7 +1348,7 @@ void Command_info::Swap(Command_info* other) {
 void Command_info::InternalSwap(Command_info* other) {
   using std::swap;
   time_.Swap(&other->time_);
-  location_.Swap(&other->location_);
+  place_.Swap(&other->place_);
   swap(event_, other->event_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);

+ 55 - 55
message/message_base.pb.h

@@ -487,20 +487,20 @@ class Command_info : public ::google::protobuf::Message /* @@protoc_insertion_po
   ::std::string* release_time();
   void set_allocated_time(::std::string* time);
 
-  // required string location = 2;
-  bool has_location() const;
-  void clear_location();
-  static const int kLocationFieldNumber = 2;
-  const ::std::string& location() const;
-  void set_location(const ::std::string& value);
+  // required string place = 2;
+  bool has_place() const;
+  void clear_place();
+  static const int kPlaceFieldNumber = 2;
+  const ::std::string& place() const;
+  void set_place(const ::std::string& value);
   #if LANG_CXX11
-  void set_location(::std::string&& value);
+  void set_place(::std::string&& value);
   #endif
-  void set_location(const char* value);
-  void set_location(const char* value, size_t size);
-  ::std::string* mutable_location();
-  ::std::string* release_location();
-  void set_allocated_location(::std::string* location);
+  void set_place(const char* value);
+  void set_place(const char* value, size_t size);
+  ::std::string* mutable_place();
+  ::std::string* release_place();
+  void set_allocated_place(::std::string* place);
 
   // required .message.Event event = 3;
   bool has_event() const;
@@ -513,8 +513,8 @@ class Command_info : public ::google::protobuf::Message /* @@protoc_insertion_po
  private:
   void set_has_time();
   void clear_has_time();
-  void set_has_location();
-  void clear_has_location();
+  void set_has_place();
+  void clear_has_place();
   void set_has_event();
   void clear_has_event();
 
@@ -525,7 +525,7 @@ class Command_info : public ::google::protobuf::Message /* @@protoc_insertion_po
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
   ::google::protobuf::internal::ArenaStringPtr time_;
-  ::google::protobuf::internal::ArenaStringPtr location_;
+  ::google::protobuf::internal::ArenaStringPtr place_;
   int event_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
   friend void ::protobuf_message_5fbase_2eproto::InitDefaultsCommand_infoImpl();
@@ -1523,67 +1523,67 @@ inline void Command_info::set_allocated_time(::std::string* time) {
   // @@protoc_insertion_point(field_set_allocated:message.Command_info.time)
 }
 
-// required string location = 2;
-inline bool Command_info::has_location() const {
+// required string place = 2;
+inline bool Command_info::has_place() const {
   return (_has_bits_[0] & 0x00000002u) != 0;
 }
-inline void Command_info::set_has_location() {
+inline void Command_info::set_has_place() {
   _has_bits_[0] |= 0x00000002u;
 }
-inline void Command_info::clear_has_location() {
+inline void Command_info::clear_has_place() {
   _has_bits_[0] &= ~0x00000002u;
 }
-inline void Command_info::clear_location() {
-  location_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  clear_has_location();
+inline void Command_info::clear_place() {
+  place_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  clear_has_place();
 }
-inline const ::std::string& Command_info::location() const {
-  // @@protoc_insertion_point(field_get:message.Command_info.location)
-  return location_.GetNoArena();
+inline const ::std::string& Command_info::place() const {
+  // @@protoc_insertion_point(field_get:message.Command_info.place)
+  return place_.GetNoArena();
 }
-inline void Command_info::set_location(const ::std::string& value) {
-  set_has_location();
-  location_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
-  // @@protoc_insertion_point(field_set:message.Command_info.location)
+inline void Command_info::set_place(const ::std::string& value) {
+  set_has_place();
+  place_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:message.Command_info.place)
 }
 #if LANG_CXX11
-inline void Command_info::set_location(::std::string&& value) {
-  set_has_location();
-  location_.SetNoArena(
+inline void Command_info::set_place(::std::string&& value) {
+  set_has_place();
+  place_.SetNoArena(
     &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
-  // @@protoc_insertion_point(field_set_rvalue:message.Command_info.location)
+  // @@protoc_insertion_point(field_set_rvalue:message.Command_info.place)
 }
 #endif
-inline void Command_info::set_location(const char* value) {
+inline void Command_info::set_place(const char* value) {
   GOOGLE_DCHECK(value != NULL);
-  set_has_location();
-  location_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
-  // @@protoc_insertion_point(field_set_char:message.Command_info.location)
+  set_has_place();
+  place_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:message.Command_info.place)
 }
-inline void Command_info::set_location(const char* value, size_t size) {
-  set_has_location();
-  location_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+inline void Command_info::set_place(const char* value, size_t size) {
+  set_has_place();
+  place_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
       ::std::string(reinterpret_cast<const char*>(value), size));
-  // @@protoc_insertion_point(field_set_pointer:message.Command_info.location)
+  // @@protoc_insertion_point(field_set_pointer:message.Command_info.place)
 }
-inline ::std::string* Command_info::mutable_location() {
-  set_has_location();
-  // @@protoc_insertion_point(field_mutable:message.Command_info.location)
-  return location_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+inline ::std::string* Command_info::mutable_place() {
+  set_has_place();
+  // @@protoc_insertion_point(field_mutable:message.Command_info.place)
+  return place_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
-inline ::std::string* Command_info::release_location() {
-  // @@protoc_insertion_point(field_release:message.Command_info.location)
-  clear_has_location();
-  return location_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+inline ::std::string* Command_info::release_place() {
+  // @@protoc_insertion_point(field_release:message.Command_info.place)
+  clear_has_place();
+  return place_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
-inline void Command_info::set_allocated_location(::std::string* location) {
-  if (location != NULL) {
-    set_has_location();
+inline void Command_info::set_allocated_place(::std::string* place) {
+  if (place != NULL) {
+    set_has_place();
   } else {
-    clear_has_location();
+    clear_has_place();
   }
-  location_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), location);
-  // @@protoc_insertion_point(field_set_allocated:message.Command_info.location)
+  place_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), place);
+  // @@protoc_insertion_point(field_set_allocated:message.Command_info.place)
 }
 
 // required .message.Event event = 3;

+ 1 - 1
message/message_base.proto

@@ -78,7 +78,7 @@ enum Event
 
 // 指令信息, 包含 时间,地点,事件
 // 时间 格式为: 年-月-日:时-分-秒
-//地点格式为 :  区号-序号   楚天项目为  027-01
+//地点格式为 :  区号-序号-终端号   楚天项目为  027-01
 message Command_info
 {
     required string                     time=1;

+ 21 - 2
message/message_compare.h

@@ -4,6 +4,25 @@
 
 #ifndef NNXX_TESTS_MESSAGE_COMPARE_H__H
 #define NNXX_TESTS_MESSAGE_COMPARE_H__H
+namespace message {
+    static bool operator==(const message::Command_info &msg1, const message::Command_info &msg2) {
+
+        return (msg1.event() == msg2.event()) && (0==msg1.time().compare(msg2.time())) && (0==msg1.place().compare(msg2.place()));
+    }
+
+    static bool operator!=(const message::Command_info &msg1, const message::Command_info &msg2) {
+        return msg1.event() != msg2.event() ||0!= msg1.time().compare(msg2.time()) || 0!=msg1.place().compare(msg2.place());
+    }
+
+    static bool operator<(const message::Command_info &msg1, const message::Command_info &msg2) {
+        return msg1.time().compare(msg2.time()) < 0 ||
+        msg1.place().compare(msg2.place())<0 || msg1.event()<msg2.event();
+    }
+        /*static bool operator>(const message::Command_info &msg1, const message::Command_info &msg2) {
+            LOG(WARNING)<<">>>>>>>>>>>"<<msg1.time().compare(msg2.time());
+            return msg1.time().compare(msg2.time())>0;
+    }*/
+}
 
 #define RegistoryCompare(NAMESPACE,NAME)  \
 namespace NAMESPACE                                                         \
@@ -12,14 +31,14 @@ static bool operator==(const NAME& msg1,const NAME& msg2){                  \
     if(msg1.base_info().msg_type() == msg2.base_info().msg_type()           \
         && msg1.base_info().sender() == msg2.base_info().sender()           \
         && msg1.base_info().receiver() == msg2.base_info().receiver()       \
-        && msg1.command_id() == msg2.command_id()){                         \
+        && msg1.command_info() == msg2.command_info()){                         \
         return true;                                                        \
     }else{                                                                  \
         return false;                                                       \
     }                                                                       \
 }                                                                           \
 static bool operator<(const NAME& msg1,const NAME& msg2){                   \
-    return msg1.command_id() < msg2.command_id();                           \
+    return msg1.command_info() < msg2.command_info();                       \
 }                                                                           \
 }
 

+ 216 - 163
message/parkspace_allocation_message.pb.cc

@@ -76,6 +76,7 @@ void InitDefaultsParkspace_allocation_request_msgImpl() {
   ::google::protobuf::internal::InitProtobufDefaults();
 #endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   protobuf_message_5fbase_2eproto::InitDefaultsBase_info();
+  protobuf_message_5fbase_2eproto::InitDefaultsCommand_info();
   protobuf_message_5fbase_2eproto::InitDefaultsCar_info();
   {
     void* ptr = &::message::_Parkspace_allocation_request_msg_default_instance_;
@@ -99,6 +100,7 @@ void InitDefaultsParkspace_allocation_response_msgImpl() {
   ::google::protobuf::internal::InitProtobufDefaults();
 #endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   protobuf_message_5fbase_2eproto::InitDefaultsBase_info();
+  protobuf_message_5fbase_2eproto::InitDefaultsCommand_info();
   protobuf_message_5fbase_2eproto::InitDefaultsError_manager();
   protobuf_message_5fbase_2eproto::InitDefaultsParkspace_info();
   {
@@ -123,6 +125,7 @@ void InitDefaultsParkspace_search_request_msgImpl() {
   ::google::protobuf::internal::InitProtobufDefaults();
 #endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   protobuf_message_5fbase_2eproto::InitDefaultsBase_info();
+  protobuf_message_5fbase_2eproto::InitDefaultsCommand_info();
   protobuf_message_5fbase_2eproto::InitDefaultsCar_info();
   {
     void* ptr = &::message::_Parkspace_search_request_msg_default_instance_;
@@ -293,12 +296,12 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   ~0u,  // no _oneof_case_
   ~0u,  // no _weak_field_map_
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_request_msg, base_info_),
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_request_msg, command_id_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_request_msg, command_info_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_request_msg, car_info_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_request_msg, terminal_id_),
   0,
-  2,
   1,
+  2,
   3,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_response_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_response_msg, _internal_metadata_),
@@ -306,24 +309,24 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   ~0u,  // no _oneof_case_
   ~0u,  // no _weak_field_map_
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_response_msg, base_info_),
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_response_msg, command_id_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_response_msg, command_info_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_response_msg, error_manager_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_response_msg, allocated_space_info_),
   0,
-  3,
   1,
   2,
+  3,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_search_request_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_search_request_msg, _internal_metadata_),
   ~0u,  // no _extensions_
   ~0u,  // no _oneof_case_
   ~0u,  // no _weak_field_map_
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_search_request_msg, base_info_),
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_search_request_msg, command_id_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_search_request_msg, command_info_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_search_request_msg, car_info_),
   0,
-  2,
   1,
+  2,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_search_response_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_search_response_msg, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -444,52 +447,54 @@ void AddDescriptorsImpl() {
   InitDefaults();
   static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
       "\n\"parkspace_allocation_message.proto\022\007me"
-      "ssage\032\022message_base.proto\"\227\001\n Parkspace_"
+      "ssage\032\022message_base.proto\"\260\001\n Parkspace_"
       "allocation_request_msg\022%\n\tbase_info\030\001 \002("
-      "\0132\022.message.Base_info\022\022\n\ncommand_id\030\002 \002("
-      "\005\022#\n\010car_info\030\003 \002(\0132\021.message.Car_info\022\023"
-      "\n\013terminal_id\030\004 \002(\005\"\304\001\n!Parkspace_alloca"
-      "tion_response_msg\022%\n\tbase_info\030\001 \002(\0132\022.m"
-      "essage.Base_info\022\022\n\ncommand_id\030\002 \002(\005\022-\n\r"
-      "error_manager\030\003 \002(\0132\026.message.Error_mana"
-      "ger\0225\n\024allocated_space_info\030\004 \002(\0132\027.mess"
-      "age.Parkspace_info\"~\n\034Parkspace_search_r"
-      "equest_msg\022%\n\tbase_info\030\001 \002(\0132\022.message."
-      "Base_info\022\022\n\ncommand_id\030\002 \002(\005\022#\n\010car_inf"
-      "o\030\003 \002(\0132\021.message.Car_info\"\321\001\n\035Parkspace"
-      "_search_response_msg\022%\n\tbase_info\030\001 \002(\0132"
-      "\022.message.Base_info\022+\n\014command_info\030\002 \002("
-      "\0132\025.message.Command_info\022-\n\rerror_manage"
-      "r\030\003 \002(\0132\026.message.Error_manager\022-\n\014car_p"
-      "osition\030\004 \001(\0132\027.message.Parkspace_info\"\250"
-      "\001\n\035Parkspace_release_request_msg\022%\n\tbase"
-      "_info\030\001 \002(\0132\022.message.Base_info\022+\n\014comma"
-      "nd_info\030\002 \002(\0132\025.message.Command_info\0223\n\022"
-      "release_space_info\030\003 \002(\0132\027.message.Parks"
-      "pace_info\"\330\001\n\036Parkspace_release_response"
-      "_msg\022%\n\tbase_info\030\001 \002(\0132\022.message.Base_i"
-      "nfo\022+\n\014command_info\030\002 \002(\0132\025.message.Comm"
-      "and_info\022-\n\rerror_manager\030\003 \002(\0132\026.messag"
-      "e.Error_manager\0223\n\022release_space_info\030\004 "
-      "\002(\0132\027.message.Parkspace_info\"\256\001\n#Parkspa"
-      "ce_confirm_alloc_request_msg\022%\n\tbase_inf"
+      "\0132\022.message.Base_info\022+\n\014command_info\030\002 "
+      "\002(\0132\025.message.Command_info\022#\n\010car_info\030\003"
+      " \002(\0132\021.message.Car_info\022\023\n\013terminal_id\030\004"
+      " \002(\005\"\335\001\n!Parkspace_allocation_response_m"
+      "sg\022%\n\tbase_info\030\001 \002(\0132\022.message.Base_inf"
+      "o\022+\n\014command_info\030\002 \002(\0132\025.message.Comman"
+      "d_info\022-\n\rerror_manager\030\003 \002(\0132\026.message."
+      "Error_manager\0225\n\024allocated_space_info\030\004 "
+      "\002(\0132\027.message.Parkspace_info\"\227\001\n\034Parkspa"
+      "ce_search_request_msg\022%\n\tbase_info\030\001 \002(\013"
+      "2\022.message.Base_info\022+\n\014command_info\030\002 \002"
+      "(\0132\025.message.Command_info\022#\n\010car_info\030\003 "
+      "\002(\0132\021.message.Car_info\"\321\001\n\035Parkspace_sea"
+      "rch_response_msg\022%\n\tbase_info\030\001 \002(\0132\022.me"
+      "ssage.Base_info\022+\n\014command_info\030\002 \002(\0132\025."
+      "message.Command_info\022-\n\rerror_manager\030\003 "
+      "\002(\0132\026.message.Error_manager\022-\n\014car_posit"
+      "ion\030\004 \001(\0132\027.message.Parkspace_info\"\250\001\n\035P"
+      "arkspace_release_request_msg\022%\n\tbase_inf"
       "o\030\001 \002(\0132\022.message.Base_info\022+\n\014command_i"
-      "nfo\030\002 \002(\0132\025.message.Command_info\0223\n\022conf"
-      "irm_space_info\030\003 \002(\0132\027.message.Parkspace"
-      "_info\"\344\001\n$Parkspace_confirm_alloc_respon"
-      "se_msg\022%\n\tbase_info\030\001 \002(\0132\022.message.Base"
-      "_info\022+\n\014command_info\030\002 \002(\0132\025.message.Co"
-      "mmand_info\022-\n\rerror_manager\030\003 \002(\0132\026.mess"
-      "age.Error_manager\0229\n\030confirm_alloc_space"
-      "_info\030\004 \002(\0132\027.message.Parkspace_info\"\250\001\n"
-      "\037Parkspace_allocation_status_msg\022%\n\tbase"
-      "_info\030\001 \002(\0132\022.message.Base_info\022-\n\rerror"
-      "_manager\030\002 \002(\0132\026.message.Error_manager\022/"
-      "\n\016parkspace_info\030\003 \003(\0132\027.message.Parkspa"
-      "ce_info"
+      "nfo\030\002 \002(\0132\025.message.Command_info\0223\n\022rele"
+      "ase_space_info\030\003 \002(\0132\027.message.Parkspace"
+      "_info\"\330\001\n\036Parkspace_release_response_msg"
+      "\022%\n\tbase_info\030\001 \002(\0132\022.message.Base_info\022"
+      "+\n\014command_info\030\002 \002(\0132\025.message.Command_"
+      "info\022-\n\rerror_manager\030\003 \002(\0132\026.message.Er"
+      "ror_manager\0223\n\022release_space_info\030\004 \002(\0132"
+      "\027.message.Parkspace_info\"\256\001\n#Parkspace_c"
+      "onfirm_alloc_request_msg\022%\n\tbase_info\030\001 "
+      "\002(\0132\022.message.Base_info\022+\n\014command_info\030"
+      "\002 \002(\0132\025.message.Command_info\0223\n\022confirm_"
+      "space_info\030\003 \002(\0132\027.message.Parkspace_inf"
+      "o\"\344\001\n$Parkspace_confirm_alloc_response_m"
+      "sg\022%\n\tbase_info\030\001 \002(\0132\022.message.Base_inf"
+      "o\022+\n\014command_info\030\002 \002(\0132\025.message.Comman"
+      "d_info\022-\n\rerror_manager\030\003 \002(\0132\026.message."
+      "Error_manager\0229\n\030confirm_alloc_space_inf"
+      "o\030\004 \002(\0132\027.message.Parkspace_info\"\250\001\n\037Par"
+      "kspace_allocation_status_msg\022%\n\tbase_inf"
+      "o\030\001 \002(\0132\022.message.Base_info\022-\n\rerror_man"
+      "ager\030\002 \002(\0132\026.message.Error_manager\022/\n\016pa"
+      "rkspace_info\030\003 \003(\0132\027.message.Parkspace_i"
+      "nfo"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 1727);
+      descriptor, 1803);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "parkspace_allocation_message.proto", &protobuf_RegisterTypes);
   ::protobuf_message_5fbase_2eproto::AddDescriptors();
@@ -513,6 +518,8 @@ namespace message {
 void Parkspace_allocation_request_msg::InitAsDefaultInstance() {
   ::message::_Parkspace_allocation_request_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
       ::message::Base_info::internal_default_instance());
+  ::message::_Parkspace_allocation_request_msg_default_instance_._instance.get_mutable()->command_info_ = const_cast< ::message::Command_info*>(
+      ::message::Command_info::internal_default_instance());
   ::message::_Parkspace_allocation_request_msg_default_instance_._instance.get_mutable()->car_info_ = const_cast< ::message::Car_info*>(
       ::message::Car_info::internal_default_instance());
 }
@@ -520,13 +527,17 @@ void Parkspace_allocation_request_msg::clear_base_info() {
   if (base_info_ != NULL) base_info_->Clear();
   clear_has_base_info();
 }
+void Parkspace_allocation_request_msg::clear_command_info() {
+  if (command_info_ != NULL) command_info_->Clear();
+  clear_has_command_info();
+}
 void Parkspace_allocation_request_msg::clear_car_info() {
   if (car_info_ != NULL) car_info_->Clear();
   clear_has_car_info();
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Parkspace_allocation_request_msg::kBaseInfoFieldNumber;
-const int Parkspace_allocation_request_msg::kCommandIdFieldNumber;
+const int Parkspace_allocation_request_msg::kCommandInfoFieldNumber;
 const int Parkspace_allocation_request_msg::kCarInfoFieldNumber;
 const int Parkspace_allocation_request_msg::kTerminalIdFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
@@ -550,14 +561,17 @@ Parkspace_allocation_request_msg::Parkspace_allocation_request_msg(const Parkspa
   } else {
     base_info_ = NULL;
   }
+  if (from.has_command_info()) {
+    command_info_ = new ::message::Command_info(*from.command_info_);
+  } else {
+    command_info_ = NULL;
+  }
   if (from.has_car_info()) {
     car_info_ = new ::message::Car_info(*from.car_info_);
   } else {
     car_info_ = NULL;
   }
-  ::memcpy(&command_id_, &from.command_id_,
-    static_cast<size_t>(reinterpret_cast<char*>(&terminal_id_) -
-    reinterpret_cast<char*>(&command_id_)) + sizeof(terminal_id_));
+  terminal_id_ = from.terminal_id_;
   // @@protoc_insertion_point(copy_constructor:message.Parkspace_allocation_request_msg)
 }
 
@@ -575,6 +589,7 @@ Parkspace_allocation_request_msg::~Parkspace_allocation_request_msg() {
 
 void Parkspace_allocation_request_msg::SharedDtor() {
   if (this != internal_default_instance()) delete base_info_;
+  if (this != internal_default_instance()) delete command_info_;
   if (this != internal_default_instance()) delete car_info_;
 }
 
@@ -608,21 +623,21 @@ void Parkspace_allocation_request_msg::Clear() {
   (void) cached_has_bits;
 
   cached_has_bits = _has_bits_[0];
-  if (cached_has_bits & 3u) {
+  if (cached_has_bits & 7u) {
     if (cached_has_bits & 0x00000001u) {
       GOOGLE_DCHECK(base_info_ != NULL);
       base_info_->Clear();
     }
     if (cached_has_bits & 0x00000002u) {
+      GOOGLE_DCHECK(command_info_ != NULL);
+      command_info_->Clear();
+    }
+    if (cached_has_bits & 0x00000004u) {
       GOOGLE_DCHECK(car_info_ != NULL);
       car_info_->Clear();
     }
   }
-  if (cached_has_bits & 12u) {
-    ::memset(&command_id_, 0, static_cast<size_t>(
-        reinterpret_cast<char*>(&terminal_id_) -
-        reinterpret_cast<char*>(&command_id_)) + sizeof(terminal_id_));
-  }
+  terminal_id_ = 0;
   _has_bits_.Clear();
   _internal_metadata_.Clear();
 }
@@ -649,14 +664,12 @@ bool Parkspace_allocation_request_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required int32 command_id = 2;
+      // required .message.Command_info command_info = 2;
       case 2: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
-          set_has_command_id();
-          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
-                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
-                 input, &command_id_)));
+            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_command_info()));
         } else {
           goto handle_unusual;
         }
@@ -722,13 +735,14 @@ void Parkspace_allocation_request_msg::SerializeWithCachedSizes(
       1, *this->base_info_, output);
   }
 
-  // required int32 command_id = 2;
-  if (cached_has_bits & 0x00000004u) {
-    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->command_id(), output);
+  // required .message.Command_info command_info = 2;
+  if (cached_has_bits & 0x00000002u) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      2, *this->command_info_, output);
   }
 
   // required .message.Car_info car_info = 3;
-  if (cached_has_bits & 0x00000002u) {
+  if (cached_has_bits & 0x00000004u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
       3, *this->car_info_, output);
   }
@@ -760,13 +774,15 @@ void Parkspace_allocation_request_msg::SerializeWithCachedSizes(
         1, *this->base_info_, deterministic, target);
   }
 
-  // required int32 command_id = 2;
-  if (cached_has_bits & 0x00000004u) {
-    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->command_id(), target);
+  // required .message.Command_info command_info = 2;
+  if (cached_has_bits & 0x00000002u) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        2, *this->command_info_, deterministic, target);
   }
 
   // required .message.Car_info car_info = 3;
-  if (cached_has_bits & 0x00000002u) {
+  if (cached_has_bits & 0x00000004u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
         3, *this->car_info_, deterministic, target);
@@ -796,18 +812,18 @@ size_t Parkspace_allocation_request_msg::RequiredFieldsByteSizeFallback() const
         *this->base_info_);
   }
 
-  if (has_car_info()) {
-    // required .message.Car_info car_info = 3;
+  if (has_command_info()) {
+    // required .message.Command_info command_info = 2;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->car_info_);
+        *this->command_info_);
   }
 
-  if (has_command_id()) {
-    // required int32 command_id = 2;
+  if (has_car_info()) {
+    // required .message.Car_info car_info = 3;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::Int32Size(
-        this->command_id());
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->car_info_);
   }
 
   if (has_terminal_id()) {
@@ -834,15 +850,15 @@ size_t Parkspace_allocation_request_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormatLite::MessageSize(
         *this->base_info_);
 
-    // required .message.Car_info car_info = 3;
+    // required .message.Command_info command_info = 2;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->car_info_);
+        *this->command_info_);
 
-    // required int32 command_id = 2;
+    // required .message.Car_info car_info = 3;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::Int32Size(
-        this->command_id());
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->car_info_);
 
     // required int32 terminal_id = 4;
     total_size += 1 +
@@ -887,10 +903,10 @@ void Parkspace_allocation_request_msg::MergeFrom(const Parkspace_allocation_requ
       mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
     }
     if (cached_has_bits & 0x00000002u) {
-      mutable_car_info()->::message::Car_info::MergeFrom(from.car_info());
+      mutable_command_info()->::message::Command_info::MergeFrom(from.command_info());
     }
     if (cached_has_bits & 0x00000004u) {
-      command_id_ = from.command_id_;
+      mutable_car_info()->::message::Car_info::MergeFrom(from.car_info());
     }
     if (cached_has_bits & 0x00000008u) {
       terminal_id_ = from.terminal_id_;
@@ -918,6 +934,9 @@ bool Parkspace_allocation_request_msg::IsInitialized() const {
   if (has_base_info()) {
     if (!this->base_info_->IsInitialized()) return false;
   }
+  if (has_command_info()) {
+    if (!this->command_info_->IsInitialized()) return false;
+  }
   return true;
 }
 
@@ -928,8 +947,8 @@ void Parkspace_allocation_request_msg::Swap(Parkspace_allocation_request_msg* ot
 void Parkspace_allocation_request_msg::InternalSwap(Parkspace_allocation_request_msg* other) {
   using std::swap;
   swap(base_info_, other->base_info_);
+  swap(command_info_, other->command_info_);
   swap(car_info_, other->car_info_);
-  swap(command_id_, other->command_id_);
   swap(terminal_id_, other->terminal_id_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
@@ -947,6 +966,8 @@ void Parkspace_allocation_request_msg::InternalSwap(Parkspace_allocation_request
 void Parkspace_allocation_response_msg::InitAsDefaultInstance() {
   ::message::_Parkspace_allocation_response_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
       ::message::Base_info::internal_default_instance());
+  ::message::_Parkspace_allocation_response_msg_default_instance_._instance.get_mutable()->command_info_ = const_cast< ::message::Command_info*>(
+      ::message::Command_info::internal_default_instance());
   ::message::_Parkspace_allocation_response_msg_default_instance_._instance.get_mutable()->error_manager_ = const_cast< ::message::Error_manager*>(
       ::message::Error_manager::internal_default_instance());
   ::message::_Parkspace_allocation_response_msg_default_instance_._instance.get_mutable()->allocated_space_info_ = const_cast< ::message::Parkspace_info*>(
@@ -956,6 +977,10 @@ void Parkspace_allocation_response_msg::clear_base_info() {
   if (base_info_ != NULL) base_info_->Clear();
   clear_has_base_info();
 }
+void Parkspace_allocation_response_msg::clear_command_info() {
+  if (command_info_ != NULL) command_info_->Clear();
+  clear_has_command_info();
+}
 void Parkspace_allocation_response_msg::clear_error_manager() {
   if (error_manager_ != NULL) error_manager_->Clear();
   clear_has_error_manager();
@@ -966,7 +991,7 @@ void Parkspace_allocation_response_msg::clear_allocated_space_info() {
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Parkspace_allocation_response_msg::kBaseInfoFieldNumber;
-const int Parkspace_allocation_response_msg::kCommandIdFieldNumber;
+const int Parkspace_allocation_response_msg::kCommandInfoFieldNumber;
 const int Parkspace_allocation_response_msg::kErrorManagerFieldNumber;
 const int Parkspace_allocation_response_msg::kAllocatedSpaceInfoFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
@@ -990,6 +1015,11 @@ Parkspace_allocation_response_msg::Parkspace_allocation_response_msg(const Parks
   } else {
     base_info_ = NULL;
   }
+  if (from.has_command_info()) {
+    command_info_ = new ::message::Command_info(*from.command_info_);
+  } else {
+    command_info_ = NULL;
+  }
   if (from.has_error_manager()) {
     error_manager_ = new ::message::Error_manager(*from.error_manager_);
   } else {
@@ -1000,15 +1030,14 @@ Parkspace_allocation_response_msg::Parkspace_allocation_response_msg(const Parks
   } else {
     allocated_space_info_ = NULL;
   }
-  command_id_ = from.command_id_;
   // @@protoc_insertion_point(copy_constructor:message.Parkspace_allocation_response_msg)
 }
 
 void Parkspace_allocation_response_msg::SharedCtor() {
   _cached_size_ = 0;
   ::memset(&base_info_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&command_id_) -
-      reinterpret_cast<char*>(&base_info_)) + sizeof(command_id_));
+      reinterpret_cast<char*>(&allocated_space_info_) -
+      reinterpret_cast<char*>(&base_info_)) + sizeof(allocated_space_info_));
 }
 
 Parkspace_allocation_response_msg::~Parkspace_allocation_response_msg() {
@@ -1018,6 +1047,7 @@ Parkspace_allocation_response_msg::~Parkspace_allocation_response_msg() {
 
 void Parkspace_allocation_response_msg::SharedDtor() {
   if (this != internal_default_instance()) delete base_info_;
+  if (this != internal_default_instance()) delete command_info_;
   if (this != internal_default_instance()) delete error_manager_;
   if (this != internal_default_instance()) delete allocated_space_info_;
 }
@@ -1052,21 +1082,24 @@ void Parkspace_allocation_response_msg::Clear() {
   (void) cached_has_bits;
 
   cached_has_bits = _has_bits_[0];
-  if (cached_has_bits & 7u) {
+  if (cached_has_bits & 15u) {
     if (cached_has_bits & 0x00000001u) {
       GOOGLE_DCHECK(base_info_ != NULL);
       base_info_->Clear();
     }
     if (cached_has_bits & 0x00000002u) {
+      GOOGLE_DCHECK(command_info_ != NULL);
+      command_info_->Clear();
+    }
+    if (cached_has_bits & 0x00000004u) {
       GOOGLE_DCHECK(error_manager_ != NULL);
       error_manager_->Clear();
     }
-    if (cached_has_bits & 0x00000004u) {
+    if (cached_has_bits & 0x00000008u) {
       GOOGLE_DCHECK(allocated_space_info_ != NULL);
       allocated_space_info_->Clear();
     }
   }
-  command_id_ = 0;
   _has_bits_.Clear();
   _internal_metadata_.Clear();
 }
@@ -1093,14 +1126,12 @@ bool Parkspace_allocation_response_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required int32 command_id = 2;
+      // required .message.Command_info command_info = 2;
       case 2: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
-          set_has_command_id();
-          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
-                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
-                 input, &command_id_)));
+            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_command_info()));
         } else {
           goto handle_unusual;
         }
@@ -1164,19 +1195,20 @@ void Parkspace_allocation_response_msg::SerializeWithCachedSizes(
       1, *this->base_info_, output);
   }
 
-  // required int32 command_id = 2;
-  if (cached_has_bits & 0x00000008u) {
-    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->command_id(), output);
+  // required .message.Command_info command_info = 2;
+  if (cached_has_bits & 0x00000002u) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      2, *this->command_info_, output);
   }
 
   // required .message.Error_manager error_manager = 3;
-  if (cached_has_bits & 0x00000002u) {
+  if (cached_has_bits & 0x00000004u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
       3, *this->error_manager_, output);
   }
 
   // required .message.Parkspace_info allocated_space_info = 4;
-  if (cached_has_bits & 0x00000004u) {
+  if (cached_has_bits & 0x00000008u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
       4, *this->allocated_space_info_, output);
   }
@@ -1203,20 +1235,22 @@ void Parkspace_allocation_response_msg::SerializeWithCachedSizes(
         1, *this->base_info_, deterministic, target);
   }
 
-  // required int32 command_id = 2;
-  if (cached_has_bits & 0x00000008u) {
-    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->command_id(), target);
+  // required .message.Command_info command_info = 2;
+  if (cached_has_bits & 0x00000002u) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        2, *this->command_info_, deterministic, target);
   }
 
   // required .message.Error_manager error_manager = 3;
-  if (cached_has_bits & 0x00000002u) {
+  if (cached_has_bits & 0x00000004u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
         3, *this->error_manager_, deterministic, target);
   }
 
   // required .message.Parkspace_info allocated_space_info = 4;
-  if (cached_has_bits & 0x00000004u) {
+  if (cached_has_bits & 0x00000008u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
         4, *this->allocated_space_info_, deterministic, target);
@@ -1241,6 +1275,13 @@ size_t Parkspace_allocation_response_msg::RequiredFieldsByteSizeFallback() const
         *this->base_info_);
   }
 
+  if (has_command_info()) {
+    // required .message.Command_info command_info = 2;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->command_info_);
+  }
+
   if (has_error_manager()) {
     // required .message.Error_manager error_manager = 3;
     total_size += 1 +
@@ -1255,13 +1296,6 @@ size_t Parkspace_allocation_response_msg::RequiredFieldsByteSizeFallback() const
         *this->allocated_space_info_);
   }
 
-  if (has_command_id()) {
-    // required int32 command_id = 2;
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::Int32Size(
-        this->command_id());
-  }
-
   return total_size;
 }
 size_t Parkspace_allocation_response_msg::ByteSizeLong() const {
@@ -1279,6 +1313,11 @@ size_t Parkspace_allocation_response_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormatLite::MessageSize(
         *this->base_info_);
 
+    // required .message.Command_info command_info = 2;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->command_info_);
+
     // required .message.Error_manager error_manager = 3;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
@@ -1289,11 +1328,6 @@ size_t Parkspace_allocation_response_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormatLite::MessageSize(
         *this->allocated_space_info_);
 
-    // required int32 command_id = 2;
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::Int32Size(
-        this->command_id());
-
   } else {
     total_size += RequiredFieldsByteSizeFallback();
   }
@@ -1332,15 +1366,14 @@ void Parkspace_allocation_response_msg::MergeFrom(const Parkspace_allocation_res
       mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
     }
     if (cached_has_bits & 0x00000002u) {
-      mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
+      mutable_command_info()->::message::Command_info::MergeFrom(from.command_info());
     }
     if (cached_has_bits & 0x00000004u) {
-      mutable_allocated_space_info()->::message::Parkspace_info::MergeFrom(from.allocated_space_info());
+      mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
     }
     if (cached_has_bits & 0x00000008u) {
-      command_id_ = from.command_id_;
+      mutable_allocated_space_info()->::message::Parkspace_info::MergeFrom(from.allocated_space_info());
     }
-    _has_bits_[0] |= cached_has_bits;
   }
 }
 
@@ -1363,6 +1396,9 @@ bool Parkspace_allocation_response_msg::IsInitialized() const {
   if (has_base_info()) {
     if (!this->base_info_->IsInitialized()) return false;
   }
+  if (has_command_info()) {
+    if (!this->command_info_->IsInitialized()) return false;
+  }
   if (has_error_manager()) {
     if (!this->error_manager_->IsInitialized()) return false;
   }
@@ -1376,9 +1412,9 @@ void Parkspace_allocation_response_msg::Swap(Parkspace_allocation_response_msg*
 void Parkspace_allocation_response_msg::InternalSwap(Parkspace_allocation_response_msg* other) {
   using std::swap;
   swap(base_info_, other->base_info_);
+  swap(command_info_, other->command_info_);
   swap(error_manager_, other->error_manager_);
   swap(allocated_space_info_, other->allocated_space_info_);
-  swap(command_id_, other->command_id_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
   swap(_cached_size_, other->_cached_size_);
@@ -1395,6 +1431,8 @@ void Parkspace_allocation_response_msg::InternalSwap(Parkspace_allocation_respon
 void Parkspace_search_request_msg::InitAsDefaultInstance() {
   ::message::_Parkspace_search_request_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
       ::message::Base_info::internal_default_instance());
+  ::message::_Parkspace_search_request_msg_default_instance_._instance.get_mutable()->command_info_ = const_cast< ::message::Command_info*>(
+      ::message::Command_info::internal_default_instance());
   ::message::_Parkspace_search_request_msg_default_instance_._instance.get_mutable()->car_info_ = const_cast< ::message::Car_info*>(
       ::message::Car_info::internal_default_instance());
 }
@@ -1402,13 +1440,17 @@ void Parkspace_search_request_msg::clear_base_info() {
   if (base_info_ != NULL) base_info_->Clear();
   clear_has_base_info();
 }
+void Parkspace_search_request_msg::clear_command_info() {
+  if (command_info_ != NULL) command_info_->Clear();
+  clear_has_command_info();
+}
 void Parkspace_search_request_msg::clear_car_info() {
   if (car_info_ != NULL) car_info_->Clear();
   clear_has_car_info();
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Parkspace_search_request_msg::kBaseInfoFieldNumber;
-const int Parkspace_search_request_msg::kCommandIdFieldNumber;
+const int Parkspace_search_request_msg::kCommandInfoFieldNumber;
 const int Parkspace_search_request_msg::kCarInfoFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
@@ -1431,20 +1473,24 @@ Parkspace_search_request_msg::Parkspace_search_request_msg(const Parkspace_searc
   } else {
     base_info_ = NULL;
   }
+  if (from.has_command_info()) {
+    command_info_ = new ::message::Command_info(*from.command_info_);
+  } else {
+    command_info_ = NULL;
+  }
   if (from.has_car_info()) {
     car_info_ = new ::message::Car_info(*from.car_info_);
   } else {
     car_info_ = NULL;
   }
-  command_id_ = from.command_id_;
   // @@protoc_insertion_point(copy_constructor:message.Parkspace_search_request_msg)
 }
 
 void Parkspace_search_request_msg::SharedCtor() {
   _cached_size_ = 0;
   ::memset(&base_info_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&command_id_) -
-      reinterpret_cast<char*>(&base_info_)) + sizeof(command_id_));
+      reinterpret_cast<char*>(&car_info_) -
+      reinterpret_cast<char*>(&base_info_)) + sizeof(car_info_));
 }
 
 Parkspace_search_request_msg::~Parkspace_search_request_msg() {
@@ -1454,6 +1500,7 @@ Parkspace_search_request_msg::~Parkspace_search_request_msg() {
 
 void Parkspace_search_request_msg::SharedDtor() {
   if (this != internal_default_instance()) delete base_info_;
+  if (this != internal_default_instance()) delete command_info_;
   if (this != internal_default_instance()) delete car_info_;
 }
 
@@ -1487,17 +1534,20 @@ void Parkspace_search_request_msg::Clear() {
   (void) cached_has_bits;
 
   cached_has_bits = _has_bits_[0];
-  if (cached_has_bits & 3u) {
+  if (cached_has_bits & 7u) {
     if (cached_has_bits & 0x00000001u) {
       GOOGLE_DCHECK(base_info_ != NULL);
       base_info_->Clear();
     }
     if (cached_has_bits & 0x00000002u) {
+      GOOGLE_DCHECK(command_info_ != NULL);
+      command_info_->Clear();
+    }
+    if (cached_has_bits & 0x00000004u) {
       GOOGLE_DCHECK(car_info_ != NULL);
       car_info_->Clear();
     }
   }
-  command_id_ = 0;
   _has_bits_.Clear();
   _internal_metadata_.Clear();
 }
@@ -1524,14 +1574,12 @@ bool Parkspace_search_request_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required int32 command_id = 2;
+      // required .message.Command_info command_info = 2;
       case 2: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
-          set_has_command_id();
-          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
-                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
-                 input, &command_id_)));
+            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_command_info()));
         } else {
           goto handle_unusual;
         }
@@ -1583,13 +1631,14 @@ void Parkspace_search_request_msg::SerializeWithCachedSizes(
       1, *this->base_info_, output);
   }
 
-  // required int32 command_id = 2;
-  if (cached_has_bits & 0x00000004u) {
-    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->command_id(), output);
+  // required .message.Command_info command_info = 2;
+  if (cached_has_bits & 0x00000002u) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      2, *this->command_info_, output);
   }
 
   // required .message.Car_info car_info = 3;
-  if (cached_has_bits & 0x00000002u) {
+  if (cached_has_bits & 0x00000004u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
       3, *this->car_info_, output);
   }
@@ -1616,13 +1665,15 @@ void Parkspace_search_request_msg::SerializeWithCachedSizes(
         1, *this->base_info_, deterministic, target);
   }
 
-  // required int32 command_id = 2;
-  if (cached_has_bits & 0x00000004u) {
-    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->command_id(), target);
+  // required .message.Command_info command_info = 2;
+  if (cached_has_bits & 0x00000002u) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        2, *this->command_info_, deterministic, target);
   }
 
   // required .message.Car_info car_info = 3;
-  if (cached_has_bits & 0x00000002u) {
+  if (cached_has_bits & 0x00000004u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
         3, *this->car_info_, deterministic, target);
@@ -1647,18 +1698,18 @@ size_t Parkspace_search_request_msg::RequiredFieldsByteSizeFallback() const {
         *this->base_info_);
   }
 
-  if (has_car_info()) {
-    // required .message.Car_info car_info = 3;
+  if (has_command_info()) {
+    // required .message.Command_info command_info = 2;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->car_info_);
+        *this->command_info_);
   }
 
-  if (has_command_id()) {
-    // required int32 command_id = 2;
+  if (has_car_info()) {
+    // required .message.Car_info car_info = 3;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::Int32Size(
-        this->command_id());
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->car_info_);
   }
 
   return total_size;
@@ -1678,15 +1729,15 @@ size_t Parkspace_search_request_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormatLite::MessageSize(
         *this->base_info_);
 
-    // required .message.Car_info car_info = 3;
+    // required .message.Command_info command_info = 2;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->car_info_);
+        *this->command_info_);
 
-    // required int32 command_id = 2;
+    // required .message.Car_info car_info = 3;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::Int32Size(
-        this->command_id());
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->car_info_);
 
   } else {
     total_size += RequiredFieldsByteSizeFallback();
@@ -1726,12 +1777,11 @@ void Parkspace_search_request_msg::MergeFrom(const Parkspace_search_request_msg&
       mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
     }
     if (cached_has_bits & 0x00000002u) {
-      mutable_car_info()->::message::Car_info::MergeFrom(from.car_info());
+      mutable_command_info()->::message::Command_info::MergeFrom(from.command_info());
     }
     if (cached_has_bits & 0x00000004u) {
-      command_id_ = from.command_id_;
+      mutable_car_info()->::message::Car_info::MergeFrom(from.car_info());
     }
-    _has_bits_[0] |= cached_has_bits;
   }
 }
 
@@ -1754,6 +1804,9 @@ bool Parkspace_search_request_msg::IsInitialized() const {
   if (has_base_info()) {
     if (!this->base_info_->IsInitialized()) return false;
   }
+  if (has_command_info()) {
+    if (!this->command_info_->IsInitialized()) return false;
+  }
   return true;
 }
 
@@ -1764,8 +1817,8 @@ void Parkspace_search_request_msg::Swap(Parkspace_search_request_msg* other) {
 void Parkspace_search_request_msg::InternalSwap(Parkspace_search_request_msg* other) {
   using std::swap;
   swap(base_info_, other->base_info_);
+  swap(command_info_, other->command_info_);
   swap(car_info_, other->car_info_);
-  swap(command_id_, other->command_id_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
   swap(_cached_size_, other->_cached_size_);

+ 177 - 93
message/parkspace_allocation_message.pb.h

@@ -204,6 +204,15 @@ class Parkspace_allocation_request_msg : public ::google::protobuf::Message /* @
   ::message::Base_info* mutable_base_info();
   void set_allocated_base_info(::message::Base_info* base_info);
 
+  // required .message.Command_info command_info = 2;
+  bool has_command_info() const;
+  void clear_command_info();
+  static const int kCommandInfoFieldNumber = 2;
+  const ::message::Command_info& command_info() const;
+  ::message::Command_info* release_command_info();
+  ::message::Command_info* mutable_command_info();
+  void set_allocated_command_info(::message::Command_info* command_info);
+
   // required .message.Car_info car_info = 3;
   bool has_car_info() const;
   void clear_car_info();
@@ -213,13 +222,6 @@ class Parkspace_allocation_request_msg : public ::google::protobuf::Message /* @
   ::message::Car_info* mutable_car_info();
   void set_allocated_car_info(::message::Car_info* car_info);
 
-  // required int32 command_id = 2;
-  bool has_command_id() const;
-  void clear_command_id();
-  static const int kCommandIdFieldNumber = 2;
-  ::google::protobuf::int32 command_id() const;
-  void set_command_id(::google::protobuf::int32 value);
-
   // required int32 terminal_id = 4;
   bool has_terminal_id() const;
   void clear_terminal_id();
@@ -231,8 +233,8 @@ class Parkspace_allocation_request_msg : public ::google::protobuf::Message /* @
  private:
   void set_has_base_info();
   void clear_has_base_info();
-  void set_has_command_id();
-  void clear_has_command_id();
+  void set_has_command_info();
+  void clear_has_command_info();
   void set_has_car_info();
   void clear_has_car_info();
   void set_has_terminal_id();
@@ -245,8 +247,8 @@ class Parkspace_allocation_request_msg : public ::google::protobuf::Message /* @
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
   ::message::Base_info* base_info_;
+  ::message::Command_info* command_info_;
   ::message::Car_info* car_info_;
-  ::google::protobuf::int32 command_id_;
   ::google::protobuf::int32 terminal_id_;
   friend struct ::protobuf_parkspace_5fallocation_5fmessage_2eproto::TableStruct;
   friend void ::protobuf_parkspace_5fallocation_5fmessage_2eproto::InitDefaultsParkspace_allocation_request_msgImpl();
@@ -351,6 +353,15 @@ class Parkspace_allocation_response_msg : public ::google::protobuf::Message /*
   ::message::Base_info* mutable_base_info();
   void set_allocated_base_info(::message::Base_info* base_info);
 
+  // required .message.Command_info command_info = 2;
+  bool has_command_info() const;
+  void clear_command_info();
+  static const int kCommandInfoFieldNumber = 2;
+  const ::message::Command_info& command_info() const;
+  ::message::Command_info* release_command_info();
+  ::message::Command_info* mutable_command_info();
+  void set_allocated_command_info(::message::Command_info* command_info);
+
   // required .message.Error_manager error_manager = 3;
   bool has_error_manager() const;
   void clear_error_manager();
@@ -369,19 +380,12 @@ class Parkspace_allocation_response_msg : public ::google::protobuf::Message /*
   ::message::Parkspace_info* mutable_allocated_space_info();
   void set_allocated_allocated_space_info(::message::Parkspace_info* allocated_space_info);
 
-  // required int32 command_id = 2;
-  bool has_command_id() const;
-  void clear_command_id();
-  static const int kCommandIdFieldNumber = 2;
-  ::google::protobuf::int32 command_id() const;
-  void set_command_id(::google::protobuf::int32 value);
-
   // @@protoc_insertion_point(class_scope:message.Parkspace_allocation_response_msg)
  private:
   void set_has_base_info();
   void clear_has_base_info();
-  void set_has_command_id();
-  void clear_has_command_id();
+  void set_has_command_info();
+  void clear_has_command_info();
   void set_has_error_manager();
   void clear_has_error_manager();
   void set_has_allocated_space_info();
@@ -394,9 +398,9 @@ class Parkspace_allocation_response_msg : public ::google::protobuf::Message /*
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
   ::message::Base_info* base_info_;
+  ::message::Command_info* command_info_;
   ::message::Error_manager* error_manager_;
   ::message::Parkspace_info* allocated_space_info_;
-  ::google::protobuf::int32 command_id_;
   friend struct ::protobuf_parkspace_5fallocation_5fmessage_2eproto::TableStruct;
   friend void ::protobuf_parkspace_5fallocation_5fmessage_2eproto::InitDefaultsParkspace_allocation_response_msgImpl();
 };
@@ -500,6 +504,15 @@ class Parkspace_search_request_msg : public ::google::protobuf::Message /* @@pro
   ::message::Base_info* mutable_base_info();
   void set_allocated_base_info(::message::Base_info* base_info);
 
+  // required .message.Command_info command_info = 2;
+  bool has_command_info() const;
+  void clear_command_info();
+  static const int kCommandInfoFieldNumber = 2;
+  const ::message::Command_info& command_info() const;
+  ::message::Command_info* release_command_info();
+  ::message::Command_info* mutable_command_info();
+  void set_allocated_command_info(::message::Command_info* command_info);
+
   // required .message.Car_info car_info = 3;
   bool has_car_info() const;
   void clear_car_info();
@@ -509,19 +522,12 @@ class Parkspace_search_request_msg : public ::google::protobuf::Message /* @@pro
   ::message::Car_info* mutable_car_info();
   void set_allocated_car_info(::message::Car_info* car_info);
 
-  // required int32 command_id = 2;
-  bool has_command_id() const;
-  void clear_command_id();
-  static const int kCommandIdFieldNumber = 2;
-  ::google::protobuf::int32 command_id() const;
-  void set_command_id(::google::protobuf::int32 value);
-
   // @@protoc_insertion_point(class_scope:message.Parkspace_search_request_msg)
  private:
   void set_has_base_info();
   void clear_has_base_info();
-  void set_has_command_id();
-  void clear_has_command_id();
+  void set_has_command_info();
+  void clear_has_command_info();
   void set_has_car_info();
   void clear_has_car_info();
 
@@ -532,8 +538,8 @@ class Parkspace_search_request_msg : public ::google::protobuf::Message /* @@pro
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
   ::message::Base_info* base_info_;
+  ::message::Command_info* command_info_;
   ::message::Car_info* car_info_;
-  ::google::protobuf::int32 command_id_;
   friend struct ::protobuf_parkspace_5fallocation_5fmessage_2eproto::TableStruct;
   friend void ::protobuf_parkspace_5fallocation_5fmessage_2eproto::InitDefaultsParkspace_search_request_msgImpl();
 };
@@ -1469,39 +1475,65 @@ inline void Parkspace_allocation_request_msg::set_allocated_base_info(::message:
   // @@protoc_insertion_point(field_set_allocated:message.Parkspace_allocation_request_msg.base_info)
 }
 
-// required int32 command_id = 2;
-inline bool Parkspace_allocation_request_msg::has_command_id() const {
-  return (_has_bits_[0] & 0x00000004u) != 0;
+// required .message.Command_info command_info = 2;
+inline bool Parkspace_allocation_request_msg::has_command_info() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
 }
-inline void Parkspace_allocation_request_msg::set_has_command_id() {
-  _has_bits_[0] |= 0x00000004u;
+inline void Parkspace_allocation_request_msg::set_has_command_info() {
+  _has_bits_[0] |= 0x00000002u;
 }
-inline void Parkspace_allocation_request_msg::clear_has_command_id() {
-  _has_bits_[0] &= ~0x00000004u;
+inline void Parkspace_allocation_request_msg::clear_has_command_info() {
+  _has_bits_[0] &= ~0x00000002u;
 }
-inline void Parkspace_allocation_request_msg::clear_command_id() {
-  command_id_ = 0;
-  clear_has_command_id();
+inline const ::message::Command_info& Parkspace_allocation_request_msg::command_info() const {
+  const ::message::Command_info* p = command_info_;
+  // @@protoc_insertion_point(field_get:message.Parkspace_allocation_request_msg.command_info)
+  return p != NULL ? *p : *reinterpret_cast<const ::message::Command_info*>(
+      &::message::_Command_info_default_instance_);
 }
-inline ::google::protobuf::int32 Parkspace_allocation_request_msg::command_id() const {
-  // @@protoc_insertion_point(field_get:message.Parkspace_allocation_request_msg.command_id)
-  return command_id_;
+inline ::message::Command_info* Parkspace_allocation_request_msg::release_command_info() {
+  // @@protoc_insertion_point(field_release:message.Parkspace_allocation_request_msg.command_info)
+  clear_has_command_info();
+  ::message::Command_info* temp = command_info_;
+  command_info_ = NULL;
+  return temp;
 }
-inline void Parkspace_allocation_request_msg::set_command_id(::google::protobuf::int32 value) {
-  set_has_command_id();
-  command_id_ = value;
-  // @@protoc_insertion_point(field_set:message.Parkspace_allocation_request_msg.command_id)
+inline ::message::Command_info* Parkspace_allocation_request_msg::mutable_command_info() {
+  set_has_command_info();
+  if (command_info_ == NULL) {
+    command_info_ = new ::message::Command_info;
+  }
+  // @@protoc_insertion_point(field_mutable:message.Parkspace_allocation_request_msg.command_info)
+  return command_info_;
+}
+inline void Parkspace_allocation_request_msg::set_allocated_command_info(::message::Command_info* command_info) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete reinterpret_cast< ::google::protobuf::MessageLite*>(command_info_);
+  }
+  if (command_info) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      command_info = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, command_info, submessage_arena);
+    }
+    set_has_command_info();
+  } else {
+    clear_has_command_info();
+  }
+  command_info_ = command_info;
+  // @@protoc_insertion_point(field_set_allocated:message.Parkspace_allocation_request_msg.command_info)
 }
 
 // required .message.Car_info car_info = 3;
 inline bool Parkspace_allocation_request_msg::has_car_info() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
+  return (_has_bits_[0] & 0x00000004u) != 0;
 }
 inline void Parkspace_allocation_request_msg::set_has_car_info() {
-  _has_bits_[0] |= 0x00000002u;
+  _has_bits_[0] |= 0x00000004u;
 }
 inline void Parkspace_allocation_request_msg::clear_has_car_info() {
-  _has_bits_[0] &= ~0x00000002u;
+  _has_bits_[0] &= ~0x00000004u;
 }
 inline const ::message::Car_info& Parkspace_allocation_request_msg::car_info() const {
   const ::message::Car_info* p = car_info_;
@@ -1621,39 +1653,65 @@ inline void Parkspace_allocation_response_msg::set_allocated_base_info(::message
   // @@protoc_insertion_point(field_set_allocated:message.Parkspace_allocation_response_msg.base_info)
 }
 
-// required int32 command_id = 2;
-inline bool Parkspace_allocation_response_msg::has_command_id() const {
-  return (_has_bits_[0] & 0x00000008u) != 0;
+// required .message.Command_info command_info = 2;
+inline bool Parkspace_allocation_response_msg::has_command_info() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
 }
-inline void Parkspace_allocation_response_msg::set_has_command_id() {
-  _has_bits_[0] |= 0x00000008u;
+inline void Parkspace_allocation_response_msg::set_has_command_info() {
+  _has_bits_[0] |= 0x00000002u;
 }
-inline void Parkspace_allocation_response_msg::clear_has_command_id() {
-  _has_bits_[0] &= ~0x00000008u;
+inline void Parkspace_allocation_response_msg::clear_has_command_info() {
+  _has_bits_[0] &= ~0x00000002u;
 }
-inline void Parkspace_allocation_response_msg::clear_command_id() {
-  command_id_ = 0;
-  clear_has_command_id();
+inline const ::message::Command_info& Parkspace_allocation_response_msg::command_info() const {
+  const ::message::Command_info* p = command_info_;
+  // @@protoc_insertion_point(field_get:message.Parkspace_allocation_response_msg.command_info)
+  return p != NULL ? *p : *reinterpret_cast<const ::message::Command_info*>(
+      &::message::_Command_info_default_instance_);
 }
-inline ::google::protobuf::int32 Parkspace_allocation_response_msg::command_id() const {
-  // @@protoc_insertion_point(field_get:message.Parkspace_allocation_response_msg.command_id)
-  return command_id_;
+inline ::message::Command_info* Parkspace_allocation_response_msg::release_command_info() {
+  // @@protoc_insertion_point(field_release:message.Parkspace_allocation_response_msg.command_info)
+  clear_has_command_info();
+  ::message::Command_info* temp = command_info_;
+  command_info_ = NULL;
+  return temp;
 }
-inline void Parkspace_allocation_response_msg::set_command_id(::google::protobuf::int32 value) {
-  set_has_command_id();
-  command_id_ = value;
-  // @@protoc_insertion_point(field_set:message.Parkspace_allocation_response_msg.command_id)
+inline ::message::Command_info* Parkspace_allocation_response_msg::mutable_command_info() {
+  set_has_command_info();
+  if (command_info_ == NULL) {
+    command_info_ = new ::message::Command_info;
+  }
+  // @@protoc_insertion_point(field_mutable:message.Parkspace_allocation_response_msg.command_info)
+  return command_info_;
+}
+inline void Parkspace_allocation_response_msg::set_allocated_command_info(::message::Command_info* command_info) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete reinterpret_cast< ::google::protobuf::MessageLite*>(command_info_);
+  }
+  if (command_info) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      command_info = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, command_info, submessage_arena);
+    }
+    set_has_command_info();
+  } else {
+    clear_has_command_info();
+  }
+  command_info_ = command_info;
+  // @@protoc_insertion_point(field_set_allocated:message.Parkspace_allocation_response_msg.command_info)
 }
 
 // required .message.Error_manager error_manager = 3;
 inline bool Parkspace_allocation_response_msg::has_error_manager() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
+  return (_has_bits_[0] & 0x00000004u) != 0;
 }
 inline void Parkspace_allocation_response_msg::set_has_error_manager() {
-  _has_bits_[0] |= 0x00000002u;
+  _has_bits_[0] |= 0x00000004u;
 }
 inline void Parkspace_allocation_response_msg::clear_has_error_manager() {
-  _has_bits_[0] &= ~0x00000002u;
+  _has_bits_[0] &= ~0x00000004u;
 }
 inline const ::message::Error_manager& Parkspace_allocation_response_msg::error_manager() const {
   const ::message::Error_manager* p = error_manager_;
@@ -1697,13 +1755,13 @@ inline void Parkspace_allocation_response_msg::set_allocated_error_manager(::mes
 
 // required .message.Parkspace_info allocated_space_info = 4;
 inline bool Parkspace_allocation_response_msg::has_allocated_space_info() const {
-  return (_has_bits_[0] & 0x00000004u) != 0;
+  return (_has_bits_[0] & 0x00000008u) != 0;
 }
 inline void Parkspace_allocation_response_msg::set_has_allocated_space_info() {
-  _has_bits_[0] |= 0x00000004u;
+  _has_bits_[0] |= 0x00000008u;
 }
 inline void Parkspace_allocation_response_msg::clear_has_allocated_space_info() {
-  _has_bits_[0] &= ~0x00000004u;
+  _has_bits_[0] &= ~0x00000008u;
 }
 inline const ::message::Parkspace_info& Parkspace_allocation_response_msg::allocated_space_info() const {
   const ::message::Parkspace_info* p = allocated_space_info_;
@@ -1799,39 +1857,65 @@ inline void Parkspace_search_request_msg::set_allocated_base_info(::message::Bas
   // @@protoc_insertion_point(field_set_allocated:message.Parkspace_search_request_msg.base_info)
 }
 
-// required int32 command_id = 2;
-inline bool Parkspace_search_request_msg::has_command_id() const {
-  return (_has_bits_[0] & 0x00000004u) != 0;
+// required .message.Command_info command_info = 2;
+inline bool Parkspace_search_request_msg::has_command_info() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
 }
-inline void Parkspace_search_request_msg::set_has_command_id() {
-  _has_bits_[0] |= 0x00000004u;
+inline void Parkspace_search_request_msg::set_has_command_info() {
+  _has_bits_[0] |= 0x00000002u;
 }
-inline void Parkspace_search_request_msg::clear_has_command_id() {
-  _has_bits_[0] &= ~0x00000004u;
+inline void Parkspace_search_request_msg::clear_has_command_info() {
+  _has_bits_[0] &= ~0x00000002u;
 }
-inline void Parkspace_search_request_msg::clear_command_id() {
-  command_id_ = 0;
-  clear_has_command_id();
+inline const ::message::Command_info& Parkspace_search_request_msg::command_info() const {
+  const ::message::Command_info* p = command_info_;
+  // @@protoc_insertion_point(field_get:message.Parkspace_search_request_msg.command_info)
+  return p != NULL ? *p : *reinterpret_cast<const ::message::Command_info*>(
+      &::message::_Command_info_default_instance_);
 }
-inline ::google::protobuf::int32 Parkspace_search_request_msg::command_id() const {
-  // @@protoc_insertion_point(field_get:message.Parkspace_search_request_msg.command_id)
-  return command_id_;
+inline ::message::Command_info* Parkspace_search_request_msg::release_command_info() {
+  // @@protoc_insertion_point(field_release:message.Parkspace_search_request_msg.command_info)
+  clear_has_command_info();
+  ::message::Command_info* temp = command_info_;
+  command_info_ = NULL;
+  return temp;
+}
+inline ::message::Command_info* Parkspace_search_request_msg::mutable_command_info() {
+  set_has_command_info();
+  if (command_info_ == NULL) {
+    command_info_ = new ::message::Command_info;
+  }
+  // @@protoc_insertion_point(field_mutable:message.Parkspace_search_request_msg.command_info)
+  return command_info_;
 }
-inline void Parkspace_search_request_msg::set_command_id(::google::protobuf::int32 value) {
-  set_has_command_id();
-  command_id_ = value;
-  // @@protoc_insertion_point(field_set:message.Parkspace_search_request_msg.command_id)
+inline void Parkspace_search_request_msg::set_allocated_command_info(::message::Command_info* command_info) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete reinterpret_cast< ::google::protobuf::MessageLite*>(command_info_);
+  }
+  if (command_info) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      command_info = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, command_info, submessage_arena);
+    }
+    set_has_command_info();
+  } else {
+    clear_has_command_info();
+  }
+  command_info_ = command_info;
+  // @@protoc_insertion_point(field_set_allocated:message.Parkspace_search_request_msg.command_info)
 }
 
 // required .message.Car_info car_info = 3;
 inline bool Parkspace_search_request_msg::has_car_info() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
+  return (_has_bits_[0] & 0x00000004u) != 0;
 }
 inline void Parkspace_search_request_msg::set_has_car_info() {
-  _has_bits_[0] |= 0x00000002u;
+  _has_bits_[0] |= 0x00000004u;
 }
 inline void Parkspace_search_request_msg::clear_has_car_info() {
-  _has_bits_[0] &= ~0x00000002u;
+  _has_bits_[0] &= ~0x00000004u;
 }
 inline const ::message::Car_info& Parkspace_search_request_msg::car_info() const {
   const ::message::Car_info* p = car_info_;

+ 3 - 3
message/parkspace_allocation_message.proto

@@ -6,7 +6,7 @@ import "message_base.proto";
 message Parkspace_allocation_request_msg
 {
     required Base_info                  base_info=1;            //消息类型
-    required int32                      command_id=2;           //指令唯一标识符id
+    required Command_info               command_info=2;           //指令唯一标识符id
     required Car_info                   car_info=3;
     required int32                      terminal_id=4;          //终端id,优化车位分配用
 }
@@ -15,7 +15,7 @@ message Parkspace_allocation_request_msg
 message Parkspace_allocation_response_msg
 {
     required Base_info                  base_info=1;            //消息类型
-    required int32                      command_id=2;           //指令唯一标识符id
+    required Command_info               command_info=2;           //指令唯一标识符id
     required Error_manager              error_manager=3;        //分配成功与否标志
     required Parkspace_info             allocated_space_info=4; //分配车位信息
 }
@@ -24,7 +24,7 @@ message Parkspace_allocation_response_msg
 message Parkspace_search_request_msg
 {
     required Base_info                  base_info=1;            //消息类型
-    required int32                      command_id=2;           //指令唯一标识符id
+    required Command_info               command_info=2;           //指令唯一标识符id
     required Car_info                   car_info=3;              //车辆凭证或号牌
 }
 

+ 16 - 13
parkspace/Parkspace_communicator.cpp

@@ -46,7 +46,7 @@ Error_manager Parkspace_communicator::alloc_request(message::Parkspace_allocatio
         if(m_alloc_table.find(request,response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_id())
+            if (response.has_base_info() && response.has_command_info())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -57,7 +57,7 @@ Error_manager Parkspace_communicator::alloc_request(message::Parkspace_allocatio
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eParkspace ||
                     response_base.receiver() != message::eMain ||
-                    response.command_id() != request.command_id()) {
+                    response.command_info() != request.command_info()) {
                     return Error_manager(PARKSPACE_ALLOC_RESPONSE_INFO_ERROR, MINOR_ERROR,
                                          "parkspace alloc response msg info error");
                 }
@@ -127,7 +127,7 @@ Error_manager Parkspace_communicator::search_request(message::Parkspace_search_r
         if(m_search_table.find(request,response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_id())
+            if (response.has_base_info() && response.has_command_info())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -138,7 +138,7 @@ Error_manager Parkspace_communicator::search_request(message::Parkspace_search_r
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eParkspace ||
                     response_base.receiver() != message::eMain ||
-                    response.command_id() != request.command_id()) {
+                    response.command_info() != request.command_info()) {
                     return Error_manager(PARKSPACE_SEARCH_RESPONSE_INFO_ERROR, MAJOR_ERROR,
                                          "parkspace search response msg info error");
                 }
@@ -211,7 +211,7 @@ Error_manager Parkspace_communicator::release_request(message::Parkspace_release
         if(m_release_table.find(request,response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_id())
+            if (response.has_base_info() && response.has_command_info())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -222,7 +222,7 @@ Error_manager Parkspace_communicator::release_request(message::Parkspace_release
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eParkspace ||
                     response_base.receiver() != message::eMain ||
-                    response.command_id() != request.command_id()) {
+                    response.command_info() != request.command_info()) {
                     return Error_manager(PARKSPACE_RELEASE_RESPONSE_INFO_ERROR, MAJOR_ERROR,
                                          "parkspace release response msg info error");
                 }
@@ -262,8 +262,11 @@ Error_manager Parkspace_communicator::confirm_request(message::Parkspace_confirm
     if(request.base_info().sender()!=message::eMain||request.base_info().receiver()!=message::eParkspace)
         return Error_manager(FAILED,MINOR_ERROR,"parkspace confirm request invalid");
 
+
     if(m_confirm_table.find(request)==true)
+    {
         return Error_manager(FAILED,MAJOR_ERROR," parkspace confirm request repeated");
+    }
     //设置超时,若没有设置,默认1000
     int timeout=request.base_info().has_timeout_ms()?request.base_info().timeout_ms():1000;
     //向测量节点发送测量请求,并记录请求
@@ -285,7 +288,7 @@ Error_manager Parkspace_communicator::confirm_request(message::Parkspace_confirm
         if(m_confirm_table.find(request,response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_id())
+            if (response.has_base_info() && response.has_command_info())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -296,7 +299,7 @@ Error_manager Parkspace_communicator::confirm_request(message::Parkspace_confirm
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eParkspace ||
                     response_base.receiver() != message::eMain ||
-                    response.command_id() != request.command_id()) {
+                    response.command_info() != request.command_info()) {
                     return Error_manager(PARKSPACE_RELEASE_RESPONSE_INFO_ERROR, MAJOR_ERROR,
                                          "parkspace confirm response msg info error");
                 }
@@ -394,6 +397,7 @@ Error_manager Parkspace_communicator::encapsulate_msg(Communication_message* mes
             message::Parkspace_confirm_alloc_request_msg request;
             request.ParseFromString(message->get_message_buf());
             //记录数据
+            LOG(INFO)<<" Add  request :  "<<request.command_info().DebugString();
             m_confirm_table[request]=message::Parkspace_confirm_alloc_response_msg();
             //发送请求
             code= Communication_socket_base::encapsulate_msg(message);
@@ -535,8 +539,7 @@ Parkspace_communicator::create_request_by_response(message::Parkspace_allocation
     baseInfo.set_sender(response.base_info().receiver());
     baseInfo.set_receiver(response.base_info().sender());
     request.mutable_base_info()->CopyFrom(baseInfo);
-    request.set_command_id(response.command_id());
-    request.set_terminal_id(response.command_id());
+    request.mutable_command_info()->CopyFrom(response.command_info());
     return request;
 }
 
@@ -549,7 +552,7 @@ Parkspace_communicator::create_request_by_response(message::Parkspace_search_res
     baseInfo.set_sender(response.base_info().receiver());
     baseInfo.set_receiver(response.base_info().sender());
     request.mutable_base_info()->CopyFrom(baseInfo);
-    request.set_command_id(response.command_id());
+    request.mutable_command_info()->CopyFrom(response.command_info());
 
 
     return request;
@@ -564,7 +567,7 @@ Parkspace_communicator::create_request_by_response(message::Parkspace_release_re
     baseInfo.set_sender(response.base_info().sender());
     baseInfo.set_receiver(response.base_info().receiver());
     request.mutable_base_info()->CopyFrom(baseInfo);
-    request.set_command_id(response.command_id());
+    request.mutable_command_info()->CopyFrom(response.command_info());
     return request;
 }
 
@@ -577,6 +580,6 @@ Parkspace_communicator::create_request_by_response(message::Parkspace_confirm_al
     baseInfo.set_sender(response.base_info().sender());
     baseInfo.set_receiver(response.base_info().receiver());
     request.mutable_base_info()->CopyFrom(baseInfo);
-    request.set_command_id(response.command_id());
+    request.mutable_command_info()->CopyFrom(response.command_info());
     return request;
 }

+ 4 - 1
proto.sh

@@ -3,4 +3,7 @@ protoc -I=./message measure_message.proto --cpp_out=./message
 protoc -I=./message parkspace_allocation_message.proto --cpp_out=./message
 protoc -I=./message terminal_message.proto --cpp_out=./message
 protoc -I=./message process_message.proto --cpp_out=./message
-protoc -I=./message dispatch_message.proto --cpp_out=./message
+protoc -I=./message dispatch_message.proto --cpp_out=./message
+
+
+protoc -I=./system system_setting.proto --cpp_out=./system

+ 40 - 16
system/PickupProcessTask.cpp

@@ -13,7 +13,6 @@ PickupProcessTask::PickupProcessTask(unsigned int terminal_id)
     :m_publish_statu_thread(nullptr)
 {
     m_terminor_id=terminal_id;
-    m_command_id=-1;
 
     message::Base_info base_info;
     base_info.set_msg_type(message::eStoring_process_statu_msg);
@@ -37,15 +36,16 @@ PickupProcessTask::~PickupProcessTask()
         m_publish_statu_thread=nullptr;
     }
 }
-Error_manager PickupProcessTask::init_task(unsigned int command_id, message::Car_info car_info)
+Error_manager PickupProcessTask::init_task(message::Command_info command_info, message::Car_info car_info)
 {
-    m_command_id=command_id;
+    m_command_info=command_info;
     m_car_info=car_info;
 
     message::Base_info base_info;
     base_info.set_msg_type(message::ePicking_process_statu_msg);
     base_info.set_sender(message::eMain);
     base_info.set_receiver(message::eEmpty);
+
     m_picking_process_statu_msg.mutable_base_info()->CopyFrom(base_info);
     reset_process_statu();
 
@@ -83,11 +83,14 @@ void PickupProcessTask::reset_process_statu()
     message::Waitfor_leave_step_statu   waitfor_leave_step;
     waitfor_leave_step.set_step_statu(message::eWaiting);
 
+    std::lock_guard<std::mutex> lock(m_picking_statu_lock);
     m_picking_process_statu_msg.mutable_check_space_step()->CopyFrom(check_step);
     m_picking_process_statu_msg.mutable_dispatch_step()->CopyFrom(pick_step);
     m_picking_process_statu_msg.mutable_release_space_step()->CopyFrom(release_step);
     m_picking_process_statu_msg.mutable_waitfor_leave()->CopyFrom(waitfor_leave_step);
 
+
+
 }
 
 /*
@@ -95,6 +98,7 @@ void PickupProcessTask::reset_process_statu()
      */
 bool PickupProcessTask::is_ready()
 {
+    std::lock_guard<std::mutex> lock(m_picking_statu_lock);
     bool cond_check_space = m_picking_process_statu_msg.check_space_step().step_statu()==message::eWaiting
                             ||m_picking_process_statu_msg.check_space_step().step_statu()==message::eComplete;
     bool cond_dispatch = m_picking_process_statu_msg.dispatch_step().step_statu()==message::eWaiting
@@ -110,7 +114,10 @@ bool PickupProcessTask::is_ready()
 Error_manager PickupProcessTask::search_space()
 {
     //更新状态
-    m_picking_process_statu_msg.mutable_check_space_step()->set_step_statu(message::eWorking);
+    {
+        std::lock_guard<std::mutex> lock(m_picking_statu_lock);
+        m_picking_process_statu_msg.mutable_check_space_step()->set_step_statu(message::eWorking);
+    }
 
     /*
      * 检验汽车信息是否正常
@@ -118,6 +125,7 @@ Error_manager PickupProcessTask::search_space()
     if(m_car_info.has_car_width()==false||m_car_info.has_car_height()== false
         ||m_car_info.has_license()==false)
     {
+        std::lock_guard<std::mutex> lock(m_picking_statu_lock);
         m_picking_process_statu_msg.mutable_check_space_step()->set_step_statu(message::eError);
         m_picking_process_statu_msg.mutable_check_space_step()->set_description("查询车位请求汽车信息错误");
         return Error_manager(INVALID_MESSAGE,CRITICAL_ERROR,"查询车位请求汽车信息错误");
@@ -127,6 +135,7 @@ Error_manager PickupProcessTask::search_space()
      * 检查车位管理模块是否正常
      */
     Error_manager code=Parkspace_communicator::get_instance_pointer()->check_statu();
+    std::lock_guard<std::mutex> lock(m_picking_statu_lock);
     if(code!=SUCCESS)
     {
         m_picking_process_statu_msg.mutable_check_space_step()->set_description(code.get_error_description());
@@ -141,7 +150,7 @@ Error_manager PickupProcessTask::search_space()
     base_info.set_timeout_ms(1000);
 
     message::Parkspace_search_request_msg request;
-    request.set_command_id(m_command_id);
+    request.mutable_command_info()->CopyFrom(m_command_info);
     request.mutable_base_info()->CopyFrom(base_info);
     request.mutable_car_info()->CopyFrom(m_car_info);
 
@@ -169,13 +178,18 @@ void PickupProcessTask::Main()
         case 0:
         {
             //更新状态
-            m_picking_process_statu_msg.mutable_dispatch_step()->set_step_statu(message::eWorking);
-            m_picking_process_statu_msg.mutable_dispatch_step()->mutable_space_info()->CopyFrom(m_parcspace_search_response_msg.car_position());
+            {
+                std::lock_guard<std::mutex> lock(m_picking_statu_lock);
+                m_picking_process_statu_msg.mutable_dispatch_step()->set_step_statu(message::eWorking);
+                m_picking_process_statu_msg.mutable_dispatch_step()->mutable_space_info()->CopyFrom(
+                        m_parcspace_search_response_msg.car_position());
+            }
             //开始工作
             code=pickup_step();
+            std::lock_guard<std::mutex> lock(m_picking_statu_lock);
             if(code!=SUCCESS)
             {
-                LOG(ERROR)<<"取车调度失败,取车终端:"<<m_terminor_id<<"指令id:"<<m_command_id
+                LOG(ERROR)<<"取车调度失败,取车终端:"<<m_terminor_id<<"指令id:"<<m_command_info.place()
                             <<", 车位id:"<<m_parcspace_search_response_msg.car_position().parkspace_id()
                             <<", 车位楼层:"<<m_parcspace_search_response_msg.car_position().floor()
                             <<", 车位序号:"<<m_parcspace_search_response_msg.car_position().index()
@@ -186,7 +200,7 @@ void PickupProcessTask::Main()
                 break;
             }
             m_picking_process_statu_msg.mutable_dispatch_step()->set_step_statu(message::eComplete);
-            LOG(WARNING)<<"取车调度成功,取车终端:"<<m_terminor_id<<"指令id:"<<m_command_id
+            LOG(WARNING)<<"取车调度成功,取车终端:"<<m_terminor_id<<"指令id:"<<m_command_info.place()
                         <<", 车位id:"<<m_parcspace_search_response_msg.car_position().parkspace_id()
                         <<", 车位楼层:"<<m_parcspace_search_response_msg.car_position().floor()
                         <<", 车位序号:"<<m_parcspace_search_response_msg.car_position().index()
@@ -197,9 +211,14 @@ void PickupProcessTask::Main()
         case 1:
         {
             //更新状态
-            m_picking_process_statu_msg.mutable_release_space_step()->set_step_statu(message::eWorking);
-            m_picking_process_statu_msg.mutable_release_space_step()->mutable_space_info()->CopyFrom(m_parcspace_search_response_msg.car_position());
+            {
+                std::lock_guard<std::mutex> lock(m_picking_statu_lock);
+                m_picking_process_statu_msg.mutable_release_space_step()->set_step_statu(message::eWorking);
+                m_picking_process_statu_msg.mutable_release_space_step()->mutable_space_info()->CopyFrom(
+                        m_parcspace_search_response_msg.car_position());
+            }
             code=release_space_step();
+            std::lock_guard<std::mutex> lock(m_picking_statu_lock);
             if(code!=SUCCESS)
             {
                 m_picking_process_statu_msg.mutable_release_space_step()->set_step_statu(message::eError);
@@ -213,10 +232,14 @@ void PickupProcessTask::Main()
         case 2:
         {
             //更新状态
-            m_picking_process_statu_msg.mutable_waitfor_leave()->set_step_statu(message::eWorking);
-            m_picking_process_statu_msg.mutable_waitfor_leave()->mutable_car_info()->CopyFrom(m_car_info);
+            {
+                std::lock_guard<std::mutex> lock(m_picking_statu_lock);
+                m_picking_process_statu_msg.mutable_waitfor_leave()->set_step_statu(message::eWorking);
+                m_picking_process_statu_msg.mutable_waitfor_leave()->mutable_car_info()->CopyFrom(m_car_info);
+            }
             //等待离开
             code=wait_for_leave_step();
+            std::lock_guard<std::mutex> lock(m_picking_statu_lock);
             if(code!=SUCCESS)
             {
                 m_picking_process_statu_msg.mutable_waitfor_leave()->set_step_statu(message::eError);
@@ -243,7 +266,7 @@ Error_manager PickupProcessTask::pickup_step()
     }
 
     //2,判断调度节点状态
-    Error_manager code=Dispatch_communicator::get_instance_pointer()->check_statu();
+    Error_manager code=Dispatch_communicator::get_instance_pointer()->check_statu(m_terminor_id);
     if(code!=SUCCESS)
         return code;
 
@@ -259,7 +282,7 @@ Error_manager PickupProcessTask::pickup_step()
     request.set_dispatch_motion_direction(message::E_PICKUP_CAR);
     request.set_parkspace_id(space_info.parkspace_id());
     request.set_terminal_id(m_terminor_id);
-    request.set_command_id(m_command_id);
+    request.mutable_command_info()->CopyFrom(m_command_info);
 
 
     message::Dispatch_response_msg response;
@@ -313,7 +336,7 @@ Error_manager PickupProcessTask::release_space_step()
     message::Parkspace_info space_info=m_parcspace_search_response_msg.car_position();
     request.mutable_release_space_info()->CopyFrom(space_info);
 
-    request.set_command_id(m_command_id);
+    request.mutable_command_info()->CopyFrom(m_command_info);
 
 
     message::Parkspace_release_response_msg release_response;
@@ -350,6 +373,7 @@ void PickupProcessTask::publish_step_status()
         {
             if(m_picking_process_statu_msg.has_base_info()==true)
             {
+                std::lock_guard<std::mutex> lock(m_picking_statu_lock);
                 System_communicator::get_instance_pointer()->post_entrance_statu(m_picking_process_statu_msg);
             }
 

+ 3 - 2
system/PickupProcessTask.h

@@ -14,7 +14,7 @@ class PickupProcessTask :public tq::BaseTask{
 public:
     PickupProcessTask(unsigned int terminal_id);
     virtual  ~PickupProcessTask();
-    Error_manager init_task(unsigned int command_id,message::Car_info car_info);
+    Error_manager init_task(message::Command_info command_info,message::Car_info car_info);
 
     /*
      * 检查当前任务是否处于空闲准备状态
@@ -55,7 +55,7 @@ protected:
     void publish_step_status();
 
 protected:
-    unsigned int                m_command_id;
+    message::Command_info                m_command_info;
     unsigned int                m_terminor_id;
     message::Car_info           m_car_info;          //当前流程的车辆信息
 
@@ -68,6 +68,7 @@ private:
     message::Dispatch_response_msg                          m_dispatch_response_msg;
 
     //取车车位的进度状态
+    std::mutex                                              m_picking_statu_lock;
     message::Picking_process_statu_msg                      m_picking_process_statu_msg;
 
 };

+ 76 - 34
system/StoreProcessTask.cpp

@@ -13,7 +13,6 @@
 StoreProcessTask::StoreProcessTask(unsigned int terminor_id)
     :m_publish_statu_thread(nullptr)
 {
-    m_command_id=-1;
     m_terminor_id=terminor_id;
 
     message::Base_info base_info;
@@ -40,10 +39,12 @@ StoreProcessTask::~StoreProcessTask()
     }
 }
 
-Error_manager StoreProcessTask::init_task( unsigned int command_id,
+Error_manager StoreProcessTask::init_task(message::Command_info command_info,
         message::Locate_information locate_info,message::Car_info car_info)
 {
-    m_command_id=command_id;
+    reset_recv_msg();
+
+    m_command_info=command_info;
     m_car_info=car_info;
     m_locate_info=locate_info;
 
@@ -67,7 +68,7 @@ Error_manager StoreProcessTask::init_task( unsigned int command_id,
 Error_manager StoreProcessTask::locate_step() {
     Error_manager code;
     //检查测量模块状态
-    code=Locate_communicator::get_instance_pointer()->check_statu();
+    code=Locate_communicator::get_instance_pointer()->check_statu(m_terminor_id);
     if(code!=SUCCESS)
         return code;
 
@@ -79,7 +80,7 @@ Error_manager StoreProcessTask::locate_step() {
     base_info.set_timeout_ms(20000); //测量超时5s
     request.mutable_base_info()->CopyFrom(base_info);
 
-    request.set_command_id(m_command_id);
+    request.mutable_command_info()->CopyFrom(m_command_info);
     request.set_terminal_id(m_terminor_id);
 
     code=Locate_communicator::get_instance_pointer()->locate_request(request,m_measure_response_msg);
@@ -113,7 +114,7 @@ Error_manager StoreProcessTask::dispatch_step()
     }
 
     //2,判断调度节点状态
-    code=Dispatch_communicator::get_instance_pointer()->check_statu();
+    code=Dispatch_communicator::get_instance_pointer()->check_statu(m_terminor_id);
     if(code!=SUCCESS)
         return code;
 
@@ -125,7 +126,7 @@ Error_manager StoreProcessTask::dispatch_step()
     base_info.set_timeout_ms(1000*15); //超时15s
     request.mutable_base_info()->CopyFrom(base_info);
 
-    request.set_command_id(m_command_id);
+    request.mutable_command_info()->CopyFrom(m_command_info);
     request.set_terminal_id(m_terminor_id);
     request.set_dispatch_motion_direction(message::E_STORE_CAR);
     request.set_parkspace_id(m_parcspace_alloc_response_msg.allocated_space_info().parkspace_id());
@@ -161,6 +162,7 @@ void StoreProcessTask::reset_process_statu()
     message::Release_space_step_statu   release_step;
     release_step.set_step_statu(message::eWaiting);
 
+    std::lock_guard<std::mutex> lock(m_storing_statu_lock);
     m_storing_process_statu_msg.mutable_alloc_space_step()->CopyFrom(alloc_step);
     m_storing_process_statu_msg.mutable_measure_step()->CopyFrom(measure_step);
     m_storing_process_statu_msg.mutable_dispatch_step()->CopyFrom(store_step);
@@ -174,6 +176,7 @@ void StoreProcessTask::reset_process_statu()
      */
 bool StoreProcessTask::is_ready()
 {
+    std::lock_guard<std::mutex> lock(m_storing_statu_lock);
     bool cond_alloc_space = m_storing_process_statu_msg.alloc_space_step().step_statu()==message::eWaiting
                             ||m_storing_process_statu_msg.alloc_space_step().step_statu()==message::eComplete;
     bool cond_measure = m_storing_process_statu_msg.measure_step().step_statu()==message::eWaiting
@@ -193,14 +196,18 @@ bool StoreProcessTask::is_ready()
 Error_manager StoreProcessTask::alloc_space()
 {
     //更新车位分配步骤状态
-    m_storing_process_statu_msg.mutable_alloc_space_step()->mutable_car_info()->CopyFrom(m_car_info);
-    m_storing_process_statu_msg.mutable_alloc_space_step()->set_step_statu(message::eWorking);
+    {
+        std::lock_guard<std::mutex> lock(m_storing_statu_lock);
+        m_storing_process_statu_msg.mutable_alloc_space_step()->mutable_car_info()->CopyFrom(m_car_info);
+        m_storing_process_statu_msg.mutable_alloc_space_step()->set_step_statu(message::eWorking);
+    }
 
     /*
      * 检查是否有测量数据
      */
     if(m_locate_info.has_locate_height()==false||m_locate_info.has_locate_width()==false)
     {
+        std::lock_guard<std::mutex> lock(m_storing_statu_lock);
         m_storing_process_statu_msg.mutable_alloc_space_step()->set_step_statu(message::eError);
         m_storing_process_statu_msg.mutable_alloc_space_step()->set_description("停车请求缺少车辆高度和宽度信息");
         return Error_manager(FAILED,MINOR_ERROR,"停车请求缺少车辆高度和宽度信息");
@@ -211,6 +218,7 @@ Error_manager StoreProcessTask::alloc_space()
     Error_manager code=Parkspace_communicator::get_instance_pointer()->check_statu();
     if(code!=SUCCESS)
     {
+        std::lock_guard<std::mutex> lock(m_storing_statu_lock);
         m_storing_process_statu_msg.mutable_alloc_space_step()->set_step_statu(message::eError);
         m_storing_process_statu_msg.mutable_alloc_space_step()->set_description(code.get_error_description());
         return code;
@@ -227,10 +235,12 @@ Error_manager StoreProcessTask::alloc_space()
 
     request.mutable_car_info()->CopyFrom(m_car_info);
 
-    request.set_command_id(m_command_id);
+    request.mutable_command_info()->CopyFrom(m_command_info);
     request.set_terminal_id(m_terminor_id);
 
     code=Parkspace_communicator::get_instance_pointer()->alloc_request(request,m_parcspace_alloc_response_msg);
+
+    std::lock_guard<std::mutex> lock(m_storing_statu_lock);
     if(code!=SUCCESS)
     {
         m_storing_process_statu_msg.mutable_alloc_space_step()->set_step_statu(message::eError);
@@ -240,6 +250,14 @@ Error_manager StoreProcessTask::alloc_space()
 
     if(m_parcspace_alloc_response_msg.error_manager().error_code()==0)
     {
+        message::Car_info alloc_car_info=m_parcspace_alloc_response_msg.allocated_space_info().car_info();
+        if(alloc_car_info.license()!=m_car_info.license())
+        {
+            m_storing_process_statu_msg.mutable_alloc_space_step()->set_step_statu(message::eError);
+            m_storing_process_statu_msg.mutable_alloc_space_step()->set_description("分配车位反馈的车辆信息不匹配");
+            return Error_manager(ERROR,MINOR_ERROR,"分配车位反馈的车辆信息不匹配");
+        }
+
         m_storing_process_statu_msg.mutable_alloc_space_step()->set_step_statu(message::eComplete);
         return SUCCESS;
     }
@@ -256,14 +274,6 @@ Error_manager StoreProcessTask::alloc_space()
  */
 Error_manager StoreProcessTask::confirm_space_step()
 {
-    /*
-    * 检查是否曾经分配过车位
-    */
-    if(m_parcspace_alloc_response_msg.has_allocated_space_info()==false)
-    {
-        return Error_manager(FAILED,MINOR_ERROR," parkspace confirm request without space info");
-    }
-
     /*
      * 检查车位管理模块是否正常
      */
@@ -281,8 +291,7 @@ Error_manager StoreProcessTask::confirm_space_step()
 
     message::Parkspace_info space_info=m_parcspace_alloc_response_msg.allocated_space_info();
     request.mutable_confirm_space_info()->CopyFrom(space_info);
-    request.set_command_id(m_command_id);
-
+    request.mutable_command_info()->CopyFrom(m_command_info);
 
     message::Parkspace_confirm_alloc_response_msg confirm_response;
     code=Parkspace_communicator::get_instance_pointer()->confirm_request(request,confirm_response);
@@ -297,7 +306,7 @@ Error_manager StoreProcessTask::confirm_space_step()
 
     if(confirm_response.error_manager().error_code()==0) {
         LOG(INFO)<<"停车流程正常,确认占用车位成功,停车终端:"<<m_terminor_id
-                    <<", 指令id:"<<m_command_id
+                    <<", 指令id:"<<m_command_info.place()+m_command_info.time()
                     <<", 车位楼层:"<<confirm_response.confirm_alloc_space_info().floor()
                     <<", 车位序号:"<<confirm_response.confirm_alloc_space_info().index()
                     <<", 车牌号:"<<confirm_response.confirm_alloc_space_info().car_info().license();
@@ -338,7 +347,7 @@ Error_manager StoreProcessTask::release_space_step()
     message::Parkspace_info space_info=m_parcspace_alloc_response_msg.allocated_space_info();
     request.mutable_release_space_info()->CopyFrom(space_info);
 
-    request.set_command_id(m_command_id);
+    request.mutable_command_info()->CopyFrom(m_command_info);
 
 
     message::Parkspace_release_response_msg release_response;
@@ -348,7 +357,7 @@ Error_manager StoreProcessTask::release_space_step()
 
     if(release_response.error_manager().error_code()==0) {
         LOG(WARNING)<<"停车流程异常,释放车位成功,停车终端:"<<m_terminor_id
-                 <<", 指令id:"<<m_command_id
+                 <<", 指令id:"<<m_command_info.place()+m_command_info.time()
                  <<", 车位楼层:"<<m_parcspace_alloc_response_msg.allocated_space_info().floor()
                  <<", 车位序号:"<<m_parcspace_alloc_response_msg.allocated_space_info().index()
                  <<", 车牌号:"<<m_parcspace_alloc_response_msg.allocated_space_info().car_info().license();
@@ -372,12 +381,18 @@ void StoreProcessTask::Main()
         case 0:
         {
             //更新状态信息
-            m_storing_process_statu_msg.mutable_measure_step()->set_step_statu(message::eWorking);
+            {
+                std::lock_guard<std::mutex> lock(m_storing_statu_lock);
+                m_storing_process_statu_msg.mutable_measure_step()->set_step_statu(message::eWorking);
+            }
             //开始定位
             code=locate_step();
             usleep(1000*1000);
+
+            std::lock_guard<std::mutex> lock(m_storing_statu_lock);
             if(code!=SUCCESS)
             {
+                //更新进度状态
                 m_storing_process_statu_msg.mutable_measure_step()->set_step_statu(message::eError);
                 m_storing_process_statu_msg.mutable_measure_step()->set_description(code.get_error_description());
                 LOG(ERROR)<<"测量失败:"<<code.get_error_description();
@@ -391,14 +406,19 @@ void StoreProcessTask::Main()
         case 1:
         {
             //更新状态信息
-            m_storing_process_statu_msg.mutable_dispatch_step()->set_step_statu(message::eWorking);
-            m_storing_process_statu_msg.mutable_dispatch_step()->mutable_locate_info()->CopyFrom(m_measure_response_msg.locate_information());
-            m_storing_process_statu_msg.mutable_dispatch_step()->mutable_space_info()->CopyFrom(m_parcspace_alloc_response_msg.allocated_space_info());
+            {
+                std::lock_guard<std::mutex> lock(m_storing_statu_lock);
+                m_storing_process_statu_msg.mutable_dispatch_step()->set_step_statu(message::eWorking);
+                m_storing_process_statu_msg.mutable_dispatch_step()->mutable_locate_info()->CopyFrom(
+                        m_measure_response_msg.locate_information());
+                m_storing_process_statu_msg.mutable_dispatch_step()->mutable_space_info()->CopyFrom(
+                        m_parcspace_alloc_response_msg.allocated_space_info());
+            }
             //开始调度
-
             code=dispatch_step();
-
             usleep(1000*1000);
+
+            std::lock_guard<std::mutex> lock(m_storing_statu_lock);
             if(code!=SUCCESS)
             {
                 m_storing_process_statu_msg.mutable_dispatch_step()->set_step_statu(message::eError);
@@ -413,15 +433,20 @@ void StoreProcessTask::Main()
         case 2:
         {
             //更新状态信息
-            m_storing_process_statu_msg.mutable_confirm_space_step()->set_step_statu(message::eWorking);
-            m_storing_process_statu_msg.mutable_confirm_space_step()->mutable_space_info()->CopyFrom(m_parcspace_alloc_response_msg.allocated_space_info());
+            {
+                std::lock_guard<std::mutex> lock(m_storing_statu_lock);
+                m_storing_process_statu_msg.mutable_confirm_space_step()->set_step_statu(message::eWorking);
+                m_storing_process_statu_msg.mutable_confirm_space_step()->mutable_space_info()->CopyFrom(
+                        m_parcspace_alloc_response_msg.allocated_space_info());
+            }
             //开始工作
             code=confirm_space_step();
+            std::lock_guard<std::mutex> lock(m_storing_statu_lock);
             if(code!=SUCCESS)
             {
                 m_storing_process_statu_msg.mutable_confirm_space_step()->set_step_statu(message::eError);
                 m_storing_process_statu_msg.mutable_confirm_space_step()->set_description(code.get_error_description());
-                LOG(ERROR)<<"指令:"<<m_command_id<<",终端号:"<<m_terminor_id<<"停车流程:"<<code.get_error_description()<<
+                LOG(ERROR)<<"指令:"<<m_command_info.place()<<",终端号:"<<m_terminor_id<<"停车流程:"<<code.get_error_description()<<
                 " 车位id :"<<m_parcspace_alloc_response_msg.allocated_space_info().parkspace_id()
                 <<",车牌:"<<m_car_info.license();
                 break;
@@ -432,7 +457,7 @@ void StoreProcessTask::Main()
         //第四步,打印...  日志 .... 记录.....
         case 3:
         {
-            LOG(INFO)<<"停车成功,停车终端:"<<m_terminor_id<<"指令id:"<<m_command_id
+            LOG(INFO)<<"停车成功,停车终端:"<<m_terminor_id<<"指令id:"<<m_command_info.place()
                      <<", 车位id:"<<m_parcspace_alloc_response_msg.allocated_space_info().parkspace_id()
                      <<", 车位楼层:"<<m_parcspace_alloc_response_msg.allocated_space_info().floor()
                      <<", 车位序号:"<<m_parcspace_alloc_response_msg.allocated_space_info().index()
@@ -447,8 +472,13 @@ void StoreProcessTask::Main()
      */
 
     //失败,清理车位
-    m_storing_process_statu_msg.mutable_failed_release_space_step()->set_step_statu(message::eWorking);
+    {
+        std::lock_guard<std::mutex> lock(m_storing_statu_lock);
+        m_storing_process_statu_msg.mutable_failed_release_space_step()->set_step_statu(message::eWorking);
+    }
     code=release_space_step();
+
+    std::lock_guard<std::mutex> lock(m_storing_statu_lock);
     if(code!=SUCCESS)
     {
         m_storing_process_statu_msg.mutable_failed_release_space_step()->set_step_statu(message::eError);
@@ -487,6 +517,7 @@ void StoreProcessTask::publish_step_status()
         {
             if(m_storing_process_statu_msg.has_base_info()==true)
             {
+                std::lock_guard<std::mutex> lock(m_storing_statu_lock);
                 System_communicator::get_instance_pointer()->post_entrance_statu(m_storing_process_statu_msg);
             }
 
@@ -494,3 +525,14 @@ void StoreProcessTask::publish_step_status()
 
     }
 }
+
+
+/*
+     * 初始化 接收到的消息
+     */
+void StoreProcessTask::reset_recv_msg() {
+    m_locate_info = message::Locate_information();
+    m_measure_response_msg = message::Measure_response_msg();         //测量模块的测量数据
+    m_parcspace_alloc_response_msg = message::Parkspace_allocation_response_msg(); //分配的车位数据
+    m_dispatch_response_msg = message::Dispatch_response_msg();        //调度模块的反馈数据
+}

+ 9 - 2
system/StoreProcessTask.h

@@ -15,7 +15,7 @@ class StoreProcessTask :public tq::BaseTask{
 public:
     StoreProcessTask(unsigned int command_id);
     virtual  ~StoreProcessTask();
-    Error_manager init_task(unsigned int terminor_id,
+    Error_manager init_task(message::Command_info command_info,
             message::Locate_information locate_info,message::Car_info car_info);
 
     /*
@@ -56,6 +56,12 @@ protected:
      */
     void reset_process_statu();
 
+    /*
+     * 初始化 接收到的消息
+     */
+    void reset_recv_msg();
+
+
     /*
      * 发布进度
      */
@@ -63,7 +69,7 @@ protected:
     void publish_step_status();
 
 protected:
-    unsigned int                m_command_id;
+    message::Command_info       m_command_info;
     unsigned int                m_terminor_id;
     message::Car_info           m_car_info;          //当前流程的车辆标识(车牌号)
 
@@ -76,6 +82,7 @@ protected:
 
     message::Dispatch_response_msg                  m_dispatch_response_msg;        //调度模块的反馈数据
 
+    std::mutex                                      m_storing_statu_lock;
     message::Storing_process_statu_msg              m_storing_process_statu_msg;    //停车流程进度信息
 
 private:

+ 134 - 9
system/command_manager.cpp

@@ -2,6 +2,8 @@
 // Created by zx on 2020/7/14.
 //
 
+#include <sstream>
+#include <iomanip>
 #include <Parkspace_communicator.h>
 #include "command_manager.h"
 #include "StoreProcessTask.h"
@@ -24,8 +26,21 @@ Command_manager::~Command_manager()
 
 }
 
-Error_manager Command_manager::init()
+Error_manager Command_manager::init(setting::System_setting system_setting)
 {
+    /*
+     * 检查参数
+     */
+    if(system_setting.has_bind_ip()==false || system_setting.has_entrance_num()== false
+        ||system_setting.has_export_num()==false )
+    {
+        return Error_manager(ERROR,MAJOR_ERROR,"系统配置错误");
+    }
+    if(system_setting.entrance_num()<0 || system_setting.export_num()<0)
+    {
+        return Error_manager(ERROR,MAJOR_ERROR,"系统配置出入口数量错误");
+    }
+
     //创建线程池
     if(m_thread_queue_process== nullptr)
     {
@@ -33,6 +48,91 @@ Error_manager Command_manager::init()
         m_thread_queue_process->Start(12);
     }
 
+
+    /*
+     * 此处添加等待各个通讯模块正常代码
+     */
+    std::chrono::system_clock::time_point t_start=std::chrono::system_clock::now();
+    std::chrono::system_clock::time_point t_end=std::chrono::system_clock::now();
+
+    Error_manager parkspace_code=ERROR;
+    LOG(INFO)<<"初始化车位管理模块...";
+    do
+    {
+        if (parkspace_code != SUCCESS) {
+            parkspace_code = Parkspace_communicator::get_instance_pointer()->check_statu();
+            LOG_IF(INFO, parkspace_code == SUCCESS) << "车位管理模块初始化完成!!!";
+        }
+        t_end=std::chrono::system_clock::now();
+        usleep(1000*100);
+    }while(t_end-t_start<std::chrono::seconds(300));
+
+    LOG_IF(ERROR,parkspace_code!=SUCCESS)<<"车位管理节点连接超时";
+    if(parkspace_code!=SUCCESS)
+    {
+        return Error_manager(ERROR,MAJOR_ERROR,"车位管理模块初始化超时");
+    }
+
+
+    //检查节点并创建停取车流程
+    for(int i=0;i<system_setting.entrance_num();++i)
+    {
+        /*
+         * 检查入口 i 的各个节点状态
+         */
+        LOG(INFO)<<"初始化停车入口:"<<i<<"  测量及调度模块...";
+        Error_manager locate_code=ERROR,dispatch_code=ERROR;
+        do {
+            if (locate_code != SUCCESS) {
+                locate_code = Locate_communicator::get_instance_pointer()->check_statu(i);
+                LOG_IF(INFO, locate_code == SUCCESS) << "停车入口:"<<i<<" 测量模块初始化完成!!!";
+            }
+            if (dispatch_code != SUCCESS) {
+                dispatch_code = Dispatch_communicator::get_instance_pointer()->check_statu(i);
+                LOG_IF(INFO, dispatch_code == SUCCESS) << "停车入口:"<<i<<" 调度模块初始化完成!!!";
+            }
+
+            t_end=std::chrono::system_clock::now();
+            if (locate_code == SUCCESS && dispatch_code == SUCCESS)
+                break;
+            usleep(1000*100);
+        }while(t_end-t_start<std::chrono::seconds(300));
+
+        LOG_IF(ERROR,locate_code!=SUCCESS||dispatch_code!=SUCCESS)<<"停车口:"<<i<<" 测量/调度节点连接超时";
+        if(locate_code!=SUCCESS||dispatch_code!=SUCCESS)
+        {
+            return Error_manager(ERROR,MAJOR_ERROR,"停车入口通讯节点初始化超时");
+        }
+
+        StoreProcessTask* ptask=new StoreProcessTask(i);
+        m_store_command_task_map[i]=ptask;
+    }
+    for(int i=0;i<system_setting.export_num();++i)
+    {
+        LOG(INFO)<<"初始化取车出口:"<<i<<"  调度模块...";
+        Error_manager dispatch_code=ERROR;
+        do {
+            if (dispatch_code != SUCCESS) {
+                dispatch_code = Dispatch_communicator::get_instance_pointer()->check_statu(i);
+                LOG_IF(INFO, dispatch_code == SUCCESS) << "取车出口:" << i << " 调度模块初始化完成!!!";
+            }
+
+            t_end = std::chrono::system_clock::now();
+            if (dispatch_code == SUCCESS)
+                break;
+            usleep(1000*100);
+        }while(t_end-t_start<std::chrono::seconds(300));
+
+        LOG_IF(ERROR,dispatch_code!=SUCCESS)<<"取车出口:"<<i<<" 调度节点连接超时";
+        if(dispatch_code!=SUCCESS)
+        {
+            return Error_manager(ERROR,MAJOR_ERROR,"取车出口通讯节点初始化超时");
+        }
+
+        PickupProcessTask* ptask=new PickupProcessTask(i);
+        m_pick_command_task_map[i]=ptask;
+    }
+
     return SUCCESS;
 }
 
@@ -85,7 +185,7 @@ Error_manager Command_manager::execute_store_command(message::Store_command_requ
                             response.mutable_code()->CopyFrom(error_msg);
                             return parkspace_code;
                         }
-                        Error_manager locate_code= Locate_communicator::get_instance_pointer()->check_statu();
+                        Error_manager locate_code= Locate_communicator::get_instance_pointer()->check_statu(request.terminal_id());
                         if(locate_code!=SUCCESS)
                         {
                             error_msg.set_error_code(locate_code.get_error_code());
@@ -93,7 +193,7 @@ Error_manager Command_manager::execute_store_command(message::Store_command_requ
                             response.mutable_code()->CopyFrom(error_msg);
                             return locate_code;
                         }
-                        Error_manager dispatch_code= Dispatch_communicator::get_instance_pointer()->check_statu();
+                        Error_manager dispatch_code= Dispatch_communicator::get_instance_pointer()->check_statu(request.terminal_id());
                         if(dispatch_code!=SUCCESS)
                         {
                             error_msg.set_error_code(dispatch_code.get_error_code());
@@ -103,19 +203,31 @@ Error_manager Command_manager::execute_store_command(message::Store_command_requ
                         }
 
                         //一切正常,接受指令
-                        int command_id=request.terminal_id()+10000;
+                        message::Command_info command_info;
+                        //获取当前时间
+                        auto t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
+                        std::stringstream ss;
+                        ss << std::put_time(std::localtime(&t), "%Y-%m-%d:%H-%M-%S-%ms");
+                        std::string str_time = ss.str();
+                        command_info.set_time(str_time);
 
-                        LOG(INFO)<<"收到停车指令:"<<command_id<<", 车牌:"<<request.car_info().license()<<
+                        char place[255]={0};
+                        sprintf(place ,"027-01-%02d",request.terminal_id());
+                        command_info.set_place(place);
+                        command_info.set_event(message::eStoring);
+
+                        LOG(INFO)<<"收到停车指令:"<<command_info.place()+"-"+command_info.time()<<", 车牌:"<<request.car_info().license()<<
                         ",终端:"<<request.terminal_id();
                         tq::BaseTask* ptask;
                         if(false==m_store_command_task_map.find(request.terminal_id(),ptask))
                         {
+                            LOG(INFO)<<"创建终端:"<<command_info.place()+"-"+command_info.time();
                             ptask=new StoreProcessTask(request.terminal_id());
                             m_store_command_task_map[request.terminal_id()]=ptask;
                         }
                         StoreProcessTask* pStore_task=(StoreProcessTask*)ptask;
                         //初始化流程
-                        pStore_task->init_task(command_id,locate_info,request.car_info());
+                        pStore_task->init_task(command_info,locate_info,request.car_info());
 
                         //获取车位
                         Error_manager code=pStore_task->alloc_space();
@@ -184,7 +296,7 @@ Error_manager Command_manager::execute_pickup_command(message::Pickup_command_re
             return parkspace_code;
         }
 
-        Error_manager dispatch_code= Dispatch_communicator::get_instance_pointer()->check_statu();
+        Error_manager dispatch_code= Dispatch_communicator::get_instance_pointer()->check_statu(request.terminal_id());
         if(dispatch_code!=SUCCESS)
         {
             error_msg.set_error_code(dispatch_code.get_error_code());
@@ -195,7 +307,20 @@ Error_manager Command_manager::execute_pickup_command(message::Pickup_command_re
 
         //一切正常,接受指令
         Error_manager code;
-        int command_id = request.terminal_id()+20000;
+
+        message::Command_info command_info;
+        //获取当前时间
+        auto t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
+        std::stringstream ss;
+        ss << std::put_time(std::localtime(&t), "%Y-%m-%d:%H-%M-%S-%ms");
+        std::string str_time = ss.str();
+        command_info.set_time(str_time);
+
+        char place[255]={0};
+        sprintf(place ,"027-01-%02d",request.terminal_id());
+        command_info.set_place(place);
+        command_info.set_event(message::ePicking);
+
         tq::BaseTask* ptask;
         if(false==m_pick_command_task_map.find(request.terminal_id(),ptask))
         {
@@ -204,7 +329,7 @@ Error_manager Command_manager::execute_pickup_command(message::Pickup_command_re
         }
         PickupProcessTask* pPick_task=(PickupProcessTask*)ptask;
         //初始化流程
-        pPick_task->init_task(command_id, request.car_info());
+        pPick_task->init_task(command_info, request.car_info());
         /////查询车位
         code=pPick_task->search_space();
 

+ 3 - 2
system/command_manager.h

@@ -17,6 +17,7 @@
 #include "TaskQueue/BaseTask.h"
 #include "process_message.pb.h"
 #include "thread_safe_map.h"
+#include "system_setting.pb.h"
 
 class Command_manager :public Singleton<Command_manager>{
     friend Singleton<Command_manager>;
@@ -24,9 +25,9 @@ public:
     ~Command_manager();
 
     /*
-     * 初始化函数,创建线程池,创建状态广播线程,
+     * 初始化函数,创建线程池,创建状态广播线程,根据配置创建停取车流程
      */
-    Error_manager init();
+    Error_manager init(setting::System_setting system_setting);
 
     /*
      * 执行停车请求

+ 14 - 0
system/system_setting.proto

@@ -0,0 +1,14 @@
+syntax = "proto2";
+package setting;
+
+message System_setting
+{
+    required string         bind_ip=1;
+    optional int32          terminor_port=2 [default=30000];
+    optional int32          park_space_port=3 [default=30001];
+    optional int32          measurer_port=4 [default=30002];
+    optional int32          dispatcher_port=5 [default=30003];
+
+    required int32          entrance_num=6;
+    required int32          export_num=7;
+}

+ 4 - 5
test/terminal_client.cpp

@@ -164,14 +164,13 @@ int main() {
         int in_count=input_queue.size();
         int out_count=output_queue.size();
 
-        if(n%10==0) {
-            std::cout<<"输入 q 退出,其他继续";
-            std::cin >> c;
+        if(n%1==0) {
+            usleep(1000*1000*1);
         }
         else {
             //暂停 5-15s 代替
-           /* int delay=10*1000;//in_count*200;
-            usleep(1000*delay+1);*/
+            int delay=10*1000;//in_count*200;
+            usleep(1000*delay+1);
             std::this_thread::yield();
         }
     }

+ 5 - 0
tool/thread_safe_map.h

@@ -65,6 +65,11 @@ public:
         return dataMap_.find(key);
     }*/
 
+    this_iterator begin()
+    {
+        return dataMap_.begin();
+    }
+
     this_iterator end()
     {
         return dataMap_.end();