Browse Source

修改command _key 去掉command_info

zx 4 years ago
parent
commit
19fd37bc97

+ 10 - 10
dispatch/dispatch_communicator.cpp

@@ -18,7 +18,7 @@ Error_manager Dispatch_communicator::dispatch_request(message::Dispatch_request_
     if(request.base_info().sender()!=message::eMain||request.base_info().receiver()!=message::eDispatch)
         return Error_manager(ERROR,MINOR_ERROR,"dispatch request invalid");
 
-    if(m_response_table.find(request.command_info().time())==true)
+    if(m_response_table.find(request.command_key())==true)
         return Error_manager(ERROR,MAJOR_ERROR," dispatch request repeated");
     //设置超时,若没有设置,默认300000  五分钟
     int timeout=request.base_info().has_timeout_ms()?request.base_info().timeout_ms():300000;
@@ -37,7 +37,7 @@ Error_manager Dispatch_communicator::dispatch_request(message::Dispatch_request_
     code=encapsulate_msg(&message);
     if(code!=SUCCESS)
         return code;
-    m_response_table[request.command_info().time()]=message::Dispatch_response_msg();
+    m_response_table[request.command_key()]=message::Dispatch_response_msg();
     //循环查询请求是否被处理
     auto start_time=std::chrono::system_clock::now();
     double time=0;
@@ -45,10 +45,10 @@ Error_manager Dispatch_communicator::dispatch_request(message::Dispatch_request_
         //查询到记录
         message::Dispatch_response_msg response;
         ///查询是否存在,并且删除该记录,
-        if(m_response_table.find(request.command_info().time(),response))
+        if(m_response_table.find(request.command_key(),response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_info())
+            if (response.has_base_info() && response.has_command_key())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -59,12 +59,12 @@ Error_manager Dispatch_communicator::dispatch_request(message::Dispatch_request_
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eDispatch ||
                     response_base.receiver() != message::eMain ||
-                    response.command_info() != request.command_info()) {
+                    response.command_key() != request.command_key()) {
                     return Error_manager(ERROR, MAJOR_ERROR,
                                          "dispatch response basemsg info error");
                 }
                 result = response;
-                m_response_table.erase(request.command_info().time());
+                m_response_table.erase(request.command_key());
                 return SUCCESS;
 
             }
@@ -82,7 +82,7 @@ Error_manager Dispatch_communicator::dispatch_request(message::Dispatch_request_
         usleep(1000);
     }while(time<double(timeout));
 
-    m_response_table.erase(request.command_info().time());
+    m_response_table.erase(request.command_key());
     return Error_manager(RESPONSE_TIMEOUT,MINOR_ERROR,"dispatch request timeout");
 }
 /*
@@ -91,9 +91,9 @@ Error_manager Dispatch_communicator::dispatch_request(message::Dispatch_request_
 Error_manager Dispatch_communicator::cancel_request(message::Dispatch_request_msg& request)
 {
     message::Dispatch_response_msg t_response;
-    if(m_response_table.find(request.command_info().time(),t_response))
+    if(m_response_table.find(request.command_key(),t_response))
     {
-        m_response_table.erase(request.command_info().time());
+        m_response_table.erase(request.command_key());
     }
     return SUCCESS;
 }
@@ -191,7 +191,7 @@ Error_manager Dispatch_communicator::execute_msg(Communication_message* p_msg)
             message::Dispatch_response_msg response;
             response.ParseFromString(p_msg->get_message_buf());
             ///查询请求表是否存在,并且更新
-            if(m_response_table.find_update(response.command_info().time(),response)==false)
+            if(m_response_table.find_update(response.command_key(),response)==false)
             {
                 return Error_manager(ERROR,NEGLIGIBLE_ERROR,"dispatch response without request");
             }

+ 0 - 5
dispatch/dispatch_communicator.h

@@ -7,14 +7,9 @@
 
 #include "communication_socket_base.h"
 #include "singleton.h"
-
 #include "dispatch_message.pb.h"
 #include "error_code.h"
-
 #include "thread_safe_map.h"
-#include "message_compare.h"
-
-RegistoryCompare(message,message::Dispatch_request_msg)
 
 class Dispatch_communicator :public Singleton<Dispatch_communicator>, public Communication_socket_base
 {

+ 11 - 11
lidar_locate/Locate_communicator.cpp

@@ -21,12 +21,12 @@ Error_manager Locate_communicator::encapsulate_msg(Communication_message* messag
         {
             message::Measure_request_msg request;
             request.ParseFromString(message->get_message_buf());
-            m_response_table[request.command_info().time()]=message::Measure_response_msg();
+            m_response_table[request.command_key()]=message::Measure_response_msg();
             //发送请求
             code= Communication_socket_base::encapsulate_msg(message);
             if(code!=SUCCESS)
             {
-                m_response_table.erase(request.command_info().time());
+                m_response_table.erase(request.command_key());
             }
             break;
         }
@@ -47,7 +47,7 @@ Error_manager Locate_communicator::locate_request(message::Measure_request_msg&
     if(request.base_info().sender()!=message::eMain||request.base_info().receiver()!=message::eMeasurer)
         return Error_manager(LOCATER_MSG_REQUEST_INVALID,MINOR_ERROR,"measure request invalid");
 
-    if(m_response_table.find(request.command_info().time())==true)
+    if(m_response_table.find(request.command_key())==true)
         return Error_manager(LOCATER_MSG_REQUEST_REPEATED,MAJOR_ERROR," measure reques repeated");
     //设置超时,若没有设置,默认3000
     int timeout=request.base_info().has_timeout_ms()?request.base_info().timeout_ms():3000;
@@ -73,10 +73,10 @@ Error_manager Locate_communicator::locate_request(message::Measure_request_msg&
         //查询到记录
         message::Measure_response_msg response;
         ///查询是否存在,并且删除该记录,
-        if(m_response_table.find(request.command_info().time(),response))
+        if(m_response_table.find(request.command_key(),response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_info())
+            if (response.has_base_info() && response.has_command_key())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -87,12 +87,12 @@ Error_manager Locate_communicator::locate_request(message::Measure_request_msg&
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eMeasurer ||
                     response_base.receiver() != message::eMain ||
-                    !(response.command_info() == request.command_info())) {
+                    !(response.command_key() == request.command_key())) {
                     return Error_manager(LOCATER_MSG_RESPONSE_INFO_ERROR, MAJOR_ERROR,
                                          "measure response msg info error");
                 }
                 result = response;
-                m_response_table.erase(request.command_info().time());
+                m_response_table.erase(request.command_key());
 
                 return SUCCESS;
 
@@ -110,7 +110,7 @@ Error_manager Locate_communicator::locate_request(message::Measure_request_msg&
         std::this_thread::yield();
         usleep(1000);
     }while(time<double(timeout));
-    m_response_table.erase(request.command_info().time());
+    m_response_table.erase(request.command_key());
     return Error_manager(RESPONSE_TIMEOUT,MINOR_ERROR,"measure request timeout");
 }
 
@@ -184,7 +184,7 @@ Error_manager Locate_communicator::execute_msg(Communication_message* p_msg)
             message::Measure_response_msg response;
             response.ParseFromString(p_msg->get_message_buf());
             ///查询请求表是否存在,并且更新
-            if(m_response_table.find_update(response.command_info().time(),response)==false)
+            if(m_response_table.find_update(response.command_key(),response)==false)
             {
                 return Error_manager(LOCATER_MSG_RESPONSE_HAS_NO_REQUEST,NEGLIGIBLE_ERROR,"measure response without request");
             }
@@ -208,8 +208,8 @@ Error_manager Locate_communicator::execute_msg(Communication_message* p_msg)
 
 Error_manager Locate_communicator::cancel_request(message::Measure_request_msg& request)
 {
-    if(m_response_table.find(request.command_info().time())==true)
-        m_response_table.erase(request.command_info().time());
+    if(m_response_table.find(request.command_key())==true)
+        m_response_table.erase(request.command_key());
     return SUCCESS;
 }
 

+ 0 - 3
lidar_locate/Locate_communicator.h

@@ -14,12 +14,9 @@
 #include "error_code.h"
 
 #include "thread_safe_map.h"
-#include "message_compare.h"
-
 /*
  * 注册消息的比较函数,用于重载==与<符号,使其可以用作map中的key
  */
-RegistoryCompare(message,message::Measure_request_msg);
 
 
 class Locate_communicator: public Singleton<Locate_communicator>, public Communication_socket_base

+ 131 - 126
message/dispatch_message.pb.cc

@@ -94,7 +94,6 @@ void InitDefaultsDispatch_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::InitDefaultsLocate_information();
   {
     void* ptr = &::message::_Dispatch_request_msg_default_instance_;
@@ -118,7 +117,6 @@ void InitDefaultsDispatch_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();
   {
     void* ptr = &::message::_Dispatch_response_msg_default_instance_;
@@ -167,13 +165,13 @@ 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_request_msg, base_info_),
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, command_info_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, command_key_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, dispatch_motion_direction_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, terminal_id_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, parkspace_id_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_request_msg, locate_information_),
-  0,
   1,
+  0,
   3,
   4,
   5,
@@ -184,10 +182,10 @@ 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_response_msg, base_info_),
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_response_msg, command_info_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_response_msg, command_key_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Dispatch_response_msg, error_manager_),
-  0,
   1,
+  0,
   2,
 };
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
@@ -234,30 +232,29 @@ void AddDescriptorsImpl() {
       "ch_manager_status\030\003 \002(\0162 .message.Dispat"
       "ch_manager_status\022E\n\031dispatch_motion_dir"
       "ection\030\004 \002(\0162\".message.Dispatch_motion_d"
-      "irection\"\225\002\n\024Dispatch_request_msg\022%\n\tbas"
-      "e_info\030\001 \002(\0132\022.message.Base_info\022+\n\014comm"
-      "and_info\030\002 \002(\0132\025.message.Command_info\022E\n"
-      "\031dispatch_motion_direction\030\003 \002(\0162\".messa"
-      "ge.Dispatch_motion_direction\022\023\n\013terminal"
-      "_id\030\004 \002(\005\022\024\n\014parkspace_id\030\005 \002(\005\0227\n\022locat"
-      "e_information\030\006 \001(\0132\033.message.Locate_inf"
-      "ormation\"\232\001\n\025Dispatch_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-"
-      "\n\rerror_manager\030\003 \002(\0132\026.message.Error_ma"
-      "nager*\261\001\n\027Dispatch_manager_status\022\035\n\031E_D"
-      "ISPATCH_MANAGER_UNKNOW\020\000\022\034\n\030E_DISPATCH_M"
-      "ANAGER_READY\020\001\022\034\n\030E_DISPATCH_MANAGER_STO"
-      "RE\020\002\022\035\n\031E_DISPATCH_MANAGER_PICKUP\020\003\022\034\n\030E"
-      "_DISPATCH_MANAGER_FAULT\020\n*{\n\016Carrier_sta"
-      "tus\022\024\n\020E_CARRIER_UNKNOW\020\000\022\023\n\017E_CARRIER_R"
-      "EADY\020\001\022\023\n\017E_CARRIER_STORE\020\002\022\024\n\020E_CARRIER"
-      "_PICKUP\020\003\022\023\n\017E_CARRIER_FAULT\020\n*>\n\031Dispat"
-      "ch_motion_direction\022\017\n\013E_STORE_CAR\020\000\022\020\n\014"
-      "E_PICKUP_CAR\020\001"
+      "irection\"\375\001\n\024Dispatch_request_msg\022%\n\tbas"
+      "e_info\030\001 \002(\0132\022.message.Base_info\022\023\n\013comm"
+      "and_key\030\002 \002(\t\022E\n\031dispatch_motion_directi"
+      "on\030\003 \002(\0162\".message.Dispatch_motion_direc"
+      "tion\022\023\n\013terminal_id\030\004 \002(\005\022\024\n\014parkspace_i"
+      "d\030\005 \002(\005\0227\n\022locate_information\030\006 \001(\0132\033.me"
+      "ssage.Locate_information\"\202\001\n\025Dispatch_re"
+      "sponse_msg\022%\n\tbase_info\030\001 \002(\0132\022.message."
+      "Base_info\022\023\n\013command_key\030\002 \002(\t\022-\n\rerror_"
+      "manager\030\003 \002(\0132\026.message.Error_manager*\261\001"
+      "\n\027Dispatch_manager_status\022\035\n\031E_DISPATCH_"
+      "MANAGER_UNKNOW\020\000\022\034\n\030E_DISPATCH_MANAGER_R"
+      "EADY\020\001\022\034\n\030E_DISPATCH_MANAGER_STORE\020\002\022\035\n\031"
+      "E_DISPATCH_MANAGER_PICKUP\020\003\022\034\n\030E_DISPATC"
+      "H_MANAGER_FAULT\020\n*{\n\016Carrier_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\020E_CARRIER_PICKUP\020"
+      "\003\022\023\n\017E_CARRIER_FAULT\020\n*>\n\031Dispatch_motio"
+      "n_direction\022\017\n\013E_STORE_CAR\020\000\022\020\n\014E_PICKUP"
+      "_CAR\020\001"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 1134);
+      descriptor, 1086);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "dispatch_message.proto", &protobuf_RegisterTypes);
   ::protobuf_message_5fbase_2eproto::AddDescriptors();
@@ -1098,8 +1095,6 @@ void Dispatch_status_msg::InternalSwap(Dispatch_status_msg* other) {
 void Dispatch_request_msg::InitAsDefaultInstance() {
   ::message::_Dispatch_request_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
       ::message::Base_info::internal_default_instance());
-  ::message::_Dispatch_request_msg_default_instance_._instance.get_mutable()->command_info_ = const_cast< ::message::Command_info*>(
-      ::message::Command_info::internal_default_instance());
   ::message::_Dispatch_request_msg_default_instance_._instance.get_mutable()->locate_information_ = const_cast< ::message::Locate_information*>(
       ::message::Locate_information::internal_default_instance());
 }
@@ -1107,17 +1102,13 @@ void Dispatch_request_msg::clear_base_info() {
   if (base_info_ != NULL) base_info_->Clear();
   clear_has_base_info();
 }
-void Dispatch_request_msg::clear_command_info() {
-  if (command_info_ != NULL) command_info_->Clear();
-  clear_has_command_info();
-}
 void Dispatch_request_msg::clear_locate_information() {
   if (locate_information_ != NULL) locate_information_->Clear();
   clear_has_locate_information();
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Dispatch_request_msg::kBaseInfoFieldNumber;
-const int Dispatch_request_msg::kCommandInfoFieldNumber;
+const int Dispatch_request_msg::kCommandKeyFieldNumber;
 const int Dispatch_request_msg::kDispatchMotionDirectionFieldNumber;
 const int Dispatch_request_msg::kTerminalIdFieldNumber;
 const int Dispatch_request_msg::kParkspaceIdFieldNumber;
@@ -1138,16 +1129,15 @@ Dispatch_request_msg::Dispatch_request_msg(const Dispatch_request_msg& from)
       _has_bits_(from._has_bits_),
       _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
+  command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.has_command_key()) {
+    command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
+  }
   if (from.has_base_info()) {
     base_info_ = new ::message::Base_info(*from.base_info_);
   } 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_locate_information()) {
     locate_information_ = new ::message::Locate_information(*from.locate_information_);
   } else {
@@ -1161,6 +1151,7 @@ Dispatch_request_msg::Dispatch_request_msg(const Dispatch_request_msg& from)
 
 void Dispatch_request_msg::SharedCtor() {
   _cached_size_ = 0;
+  command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&base_info_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&parkspace_id_) -
       reinterpret_cast<char*>(&base_info_)) + sizeof(parkspace_id_));
@@ -1172,8 +1163,8 @@ Dispatch_request_msg::~Dispatch_request_msg() {
 }
 
 void Dispatch_request_msg::SharedDtor() {
+  command_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (this != internal_default_instance()) delete base_info_;
-  if (this != internal_default_instance()) delete command_info_;
   if (this != internal_default_instance()) delete locate_information_;
 }
 
@@ -1209,12 +1200,12 @@ void Dispatch_request_msg::Clear() {
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 7u) {
     if (cached_has_bits & 0x00000001u) {
-      GOOGLE_DCHECK(base_info_ != NULL);
-      base_info_->Clear();
+      GOOGLE_DCHECK(!command_key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*command_key_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000002u) {
-      GOOGLE_DCHECK(command_info_ != NULL);
-      command_info_->Clear();
+      GOOGLE_DCHECK(base_info_ != NULL);
+      base_info_->Clear();
     }
     if (cached_has_bits & 0x00000004u) {
       GOOGLE_DCHECK(locate_information_ != NULL);
@@ -1252,12 +1243,16 @@ bool Dispatch_request_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required .message.Command_info command_info = 2;
+      // required string command_key = 2;
       case 2: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
-          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
-               input, mutable_command_info()));
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_command_key()));
+          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+            this->command_key().data(), static_cast<int>(this->command_key().length()),
+            ::google::protobuf::internal::WireFormat::PARSE,
+            "message.Dispatch_request_msg.command_key");
         } else {
           goto handle_unusual;
         }
@@ -1352,15 +1347,19 @@ void Dispatch_request_msg::SerializeWithCachedSizes(
 
   cached_has_bits = _has_bits_[0];
   // required .message.Base_info base_info = 1;
-  if (cached_has_bits & 0x00000001u) {
+  if (cached_has_bits & 0x00000002u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
       1, *this->base_info_, output);
   }
 
-  // required .message.Command_info command_info = 2;
-  if (cached_has_bits & 0x00000002u) {
-    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2, *this->command_info_, output);
+  // required string command_key = 2;
+  if (cached_has_bits & 0x00000001u) {
+    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+      this->command_key().data(), static_cast<int>(this->command_key().length()),
+      ::google::protobuf::internal::WireFormat::SERIALIZE,
+      "message.Dispatch_request_msg.command_key");
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      2, this->command_key(), output);
   }
 
   // required .message.Dispatch_motion_direction dispatch_motion_direction = 3;
@@ -1401,17 +1400,21 @@ void Dispatch_request_msg::SerializeWithCachedSizes(
 
   cached_has_bits = _has_bits_[0];
   // required .message.Base_info base_info = 1;
-  if (cached_has_bits & 0x00000001u) {
+  if (cached_has_bits & 0x00000002u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
         1, *this->base_info_, deterministic, 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 string command_key = 2;
+  if (cached_has_bits & 0x00000001u) {
+    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+      this->command_key().data(), static_cast<int>(this->command_key().length()),
+      ::google::protobuf::internal::WireFormat::SERIALIZE,
+      "message.Dispatch_request_msg.command_key");
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        2, this->command_key(), target);
   }
 
   // required .message.Dispatch_motion_direction dispatch_motion_direction = 3;
@@ -1449,18 +1452,18 @@ size_t Dispatch_request_msg::RequiredFieldsByteSizeFallback() const {
 // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Dispatch_request_msg)
   size_t total_size = 0;
 
-  if (has_base_info()) {
-    // required .message.Base_info base_info = 1;
+  if (has_command_key()) {
+    // required string command_key = 2;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->base_info_);
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->command_key());
   }
 
-  if (has_command_info()) {
-    // required .message.Command_info command_info = 2;
+  if (has_base_info()) {
+    // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->command_info_);
+        *this->base_info_);
   }
 
   if (has_dispatch_motion_direction()) {
@@ -1495,15 +1498,15 @@ size_t Dispatch_request_msg::ByteSizeLong() const {
         _internal_metadata_.unknown_fields());
   }
   if (((_has_bits_[0] & 0x0000003b) ^ 0x0000003b) == 0) {  // All required fields are present.
-    // required .message.Base_info base_info = 1;
+    // required string command_key = 2;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->base_info_);
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->command_key());
 
-    // required .message.Command_info command_info = 2;
+    // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->command_info_);
+        *this->base_info_);
 
     // required .message.Dispatch_motion_direction dispatch_motion_direction = 3;
     total_size += 1 +
@@ -1561,10 +1564,11 @@ void Dispatch_request_msg::MergeFrom(const Dispatch_request_msg& from) {
   cached_has_bits = from._has_bits_[0];
   if (cached_has_bits & 63u) {
     if (cached_has_bits & 0x00000001u) {
-      mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
+      set_has_command_key();
+      command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
     }
     if (cached_has_bits & 0x00000002u) {
-      mutable_command_info()->::message::Command_info::MergeFrom(from.command_info());
+      mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
     }
     if (cached_has_bits & 0x00000004u) {
       mutable_locate_information()->::message::Locate_information::MergeFrom(from.locate_information());
@@ -1601,9 +1605,6 @@ bool Dispatch_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;
 }
 
@@ -1613,8 +1614,8 @@ void Dispatch_request_msg::Swap(Dispatch_request_msg* other) {
 }
 void Dispatch_request_msg::InternalSwap(Dispatch_request_msg* other) {
   using std::swap;
+  command_key_.Swap(&other->command_key_);
   swap(base_info_, other->base_info_);
-  swap(command_info_, other->command_info_);
   swap(locate_information_, other->locate_information_);
   swap(dispatch_motion_direction_, other->dispatch_motion_direction_);
   swap(terminal_id_, other->terminal_id_);
@@ -1635,8 +1636,6 @@ void Dispatch_request_msg::InternalSwap(Dispatch_request_msg* other) {
 void Dispatch_response_msg::InitAsDefaultInstance() {
   ::message::_Dispatch_response_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
       ::message::Base_info::internal_default_instance());
-  ::message::_Dispatch_response_msg_default_instance_._instance.get_mutable()->command_info_ = const_cast< ::message::Command_info*>(
-      ::message::Command_info::internal_default_instance());
   ::message::_Dispatch_response_msg_default_instance_._instance.get_mutable()->error_manager_ = const_cast< ::message::Error_manager*>(
       ::message::Error_manager::internal_default_instance());
 }
@@ -1644,17 +1643,13 @@ void Dispatch_response_msg::clear_base_info() {
   if (base_info_ != NULL) base_info_->Clear();
   clear_has_base_info();
 }
-void Dispatch_response_msg::clear_command_info() {
-  if (command_info_ != NULL) command_info_->Clear();
-  clear_has_command_info();
-}
 void Dispatch_response_msg::clear_error_manager() {
   if (error_manager_ != NULL) error_manager_->Clear();
   clear_has_error_manager();
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Dispatch_response_msg::kBaseInfoFieldNumber;
-const int Dispatch_response_msg::kCommandInfoFieldNumber;
+const int Dispatch_response_msg::kCommandKeyFieldNumber;
 const int Dispatch_response_msg::kErrorManagerFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
@@ -1672,16 +1667,15 @@ Dispatch_response_msg::Dispatch_response_msg(const Dispatch_response_msg& from)
       _has_bits_(from._has_bits_),
       _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
+  command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.has_command_key()) {
+    command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
+  }
   if (from.has_base_info()) {
     base_info_ = new ::message::Base_info(*from.base_info_);
   } 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 {
@@ -1692,6 +1686,7 @@ Dispatch_response_msg::Dispatch_response_msg(const Dispatch_response_msg& from)
 
 void Dispatch_response_msg::SharedCtor() {
   _cached_size_ = 0;
+  command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&base_info_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&error_manager_) -
       reinterpret_cast<char*>(&base_info_)) + sizeof(error_manager_));
@@ -1703,8 +1698,8 @@ Dispatch_response_msg::~Dispatch_response_msg() {
 }
 
 void Dispatch_response_msg::SharedDtor() {
+  command_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (this != internal_default_instance()) delete base_info_;
-  if (this != internal_default_instance()) delete command_info_;
   if (this != internal_default_instance()) delete error_manager_;
 }
 
@@ -1740,12 +1735,12 @@ void Dispatch_response_msg::Clear() {
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 7u) {
     if (cached_has_bits & 0x00000001u) {
-      GOOGLE_DCHECK(base_info_ != NULL);
-      base_info_->Clear();
+      GOOGLE_DCHECK(!command_key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*command_key_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000002u) {
-      GOOGLE_DCHECK(command_info_ != NULL);
-      command_info_->Clear();
+      GOOGLE_DCHECK(base_info_ != NULL);
+      base_info_->Clear();
     }
     if (cached_has_bits & 0x00000004u) {
       GOOGLE_DCHECK(error_manager_ != NULL);
@@ -1778,12 +1773,16 @@ bool Dispatch_response_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required .message.Command_info command_info = 2;
+      // required string command_key = 2;
       case 2: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
-          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
-               input, mutable_command_info()));
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_command_key()));
+          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+            this->command_key().data(), static_cast<int>(this->command_key().length()),
+            ::google::protobuf::internal::WireFormat::PARSE,
+            "message.Dispatch_response_msg.command_key");
         } else {
           goto handle_unusual;
         }
@@ -1830,15 +1829,19 @@ void Dispatch_response_msg::SerializeWithCachedSizes(
 
   cached_has_bits = _has_bits_[0];
   // required .message.Base_info base_info = 1;
-  if (cached_has_bits & 0x00000001u) {
+  if (cached_has_bits & 0x00000002u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
       1, *this->base_info_, output);
   }
 
-  // required .message.Command_info command_info = 2;
-  if (cached_has_bits & 0x00000002u) {
-    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2, *this->command_info_, output);
+  // required string command_key = 2;
+  if (cached_has_bits & 0x00000001u) {
+    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+      this->command_key().data(), static_cast<int>(this->command_key().length()),
+      ::google::protobuf::internal::WireFormat::SERIALIZE,
+      "message.Dispatch_response_msg.command_key");
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      2, this->command_key(), output);
   }
 
   // required .message.Error_manager error_manager = 3;
@@ -1863,17 +1866,21 @@ void Dispatch_response_msg::SerializeWithCachedSizes(
 
   cached_has_bits = _has_bits_[0];
   // required .message.Base_info base_info = 1;
-  if (cached_has_bits & 0x00000001u) {
+  if (cached_has_bits & 0x00000002u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
         1, *this->base_info_, deterministic, 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 string command_key = 2;
+  if (cached_has_bits & 0x00000001u) {
+    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+      this->command_key().data(), static_cast<int>(this->command_key().length()),
+      ::google::protobuf::internal::WireFormat::SERIALIZE,
+      "message.Dispatch_response_msg.command_key");
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        2, this->command_key(), target);
   }
 
   // required .message.Error_manager error_manager = 3;
@@ -1895,18 +1902,18 @@ size_t Dispatch_response_msg::RequiredFieldsByteSizeFallback() const {
 // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Dispatch_response_msg)
   size_t total_size = 0;
 
-  if (has_base_info()) {
-    // required .message.Base_info base_info = 1;
+  if (has_command_key()) {
+    // required string command_key = 2;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->base_info_);
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->command_key());
   }
 
-  if (has_command_info()) {
-    // required .message.Command_info command_info = 2;
+  if (has_base_info()) {
+    // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->command_info_);
+        *this->base_info_);
   }
 
   if (has_error_manager()) {
@@ -1928,15 +1935,15 @@ size_t Dispatch_response_msg::ByteSizeLong() const {
         _internal_metadata_.unknown_fields());
   }
   if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) {  // All required fields are present.
-    // required .message.Base_info base_info = 1;
+    // required string command_key = 2;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->base_info_);
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->command_key());
 
-    // required .message.Command_info command_info = 2;
+    // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->command_info_);
+        *this->base_info_);
 
     // required .message.Error_manager error_manager = 3;
     total_size += 1 +
@@ -1978,10 +1985,11 @@ void Dispatch_response_msg::MergeFrom(const Dispatch_response_msg& from) {
   cached_has_bits = from._has_bits_[0];
   if (cached_has_bits & 7u) {
     if (cached_has_bits & 0x00000001u) {
-      mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
+      set_has_command_key();
+      command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
     }
     if (cached_has_bits & 0x00000002u) {
-      mutable_command_info()->::message::Command_info::MergeFrom(from.command_info());
+      mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
     }
     if (cached_has_bits & 0x00000004u) {
       mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
@@ -2008,9 +2016,6 @@ bool Dispatch_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;
   }
@@ -2023,8 +2028,8 @@ void Dispatch_response_msg::Swap(Dispatch_response_msg* other) {
 }
 void Dispatch_response_msg::InternalSwap(Dispatch_response_msg* other) {
   using std::swap;
+  command_key_.Swap(&other->command_key_);
   swap(base_info_, other->base_info_);
-  swap(command_info_, other->command_info_);
   swap(error_manager_, other->error_manager_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);

+ 150 - 112
message/dispatch_message.pb.h

@@ -507,6 +507,21 @@ class Dispatch_request_msg : public ::google::protobuf::Message /* @@protoc_inse
 
   // accessors -------------------------------------------------------
 
+  // required string command_key = 2;
+  bool has_command_key() const;
+  void clear_command_key();
+  static const int kCommandKeyFieldNumber = 2;
+  const ::std::string& command_key() const;
+  void set_command_key(const ::std::string& value);
+  #if LANG_CXX11
+  void set_command_key(::std::string&& value);
+  #endif
+  void set_command_key(const char* value);
+  void set_command_key(const char* value, size_t size);
+  ::std::string* mutable_command_key();
+  ::std::string* release_command_key();
+  void set_allocated_command_key(::std::string* command_key);
+
   // required .message.Base_info base_info = 1;
   bool has_base_info() const;
   void clear_base_info();
@@ -516,15 +531,6 @@ class Dispatch_request_msg : public ::google::protobuf::Message /* @@protoc_inse
   ::message::Base_info* mutable_base_info();
   void set_allocated_base_info(::message::Base_info* base_info);
 
-  // required .message.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);
-
   // optional .message.Locate_information locate_information = 6;
   bool has_locate_information() const;
   void clear_locate_information();
@@ -559,8 +565,8 @@ class Dispatch_request_msg : public ::google::protobuf::Message /* @@protoc_inse
  private:
   void set_has_base_info();
   void clear_has_base_info();
-  void set_has_command_info();
-  void clear_has_command_info();
+  void set_has_command_key();
+  void clear_has_command_key();
   void set_has_dispatch_motion_direction();
   void clear_has_dispatch_motion_direction();
   void set_has_terminal_id();
@@ -576,8 +582,8 @@ class Dispatch_request_msg : public ::google::protobuf::Message /* @@protoc_inse
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
+  ::google::protobuf::internal::ArenaStringPtr command_key_;
   ::message::Base_info* base_info_;
-  ::message::Command_info* command_info_;
   ::message::Locate_information* locate_information_;
   int dispatch_motion_direction_;
   ::google::protobuf::int32 terminal_id_;
@@ -676,6 +682,21 @@ class Dispatch_response_msg : public ::google::protobuf::Message /* @@protoc_ins
 
   // accessors -------------------------------------------------------
 
+  // required string command_key = 2;
+  bool has_command_key() const;
+  void clear_command_key();
+  static const int kCommandKeyFieldNumber = 2;
+  const ::std::string& command_key() const;
+  void set_command_key(const ::std::string& value);
+  #if LANG_CXX11
+  void set_command_key(::std::string&& value);
+  #endif
+  void set_command_key(const char* value);
+  void set_command_key(const char* value, size_t size);
+  ::std::string* mutable_command_key();
+  ::std::string* release_command_key();
+  void set_allocated_command_key(::std::string* command_key);
+
   // required .message.Base_info base_info = 1;
   bool has_base_info() const;
   void clear_base_info();
@@ -685,15 +706,6 @@ class Dispatch_response_msg : public ::google::protobuf::Message /* @@protoc_ins
   ::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();
@@ -707,8 +719,8 @@ class Dispatch_response_msg : public ::google::protobuf::Message /* @@protoc_ins
  private:
   void set_has_base_info();
   void clear_has_base_info();
-  void set_has_command_info();
-  void clear_has_command_info();
+  void set_has_command_key();
+  void clear_has_command_key();
   void set_has_error_manager();
   void clear_has_error_manager();
 
@@ -718,8 +730,8 @@ class Dispatch_response_msg : public ::google::protobuf::Message /* @@protoc_ins
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
+  ::google::protobuf::internal::ArenaStringPtr command_key_;
   ::message::Base_info* base_info_;
-  ::message::Command_info* command_info_;
   ::message::Error_manager* error_manager_;
   friend struct ::protobuf_dispatch_5fmessage_2eproto::TableStruct;
   friend void ::protobuf_dispatch_5fmessage_2eproto::InitDefaultsDispatch_response_msgImpl();
@@ -941,13 +953,13 @@ inline void Dispatch_status_msg::set_dispatch_motion_direction(::message::Dispat
 
 // required .message.Base_info base_info = 1;
 inline bool Dispatch_request_msg::has_base_info() const {
-  return (_has_bits_[0] & 0x00000001u) != 0;
+  return (_has_bits_[0] & 0x00000002u) != 0;
 }
 inline void Dispatch_request_msg::set_has_base_info() {
-  _has_bits_[0] |= 0x00000001u;
+  _has_bits_[0] |= 0x00000002u;
 }
 inline void Dispatch_request_msg::clear_has_base_info() {
-  _has_bits_[0] &= ~0x00000001u;
+  _has_bits_[0] &= ~0x00000002u;
 }
 inline const ::message::Base_info& Dispatch_request_msg::base_info() const {
   const ::message::Base_info* p = base_info_;
@@ -989,54 +1001,67 @@ inline void Dispatch_request_msg::set_allocated_base_info(::message::Base_info*
   // @@protoc_insertion_point(field_set_allocated:message.Dispatch_request_msg.base_info)
 }
 
-// required .message.Command_info command_info = 2;
-inline bool Dispatch_request_msg::has_command_info() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
+// required string command_key = 2;
+inline bool Dispatch_request_msg::has_command_key() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
 }
-inline void Dispatch_request_msg::set_has_command_info() {
-  _has_bits_[0] |= 0x00000002u;
+inline void Dispatch_request_msg::set_has_command_key() {
+  _has_bits_[0] |= 0x00000001u;
 }
-inline void Dispatch_request_msg::clear_has_command_info() {
-  _has_bits_[0] &= ~0x00000002u;
+inline void Dispatch_request_msg::clear_has_command_key() {
+  _has_bits_[0] &= ~0x00000001u;
 }
-inline const ::message::Command_info& Dispatch_request_msg::command_info() const {
-  const ::message::Command_info* p = command_info_;
-  // @@protoc_insertion_point(field_get:message.Dispatch_request_msg.command_info)
-  return p != NULL ? *p : *reinterpret_cast<const ::message::Command_info*>(
-      &::message::_Command_info_default_instance_);
-}
-inline ::message::Command_info* Dispatch_request_msg::release_command_info() {
-  // @@protoc_insertion_point(field_release:message.Dispatch_request_msg.command_info)
-  clear_has_command_info();
-  ::message::Command_info* temp = command_info_;
-  command_info_ = NULL;
-  return temp;
+inline void Dispatch_request_msg::clear_command_key() {
+  command_key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  clear_has_command_key();
 }
-inline ::message::Command_info* Dispatch_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.Dispatch_request_msg.command_info)
-  return command_info_;
+inline const ::std::string& Dispatch_request_msg::command_key() const {
+  // @@protoc_insertion_point(field_get:message.Dispatch_request_msg.command_key)
+  return command_key_.GetNoArena();
 }
-inline void Dispatch_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();
+inline void Dispatch_request_msg::set_command_key(const ::std::string& value) {
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:message.Dispatch_request_msg.command_key)
+}
+#if LANG_CXX11
+inline void Dispatch_request_msg::set_command_key(::std::string&& value) {
+  set_has_command_key();
+  command_key_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:message.Dispatch_request_msg.command_key)
+}
+#endif
+inline void Dispatch_request_msg::set_command_key(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:message.Dispatch_request_msg.command_key)
+}
+inline void Dispatch_request_msg::set_command_key(const char* value, size_t size) {
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:message.Dispatch_request_msg.command_key)
+}
+inline ::std::string* Dispatch_request_msg::mutable_command_key() {
+  set_has_command_key();
+  // @@protoc_insertion_point(field_mutable:message.Dispatch_request_msg.command_key)
+  return command_key_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Dispatch_request_msg::release_command_key() {
+  // @@protoc_insertion_point(field_release:message.Dispatch_request_msg.command_key)
+  clear_has_command_key();
+  return command_key_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Dispatch_request_msg::set_allocated_command_key(::std::string* command_key) {
+  if (command_key != NULL) {
+    set_has_command_key();
   } else {
-    clear_has_command_info();
+    clear_has_command_key();
   }
-  command_info_ = command_info;
-  // @@protoc_insertion_point(field_set_allocated:message.Dispatch_request_msg.command_info)
+  command_key_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), command_key);
+  // @@protoc_insertion_point(field_set_allocated:message.Dispatch_request_msg.command_key)
 }
 
 // required .message.Dispatch_motion_direction dispatch_motion_direction = 3;
@@ -1168,13 +1193,13 @@ inline void Dispatch_request_msg::set_allocated_locate_information(::message::Lo
 
 // required .message.Base_info base_info = 1;
 inline bool Dispatch_response_msg::has_base_info() const {
-  return (_has_bits_[0] & 0x00000001u) != 0;
+  return (_has_bits_[0] & 0x00000002u) != 0;
 }
 inline void Dispatch_response_msg::set_has_base_info() {
-  _has_bits_[0] |= 0x00000001u;
+  _has_bits_[0] |= 0x00000002u;
 }
 inline void Dispatch_response_msg::clear_has_base_info() {
-  _has_bits_[0] &= ~0x00000001u;
+  _has_bits_[0] &= ~0x00000002u;
 }
 inline const ::message::Base_info& Dispatch_response_msg::base_info() const {
   const ::message::Base_info* p = base_info_;
@@ -1216,54 +1241,67 @@ inline void Dispatch_response_msg::set_allocated_base_info(::message::Base_info*
   // @@protoc_insertion_point(field_set_allocated:message.Dispatch_response_msg.base_info)
 }
 
-// required .message.Command_info command_info = 2;
-inline bool Dispatch_response_msg::has_command_info() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
+// required string command_key = 2;
+inline bool Dispatch_response_msg::has_command_key() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
 }
-inline void Dispatch_response_msg::set_has_command_info() {
-  _has_bits_[0] |= 0x00000002u;
+inline void Dispatch_response_msg::set_has_command_key() {
+  _has_bits_[0] |= 0x00000001u;
 }
-inline void Dispatch_response_msg::clear_has_command_info() {
-  _has_bits_[0] &= ~0x00000002u;
+inline void Dispatch_response_msg::clear_has_command_key() {
+  _has_bits_[0] &= ~0x00000001u;
 }
-inline const ::message::Command_info& Dispatch_response_msg::command_info() const {
-  const ::message::Command_info* p = command_info_;
-  // @@protoc_insertion_point(field_get:message.Dispatch_response_msg.command_info)
-  return p != NULL ? *p : *reinterpret_cast<const ::message::Command_info*>(
-      &::message::_Command_info_default_instance_);
-}
-inline ::message::Command_info* Dispatch_response_msg::release_command_info() {
-  // @@protoc_insertion_point(field_release:message.Dispatch_response_msg.command_info)
-  clear_has_command_info();
-  ::message::Command_info* temp = command_info_;
-  command_info_ = NULL;
-  return temp;
+inline void Dispatch_response_msg::clear_command_key() {
+  command_key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  clear_has_command_key();
 }
-inline ::message::Command_info* Dispatch_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.Dispatch_response_msg.command_info)
-  return command_info_;
+inline const ::std::string& Dispatch_response_msg::command_key() const {
+  // @@protoc_insertion_point(field_get:message.Dispatch_response_msg.command_key)
+  return command_key_.GetNoArena();
 }
-inline void Dispatch_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();
+inline void Dispatch_response_msg::set_command_key(const ::std::string& value) {
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:message.Dispatch_response_msg.command_key)
+}
+#if LANG_CXX11
+inline void Dispatch_response_msg::set_command_key(::std::string&& value) {
+  set_has_command_key();
+  command_key_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:message.Dispatch_response_msg.command_key)
+}
+#endif
+inline void Dispatch_response_msg::set_command_key(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:message.Dispatch_response_msg.command_key)
+}
+inline void Dispatch_response_msg::set_command_key(const char* value, size_t size) {
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:message.Dispatch_response_msg.command_key)
+}
+inline ::std::string* Dispatch_response_msg::mutable_command_key() {
+  set_has_command_key();
+  // @@protoc_insertion_point(field_mutable:message.Dispatch_response_msg.command_key)
+  return command_key_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Dispatch_response_msg::release_command_key() {
+  // @@protoc_insertion_point(field_release:message.Dispatch_response_msg.command_key)
+  clear_has_command_key();
+  return command_key_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Dispatch_response_msg::set_allocated_command_key(::std::string* command_key) {
+  if (command_key != NULL) {
+    set_has_command_key();
   } else {
-    clear_has_command_info();
+    clear_has_command_key();
   }
-  command_info_ = command_info;
-  // @@protoc_insertion_point(field_set_allocated:message.Dispatch_response_msg.command_info)
+  command_key_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), command_key);
+  // @@protoc_insertion_point(field_set_allocated:message.Dispatch_response_msg.command_key)
 }
 
 // required .message.Error_manager error_manager = 3;

+ 2 - 2
message/dispatch_message.proto

@@ -54,7 +54,7 @@ message Dispatch_status_msg
 message Dispatch_request_msg
 {
     required Base_info                  base_info=1;                            //消息类型
-    required Command_info               command_info=2;                           //指令唯一标识符id
+    required string                     command_key=2;                   //指令唯一标识符id
 
     required Dispatch_motion_direction  dispatch_motion_direction=3;            //调度方向, 停车取车
     required int32                      terminal_id=4;                          //终端id, 出入口
@@ -66,7 +66,7 @@ message Dispatch_request_msg
 message Dispatch_response_msg
 {
     required Base_info                  base_info=1;                    //消息类型
-    required Command_info               command_info=2;                   //指令唯一标识符id
+    required string                     command_key=2;                   //指令唯一标识符id
     required Error_manager              error_manager = 3;
 }
 

+ 130 - 125
message/measure_message.pb.cc

@@ -70,7 +70,6 @@ void InitDefaultsMeasure_request_msgImpl() {
   ::google::protobuf::internal::InitProtobufDefaults();
 #endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   protobuf_message_5fbase_2eproto::InitDefaultsBase_info();
-  protobuf_message_5fbase_2eproto::InitDefaultsCommand_info();
   {
     void* ptr = &::message::_Measure_request_msg_default_instance_;
     new (ptr) ::message::Measure_request_msg();
@@ -93,7 +92,6 @@ void InitDefaultsMeasure_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::InitDefaultsLocate_information();
   protobuf_message_5fbase_2eproto::InitDefaultsError_manager();
   {
@@ -138,10 +136,10 @@ 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_request_msg, base_info_),
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_request_msg, command_info_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_request_msg, command_key_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_request_msg, terminal_id_),
-  0,
   1,
+  0,
   2,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, _internal_metadata_),
@@ -149,12 +147,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::Measure_response_msg, base_info_),
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, command_info_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, command_key_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, terminal_id_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, locate_information_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Measure_response_msg, error_manager_),
-  0,
   1,
+  0,
   4,
   2,
   3,
@@ -203,30 +201,29 @@ void AddDescriptorsImpl() {
       "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"
+      ".message.Error_manager\"f\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"
+      "info\022\023\n\013command_key\030\002 \002(\t\022\023\n\013terminal_id"
+      "\030\003 \002(\005\"\317\001\n\024Measure_response_msg\022%\n\tbase_"
+      "info\030\001 \002(\0132\022.message.Base_info\022\023\n\013comman"
+      "d_key\030\002 \002(\t\022\023\n\013terminal_id\030\003 \002(\005\0227\n\022loca"
+      "te_information\030\004 \001(\0132\033.message.Locate_in"
+      "formation\022-\n\rerror_manager\030\005 \002(\0132\026.messa"
+      "ge.Error_manager*\237\001\n\024Laser_manager_statu"
+      "s\022\030\n\024LASER_MANAGER_UNKNOW\020\000\022\027\n\023LASER_MAN"
+      "AGER_READY\020\001\022\035\n\031LASER_MANAGER_ISSUED_TAS"
+      "K\020\002\022\034\n\030LASER_MANAGER_WAIT_REPLY\020\003\022\027\n\023LAS"
+      "ER_MANAGER_FAULT\020\004*U\n\013Laser_statu\022\024\n\020LAS"
+      "ER_DISCONNECT\020\000\022\017\n\013LASER_READY\020\001\022\016\n\nLASE"
+      "R_BUSY\020\002\022\017\n\013LASER_FAULT\020\003*\261\001\n\025Locate_man"
+      "ager_status\022\031\n\025LOCATE_MANAGER_UNKNOW\020\000\022\030"
+      "\n\024LOCATE_MANAGER_READY\020\001\022\027\n\023LOCATE_MANAG"
+      "ER_SIFT\020\002\022\026\n\022LOCATE_MANAGER_CAR\020\003\022\030\n\024LOC"
+      "ATE_MANAGER_WHEEL\020\004\022\030\n\024LOCATE_MANAGER_FA"
+      "ULT\020\005"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 1213);
+      descriptor, 1165);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "measure_message.proto", &protobuf_RegisterTypes);
   ::protobuf_message_5fbase_2eproto::AddDescriptors();
@@ -898,20 +895,14 @@ void Measure_status_msg::InternalSwap(Measure_status_msg* other) {
 void Measure_request_msg::InitAsDefaultInstance() {
   ::message::_Measure_request_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
       ::message::Base_info::internal_default_instance());
-  ::message::_Measure_request_msg_default_instance_._instance.get_mutable()->command_info_ = const_cast< ::message::Command_info*>(
-      ::message::Command_info::internal_default_instance());
 }
 void Measure_request_msg::clear_base_info() {
   if (base_info_ != NULL) base_info_->Clear();
   clear_has_base_info();
 }
-void Measure_request_msg::clear_command_info() {
-  if (command_info_ != NULL) command_info_->Clear();
-  clear_has_command_info();
-}
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Measure_request_msg::kBaseInfoFieldNumber;
-const int Measure_request_msg::kCommandInfoFieldNumber;
+const int Measure_request_msg::kCommandKeyFieldNumber;
 const int Measure_request_msg::kTerminalIdFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
@@ -929,22 +920,22 @@ Measure_request_msg::Measure_request_msg(const Measure_request_msg& from)
       _has_bits_(from._has_bits_),
       _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
+  command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.has_command_key()) {
+    command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
+  }
   if (from.has_base_info()) {
     base_info_ = new ::message::Base_info(*from.base_info_);
   } else {
     base_info_ = NULL;
   }
-  if (from.has_command_info()) {
-    command_info_ = new ::message::Command_info(*from.command_info_);
-  } else {
-    command_info_ = NULL;
-  }
   terminal_id_ = from.terminal_id_;
   // @@protoc_insertion_point(copy_constructor:message.Measure_request_msg)
 }
 
 void Measure_request_msg::SharedCtor() {
   _cached_size_ = 0;
+  command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&base_info_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&terminal_id_) -
       reinterpret_cast<char*>(&base_info_)) + sizeof(terminal_id_));
@@ -956,8 +947,8 @@ Measure_request_msg::~Measure_request_msg() {
 }
 
 void Measure_request_msg::SharedDtor() {
+  command_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (this != internal_default_instance()) delete base_info_;
-  if (this != internal_default_instance()) delete command_info_;
 }
 
 void Measure_request_msg::SetCachedSize(int size) const {
@@ -992,12 +983,12 @@ void Measure_request_msg::Clear() {
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 3u) {
     if (cached_has_bits & 0x00000001u) {
-      GOOGLE_DCHECK(base_info_ != NULL);
-      base_info_->Clear();
+      GOOGLE_DCHECK(!command_key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*command_key_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000002u) {
-      GOOGLE_DCHECK(command_info_ != NULL);
-      command_info_->Clear();
+      GOOGLE_DCHECK(base_info_ != NULL);
+      base_info_->Clear();
     }
   }
   terminal_id_ = 0;
@@ -1027,12 +1018,16 @@ bool Measure_request_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required .message.Command_info command_info = 2;
+      // required string command_key = 2;
       case 2: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
-          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
-               input, mutable_command_info()));
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_command_key()));
+          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+            this->command_key().data(), static_cast<int>(this->command_key().length()),
+            ::google::protobuf::internal::WireFormat::PARSE,
+            "message.Measure_request_msg.command_key");
         } else {
           goto handle_unusual;
         }
@@ -1081,15 +1076,19 @@ void Measure_request_msg::SerializeWithCachedSizes(
 
   cached_has_bits = _has_bits_[0];
   // required .message.Base_info base_info = 1;
-  if (cached_has_bits & 0x00000001u) {
+  if (cached_has_bits & 0x00000002u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
       1, *this->base_info_, output);
   }
 
-  // required .message.Command_info command_info = 2;
-  if (cached_has_bits & 0x00000002u) {
-    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2, *this->command_info_, output);
+  // required string command_key = 2;
+  if (cached_has_bits & 0x00000001u) {
+    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+      this->command_key().data(), static_cast<int>(this->command_key().length()),
+      ::google::protobuf::internal::WireFormat::SERIALIZE,
+      "message.Measure_request_msg.command_key");
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      2, this->command_key(), output);
   }
 
   // required int32 terminal_id = 3;
@@ -1113,17 +1112,21 @@ void Measure_request_msg::SerializeWithCachedSizes(
 
   cached_has_bits = _has_bits_[0];
   // required .message.Base_info base_info = 1;
-  if (cached_has_bits & 0x00000001u) {
+  if (cached_has_bits & 0x00000002u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
         1, *this->base_info_, deterministic, 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 string command_key = 2;
+  if (cached_has_bits & 0x00000001u) {
+    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+      this->command_key().data(), static_cast<int>(this->command_key().length()),
+      ::google::protobuf::internal::WireFormat::SERIALIZE,
+      "message.Measure_request_msg.command_key");
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        2, this->command_key(), target);
   }
 
   // required int32 terminal_id = 3;
@@ -1143,18 +1146,18 @@ size_t Measure_request_msg::RequiredFieldsByteSizeFallback() const {
 // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Measure_request_msg)
   size_t total_size = 0;
 
-  if (has_base_info()) {
-    // required .message.Base_info base_info = 1;
+  if (has_command_key()) {
+    // required string command_key = 2;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->base_info_);
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->command_key());
   }
 
-  if (has_command_info()) {
-    // required .message.Command_info command_info = 2;
+  if (has_base_info()) {
+    // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->command_info_);
+        *this->base_info_);
   }
 
   if (has_terminal_id()) {
@@ -1176,15 +1179,15 @@ size_t Measure_request_msg::ByteSizeLong() const {
         _internal_metadata_.unknown_fields());
   }
   if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) {  // All required fields are present.
-    // required .message.Base_info base_info = 1;
+    // required string command_key = 2;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->base_info_);
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->command_key());
 
-    // required .message.Command_info command_info = 2;
+    // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->command_info_);
+        *this->base_info_);
 
     // required int32 terminal_id = 3;
     total_size += 1 +
@@ -1226,10 +1229,11 @@ void Measure_request_msg::MergeFrom(const Measure_request_msg& from) {
   cached_has_bits = from._has_bits_[0];
   if (cached_has_bits & 7u) {
     if (cached_has_bits & 0x00000001u) {
-      mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
+      set_has_command_key();
+      command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
     }
     if (cached_has_bits & 0x00000002u) {
-      mutable_command_info()->::message::Command_info::MergeFrom(from.command_info());
+      mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
     }
     if (cached_has_bits & 0x00000004u) {
       terminal_id_ = from.terminal_id_;
@@ -1257,9 +1261,6 @@ bool Measure_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;
 }
 
@@ -1269,8 +1270,8 @@ void Measure_request_msg::Swap(Measure_request_msg* other) {
 }
 void Measure_request_msg::InternalSwap(Measure_request_msg* other) {
   using std::swap;
+  command_key_.Swap(&other->command_key_);
   swap(base_info_, other->base_info_);
-  swap(command_info_, other->command_info_);
   swap(terminal_id_, other->terminal_id_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
@@ -1288,8 +1289,6 @@ void Measure_request_msg::InternalSwap(Measure_request_msg* other) {
 void Measure_response_msg::InitAsDefaultInstance() {
   ::message::_Measure_response_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
       ::message::Base_info::internal_default_instance());
-  ::message::_Measure_response_msg_default_instance_._instance.get_mutable()->command_info_ = const_cast< ::message::Command_info*>(
-      ::message::Command_info::internal_default_instance());
   ::message::_Measure_response_msg_default_instance_._instance.get_mutable()->locate_information_ = const_cast< ::message::Locate_information*>(
       ::message::Locate_information::internal_default_instance());
   ::message::_Measure_response_msg_default_instance_._instance.get_mutable()->error_manager_ = const_cast< ::message::Error_manager*>(
@@ -1299,10 +1298,6 @@ void Measure_response_msg::clear_base_info() {
   if (base_info_ != NULL) base_info_->Clear();
   clear_has_base_info();
 }
-void Measure_response_msg::clear_command_info() {
-  if (command_info_ != NULL) command_info_->Clear();
-  clear_has_command_info();
-}
 void Measure_response_msg::clear_locate_information() {
   if (locate_information_ != NULL) locate_information_->Clear();
   clear_has_locate_information();
@@ -1313,7 +1308,7 @@ void Measure_response_msg::clear_error_manager() {
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Measure_response_msg::kBaseInfoFieldNumber;
-const int Measure_response_msg::kCommandInfoFieldNumber;
+const int Measure_response_msg::kCommandKeyFieldNumber;
 const int Measure_response_msg::kTerminalIdFieldNumber;
 const int Measure_response_msg::kLocateInformationFieldNumber;
 const int Measure_response_msg::kErrorManagerFieldNumber;
@@ -1333,16 +1328,15 @@ Measure_response_msg::Measure_response_msg(const Measure_response_msg& from)
       _has_bits_(from._has_bits_),
       _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
+  command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.has_command_key()) {
+    command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
+  }
   if (from.has_base_info()) {
     base_info_ = new ::message::Base_info(*from.base_info_);
   } 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_locate_information()) {
     locate_information_ = new ::message::Locate_information(*from.locate_information_);
   } else {
@@ -1359,6 +1353,7 @@ Measure_response_msg::Measure_response_msg(const Measure_response_msg& from)
 
 void Measure_response_msg::SharedCtor() {
   _cached_size_ = 0;
+  command_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&base_info_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&terminal_id_) -
       reinterpret_cast<char*>(&base_info_)) + sizeof(terminal_id_));
@@ -1370,8 +1365,8 @@ Measure_response_msg::~Measure_response_msg() {
 }
 
 void Measure_response_msg::SharedDtor() {
+  command_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (this != internal_default_instance()) delete base_info_;
-  if (this != internal_default_instance()) delete command_info_;
   if (this != internal_default_instance()) delete locate_information_;
   if (this != internal_default_instance()) delete error_manager_;
 }
@@ -1408,12 +1403,12 @@ void Measure_response_msg::Clear() {
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 15u) {
     if (cached_has_bits & 0x00000001u) {
-      GOOGLE_DCHECK(base_info_ != NULL);
-      base_info_->Clear();
+      GOOGLE_DCHECK(!command_key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*command_key_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000002u) {
-      GOOGLE_DCHECK(command_info_ != NULL);
-      command_info_->Clear();
+      GOOGLE_DCHECK(base_info_ != NULL);
+      base_info_->Clear();
     }
     if (cached_has_bits & 0x00000004u) {
       GOOGLE_DCHECK(locate_information_ != NULL);
@@ -1451,12 +1446,16 @@ bool Measure_response_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required .message.Command_info command_info = 2;
+      // required string command_key = 2;
       case 2: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
-          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
-               input, mutable_command_info()));
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_command_key()));
+          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+            this->command_key().data(), static_cast<int>(this->command_key().length()),
+            ::google::protobuf::internal::WireFormat::PARSE,
+            "message.Measure_response_msg.command_key");
         } else {
           goto handle_unusual;
         }
@@ -1529,15 +1528,19 @@ void Measure_response_msg::SerializeWithCachedSizes(
 
   cached_has_bits = _has_bits_[0];
   // required .message.Base_info base_info = 1;
-  if (cached_has_bits & 0x00000001u) {
+  if (cached_has_bits & 0x00000002u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
       1, *this->base_info_, output);
   }
 
-  // required .message.Command_info command_info = 2;
-  if (cached_has_bits & 0x00000002u) {
-    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      2, *this->command_info_, output);
+  // required string command_key = 2;
+  if (cached_has_bits & 0x00000001u) {
+    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+      this->command_key().data(), static_cast<int>(this->command_key().length()),
+      ::google::protobuf::internal::WireFormat::SERIALIZE,
+      "message.Measure_response_msg.command_key");
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      2, this->command_key(), output);
   }
 
   // required int32 terminal_id = 3;
@@ -1573,17 +1576,21 @@ void Measure_response_msg::SerializeWithCachedSizes(
 
   cached_has_bits = _has_bits_[0];
   // required .message.Base_info base_info = 1;
-  if (cached_has_bits & 0x00000001u) {
+  if (cached_has_bits & 0x00000002u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
         1, *this->base_info_, deterministic, 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 string command_key = 2;
+  if (cached_has_bits & 0x00000001u) {
+    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
+      this->command_key().data(), static_cast<int>(this->command_key().length()),
+      ::google::protobuf::internal::WireFormat::SERIALIZE,
+      "message.Measure_response_msg.command_key");
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        2, this->command_key(), target);
   }
 
   // required int32 terminal_id = 3;
@@ -1617,18 +1624,18 @@ size_t Measure_response_msg::RequiredFieldsByteSizeFallback() const {
 // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Measure_response_msg)
   size_t total_size = 0;
 
-  if (has_base_info()) {
-    // required .message.Base_info base_info = 1;
+  if (has_command_key()) {
+    // required string command_key = 2;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->base_info_);
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->command_key());
   }
 
-  if (has_command_info()) {
-    // required .message.Command_info command_info = 2;
+  if (has_base_info()) {
+    // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->command_info_);
+        *this->base_info_);
   }
 
   if (has_error_manager()) {
@@ -1657,15 +1664,15 @@ size_t Measure_response_msg::ByteSizeLong() const {
         _internal_metadata_.unknown_fields());
   }
   if (((_has_bits_[0] & 0x0000001b) ^ 0x0000001b) == 0) {  // All required fields are present.
-    // required .message.Base_info base_info = 1;
+    // required string command_key = 2;
     total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->base_info_);
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->command_key());
 
-    // required .message.Command_info command_info = 2;
+    // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *this->command_info_);
+        *this->base_info_);
 
     // required .message.Error_manager error_manager = 5;
     total_size += 1 +
@@ -1719,10 +1726,11 @@ void Measure_response_msg::MergeFrom(const Measure_response_msg& from) {
   cached_has_bits = from._has_bits_[0];
   if (cached_has_bits & 31u) {
     if (cached_has_bits & 0x00000001u) {
-      mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
+      set_has_command_key();
+      command_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.command_key_);
     }
     if (cached_has_bits & 0x00000002u) {
-      mutable_command_info()->::message::Command_info::MergeFrom(from.command_info());
+      mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
     }
     if (cached_has_bits & 0x00000004u) {
       mutable_locate_information()->::message::Locate_information::MergeFrom(from.locate_information());
@@ -1756,9 +1764,6 @@ bool Measure_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;
   }
@@ -1771,8 +1776,8 @@ void Measure_response_msg::Swap(Measure_response_msg* other) {
 }
 void Measure_response_msg::InternalSwap(Measure_response_msg* other) {
   using std::swap;
+  command_key_.Swap(&other->command_key_);
   swap(base_info_, other->base_info_);
-  swap(command_info_, other->command_info_);
   swap(locate_information_, other->locate_information_);
   swap(error_manager_, other->error_manager_);
   swap(terminal_id_, other->terminal_id_);

+ 150 - 112
message/measure_message.pb.h

@@ -406,6 +406,21 @@ class Measure_request_msg : public ::google::protobuf::Message /* @@protoc_inser
 
   // accessors -------------------------------------------------------
 
+  // required string command_key = 2;
+  bool has_command_key() const;
+  void clear_command_key();
+  static const int kCommandKeyFieldNumber = 2;
+  const ::std::string& command_key() const;
+  void set_command_key(const ::std::string& value);
+  #if LANG_CXX11
+  void set_command_key(::std::string&& value);
+  #endif
+  void set_command_key(const char* value);
+  void set_command_key(const char* value, size_t size);
+  ::std::string* mutable_command_key();
+  ::std::string* release_command_key();
+  void set_allocated_command_key(::std::string* command_key);
+
   // required .message.Base_info base_info = 1;
   bool has_base_info() const;
   void clear_base_info();
@@ -415,15 +430,6 @@ class Measure_request_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.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 int32 terminal_id = 3;
   bool has_terminal_id() const;
   void clear_terminal_id();
@@ -435,8 +441,8 @@ class Measure_request_msg : public ::google::protobuf::Message /* @@protoc_inser
  private:
   void set_has_base_info();
   void clear_has_base_info();
-  void set_has_command_info();
-  void clear_has_command_info();
+  void set_has_command_key();
+  void clear_has_command_key();
   void set_has_terminal_id();
   void clear_has_terminal_id();
 
@@ -446,8 +452,8 @@ class Measure_request_msg : public ::google::protobuf::Message /* @@protoc_inser
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
+  ::google::protobuf::internal::ArenaStringPtr command_key_;
   ::message::Base_info* base_info_;
-  ::message::Command_info* command_info_;
   ::google::protobuf::int32 terminal_id_;
   friend struct ::protobuf_measure_5fmessage_2eproto::TableStruct;
   friend void ::protobuf_measure_5fmessage_2eproto::InitDefaultsMeasure_request_msgImpl();
@@ -543,6 +549,21 @@ class Measure_response_msg : public ::google::protobuf::Message /* @@protoc_inse
 
   // accessors -------------------------------------------------------
 
+  // required string command_key = 2;
+  bool has_command_key() const;
+  void clear_command_key();
+  static const int kCommandKeyFieldNumber = 2;
+  const ::std::string& command_key() const;
+  void set_command_key(const ::std::string& value);
+  #if LANG_CXX11
+  void set_command_key(::std::string&& value);
+  #endif
+  void set_command_key(const char* value);
+  void set_command_key(const char* value, size_t size);
+  ::std::string* mutable_command_key();
+  ::std::string* release_command_key();
+  void set_allocated_command_key(::std::string* command_key);
+
   // required .message.Base_info base_info = 1;
   bool has_base_info() const;
   void clear_base_info();
@@ -552,15 +573,6 @@ class Measure_response_msg : public ::google::protobuf::Message /* @@protoc_inse
   ::message::Base_info* mutable_base_info();
   void set_allocated_base_info(::message::Base_info* base_info);
 
-  // required .message.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);
-
   // optional .message.Locate_information locate_information = 4;
   bool has_locate_information() const;
   void clear_locate_information();
@@ -590,8 +602,8 @@ class Measure_response_msg : public ::google::protobuf::Message /* @@protoc_inse
  private:
   void set_has_base_info();
   void clear_has_base_info();
-  void set_has_command_info();
-  void clear_has_command_info();
+  void set_has_command_key();
+  void clear_has_command_key();
   void set_has_terminal_id();
   void clear_has_terminal_id();
   void set_has_locate_information();
@@ -605,8 +617,8 @@ class Measure_response_msg : public ::google::protobuf::Message /* @@protoc_inse
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
+  ::google::protobuf::internal::ArenaStringPtr command_key_;
   ::message::Base_info* base_info_;
-  ::message::Command_info* command_info_;
   ::message::Locate_information* locate_information_;
   ::message::Error_manager* error_manager_;
   ::google::protobuf::int32 terminal_id_;
@@ -886,13 +898,13 @@ inline void Measure_status_msg::set_allocated_error_manager(::message::Error_man
 
 // required .message.Base_info base_info = 1;
 inline bool Measure_request_msg::has_base_info() const {
-  return (_has_bits_[0] & 0x00000001u) != 0;
+  return (_has_bits_[0] & 0x00000002u) != 0;
 }
 inline void Measure_request_msg::set_has_base_info() {
-  _has_bits_[0] |= 0x00000001u;
+  _has_bits_[0] |= 0x00000002u;
 }
 inline void Measure_request_msg::clear_has_base_info() {
-  _has_bits_[0] &= ~0x00000001u;
+  _has_bits_[0] &= ~0x00000002u;
 }
 inline const ::message::Base_info& Measure_request_msg::base_info() const {
   const ::message::Base_info* p = base_info_;
@@ -934,54 +946,67 @@ inline void Measure_request_msg::set_allocated_base_info(::message::Base_info* b
   // @@protoc_insertion_point(field_set_allocated:message.Measure_request_msg.base_info)
 }
 
-// required .message.Command_info command_info = 2;
-inline bool Measure_request_msg::has_command_info() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
+// required string command_key = 2;
+inline bool Measure_request_msg::has_command_key() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
 }
-inline void Measure_request_msg::set_has_command_info() {
-  _has_bits_[0] |= 0x00000002u;
+inline void Measure_request_msg::set_has_command_key() {
+  _has_bits_[0] |= 0x00000001u;
 }
-inline void Measure_request_msg::clear_has_command_info() {
-  _has_bits_[0] &= ~0x00000002u;
+inline void Measure_request_msg::clear_has_command_key() {
+  _has_bits_[0] &= ~0x00000001u;
 }
-inline const ::message::Command_info& Measure_request_msg::command_info() const {
-  const ::message::Command_info* p = command_info_;
-  // @@protoc_insertion_point(field_get:message.Measure_request_msg.command_info)
-  return p != NULL ? *p : *reinterpret_cast<const ::message::Command_info*>(
-      &::message::_Command_info_default_instance_);
-}
-inline ::message::Command_info* Measure_request_msg::release_command_info() {
-  // @@protoc_insertion_point(field_release:message.Measure_request_msg.command_info)
-  clear_has_command_info();
-  ::message::Command_info* temp = command_info_;
-  command_info_ = NULL;
-  return temp;
+inline void Measure_request_msg::clear_command_key() {
+  command_key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  clear_has_command_key();
 }
-inline ::message::Command_info* Measure_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.Measure_request_msg.command_info)
-  return command_info_;
+inline const ::std::string& Measure_request_msg::command_key() const {
+  // @@protoc_insertion_point(field_get:message.Measure_request_msg.command_key)
+  return command_key_.GetNoArena();
 }
-inline void Measure_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();
+inline void Measure_request_msg::set_command_key(const ::std::string& value) {
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:message.Measure_request_msg.command_key)
+}
+#if LANG_CXX11
+inline void Measure_request_msg::set_command_key(::std::string&& value) {
+  set_has_command_key();
+  command_key_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:message.Measure_request_msg.command_key)
+}
+#endif
+inline void Measure_request_msg::set_command_key(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:message.Measure_request_msg.command_key)
+}
+inline void Measure_request_msg::set_command_key(const char* value, size_t size) {
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:message.Measure_request_msg.command_key)
+}
+inline ::std::string* Measure_request_msg::mutable_command_key() {
+  set_has_command_key();
+  // @@protoc_insertion_point(field_mutable:message.Measure_request_msg.command_key)
+  return command_key_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Measure_request_msg::release_command_key() {
+  // @@protoc_insertion_point(field_release:message.Measure_request_msg.command_key)
+  clear_has_command_key();
+  return command_key_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Measure_request_msg::set_allocated_command_key(::std::string* command_key) {
+  if (command_key != NULL) {
+    set_has_command_key();
   } else {
-    clear_has_command_info();
+    clear_has_command_key();
   }
-  command_info_ = command_info;
-  // @@protoc_insertion_point(field_set_allocated:message.Measure_request_msg.command_info)
+  command_key_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), command_key);
+  // @@protoc_insertion_point(field_set_allocated:message.Measure_request_msg.command_key)
 }
 
 // required int32 terminal_id = 3;
@@ -1014,13 +1039,13 @@ inline void Measure_request_msg::set_terminal_id(::google::protobuf::int32 value
 
 // required .message.Base_info base_info = 1;
 inline bool Measure_response_msg::has_base_info() const {
-  return (_has_bits_[0] & 0x00000001u) != 0;
+  return (_has_bits_[0] & 0x00000002u) != 0;
 }
 inline void Measure_response_msg::set_has_base_info() {
-  _has_bits_[0] |= 0x00000001u;
+  _has_bits_[0] |= 0x00000002u;
 }
 inline void Measure_response_msg::clear_has_base_info() {
-  _has_bits_[0] &= ~0x00000001u;
+  _has_bits_[0] &= ~0x00000002u;
 }
 inline const ::message::Base_info& Measure_response_msg::base_info() const {
   const ::message::Base_info* p = base_info_;
@@ -1062,54 +1087,67 @@ inline void Measure_response_msg::set_allocated_base_info(::message::Base_info*
   // @@protoc_insertion_point(field_set_allocated:message.Measure_response_msg.base_info)
 }
 
-// required .message.Command_info command_info = 2;
-inline bool Measure_response_msg::has_command_info() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
+// required string command_key = 2;
+inline bool Measure_response_msg::has_command_key() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
 }
-inline void Measure_response_msg::set_has_command_info() {
-  _has_bits_[0] |= 0x00000002u;
+inline void Measure_response_msg::set_has_command_key() {
+  _has_bits_[0] |= 0x00000001u;
 }
-inline void Measure_response_msg::clear_has_command_info() {
-  _has_bits_[0] &= ~0x00000002u;
+inline void Measure_response_msg::clear_has_command_key() {
+  _has_bits_[0] &= ~0x00000001u;
 }
-inline const ::message::Command_info& Measure_response_msg::command_info() const {
-  const ::message::Command_info* p = command_info_;
-  // @@protoc_insertion_point(field_get:message.Measure_response_msg.command_info)
-  return p != NULL ? *p : *reinterpret_cast<const ::message::Command_info*>(
-      &::message::_Command_info_default_instance_);
-}
-inline ::message::Command_info* Measure_response_msg::release_command_info() {
-  // @@protoc_insertion_point(field_release:message.Measure_response_msg.command_info)
-  clear_has_command_info();
-  ::message::Command_info* temp = command_info_;
-  command_info_ = NULL;
-  return temp;
+inline void Measure_response_msg::clear_command_key() {
+  command_key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  clear_has_command_key();
 }
-inline ::message::Command_info* Measure_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.Measure_response_msg.command_info)
-  return command_info_;
+inline const ::std::string& Measure_response_msg::command_key() const {
+  // @@protoc_insertion_point(field_get:message.Measure_response_msg.command_key)
+  return command_key_.GetNoArena();
 }
-inline void Measure_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();
+inline void Measure_response_msg::set_command_key(const ::std::string& value) {
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:message.Measure_response_msg.command_key)
+}
+#if LANG_CXX11
+inline void Measure_response_msg::set_command_key(::std::string&& value) {
+  set_has_command_key();
+  command_key_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:message.Measure_response_msg.command_key)
+}
+#endif
+inline void Measure_response_msg::set_command_key(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:message.Measure_response_msg.command_key)
+}
+inline void Measure_response_msg::set_command_key(const char* value, size_t size) {
+  set_has_command_key();
+  command_key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:message.Measure_response_msg.command_key)
+}
+inline ::std::string* Measure_response_msg::mutable_command_key() {
+  set_has_command_key();
+  // @@protoc_insertion_point(field_mutable:message.Measure_response_msg.command_key)
+  return command_key_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Measure_response_msg::release_command_key() {
+  // @@protoc_insertion_point(field_release:message.Measure_response_msg.command_key)
+  clear_has_command_key();
+  return command_key_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Measure_response_msg::set_allocated_command_key(::std::string* command_key) {
+  if (command_key != NULL) {
+    set_has_command_key();
   } else {
-    clear_has_command_info();
+    clear_has_command_key();
   }
-  command_info_ = command_info;
-  // @@protoc_insertion_point(field_set_allocated:message.Measure_response_msg.command_info)
+  command_key_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), command_key);
+  // @@protoc_insertion_point(field_set_allocated:message.Measure_response_msg.command_key)
 }
 
 // required int32 terminal_id = 3;

+ 2 - 2
message/measure_message.proto

@@ -51,7 +51,7 @@ message Measure_status_msg
 message Measure_request_msg
 {
     required Base_info                  base_info=1;        //消息类型
-    required Command_info               command_info=2;                   //指令唯一标识符id
+    required string                     command_key=2;                   //指令唯一标识符id
     required int32                      terminal_id=3;          //终端id
 }
 
@@ -59,7 +59,7 @@ message Measure_request_msg
 message Measure_response_msg
 {
     required Base_info                  base_info=1;                         //消息类型
-    required Command_info               command_info=2;                   //指令唯一标识符id
+    required string                     command_key=2;                   //指令唯一标识符id
     required int32                      terminal_id=3;
 
     optional Locate_information         locate_information=4;

+ 59 - 502
message/message_base.pb.cc

@@ -25,11 +25,6 @@ class Base_infoDefaultTypeInternal {
   ::google::protobuf::internal::ExplicitlyConstructed<Base_info>
       _instance;
 } _Base_info_default_instance_;
-class Command_infoDefaultTypeInternal {
- public:
-  ::google::protobuf::internal::ExplicitlyConstructed<Command_info>
-      _instance;
-} _Command_info_default_instance_;
 class Base_msgDefaultTypeInternal {
  public:
   ::google::protobuf::internal::ExplicitlyConstructed<Base_msg>
@@ -78,27 +73,6 @@ void InitDefaultsBase_info() {
   ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBase_infoImpl);
 }
 
-void InitDefaultsCommand_infoImpl() {
-  GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
-  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
-  ::google::protobuf::internal::InitProtobufDefaults();
-#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
-  {
-    void* ptr = &::message::_Command_info_default_instance_;
-    new (ptr) ::message::Command_info();
-    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
-  }
-  ::message::Command_info::InitAsDefaultInstance();
-}
-
-void InitDefaultsCommand_info() {
-  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
-  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCommand_infoImpl);
-}
-
 void InitDefaultsBase_msgImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
@@ -206,7 +180,7 @@ void InitDefaultsParkspace_info() {
   ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsParkspace_infoImpl);
 }
 
-::google::protobuf::Metadata file_level_metadata[7];
+::google::protobuf::Metadata file_level_metadata[6];
 const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[6];
 
 const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
@@ -223,17 +197,6 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   1,
   2,
   3,
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_info, _has_bits_),
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_info, _internal_metadata_),
-  ~0u,  // no _extensions_
-  ~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, place_),
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_info, event_),
-  0,
-  1,
-  2,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Base_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Base_msg, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -318,17 +281,15 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
 };
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
   { 0, 9, sizeof(::message::Base_info)},
-  { 13, 21, sizeof(::message::Command_info)},
-  { 24, 30, sizeof(::message::Base_msg)},
-  { 31, 39, sizeof(::message::Error_manager)},
-  { 42, 56, sizeof(::message::Locate_information)},
-  { 65, 74, sizeof(::message::Car_info)},
-  { 78, 94, sizeof(::message::Parkspace_info)},
+  { 13, 19, sizeof(::message::Base_msg)},
+  { 20, 28, sizeof(::message::Error_manager)},
+  { 31, 45, sizeof(::message::Locate_information)},
+  { 54, 63, sizeof(::message::Car_info)},
+  { 67, 83, sizeof(::message::Parkspace_info)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
   reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Base_info_default_instance_),
-  reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Command_info_default_instance_),
   reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Base_msg_default_instance_),
   reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Error_manager_default_instance_),
   reinterpret_cast<const ::google::protobuf::Message*>(&::message::_Locate_information_default_instance_),
@@ -352,7 +313,7 @@ void protobuf_AssignDescriptorsOnce() {
 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
 void protobuf_RegisterTypes(const ::std::string&) {
   protobuf_AssignDescriptorsOnce();
-  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 7);
+  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 6);
 }
 
 void AddDescriptorsImpl() {
@@ -362,62 +323,60 @@ 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\"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"
+      "\0162\025.message.Communicator\"1\n\010Base_msg\022%\n\t"
+      "base_info\030\001 \002(\0132\022.message.Base_info\"i\n\rE"
+      "rror_manager\022\022\n\nerror_code\030\001 \002(\005\022)\n\013erro"
+      "r_level\030\002 \001(\0162\024.message.Error_level\022\031\n\021e"
+      "rror_description\030\003 \001(\t\"\341\001\n\022Locate_inform"
+      "ation\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_h"
+      "eight\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_cor"
+      "rect\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"
+      "\014parkspace_id\030\001 \001(\005\022\r\n\005index\030\002 \001(\005\022%\n\tdi"
+      "rection\030\003 \001(\0162\022.message.Direction\022\r\n\005flo"
+      "or\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("
+      "\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_ty"
+      "pe\022\r\n\teBase_msg\020\000\022\020\n\014eCommand_msg\020\001\022\026\n\022e"
+      "Locate_status_msg\020\021\022\027\n\023eLocate_request_m"
+      "sg\020\022\022\030\n\024eLocate_response_msg\020\023\022\030\n\024eDispa"
+      "tch_status_msg\020!\022\031\n\025eDispatch_request_ms"
+      "g\020\"\022\032\n\026eDispatch_response_msg\020#\022$\n ePark"
+      "space_allocation_status_msg\0201\022%\n!eParksp"
+      "ace_allocation_request_msg\0202\022&\n\"eParkspa"
+      "ce_allocation_response_msg\0203\022!\n\035eParkspa"
+      "ce_search_request_msg\0204\022\"\n\036eParkspace_se"
+      "arch_response_msg\0205\022\"\n\036eParkspace_releas"
+      "e_request_msg\0206\022#\n\037eParkspace_release_re"
+      "sponse_msg\0207\022\'\n#eParkspace_force_update_"
+      "request_msg\0208\022(\n$eParkspace_force_update"
+      "_response_msg\0209\022(\n$eParkspace_confirm_al"
+      "loc_request_msg\020:\022)\n%eParkspace_confirm_"
+      "alloc_response_msg\020;\022\036\n\032eStore_command_r"
+      "equest_msg\020A\022\037\n\033eStore_command_response_"
+      "msg\020B\022\037\n\033ePickup_command_request_msg\020C\022 "
+      "\n\034ePickup_command_response_msg\020D\022\037\n\032eSto"
+      "ring_process_statu_msg\020\220\001\022\037\n\032ePicking_pr"
+      "ocess_statu_msg\020\221\001*f\n\014Communicator\022\n\n\006eE"
+      "mpty\020\000\022\t\n\005eMain\020\001\022\016\n\teTerminor\020\200\002\022\017\n\nePa"
+      "rkspace\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_stat"
+      "us\022\024\n\020eParkspace_empty\020\000\022\027\n\023eParkspace_o"
+      "ccupied\020\001\022\030\n\024eParkspace_reserverd\020\002\022\024\n\020e"
+      "Parkspace_error\020\003*(\n\tDirection\022\014\n\010eForwa"
+      "rd\020\001\022\r\n\teBackward\020\002"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 2255);
+      descriptor, 2179);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "message_base.proto", &protobuf_RegisterTypes);
 }
@@ -959,408 +918,6 @@ void Base_info::InternalSwap(Base_info* other) {
 }
 
 
-// ===================================================================
-
-void Command_info::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int Command_info::kTimeFieldNumber;
-const int Command_info::kPlaceFieldNumber;
-const int Command_info::kEventFieldNumber;
-#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-Command_info::Command_info()
-  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
-    ::protobuf_message_5fbase_2eproto::InitDefaultsCommand_info();
-  }
-  SharedCtor();
-  // @@protoc_insertion_point(constructor:message.Command_info)
-}
-Command_info::Command_info(const Command_info& from)
-  : ::google::protobuf::Message(),
-      _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_),
-      _cached_size_(0) {
-  _internal_metadata_.MergeFrom(from._internal_metadata_);
-  time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  if (from.has_time()) {
-    time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.time_);
-  }
-  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)
-}
-
-void Command_info::SharedCtor() {
-  _cached_size_ = 0;
-  time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  place_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  event_ = 1;
-}
-
-Command_info::~Command_info() {
-  // @@protoc_insertion_point(destructor:message.Command_info)
-  SharedDtor();
-}
-
-void Command_info::SharedDtor() {
-  time_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  place_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void Command_info::SetCachedSize(int size) const {
-  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
-  _cached_size_ = size;
-  GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Command_info::descriptor() {
-  ::protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce();
-  return ::protobuf_message_5fbase_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const Command_info& Command_info::default_instance() {
-  ::protobuf_message_5fbase_2eproto::InitDefaultsCommand_info();
-  return *internal_default_instance();
-}
-
-Command_info* Command_info::New(::google::protobuf::Arena* arena) const {
-  Command_info* n = new Command_info;
-  if (arena != NULL) {
-    arena->Own(n);
-  }
-  return n;
-}
-
-void Command_info::Clear() {
-// @@protoc_insertion_point(message_clear_start:message.Command_info)
-  ::google::protobuf::uint32 cached_has_bits = 0;
-  // Prevent compiler warnings about cached_has_bits being unused
-  (void) cached_has_bits;
-
-  cached_has_bits = _has_bits_[0];
-  if (cached_has_bits & 7u) {
-    if (cached_has_bits & 0x00000001u) {
-      GOOGLE_DCHECK(!time_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
-      (*time_.UnsafeRawStringPointer())->clear();
-    }
-    if (cached_has_bits & 0x00000002u) {
-      GOOGLE_DCHECK(!place_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
-      (*place_.UnsafeRawStringPointer())->clear();
-    }
-    event_ = 1;
-  }
-  _has_bits_.Clear();
-  _internal_metadata_.Clear();
-}
-
-bool Command_info::MergePartialFromCodedStream(
-    ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
-  ::google::protobuf::uint32 tag;
-  // @@protoc_insertion_point(parse_start:message.Command_info)
-  for (;;) {
-    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
-    tag = p.first;
-    if (!p.second) goto handle_unusual;
-    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // required string time = 1;
-      case 1: {
-        if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
-          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
-                input, this->mutable_time()));
-          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
-            this->time().data(), static_cast<int>(this->time().length()),
-            ::google::protobuf::internal::WireFormat::PARSE,
-            "message.Command_info.time");
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // 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_place()));
-          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
-            this->place().data(), static_cast<int>(this->place().length()),
-            ::google::protobuf::internal::WireFormat::PARSE,
-            "message.Command_info.place");
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // required .message.Event event = 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>(
-                 input, &value)));
-          if (::message::Event_IsValid(value)) {
-            set_event(static_cast< ::message::Event >(value));
-          } else {
-            mutable_unknown_fields()->AddVarint(
-                3, static_cast< ::google::protobuf::uint64>(value));
-          }
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      default: {
-      handle_unusual:
-        if (tag == 0) {
-          goto success;
-        }
-        DO_(::google::protobuf::internal::WireFormat::SkipField(
-              input, tag, _internal_metadata_.mutable_unknown_fields()));
-        break;
-      }
-    }
-  }
-success:
-  // @@protoc_insertion_point(parse_success:message.Command_info)
-  return true;
-failure:
-  // @@protoc_insertion_point(parse_failure:message.Command_info)
-  return false;
-#undef DO_
-}
-
-void Command_info::SerializeWithCachedSizes(
-    ::google::protobuf::io::CodedOutputStream* output) const {
-  // @@protoc_insertion_point(serialize_start:message.Command_info)
-  ::google::protobuf::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  cached_has_bits = _has_bits_[0];
-  // required string time = 1;
-  if (cached_has_bits & 0x00000001u) {
-    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
-      this->time().data(), static_cast<int>(this->time().length()),
-      ::google::protobuf::internal::WireFormat::SERIALIZE,
-      "message.Command_info.time");
-    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
-      1, this->time(), output);
-  }
-
-  // required string place = 2;
-  if (cached_has_bits & 0x00000002u) {
-    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
-      this->place().data(), static_cast<int>(this->place().length()),
-      ::google::protobuf::internal::WireFormat::SERIALIZE,
-      "message.Command_info.place");
-    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
-      2, this->place(), output);
-  }
-
-  // required .message.Event event = 3;
-  if (cached_has_bits & 0x00000004u) {
-    ::google::protobuf::internal::WireFormatLite::WriteEnum(
-      3, this->event(), output);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
-        _internal_metadata_.unknown_fields(), output);
-  }
-  // @@protoc_insertion_point(serialize_end:message.Command_info)
-}
-
-::google::protobuf::uint8* Command_info::InternalSerializeWithCachedSizesToArray(
-    bool deterministic, ::google::protobuf::uint8* target) const {
-  (void)deterministic; // Unused
-  // @@protoc_insertion_point(serialize_to_array_start:message.Command_info)
-  ::google::protobuf::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  cached_has_bits = _has_bits_[0];
-  // required string time = 1;
-  if (cached_has_bits & 0x00000001u) {
-    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
-      this->time().data(), static_cast<int>(this->time().length()),
-      ::google::protobuf::internal::WireFormat::SERIALIZE,
-      "message.Command_info.time");
-    target =
-      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
-        1, this->time(), target);
-  }
-
-  // required string place = 2;
-  if (cached_has_bits & 0x00000002u) {
-    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
-      this->place().data(), static_cast<int>(this->place().length()),
-      ::google::protobuf::internal::WireFormat::SERIALIZE,
-      "message.Command_info.place");
-    target =
-      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
-        2, this->place(), target);
-  }
-
-  // required .message.Event event = 3;
-  if (cached_has_bits & 0x00000004u) {
-    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
-      3, this->event(), target);
-  }
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
-        _internal_metadata_.unknown_fields(), target);
-  }
-  // @@protoc_insertion_point(serialize_to_array_end:message.Command_info)
-  return target;
-}
-
-size_t Command_info::RequiredFieldsByteSizeFallback() const {
-// @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Command_info)
-  size_t total_size = 0;
-
-  if (has_time()) {
-    // required string time = 1;
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::StringSize(
-        this->time());
-  }
-
-  if (has_place()) {
-    // required string place = 2;
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::StringSize(
-        this->place());
-  }
-
-  if (has_event()) {
-    // required .message.Event event = 3;
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::EnumSize(this->event());
-  }
-
-  return total_size;
-}
-size_t Command_info::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:message.Command_info)
-  size_t total_size = 0;
-
-  if (_internal_metadata_.have_unknown_fields()) {
-    total_size +=
-      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
-        _internal_metadata_.unknown_fields());
-  }
-  if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) {  // All required fields are present.
-    // required string time = 1;
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::StringSize(
-        this->time());
-
-    // required string place = 2;
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::StringSize(
-        this->place());
-
-    // required .message.Event event = 3;
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::EnumSize(this->event());
-
-  } else {
-    total_size += RequiredFieldsByteSizeFallback();
-  }
-  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
-  _cached_size_ = cached_size;
-  GOOGLE_SAFE_CONCURRENT_WRITES_END();
-  return total_size;
-}
-
-void Command_info::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:message.Command_info)
-  GOOGLE_DCHECK_NE(&from, this);
-  const Command_info* source =
-      ::google::protobuf::internal::DynamicCastToGenerated<const Command_info>(
-          &from);
-  if (source == NULL) {
-  // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Command_info)
-    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
-  } else {
-  // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Command_info)
-    MergeFrom(*source);
-  }
-}
-
-void Command_info::MergeFrom(const Command_info& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:message.Command_info)
-  GOOGLE_DCHECK_NE(&from, this);
-  _internal_metadata_.MergeFrom(from._internal_metadata_);
-  ::google::protobuf::uint32 cached_has_bits = 0;
-  (void) cached_has_bits;
-
-  cached_has_bits = from._has_bits_[0];
-  if (cached_has_bits & 7u) {
-    if (cached_has_bits & 0x00000001u) {
-      set_has_time();
-      time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.time_);
-    }
-    if (cached_has_bits & 0x00000002u) {
-      set_has_place();
-      place_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.place_);
-    }
-    if (cached_has_bits & 0x00000004u) {
-      event_ = from.event_;
-    }
-    _has_bits_[0] |= cached_has_bits;
-  }
-}
-
-void Command_info::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:message.Command_info)
-  if (&from == this) return;
-  Clear();
-  MergeFrom(from);
-}
-
-void Command_info::CopyFrom(const Command_info& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:message.Command_info)
-  if (&from == this) return;
-  Clear();
-  MergeFrom(from);
-}
-
-bool Command_info::IsInitialized() const {
-  if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
-  return true;
-}
-
-void Command_info::Swap(Command_info* other) {
-  if (other == this) return;
-  InternalSwap(other);
-}
-void Command_info::InternalSwap(Command_info* other) {
-  using std::swap;
-  time_.Swap(&other->time_);
-  place_.Swap(&other->place_);
-  swap(event_, other->event_);
-  swap(_has_bits_[0], other->_has_bits_[0]);
-  _internal_metadata_.Swap(&other->_internal_metadata_);
-  swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata Command_info::GetMetadata() const {
-  protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce();
-  return ::protobuf_message_5fbase_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
 // ===================================================================
 
 void Base_msg::InitAsDefaultInstance() {

+ 6 - 318
message/message_base.pb.h

@@ -37,7 +37,7 @@ namespace protobuf_message_5fbase_2eproto {
 struct TableStruct {
   static const ::google::protobuf::internal::ParseTableField entries[];
   static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
-  static const ::google::protobuf::internal::ParseTable schema[7];
+  static const ::google::protobuf::internal::ParseTable schema[6];
   static const ::google::protobuf::internal::FieldMetadata field_metadata[];
   static const ::google::protobuf::internal::SerializationTable serialization_table[];
   static const ::google::protobuf::uint32 offsets[];
@@ -45,8 +45,6 @@ struct TableStruct {
 void AddDescriptors();
 void InitDefaultsBase_infoImpl();
 void InitDefaultsBase_info();
-void InitDefaultsCommand_infoImpl();
-void InitDefaultsCommand_info();
 void InitDefaultsBase_msgImpl();
 void InitDefaultsBase_msg();
 void InitDefaultsError_managerImpl();
@@ -59,7 +57,6 @@ void InitDefaultsParkspace_infoImpl();
 void InitDefaultsParkspace_info();
 inline void InitDefaults() {
   InitDefaultsBase_info();
-  InitDefaultsCommand_info();
   InitDefaultsBase_msg();
   InitDefaultsError_manager();
   InitDefaultsLocate_information();
@@ -77,9 +74,6 @@ extern Base_msgDefaultTypeInternal _Base_msg_default_instance_;
 class Car_info;
 class Car_infoDefaultTypeInternal;
 extern Car_infoDefaultTypeInternal _Car_info_default_instance_;
-class Command_info;
-class Command_infoDefaultTypeInternal;
-extern Command_infoDefaultTypeInternal _Command_info_default_instance_;
 class Error_manager;
 class Error_managerDefaultTypeInternal;
 extern Error_managerDefaultTypeInternal _Error_manager_default_instance_;
@@ -383,155 +377,6 @@ class Base_info : public ::google::protobuf::Message /* @@protoc_insertion_point
 };
 // -------------------------------------------------------------------
 
-class Command_info : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:message.Command_info) */ {
- public:
-  Command_info();
-  virtual ~Command_info();
-
-  Command_info(const Command_info& from);
-
-  inline Command_info& operator=(const Command_info& from) {
-    CopyFrom(from);
-    return *this;
-  }
-  #if LANG_CXX11
-  Command_info(Command_info&& from) noexcept
-    : Command_info() {
-    *this = ::std::move(from);
-  }
-
-  inline Command_info& operator=(Command_info&& from) noexcept {
-    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
-      if (this != &from) InternalSwap(&from);
-    } else {
-      CopyFrom(from);
-    }
-    return *this;
-  }
-  #endif
-  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
-    return _internal_metadata_.unknown_fields();
-  }
-  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
-    return _internal_metadata_.mutable_unknown_fields();
-  }
-
-  static const ::google::protobuf::Descriptor* descriptor();
-  static const Command_info& default_instance();
-
-  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
-  static inline const Command_info* internal_default_instance() {
-    return reinterpret_cast<const Command_info*>(
-               &_Command_info_default_instance_);
-  }
-  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
-    1;
-
-  void Swap(Command_info* other);
-  friend void swap(Command_info& a, Command_info& b) {
-    a.Swap(&b);
-  }
-
-  // implements Message ----------------------------------------------
-
-  inline Command_info* New() const PROTOBUF_FINAL { return New(NULL); }
-
-  Command_info* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
-  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
-  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
-  void CopyFrom(const Command_info& from);
-  void MergeFrom(const Command_info& from);
-  void Clear() PROTOBUF_FINAL;
-  bool IsInitialized() const PROTOBUF_FINAL;
-
-  size_t ByteSizeLong() const PROTOBUF_FINAL;
-  bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
-  void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
-  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
-  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
-  private:
-  void SharedCtor();
-  void SharedDtor();
-  void SetCachedSize(int size) const PROTOBUF_FINAL;
-  void InternalSwap(Command_info* other);
-  private:
-  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
-    return NULL;
-  }
-  inline void* MaybeArenaPtr() const {
-    return NULL;
-  }
-  public:
-
-  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
-  // nested types ----------------------------------------------------
-
-  // accessors -------------------------------------------------------
-
-  // required string time = 1;
-  bool has_time() const;
-  void clear_time();
-  static const int kTimeFieldNumber = 1;
-  const ::std::string& time() const;
-  void set_time(const ::std::string& value);
-  #if LANG_CXX11
-  void set_time(::std::string&& value);
-  #endif
-  void set_time(const char* value);
-  void set_time(const char* value, size_t size);
-  ::std::string* mutable_time();
-  ::std::string* release_time();
-  void set_allocated_time(::std::string* time);
-
-  // 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_place(::std::string&& value);
-  #endif
-  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;
-  void clear_event();
-  static const int kEventFieldNumber = 3;
-  ::message::Event event() const;
-  void set_event(::message::Event value);
-
-  // @@protoc_insertion_point(class_scope:message.Command_info)
- private:
-  void set_has_time();
-  void clear_has_time();
-  void set_has_place();
-  void clear_has_place();
-  void set_has_event();
-  void clear_has_event();
-
-  // helper for ByteSizeLong()
-  size_t RequiredFieldsByteSizeFallback() const;
-
-  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
-  ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable int _cached_size_;
-  ::google::protobuf::internal::ArenaStringPtr time_;
-  ::google::protobuf::internal::ArenaStringPtr place_;
-  int event_;
-  friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
-  friend void ::protobuf_message_5fbase_2eproto::InitDefaultsCommand_infoImpl();
-};
-// -------------------------------------------------------------------
-
 class Base_msg : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:message.Base_msg) */ {
  public:
   Base_msg();
@@ -574,7 +419,7 @@ class Base_msg : public ::google::protobuf::Message /* @@protoc_insertion_point(
                &_Base_msg_default_instance_);
   }
   static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
-    2;
+    1;
 
   void Swap(Base_msg* other);
   friend void swap(Base_msg& a, Base_msg& b) {
@@ -686,7 +531,7 @@ class Error_manager : public ::google::protobuf::Message /* @@protoc_insertion_p
                &_Error_manager_default_instance_);
   }
   static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
-    3;
+    2;
 
   void Swap(Error_manager* other);
   friend void swap(Error_manager& a, Error_manager& b) {
@@ -824,7 +669,7 @@ class Locate_information : public ::google::protobuf::Message /* @@protoc_insert
                &_Locate_information_default_instance_);
   }
   static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
-    4;
+    3;
 
   void Swap(Locate_information* other);
   friend void swap(Locate_information& a, Locate_information& b) {
@@ -1014,7 +859,7 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
                &_Car_info_default_instance_);
   }
   static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
-    5;
+    4;
 
   void Swap(Car_info* other);
   friend void swap(Car_info& a, Car_info& b) {
@@ -1162,7 +1007,7 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
                &_Parkspace_info_default_instance_);
   }
   static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
-    6;
+    5;
 
   void Swap(Parkspace_info* other);
   friend void swap(Parkspace_info& a, Parkspace_info& b) {
@@ -1458,161 +1303,6 @@ inline void Base_info::set_receiver(::message::Communicator value) {
 
 // -------------------------------------------------------------------
 
-// Command_info
-
-// required string time = 1;
-inline bool Command_info::has_time() const {
-  return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void Command_info::set_has_time() {
-  _has_bits_[0] |= 0x00000001u;
-}
-inline void Command_info::clear_has_time() {
-  _has_bits_[0] &= ~0x00000001u;
-}
-inline void Command_info::clear_time() {
-  time_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  clear_has_time();
-}
-inline const ::std::string& Command_info::time() const {
-  // @@protoc_insertion_point(field_get:message.Command_info.time)
-  return time_.GetNoArena();
-}
-inline void Command_info::set_time(const ::std::string& value) {
-  set_has_time();
-  time_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
-  // @@protoc_insertion_point(field_set:message.Command_info.time)
-}
-#if LANG_CXX11
-inline void Command_info::set_time(::std::string&& value) {
-  set_has_time();
-  time_.SetNoArena(
-    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
-  // @@protoc_insertion_point(field_set_rvalue:message.Command_info.time)
-}
-#endif
-inline void Command_info::set_time(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
-  set_has_time();
-  time_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
-  // @@protoc_insertion_point(field_set_char:message.Command_info.time)
-}
-inline void Command_info::set_time(const char* value, size_t size) {
-  set_has_time();
-  time_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-      ::std::string(reinterpret_cast<const char*>(value), size));
-  // @@protoc_insertion_point(field_set_pointer:message.Command_info.time)
-}
-inline ::std::string* Command_info::mutable_time() {
-  set_has_time();
-  // @@protoc_insertion_point(field_mutable:message.Command_info.time)
-  return time_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* Command_info::release_time() {
-  // @@protoc_insertion_point(field_release:message.Command_info.time)
-  clear_has_time();
-  return time_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void Command_info::set_allocated_time(::std::string* time) {
-  if (time != NULL) {
-    set_has_time();
-  } else {
-    clear_has_time();
-  }
-  time_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), time);
-  // @@protoc_insertion_point(field_set_allocated:message.Command_info.time)
-}
-
-// required string place = 2;
-inline bool Command_info::has_place() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void Command_info::set_has_place() {
-  _has_bits_[0] |= 0x00000002u;
-}
-inline void Command_info::clear_has_place() {
-  _has_bits_[0] &= ~0x00000002u;
-}
-inline void Command_info::clear_place() {
-  place_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  clear_has_place();
-}
-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_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_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.place)
-}
-#endif
-inline void Command_info::set_place(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
-  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_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.place)
-}
-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_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_place(::std::string* place) {
-  if (place != NULL) {
-    set_has_place();
-  } else {
-    clear_has_place();
-  }
-  place_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), place);
-  // @@protoc_insertion_point(field_set_allocated:message.Command_info.place)
-}
-
-// required .message.Event event = 3;
-inline bool Command_info::has_event() const {
-  return (_has_bits_[0] & 0x00000004u) != 0;
-}
-inline void Command_info::set_has_event() {
-  _has_bits_[0] |= 0x00000004u;
-}
-inline void Command_info::clear_has_event() {
-  _has_bits_[0] &= ~0x00000004u;
-}
-inline void Command_info::clear_event() {
-  event_ = 1;
-  clear_has_event();
-}
-inline ::message::Event Command_info::event() const {
-  // @@protoc_insertion_point(field_get:message.Command_info.event)
-  return static_cast< ::message::Event >(event_);
-}
-inline void Command_info::set_event(::message::Event value) {
-  assert(::message::Event_IsValid(value));
-  set_has_event();
-  event_ = value;
-  // @@protoc_insertion_point(field_set:message.Command_info.event)
-}
-
-// -------------------------------------------------------------------
-
 // Base_msg
 
 // required .message.Base_info base_info = 1;
@@ -2535,8 +2225,6 @@ inline void Parkspace_info::set_allocated_leave_time(::std::string* leave_time)
 
 // -------------------------------------------------------------------
 
-// -------------------------------------------------------------------
-
 
 // @@protoc_insertion_point(namespace_scope)
 

+ 0 - 10
message/message_base.proto

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

+ 0 - 45
message/message_compare.h

@@ -1,45 +0,0 @@
-//
-// Created by zx on 2020/7/10.
-//
-
-#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                                                         \
-{                                                                           \
-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_info() == msg2.command_info()){                         \
-        return true;                                                        \
-    }else{                                                                  \
-        return false;                                                       \
-    }                                                                       \
-}                                                                           \
-static bool operator<(const NAME& msg1,const NAME& msg2){                   \
-    return msg1.command_info() < msg2.command_info();                       \
-}                                                                           \
-}
-
-#endif //NNXX_TESTS_MESSAGE_COMPARE_H

File diff suppressed because it is too large
+ 480 - 461
message/parkspace_allocation_message.pb.cc


File diff suppressed because it is too large
+ 600 - 448
message/parkspace_allocation_message.pb.h


+ 8 - 8
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 Command_info               command_info=2;           //指令唯一标识符id
+    required string                     command_key=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 Command_info               command_info=2;           //指令唯一标识符id
+    required string                     command_key=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 Command_info               command_info=2;           //指令唯一标识符id
+    required string                     command_key=2;                   //指令唯一标识符id
     required Car_info                   car_info=3;              //车辆凭证或号牌
 }
 
@@ -32,7 +32,7 @@ message Parkspace_search_request_msg
 message Parkspace_search_response_msg
 {
     required Base_info                  base_info=1;            //消息类型
-    required Command_info               command_info=2;           //指令唯一标识符id
+    required string                     command_key=2;                   //指令唯一标识符id
     required Error_manager              error_manager=3;        //分配成功与否标志
     optional Parkspace_info             car_position=4;         //待查询车辆存放位置
 }
@@ -41,7 +41,7 @@ message Parkspace_search_response_msg
 message Parkspace_release_request_msg
 {
     required Base_info                  base_info=1;            //消息类型
-    required Command_info               command_info=2;           //指令唯一标识符id
+    required string                     command_key=2;                   //指令唯一标识符id
     required Parkspace_info             release_space_info=3;   //待释放车位信息
 }
 
@@ -49,7 +49,7 @@ message Parkspace_release_request_msg
 message Parkspace_release_response_msg
 {
     required Base_info                  base_info=1;            //消息类型
-    required Command_info               command_info=2;           //指令唯一标识符id
+    required string                     command_key=2;                   //指令唯一标识符id
     required Error_manager              error_manager=3;        //分配成功与否标志
     required Parkspace_info             release_space_info=4;   //待释放车位信息
 }
@@ -58,14 +58,14 @@ message Parkspace_release_response_msg
 message Parkspace_confirm_alloc_request_msg
 {
     required Base_info                  base_info=1;            //消息类型
-    required Command_info               command_info=2;           //指令唯一标识符id
+    required string                     command_key=2;                   //指令唯一标识符id
     required Parkspace_info             confirm_space_info=3;    //已修改后的车位信息
 }
 //确定占用车位反馈消息
 message Parkspace_confirm_alloc_response_msg
 {
     required Base_info                  base_info=1;            //消息类型
-    required Command_info               command_info=2;           //指令唯一标识符id
+    required string                     command_key=2;                   //指令唯一标识符id
     required Error_manager              error_manager=3;        //分配成功与否标志
     required Parkspace_info             confirm_alloc_space_info=4;    //已修改后的车位信息
 }

+ 36 - 36
parkspace/Parkspace_communicator.cpp

@@ -17,7 +17,7 @@ Error_manager Parkspace_communicator::alloc_request(message::Parkspace_allocatio
     if(request.base_info().sender()!=message::eMain||request.base_info().receiver()!=message::eParkspace)
         return Error_manager(PARKSPACE_ALLOC_REQUEST_INVALID,MINOR_ERROR,"车位分配请求信息错误!!!");
 
-    if(m_alloc_table.find(request.command_info().time())==true)
+    if(m_alloc_table.find(request.command_key())==true)
         return Error_manager(PARKSPACE_ALLOC_REQUEST_REPEATED,MINOR_ERROR,"车位分配请求已经存在,重复!!!");
     //设置超时,若没有设置,默认1000
     int timeout=request.base_info().has_timeout_ms()?request.base_info().timeout_ms():1000;
@@ -43,10 +43,10 @@ Error_manager Parkspace_communicator::alloc_request(message::Parkspace_allocatio
         //查询到记录
         message::Parkspace_allocation_response_msg response;
         ///查询是否存在,并且删除该记录,
-        if(m_alloc_table.find(request.command_info().time(),response))
+        if(m_alloc_table.find(request.command_key(),response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_info())
+            if (response.has_base_info() && response.has_command_key())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -57,12 +57,12 @@ Error_manager Parkspace_communicator::alloc_request(message::Parkspace_allocatio
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eParkspace ||
                     response_base.receiver() != message::eMain ||
-                    response.command_info() != request.command_info()) {
+                    response.command_key() != request.command_key()) {
                     return Error_manager(PARKSPACE_ALLOC_RESPONSE_INFO_ERROR, MINOR_ERROR,
                                          "parkspace alloc response msg info error");
                 }
                 result = response;
-                m_alloc_table.erase(request.command_info().time());
+                m_alloc_table.erase(request.command_key());
 
                 return SUCCESS;
 
@@ -81,7 +81,7 @@ Error_manager Parkspace_communicator::alloc_request(message::Parkspace_allocatio
         usleep(1000);
     }while(time<double(timeout));
     //超时,删除记录,返回错误
-    m_alloc_table.erase(request.command_info().time());
+    m_alloc_table.erase(request.command_key());
     return Error_manager(RESPONSE_TIMEOUT,MINOR_ERROR,"parkspace alloc request timeout");
 
 }
@@ -98,7 +98,7 @@ Error_manager Parkspace_communicator::search_request(message::Parkspace_search_r
     if(request.base_info().sender()!=message::eMain||request.base_info().receiver()!=message::eParkspace)
         return Error_manager(PARKSPACE_SEARCH_REQUEST_INVALID,MINOR_ERROR,"parkspace search request invalid");
 
-    if(m_search_table.find(request.command_info().time())==true)
+    if(m_search_table.find(request.command_key())==true)
         return Error_manager(PARKSPACE_SEARCH_REQUEST_REPEATED,MAJOR_ERROR," parkspace search request repeated");
     //设置超时,若没有设置,默认1000
     int timeout=request.base_info().has_timeout_ms()?request.base_info().timeout_ms():1000;
@@ -124,10 +124,10 @@ Error_manager Parkspace_communicator::search_request(message::Parkspace_search_r
         //查询到记录
         message::Parkspace_search_response_msg response;
         ///查询是否存在,并且删除该记录,
-        if(m_search_table.find(request.command_info().time(),response))
+        if(m_search_table.find(request.command_key(),response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_info())
+            if (response.has_base_info() && response.has_command_key())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -138,12 +138,12 @@ Error_manager Parkspace_communicator::search_request(message::Parkspace_search_r
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eParkspace ||
                     response_base.receiver() != message::eMain ||
-                    response.command_info() != request.command_info()) {
+                    response.command_key() != request.command_key()) {
                     return Error_manager(PARKSPACE_SEARCH_RESPONSE_INFO_ERROR, MAJOR_ERROR,
                                          "parkspace search response msg info error");
                 }
                 result = response;
-                m_search_table.erase(request.command_info().time());
+                m_search_table.erase(request.command_key());
                 if(response.has_error_manager())
                 {
                     if(response.error_manager().error_code()==0)
@@ -166,7 +166,7 @@ Error_manager Parkspace_communicator::search_request(message::Parkspace_search_r
         usleep(1000);
     }while(time<double(timeout));
     //超时,删除记录,返回错误
-    m_search_table.erase(request.command_info().time());
+    m_search_table.erase(request.command_key());
     return Error_manager(RESPONSE_TIMEOUT,MINOR_ERROR,"parkspace search request timeout");
 }
 
@@ -182,7 +182,7 @@ Error_manager Parkspace_communicator::release_request(message::Parkspace_release
     if(request.base_info().sender()!=message::eMain||request.base_info().receiver()!=message::eParkspace)
         return Error_manager(PARKSPACE_RELEASE_REQUEST_INVALID,MINOR_ERROR,"parkspace release request invalid");
 
-    if(m_release_table.find(request.command_info().time())==true)
+    if(m_release_table.find(request.command_key())==true)
         return Error_manager(PARKSPACE_RELEASE_REQUEST_REPEATED,MAJOR_ERROR," parkspace release request repeated");
     //设置超时,若没有设置,默认1000
     int timeout=request.base_info().has_timeout_ms()?request.base_info().timeout_ms():1000;
@@ -208,10 +208,10 @@ Error_manager Parkspace_communicator::release_request(message::Parkspace_release
         //查询到记录
         message::Parkspace_release_response_msg response;
         ///查询是否存在,并且删除该记录,
-        if(m_release_table.find(request.command_info().time(),response))
+        if(m_release_table.find(request.command_key(),response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_info())
+            if (response.has_base_info() && response.has_command_key())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -222,12 +222,12 @@ Error_manager Parkspace_communicator::release_request(message::Parkspace_release
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eParkspace ||
                     response_base.receiver() != message::eMain ||
-                    response.command_info() != request.command_info()) {
+                    response.command_key() != request.command_key()) {
                     return Error_manager(PARKSPACE_RELEASE_RESPONSE_INFO_ERROR, MAJOR_ERROR,
                                          "parkspace release response msg info error");
                 }
                 result = response;
-                m_release_table.erase(request.command_info().time());
+                m_release_table.erase(request.command_key());
 
                 return SUCCESS;
 
@@ -246,7 +246,7 @@ Error_manager Parkspace_communicator::release_request(message::Parkspace_release
         usleep(1000);
     }while(time<double(timeout));
     //超时,删除记录,返回错误
-    m_release_table.erase(request.command_info().time());
+    m_release_table.erase(request.command_key());
     return Error_manager(RESPONSE_TIMEOUT,MINOR_ERROR,"parkspace release request timeout");
 }
 
@@ -263,7 +263,7 @@ Error_manager Parkspace_communicator::confirm_request(message::Parkspace_confirm
         return Error_manager(FAILED,MINOR_ERROR,"parkspace confirm request invalid");
 
 
-    if(m_confirm_table.find(request.command_info().time())==true)
+    if(m_confirm_table.find(request.command_key())==true)
     {
         return Error_manager(FAILED,MAJOR_ERROR," parkspace confirm request repeated");
     }
@@ -285,10 +285,10 @@ Error_manager Parkspace_communicator::confirm_request(message::Parkspace_confirm
         //查询到记录
         message::Parkspace_confirm_alloc_response_msg response;
         ///查询是否存在,并且删除该记录,
-        if(m_confirm_table.find(request.command_info().time(),response))
+        if(m_confirm_table.find(request.command_key(),response))
         {
             //判断是否接收到回应,若回应信息被赋值则证明有回应
-            if (response.has_base_info() && response.has_command_info())
+            if (response.has_base_info() && response.has_command_key())
             {
                 message::Base_info response_base = response.base_info();
                 //检查类型是否匹配
@@ -299,12 +299,12 @@ Error_manager Parkspace_communicator::confirm_request(message::Parkspace_confirm
                 //检查基本信息是否匹配
                 if (response_base.sender() != message::eParkspace ||
                     response_base.receiver() != message::eMain ||
-                    response.command_info() != request.command_info()) {
+                    response.command_key() != request.command_key()) {
                     return Error_manager(PARKSPACE_RELEASE_RESPONSE_INFO_ERROR, MAJOR_ERROR,
                                          "parkspace confirm response msg info error");
                 }
                 result = response;
-                m_confirm_table.erase(request.command_info().time());
+                m_confirm_table.erase(request.command_key());
 
                 return SUCCESS;
 
@@ -323,7 +323,7 @@ Error_manager Parkspace_communicator::confirm_request(message::Parkspace_confirm
         usleep(1000);
     }while(time<double(timeout));
     //超时,删除记录,返回错误
-    m_confirm_table.erase(request.command_info().time());
+    m_confirm_table.erase(request.command_key());
     return Error_manager(RESPONSE_TIMEOUT,MINOR_ERROR,"parkspace confirm request timeout");
 }
 
@@ -355,12 +355,12 @@ Error_manager Parkspace_communicator::encapsulate_msg(Communication_message* mes
             message::Parkspace_allocation_request_msg request;
             request.ParseFromString(message->get_message_buf());
             //记录数据
-            m_alloc_table[request.command_info().time()]=message::Parkspace_allocation_response_msg();
+            m_alloc_table[request.command_key()]=message::Parkspace_allocation_response_msg();
             //发送请求
             code= Communication_socket_base::encapsulate_msg(message);
             if(code!=SUCCESS)
             {
-                m_alloc_table.erase(request.command_info().time());
+                m_alloc_table.erase(request.command_key());
             }
             break;
         }
@@ -369,12 +369,12 @@ Error_manager Parkspace_communicator::encapsulate_msg(Communication_message* mes
             message::Parkspace_search_request_msg request;
             request.ParseFromString(message->get_message_buf());
             //记录数据
-            m_search_table[request.command_info().time()]=message::Parkspace_search_response_msg();
+            m_search_table[request.command_key()]=message::Parkspace_search_response_msg();
             //发送请求
             code= Communication_socket_base::encapsulate_msg(message);
             if(code!=SUCCESS)
             {
-                m_search_table.erase(request.command_info().time());
+                m_search_table.erase(request.command_key());
             }
             break;
         }
@@ -383,12 +383,12 @@ Error_manager Parkspace_communicator::encapsulate_msg(Communication_message* mes
             message::Parkspace_release_request_msg request;
             request.ParseFromString(message->get_message_buf());
             //记录数据
-            m_release_table[request.command_info().time()]=message::Parkspace_release_response_msg();
+            m_release_table[request.command_key()]=message::Parkspace_release_response_msg();
             //发送请求
             code= Communication_socket_base::encapsulate_msg(message);
             if(code!=SUCCESS)
             {
-                m_release_table.erase(request.command_info().time());
+                m_release_table.erase(request.command_key());
             }
             break;
         }
@@ -397,12 +397,12 @@ Error_manager Parkspace_communicator::encapsulate_msg(Communication_message* mes
             message::Parkspace_confirm_alloc_request_msg request;
             request.ParseFromString(message->get_message_buf());
             //记录数据
-            m_confirm_table[request.command_info().time()]=message::Parkspace_confirm_alloc_response_msg();
+            m_confirm_table[request.command_key()]=message::Parkspace_confirm_alloc_response_msg();
             //发送请求
             code= Communication_socket_base::encapsulate_msg(message);
             if(code!=SUCCESS)
             {
-                m_confirm_table.erase(request.command_info().time());
+                m_confirm_table.erase(request.command_key());
             }
             break;
         }
@@ -428,7 +428,7 @@ Error_manager Parkspace_communicator::execute_msg(Communication_message* p_msg)
             response.ParseFromString(p_msg->get_message_buf());
 
             ///查询请求表是否存在,并且更新
-            if(m_alloc_table.find_update(response.command_info().time(),response)==false)
+            if(m_alloc_table.find_update(response.command_key(),response)==false)
             {
                 return Error_manager(PARKSPACE_ALLOCMSG_RESPONSE_HAS_NO_REQUEST,NEGLIGIBLE_ERROR,"parkspace alloc response without request");
             }
@@ -443,7 +443,7 @@ Error_manager Parkspace_communicator::execute_msg(Communication_message* p_msg)
                 return Error_manager(ERROR,CRITICAL_ERROR,"parkspace search response 解析失败");
             }
             ///查询请求表是否存在,并且更新
-            if(m_search_table.find_update(response.command_info().time(),response)==false)
+            if(m_search_table.find_update(response.command_key(),response)==false)
             {
                 return Error_manager(PARKSPACE_SEARCHMSG_RESPONSE_HAS_NO_REQUEST,NEGLIGIBLE_ERROR,"parkspace search response without request");
             }
@@ -454,7 +454,7 @@ Error_manager Parkspace_communicator::execute_msg(Communication_message* p_msg)
             message::Parkspace_release_response_msg response;
             response.ParseFromString(p_msg->get_message_buf());
             ///查询请求表是否存在,并且更新
-            if(m_release_table.find_update(response.command_info().time(),response)==false)
+            if(m_release_table.find_update(response.command_key(),response)==false)
             {
                 return Error_manager(PARKSPACE_RELEASEMSG_RESPONSE_HAS_NO_REQUEST,NEGLIGIBLE_ERROR,"parkspace release response without request");
             }
@@ -466,7 +466,7 @@ Error_manager Parkspace_communicator::execute_msg(Communication_message* p_msg)
             message::Parkspace_confirm_alloc_response_msg response;
             response.ParseFromString(p_msg->get_message_buf());
             ///查询请求表是否存在,并且更新
-            if(m_confirm_table.find_update(response.command_info().time(),response)==true)
+            if(m_confirm_table.find_update(response.command_key(),response)==true)
             {
                 return SUCCESS;
             }

+ 0 - 10
parkspace/Parkspace_communicator.h

@@ -10,16 +10,6 @@
 #include "singleton.h"
 #include "thread_safe_map.h"
 
-#include "message_compare.h"
-
-/*
- * 注册消息的比较函数,用于重载==与<符号,使其可以用作map中的key
- */
-RegistoryCompare(message,message::Parkspace_allocation_request_msg);
-RegistoryCompare(message,message::Parkspace_search_request_msg)
-RegistoryCompare(message,message::Parkspace_release_request_msg)
-RegistoryCompare(message,Parkspace_confirm_alloc_request_msg)
-
 
 class Parkspace_communicator :public Singleton<Parkspace_communicator>, public Communication_socket_base
 {

+ 6 - 9
system/PickupProcessTask.cpp

@@ -37,11 +37,10 @@ PickupProcessTask::~PickupProcessTask()
         m_publish_statu_thread=nullptr;
     }
 }
-Error_manager PickupProcessTask::init_task(message::Command_info command_info, message::Car_info car_info)
+Error_manager PickupProcessTask::init_task(message::Car_info car_info)
 {
     reset_recv_msg();
 
-    m_command_info=command_info;
     m_car_info=car_info;
 
 
@@ -133,8 +132,7 @@ Error_manager PickupProcessTask::search_space()
     base_info.set_timeout_ms(1000);
 
     message::Parkspace_search_request_msg request;
-    request.mutable_command_info()->CopyFrom(m_command_info);
-    request.mutable_command_info()->set_time(create_key());
+    request.set_command_key(create_key());
     request.mutable_base_info()->CopyFrom(base_info);
     request.mutable_car_info()->CopyFrom(m_car_info);
 
@@ -173,7 +171,7 @@ void PickupProcessTask::Main()
             std::lock_guard<std::mutex> lock(m_picking_statu_lock);
             if(code!=SUCCESS)
             {
-                LOG(ERROR)<<"取车调度失败,取车终端:"<<m_terminor_id<<"指令id:"<<m_command_info.place()
+                LOG(ERROR)<<"取车调度失败,取车终端:"<<m_terminor_id
                             <<", 车位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()
@@ -270,8 +268,8 @@ 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.mutable_command_info()->CopyFrom(m_command_info);
-    request.mutable_command_info()->set_time(create_key());
+
+    request.set_command_key(create_key());
 
 
     message::Dispatch_response_msg response;
@@ -325,8 +323,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.mutable_command_info()->CopyFrom(m_command_info);
-    request.mutable_command_info()->set_time(create_key());
+    request.set_command_key(create_key());
 
 
     message::Parkspace_release_response_msg release_response;

+ 1 - 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(message::Command_info command_info,message::Car_info car_info);
+    Error_manager init_task(message::Car_info car_info);
 
     /*
      * 检查当前任务是否处于空闲准备状态
@@ -56,7 +56,6 @@ protected:
 
     void reset_recv_msg();
 protected:
-    message::Command_info                m_command_info;
     unsigned int                m_terminor_id;
     message::Car_info           m_car_info;          //当前流程的车辆信息
 

+ 7 - 14
system/StoreProcessTask.cpp

@@ -40,12 +40,10 @@ StoreProcessTask::~StoreProcessTask()
     }
 }
 
-Error_manager StoreProcessTask::init_task(message::Command_info command_info,
-        message::Locate_information locate_info,message::Car_info car_info)
+Error_manager StoreProcessTask::init_task(message::Locate_information locate_info,message::Car_info car_info)
 {
     reset_recv_msg();
 
-    m_command_info=command_info;
     m_car_info=car_info;
     m_locate_info=locate_info;
 
@@ -77,8 +75,7 @@ Error_manager StoreProcessTask::locate_step() {
     base_info.set_timeout_ms(20000); //测量超时5s
     request.mutable_base_info()->CopyFrom(base_info);
 
-    request.mutable_command_info()->CopyFrom(m_command_info);
-    request.mutable_command_info()->set_time(create_key());
+    request.set_command_key(create_key());
     request.set_terminal_id(m_terminor_id);
 
     code=Locate_communicator::get_instance_pointer()->locate_request(request,m_measure_response_msg);
@@ -124,9 +121,8 @@ Error_manager StoreProcessTask::dispatch_step()
     base_info.set_timeout_ms(1000*15); //超时15s
     request.mutable_base_info()->CopyFrom(base_info);
 
-    request.mutable_command_info()->CopyFrom(m_command_info);
     std::string key=create_key();
-    request.mutable_command_info()->set_time(key);
+    request.set_command_key(key);
     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());
@@ -219,8 +215,7 @@ Error_manager StoreProcessTask::alloc_space()
 
     request.mutable_car_info()->CopyFrom(m_car_info);
 
-    request.mutable_command_info()->CopyFrom(m_command_info);
-    request.mutable_command_info()->set_time(create_key());
+    request.set_command_key(create_key());
     request.set_terminal_id(m_terminor_id);
 
     code=Parkspace_communicator::get_instance_pointer()->alloc_request(request,m_parcspace_alloc_response_msg);
@@ -276,8 +271,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.mutable_command_info()->CopyFrom(m_command_info);
-    request.mutable_command_info()->set_time(create_key());
+    request.set_command_key(create_key());
 
     message::Parkspace_confirm_alloc_response_msg confirm_response;
     code=Parkspace_communicator::get_instance_pointer()->confirm_request(request,confirm_response);
@@ -333,8 +327,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.mutable_command_info()->CopyFrom(m_command_info);
-    request.mutable_command_info()->set_time(create_key());
+    request.set_command_key(create_key());
 
 
     message::Parkspace_release_response_msg release_response;
@@ -433,7 +426,7 @@ void StoreProcessTask::Main()
             {
                 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_info.place()<<",终端号:"<<m_terminor_id<<"停车流程:"<<code.get_error_description()<<
+                LOG(ERROR)<<",终端号:"<<m_terminor_id<<"停车流程:"<<code.get_error_description()<<
                 " 车位id :"<<m_parcspace_alloc_response_msg.allocated_space_info().parkspace_id()
                 <<",车牌:"<<m_car_info.license();
                 break;

+ 1 - 3
system/StoreProcessTask.h

@@ -15,8 +15,7 @@ class StoreProcessTask :public tq::BaseTask{
 public:
     StoreProcessTask(unsigned int command_id);
     virtual  ~StoreProcessTask();
-    Error_manager init_task(message::Command_info command_info,
-            message::Locate_information locate_info,message::Car_info car_info);
+    Error_manager init_task(message::Locate_information locate_info,message::Car_info car_info);
 
     /*
      * 分配车位
@@ -64,7 +63,6 @@ protected:
     void publish_step_status();
 
 protected:
-    message::Command_info       m_command_info;
     unsigned int                m_terminor_id;
     message::Car_info           m_car_info;          //当前流程的车辆标识(车牌号)
 

+ 5 - 25
system/command_manager.cpp

@@ -193,27 +193,14 @@ Error_manager Command_manager::execute_store_command(message::Store_command_requ
                             return dispatch_code;
                         }
 
-                        //一切正常,接受指令
-                        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");
-                        std::string str_time = ss.str();
-                        command_info.set_time(str_time);
-
-                        char place[255] = {0};
-                        sprintf(place, "027-01-%02d:%s", request.terminal_id(), request.car_info().license().c_str());
-                        command_info.set_place(place);
-                        command_info.set_event(message::eStoring);
-
-                        LOG(INFO) << "收到停车:" << command_info.place() + "-" + command_info.time() << ", 车牌:"
-                                  << request.car_info().license() <<
+
+
+                        LOG(INFO) << "收到停车,车牌:"<< request.car_info().license() <<
                                   ",终端:" << request.terminal_id()<<"............................";
                         tq::BaseTask *ptask = new StoreProcessTask(request.terminal_id());
                         StoreProcessTask *pStore_task = (StoreProcessTask *) ptask;
                         //初始化流程
-                        pStore_task->init_task(command_info, locate_info, request.car_info());
+                        pStore_task->init_task(locate_info, request.car_info());
 
                         //获取车位
                         Error_manager code = pStore_task->alloc_space();
@@ -294,20 +281,13 @@ Error_manager Command_manager::execute_pickup_command(message::Pickup_command_re
         //一切正常,接受指令
         Error_manager code;
 
-        message::Command_info command_info;
-        //获取当前时间
-        auto t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
 
-        char place[255]={0};
-        sprintf(place, "027-01-%02d:%s", request.terminal_id(), request.car_info().license().c_str());
-        command_info.set_place(place);
-        command_info.set_event(message::ePicking);
 
         LOG(WARNING)<<"收到取车-----------------------------"<<request.car_info().license();
         tq::BaseTask* ptask=new PickupProcessTask(request.terminal_id());
         PickupProcessTask* pPick_task=(PickupProcessTask*)ptask;
         //初始化流程
-        code=pPick_task->init_task(command_info, request.car_info());
+        code=pPick_task->init_task(request.car_info());
         /////查询车位
         code=pPick_task->search_space();
 

+ 0 - 1
test/Terminal_communication.h

@@ -10,7 +10,6 @@
 #include "../communication/communication_socket_base.h"
 #include "terminal_message.pb.h"
 #include "parkspace_allocation_message.pb.h"
-#include "message_compare.h"
 #include "thread_safe_map.h"
 
 class Terminal_communication :public Singleton<Terminal_communication>, public Communication_socket_base{