Procházet zdrojové kódy

消息格式调整

yct před 4 roky
rodič
revize
40c7f406d5

+ 88 - 82
message/measure_message.pb.cc

@@ -386,12 +386,12 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_status_msg, locate_information_realtime_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Ground_status_msg, error_manager_),
   0,
-  2,
   3,
+  4,
   ~0u,
-  ~0u,
-  ~0u,
+  5,
   1,
+  2,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Cloud_coordinate, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Cloud_coordinate, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -521,9 +521,9 @@ void AddDescriptorsImpl() {
       "\n\024wanji_manager_status\030\003 \002(\0162\035.message.W"
       "anji_manager_status\022E\n\031wanji_lidar_devic"
       "e_status\030\004 \003(\0162\".message.Wanji_lidar_dev"
-      "ice_status\022;\n\024region_worker_status\030\005 \003(\016"
+      "ice_status\022;\n\024region_worker_status\030\005 \002(\016"
       "2\035.message.Region_worker_status\022@\n\033locat"
-      "e_information_realtime\030\006 \003(\0132\033.message.L"
+      "e_information_realtime\030\006 \002(\0132\033.message.L"
       "ocate_information\022-\n\rerror_manager\030\007 \002(\013"
       "2\026.message.Error_manager\"3\n\020Cloud_coordi"
       "nate\022\t\n\001x\030\001 \002(\002\022\t\n\001y\030\002 \002(\002\022\t\n\001z\030\003 \002(\002\"\032\n"
@@ -3041,6 +3041,8 @@ void Ground_detect_response_msg::InternalSwap(Ground_detect_response_msg* other)
 void Ground_status_msg::InitAsDefaultInstance() {
   ::message::_Ground_status_msg_default_instance_._instance.get_mutable()->base_info_ = const_cast< ::message::Base_info*>(
       ::message::Base_info::internal_default_instance());
+  ::message::_Ground_status_msg_default_instance_._instance.get_mutable()->locate_information_realtime_ = const_cast< ::message::Locate_information*>(
+      ::message::Locate_information::internal_default_instance());
   ::message::_Ground_status_msg_default_instance_._instance.get_mutable()->error_manager_ = const_cast< ::message::Error_manager*>(
       ::message::Error_manager::internal_default_instance());
 }
@@ -3049,7 +3051,8 @@ void Ground_status_msg::clear_base_info() {
   clear_has_base_info();
 }
 void Ground_status_msg::clear_locate_information_realtime() {
-  locate_information_realtime_.Clear();
+  if (locate_information_realtime_ != NULL) locate_information_realtime_->Clear();
+  clear_has_locate_information_realtime();
 }
 void Ground_status_msg::clear_error_manager() {
   if (error_manager_ != NULL) error_manager_->Clear();
@@ -3078,31 +3081,34 @@ Ground_status_msg::Ground_status_msg(const Ground_status_msg& from)
       _internal_metadata_(NULL),
       _has_bits_(from._has_bits_),
       _cached_size_(0),
-      wanji_lidar_device_status_(from.wanji_lidar_device_status_),
-      region_worker_status_(from.region_worker_status_),
-      locate_information_realtime_(from.locate_information_realtime_) {
+      wanji_lidar_device_status_(from.wanji_lidar_device_status_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   if (from.has_base_info()) {
     base_info_ = new ::message::Base_info(*from.base_info_);
   } else {
     base_info_ = NULL;
   }
+  if (from.has_locate_information_realtime()) {
+    locate_information_realtime_ = new ::message::Locate_information(*from.locate_information_realtime_);
+  } else {
+    locate_information_realtime_ = NULL;
+  }
   if (from.has_error_manager()) {
     error_manager_ = new ::message::Error_manager(*from.error_manager_);
   } else {
     error_manager_ = NULL;
   }
   ::memcpy(&terminal_id_, &from.terminal_id_,
-    static_cast<size_t>(reinterpret_cast<char*>(&wanji_manager_status_) -
-    reinterpret_cast<char*>(&terminal_id_)) + sizeof(wanji_manager_status_));
+    static_cast<size_t>(reinterpret_cast<char*>(&region_worker_status_) -
+    reinterpret_cast<char*>(&terminal_id_)) + sizeof(region_worker_status_));
   // @@protoc_insertion_point(copy_constructor:message.Ground_status_msg)
 }
 
 void Ground_status_msg::SharedCtor() {
   _cached_size_ = 0;
   ::memset(&base_info_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&wanji_manager_status_) -
-      reinterpret_cast<char*>(&base_info_)) + sizeof(wanji_manager_status_));
+      reinterpret_cast<char*>(&region_worker_status_) -
+      reinterpret_cast<char*>(&base_info_)) + sizeof(region_worker_status_));
 }
 
 Ground_status_msg::~Ground_status_msg() {
@@ -3112,6 +3118,7 @@ Ground_status_msg::~Ground_status_msg() {
 
 void Ground_status_msg::SharedDtor() {
   if (this != internal_default_instance()) delete base_info_;
+  if (this != internal_default_instance()) delete locate_information_realtime_;
   if (this != internal_default_instance()) delete error_manager_;
 }
 
@@ -3145,23 +3152,25 @@ void Ground_status_msg::Clear() {
   (void) cached_has_bits;
 
   wanji_lidar_device_status_.Clear();
-  region_worker_status_.Clear();
-  locate_information_realtime_.Clear();
   cached_has_bits = _has_bits_[0];
-  if (cached_has_bits & 3u) {
+  if (cached_has_bits & 7u) {
     if (cached_has_bits & 0x00000001u) {
       GOOGLE_DCHECK(base_info_ != NULL);
       base_info_->Clear();
     }
     if (cached_has_bits & 0x00000002u) {
+      GOOGLE_DCHECK(locate_information_realtime_ != NULL);
+      locate_information_realtime_->Clear();
+    }
+    if (cached_has_bits & 0x00000004u) {
       GOOGLE_DCHECK(error_manager_ != NULL);
       error_manager_->Clear();
     }
   }
-  if (cached_has_bits & 12u) {
+  if (cached_has_bits & 56u) {
     ::memset(&terminal_id_, 0, static_cast<size_t>(
-        reinterpret_cast<char*>(&wanji_manager_status_) -
-        reinterpret_cast<char*>(&terminal_id_)) + sizeof(wanji_manager_status_));
+        reinterpret_cast<char*>(&region_worker_status_) -
+        reinterpret_cast<char*>(&terminal_id_)) + sizeof(region_worker_status_));
   }
   _has_bits_.Clear();
   _internal_metadata_.Clear();
@@ -3252,7 +3261,7 @@ bool Ground_status_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // repeated .message.Region_worker_status region_worker_status = 5;
+      // required .message.Region_worker_status region_worker_status = 5;
       case 5: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
@@ -3261,31 +3270,23 @@ bool Ground_status_msg::MergePartialFromCodedStream(
                    int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                  input, &value)));
           if (::message::Region_worker_status_IsValid(value)) {
-            add_region_worker_status(static_cast< ::message::Region_worker_status >(value));
+            set_region_worker_status(static_cast< ::message::Region_worker_status >(value));
           } else {
             mutable_unknown_fields()->AddVarint(
                 5, static_cast< ::google::protobuf::uint64>(value));
           }
-        } else if (
-            static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
-          DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
-                 input,
-                 5,
-                 ::message::Region_worker_status_IsValid,
-                 mutable_unknown_fields(),
-                 this->mutable_region_worker_status())));
         } else {
           goto handle_unusual;
         }
         break;
       }
 
-      // repeated .message.Locate_information locate_information_realtime = 6;
+      // required .message.Locate_information locate_information_realtime = 6;
       case 6: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
-          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_locate_information_realtime()));
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_locate_information_realtime()));
         } else {
           goto handle_unusual;
         }
@@ -3338,12 +3339,12 @@ void Ground_status_msg::SerializeWithCachedSizes(
   }
 
   // required int32 terminal_id = 2;
-  if (cached_has_bits & 0x00000004u) {
+  if (cached_has_bits & 0x00000008u) {
     ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->terminal_id(), output);
   }
 
   // required .message.Wanji_manager_status wanji_manager_status = 3;
-  if (cached_has_bits & 0x00000008u) {
+  if (cached_has_bits & 0x00000010u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       3, this->wanji_manager_status(), output);
   }
@@ -3354,21 +3355,20 @@ void Ground_status_msg::SerializeWithCachedSizes(
       4, this->wanji_lidar_device_status(i), output);
   }
 
-  // repeated .message.Region_worker_status region_worker_status = 5;
-  for (int i = 0, n = this->region_worker_status_size(); i < n; i++) {
+  // required .message.Region_worker_status region_worker_status = 5;
+  if (cached_has_bits & 0x00000020u) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
-      5, this->region_worker_status(i), output);
+      5, this->region_worker_status(), output);
   }
 
-  // repeated .message.Locate_information locate_information_realtime = 6;
-  for (unsigned int i = 0,
-      n = static_cast<unsigned int>(this->locate_information_realtime_size()); i < n; i++) {
+  // required .message.Locate_information locate_information_realtime = 6;
+  if (cached_has_bits & 0x00000002u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      6, this->locate_information_realtime(static_cast<int>(i)), output);
+      6, *this->locate_information_realtime_, output);
   }
 
   // required .message.Error_manager error_manager = 7;
-  if (cached_has_bits & 0x00000002u) {
+  if (cached_has_bits & 0x00000004u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
       7, *this->error_manager_, output);
   }
@@ -3396,12 +3396,12 @@ void Ground_status_msg::SerializeWithCachedSizes(
   }
 
   // required int32 terminal_id = 2;
-  if (cached_has_bits & 0x00000004u) {
+  if (cached_has_bits & 0x00000008u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->terminal_id(), target);
   }
 
   // required .message.Wanji_manager_status wanji_manager_status = 3;
-  if (cached_has_bits & 0x00000008u) {
+  if (cached_has_bits & 0x00000010u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
       3, this->wanji_manager_status(), target);
   }
@@ -3410,20 +3410,21 @@ void Ground_status_msg::SerializeWithCachedSizes(
   target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
     4, this->wanji_lidar_device_status_, target);
 
-  // repeated .message.Region_worker_status region_worker_status = 5;
-  target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
-    5, this->region_worker_status_, target);
+  // required .message.Region_worker_status region_worker_status = 5;
+  if (cached_has_bits & 0x00000020u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
+      5, this->region_worker_status(), target);
+  }
 
-  // repeated .message.Locate_information locate_information_realtime = 6;
-  for (unsigned int i = 0,
-      n = static_cast<unsigned int>(this->locate_information_realtime_size()); i < n; i++) {
+  // required .message.Locate_information locate_information_realtime = 6;
+  if (cached_has_bits & 0x00000002u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
-        6, this->locate_information_realtime(static_cast<int>(i)), deterministic, target);
+        6, *this->locate_information_realtime_, deterministic, target);
   }
 
   // required .message.Error_manager error_manager = 7;
-  if (cached_has_bits & 0x00000002u) {
+  if (cached_has_bits & 0x00000004u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
         7, *this->error_manager_, deterministic, target);
@@ -3448,6 +3449,13 @@ size_t Ground_status_msg::RequiredFieldsByteSizeFallback() const {
         *this->base_info_);
   }
 
+  if (has_locate_information_realtime()) {
+    // required .message.Locate_information locate_information_realtime = 6;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->locate_information_realtime_);
+  }
+
   if (has_error_manager()) {
     // required .message.Error_manager error_manager = 7;
     total_size += 1 +
@@ -3468,6 +3476,12 @@ size_t Ground_status_msg::RequiredFieldsByteSizeFallback() const {
       ::google::protobuf::internal::WireFormatLite::EnumSize(this->wanji_manager_status());
   }
 
+  if (has_region_worker_status()) {
+    // required .message.Region_worker_status region_worker_status = 5;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::EnumSize(this->region_worker_status());
+  }
+
   return total_size;
 }
 size_t Ground_status_msg::ByteSizeLong() const {
@@ -3479,12 +3493,17 @@ size_t Ground_status_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
         _internal_metadata_.unknown_fields());
   }
-  if (((_has_bits_[0] & 0x0000000f) ^ 0x0000000f) == 0) {  // All required fields are present.
+  if (((_has_bits_[0] & 0x0000003f) ^ 0x0000003f) == 0) {  // All required fields are present.
     // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
         *this->base_info_);
 
+    // required .message.Locate_information locate_information_realtime = 6;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *this->locate_information_realtime_);
+
     // required .message.Error_manager error_manager = 7;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
@@ -3499,6 +3518,10 @@ size_t Ground_status_msg::ByteSizeLong() const {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::EnumSize(this->wanji_manager_status());
 
+    // required .message.Region_worker_status region_worker_status = 5;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::EnumSize(this->region_worker_status());
+
   } else {
     total_size += RequiredFieldsByteSizeFallback();
   }
@@ -3512,27 +3535,6 @@ size_t Ground_status_msg::ByteSizeLong() const {
     total_size += (1UL * count) + data_size;
   }
 
-  // repeated .message.Region_worker_status region_worker_status = 5;
-  {
-    size_t data_size = 0;
-    unsigned int count = static_cast<unsigned int>(this->region_worker_status_size());for (unsigned int i = 0; i < count; i++) {
-      data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
-        this->region_worker_status(static_cast<int>(i)));
-    }
-    total_size += (1UL * count) + data_size;
-  }
-
-  // repeated .message.Locate_information locate_information_realtime = 6;
-  {
-    unsigned int count = static_cast<unsigned int>(this->locate_information_realtime_size());
-    total_size += 1UL * count;
-    for (unsigned int i = 0; i < count; i++) {
-      total_size +=
-        ::google::protobuf::internal::WireFormatLite::MessageSize(
-          this->locate_information_realtime(static_cast<int>(i)));
-    }
-  }
-
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
   _cached_size_ = cached_size;
@@ -3563,22 +3565,26 @@ void Ground_status_msg::MergeFrom(const Ground_status_msg& from) {
   (void) cached_has_bits;
 
   wanji_lidar_device_status_.MergeFrom(from.wanji_lidar_device_status_);
-  region_worker_status_.MergeFrom(from.region_worker_status_);
-  locate_information_realtime_.MergeFrom(from.locate_information_realtime_);
   cached_has_bits = from._has_bits_[0];
-  if (cached_has_bits & 15u) {
+  if (cached_has_bits & 63u) {
     if (cached_has_bits & 0x00000001u) {
       mutable_base_info()->::message::Base_info::MergeFrom(from.base_info());
     }
     if (cached_has_bits & 0x00000002u) {
-      mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
+      mutable_locate_information_realtime()->::message::Locate_information::MergeFrom(from.locate_information_realtime());
     }
     if (cached_has_bits & 0x00000004u) {
-      terminal_id_ = from.terminal_id_;
+      mutable_error_manager()->::message::Error_manager::MergeFrom(from.error_manager());
     }
     if (cached_has_bits & 0x00000008u) {
+      terminal_id_ = from.terminal_id_;
+    }
+    if (cached_has_bits & 0x00000010u) {
       wanji_manager_status_ = from.wanji_manager_status_;
     }
+    if (cached_has_bits & 0x00000020u) {
+      region_worker_status_ = from.region_worker_status_;
+    }
     _has_bits_[0] |= cached_has_bits;
   }
 }
@@ -3598,7 +3604,7 @@ void Ground_status_msg::CopyFrom(const Ground_status_msg& from) {
 }
 
 bool Ground_status_msg::IsInitialized() const {
-  if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false;
+  if ((_has_bits_[0] & 0x0000003f) != 0x0000003f) return false;
   if (has_base_info()) {
     if (!this->base_info_->IsInitialized()) return false;
   }
@@ -3615,12 +3621,12 @@ void Ground_status_msg::Swap(Ground_status_msg* other) {
 void Ground_status_msg::InternalSwap(Ground_status_msg* other) {
   using std::swap;
   wanji_lidar_device_status_.InternalSwap(&other->wanji_lidar_device_status_);
-  region_worker_status_.InternalSwap(&other->region_worker_status_);
-  locate_information_realtime_.InternalSwap(&other->locate_information_realtime_);
   swap(base_info_, other->base_info_);
+  swap(locate_information_realtime_, other->locate_information_realtime_);
   swap(error_manager_, other->error_manager_);
   swap(terminal_id_, other->terminal_id_);
   swap(wanji_manager_status_, other->wanji_manager_status_);
+  swap(region_worker_status_, other->region_worker_status_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
   swap(_cached_size_, other->_cached_size_);

+ 89 - 75
message/measure_message.pb.h

@@ -1134,28 +1134,6 @@ class Ground_status_msg : public ::google::protobuf::Message /* @@protoc_inserti
   const ::google::protobuf::RepeatedField<int>& wanji_lidar_device_status() const;
   ::google::protobuf::RepeatedField<int>* mutable_wanji_lidar_device_status();
 
-  // repeated .message.Region_worker_status region_worker_status = 5;
-  int region_worker_status_size() const;
-  void clear_region_worker_status();
-  static const int kRegionWorkerStatusFieldNumber = 5;
-  ::message::Region_worker_status region_worker_status(int index) const;
-  void set_region_worker_status(int index, ::message::Region_worker_status value);
-  void add_region_worker_status(::message::Region_worker_status value);
-  const ::google::protobuf::RepeatedField<int>& region_worker_status() const;
-  ::google::protobuf::RepeatedField<int>* mutable_region_worker_status();
-
-  // repeated .message.Locate_information locate_information_realtime = 6;
-  int locate_information_realtime_size() const;
-  void clear_locate_information_realtime();
-  static const int kLocateInformationRealtimeFieldNumber = 6;
-  const ::message::Locate_information& locate_information_realtime(int index) const;
-  ::message::Locate_information* mutable_locate_information_realtime(int index);
-  ::message::Locate_information* add_locate_information_realtime();
-  ::google::protobuf::RepeatedPtrField< ::message::Locate_information >*
-      mutable_locate_information_realtime();
-  const ::google::protobuf::RepeatedPtrField< ::message::Locate_information >&
-      locate_information_realtime() const;
-
   // required .message.Base_info base_info = 1;
   bool has_base_info() const;
   void clear_base_info();
@@ -1165,6 +1143,15 @@ class Ground_status_msg : public ::google::protobuf::Message /* @@protoc_inserti
   ::message::Base_info* mutable_base_info();
   void set_allocated_base_info(::message::Base_info* base_info);
 
+  // required .message.Locate_information locate_information_realtime = 6;
+  bool has_locate_information_realtime() const;
+  void clear_locate_information_realtime();
+  static const int kLocateInformationRealtimeFieldNumber = 6;
+  const ::message::Locate_information& locate_information_realtime() const;
+  ::message::Locate_information* release_locate_information_realtime();
+  ::message::Locate_information* mutable_locate_information_realtime();
+  void set_allocated_locate_information_realtime(::message::Locate_information* locate_information_realtime);
+
   // required .message.Error_manager error_manager = 7;
   bool has_error_manager() const;
   void clear_error_manager();
@@ -1188,6 +1175,13 @@ class Ground_status_msg : public ::google::protobuf::Message /* @@protoc_inserti
   ::message::Wanji_manager_status wanji_manager_status() const;
   void set_wanji_manager_status(::message::Wanji_manager_status value);
 
+  // required .message.Region_worker_status region_worker_status = 5;
+  bool has_region_worker_status() const;
+  void clear_region_worker_status();
+  static const int kRegionWorkerStatusFieldNumber = 5;
+  ::message::Region_worker_status region_worker_status() const;
+  void set_region_worker_status(::message::Region_worker_status value);
+
   // @@protoc_insertion_point(class_scope:message.Ground_status_msg)
  private:
   void set_has_base_info();
@@ -1196,6 +1190,10 @@ class Ground_status_msg : public ::google::protobuf::Message /* @@protoc_inserti
   void clear_has_terminal_id();
   void set_has_wanji_manager_status();
   void clear_has_wanji_manager_status();
+  void set_has_region_worker_status();
+  void clear_has_region_worker_status();
+  void set_has_locate_information_realtime();
+  void clear_has_locate_information_realtime();
   void set_has_error_manager();
   void clear_has_error_manager();
 
@@ -1206,12 +1204,12 @@ class Ground_status_msg : public ::google::protobuf::Message /* @@protoc_inserti
   ::google::protobuf::internal::HasBits<1> _has_bits_;
   mutable int _cached_size_;
   ::google::protobuf::RepeatedField<int> wanji_lidar_device_status_;
-  ::google::protobuf::RepeatedField<int> region_worker_status_;
-  ::google::protobuf::RepeatedPtrField< ::message::Locate_information > locate_information_realtime_;
   ::message::Base_info* base_info_;
+  ::message::Locate_information* locate_information_realtime_;
   ::message::Error_manager* error_manager_;
   ::google::protobuf::int32 terminal_id_;
   int wanji_manager_status_;
+  int region_worker_status_;
   friend struct ::protobuf_measure_5fmessage_2eproto::TableStruct;
   friend void ::protobuf_measure_5fmessage_2eproto::InitDefaultsGround_status_msgImpl();
 };
@@ -2839,13 +2837,13 @@ inline void Ground_status_msg::set_allocated_base_info(::message::Base_info* bas
 
 // required int32 terminal_id = 2;
 inline bool Ground_status_msg::has_terminal_id() const {
-  return (_has_bits_[0] & 0x00000004u) != 0;
+  return (_has_bits_[0] & 0x00000008u) != 0;
 }
 inline void Ground_status_msg::set_has_terminal_id() {
-  _has_bits_[0] |= 0x00000004u;
+  _has_bits_[0] |= 0x00000008u;
 }
 inline void Ground_status_msg::clear_has_terminal_id() {
-  _has_bits_[0] &= ~0x00000004u;
+  _has_bits_[0] &= ~0x00000008u;
 }
 inline void Ground_status_msg::clear_terminal_id() {
   terminal_id_ = 0;
@@ -2863,13 +2861,13 @@ inline void Ground_status_msg::set_terminal_id(::google::protobuf::int32 value)
 
 // required .message.Wanji_manager_status wanji_manager_status = 3;
 inline bool Ground_status_msg::has_wanji_manager_status() const {
-  return (_has_bits_[0] & 0x00000008u) != 0;
+  return (_has_bits_[0] & 0x00000010u) != 0;
 }
 inline void Ground_status_msg::set_has_wanji_manager_status() {
-  _has_bits_[0] |= 0x00000008u;
+  _has_bits_[0] |= 0x00000010u;
 }
 inline void Ground_status_msg::clear_has_wanji_manager_status() {
-  _has_bits_[0] &= ~0x00000008u;
+  _has_bits_[0] &= ~0x00000010u;
 }
 inline void Ground_status_msg::clear_wanji_manager_status() {
   wanji_manager_status_ = 0;
@@ -2918,74 +2916,90 @@ Ground_status_msg::mutable_wanji_lidar_device_status() {
   return &wanji_lidar_device_status_;
 }
 
-// repeated .message.Region_worker_status region_worker_status = 5;
-inline int Ground_status_msg::region_worker_status_size() const {
-  return region_worker_status_.size();
+// required .message.Region_worker_status region_worker_status = 5;
+inline bool Ground_status_msg::has_region_worker_status() const {
+  return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void Ground_status_msg::set_has_region_worker_status() {
+  _has_bits_[0] |= 0x00000020u;
+}
+inline void Ground_status_msg::clear_has_region_worker_status() {
+  _has_bits_[0] &= ~0x00000020u;
 }
 inline void Ground_status_msg::clear_region_worker_status() {
-  region_worker_status_.Clear();
+  region_worker_status_ = 0;
+  clear_has_region_worker_status();
 }
-inline ::message::Region_worker_status Ground_status_msg::region_worker_status(int index) const {
+inline ::message::Region_worker_status Ground_status_msg::region_worker_status() const {
   // @@protoc_insertion_point(field_get:message.Ground_status_msg.region_worker_status)
-  return static_cast< ::message::Region_worker_status >(region_worker_status_.Get(index));
+  return static_cast< ::message::Region_worker_status >(region_worker_status_);
 }
-inline void Ground_status_msg::set_region_worker_status(int index, ::message::Region_worker_status value) {
+inline void Ground_status_msg::set_region_worker_status(::message::Region_worker_status value) {
   assert(::message::Region_worker_status_IsValid(value));
-  region_worker_status_.Set(index, value);
+  set_has_region_worker_status();
+  region_worker_status_ = value;
   // @@protoc_insertion_point(field_set:message.Ground_status_msg.region_worker_status)
 }
-inline void Ground_status_msg::add_region_worker_status(::message::Region_worker_status value) {
-  assert(::message::Region_worker_status_IsValid(value));
-  region_worker_status_.Add(value);
-  // @@protoc_insertion_point(field_add:message.Ground_status_msg.region_worker_status)
-}
-inline const ::google::protobuf::RepeatedField<int>&
-Ground_status_msg::region_worker_status() const {
-  // @@protoc_insertion_point(field_list:message.Ground_status_msg.region_worker_status)
-  return region_worker_status_;
-}
-inline ::google::protobuf::RepeatedField<int>*
-Ground_status_msg::mutable_region_worker_status() {
-  // @@protoc_insertion_point(field_mutable_list:message.Ground_status_msg.region_worker_status)
-  return &region_worker_status_;
-}
 
-// repeated .message.Locate_information locate_information_realtime = 6;
-inline int Ground_status_msg::locate_information_realtime_size() const {
-  return locate_information_realtime_.size();
+// required .message.Locate_information locate_information_realtime = 6;
+inline bool Ground_status_msg::has_locate_information_realtime() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
 }
-inline const ::message::Locate_information& Ground_status_msg::locate_information_realtime(int index) const {
-  // @@protoc_insertion_point(field_get:message.Ground_status_msg.locate_information_realtime)
-  return locate_information_realtime_.Get(index);
+inline void Ground_status_msg::set_has_locate_information_realtime() {
+  _has_bits_[0] |= 0x00000002u;
 }
-inline ::message::Locate_information* Ground_status_msg::mutable_locate_information_realtime(int index) {
-  // @@protoc_insertion_point(field_mutable:message.Ground_status_msg.locate_information_realtime)
-  return locate_information_realtime_.Mutable(index);
+inline void Ground_status_msg::clear_has_locate_information_realtime() {
+  _has_bits_[0] &= ~0x00000002u;
 }
-inline ::message::Locate_information* Ground_status_msg::add_locate_information_realtime() {
-  // @@protoc_insertion_point(field_add:message.Ground_status_msg.locate_information_realtime)
-  return locate_information_realtime_.Add();
+inline const ::message::Locate_information& Ground_status_msg::locate_information_realtime() const {
+  const ::message::Locate_information* p = locate_information_realtime_;
+  // @@protoc_insertion_point(field_get:message.Ground_status_msg.locate_information_realtime)
+  return p != NULL ? *p : *reinterpret_cast<const ::message::Locate_information*>(
+      &::message::_Locate_information_default_instance_);
 }
-inline ::google::protobuf::RepeatedPtrField< ::message::Locate_information >*
-Ground_status_msg::mutable_locate_information_realtime() {
-  // @@protoc_insertion_point(field_mutable_list:message.Ground_status_msg.locate_information_realtime)
-  return &locate_information_realtime_;
+inline ::message::Locate_information* Ground_status_msg::release_locate_information_realtime() {
+  // @@protoc_insertion_point(field_release:message.Ground_status_msg.locate_information_realtime)
+  clear_has_locate_information_realtime();
+  ::message::Locate_information* temp = locate_information_realtime_;
+  locate_information_realtime_ = NULL;
+  return temp;
 }
-inline const ::google::protobuf::RepeatedPtrField< ::message::Locate_information >&
-Ground_status_msg::locate_information_realtime() const {
-  // @@protoc_insertion_point(field_list:message.Ground_status_msg.locate_information_realtime)
+inline ::message::Locate_information* Ground_status_msg::mutable_locate_information_realtime() {
+  set_has_locate_information_realtime();
+  if (locate_information_realtime_ == NULL) {
+    locate_information_realtime_ = new ::message::Locate_information;
+  }
+  // @@protoc_insertion_point(field_mutable:message.Ground_status_msg.locate_information_realtime)
   return locate_information_realtime_;
 }
+inline void Ground_status_msg::set_allocated_locate_information_realtime(::message::Locate_information* locate_information_realtime) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete reinterpret_cast< ::google::protobuf::MessageLite*>(locate_information_realtime_);
+  }
+  if (locate_information_realtime) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      locate_information_realtime = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, locate_information_realtime, submessage_arena);
+    }
+    set_has_locate_information_realtime();
+  } else {
+    clear_has_locate_information_realtime();
+  }
+  locate_information_realtime_ = locate_information_realtime;
+  // @@protoc_insertion_point(field_set_allocated:message.Ground_status_msg.locate_information_realtime)
+}
 
 // required .message.Error_manager error_manager = 7;
 inline bool Ground_status_msg::has_error_manager() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
+  return (_has_bits_[0] & 0x00000004u) != 0;
 }
 inline void Ground_status_msg::set_has_error_manager() {
-  _has_bits_[0] |= 0x00000002u;
+  _has_bits_[0] |= 0x00000004u;
 }
 inline void Ground_status_msg::clear_has_error_manager() {
-  _has_bits_[0] &= ~0x00000002u;
+  _has_bits_[0] &= ~0x00000004u;
 }
 inline const ::message::Error_manager& Ground_status_msg::error_manager() const {
   const ::message::Error_manager* p = error_manager_;

+ 2 - 2
message/measure_message.proto

@@ -130,8 +130,8 @@ message Ground_status_msg
 
     required Wanji_manager_status       wanji_manager_status = 3;       //万集管理状态
     repeated Wanji_lidar_device_status  wanji_lidar_device_status = 4;  //万集设备身状态
-    repeated Region_worker_status       region_worker_status = 5;       //万集区域功能的状态
-    repeated Locate_information         locate_information_realtime = 6;//地面雷达的 实时定位信息
+    required Region_worker_status       region_worker_status = 5;       //万集区域功能的状态
+    required Locate_information         locate_information_realtime = 6;//地面雷达的 实时定位信息
 
     required Error_manager              error_manager = 7;
 }

+ 18 - 15
system/system_executor.cpp

@@ -227,7 +227,7 @@ Error_manager System_executor::encapsulate_send_status()
 	t_ground_status_msg.mutable_base_info()->set_sender(message::Communicator::eGround_measurer);
 	t_ground_status_msg.mutable_base_info()->set_receiver(message::Communicator::eEmpty);
 
-    // 普爱统一一个万集节点
+    // 普爱统一一个万集节点, 各终端消息分别发送
 	t_ground_status_msg.set_terminal_id(m_terminal_id);
 
 	//万集716
@@ -249,26 +249,29 @@ Error_manager System_executor::encapsulate_send_status()
         t_multi_status_msg.CopyFrom(t_ground_status_msg);
         t_multi_status_msg.set_terminal_id(region_index++);
 		Region_worker::Region_worker_status t_region_worker_status = (*iter).second->get_status();
-        t_multi_status_msg.add_region_worker_status((message::Region_worker_status)t_region_worker_status);
+        // t_multi_status_msg.add_region_worker_status((message::Region_worker_status)t_region_worker_status);
+		t_multi_status_msg.set_region_worker_status((message::Region_worker_status)t_region_worker_status);
 
 		//万集雷达的自动定位信息
 		Common_data::Car_wheel_information	t_car_wheel_information;
 		t_error = (*iter).second->get_last_wheel_information(&t_car_wheel_information, std::chrono::system_clock::now());
 
 		//无论定位结果如何, 都要填充数据, 即使全部写0, 必须保证通信格式正确.
-		message::Locate_information* tp_locate_information = t_multi_status_msg.add_locate_information_realtime();
-		tp_locate_information->set_locate_x(t_car_wheel_information.center_x);
-		tp_locate_information->set_locate_y(t_car_wheel_information.center_y);
-		tp_locate_information->set_locate_angle(t_car_wheel_information.car_angle);
-		tp_locate_information->set_locate_length(0);
-		tp_locate_information->set_locate_width(0);
-		tp_locate_information->set_locate_height(0);
-		tp_locate_information->set_locate_wheel_base(t_car_wheel_information.wheel_base);
-		tp_locate_information->set_locate_wheel_width(t_car_wheel_information.wheel_width);
-		tp_locate_information->set_locate_front_theta(t_car_wheel_information.front_theta);
-		tp_locate_information->set_locate_correct(t_car_wheel_information.correctness);
-
-        t_multi_status_msg.mutable_error_manager()->set_error_code(t_error.get_error_code());
+		message::Locate_information t_locate_information;
+		//= t_multi_status_msg.add_locate_information_realtime();
+		t_locate_information.set_locate_x(t_car_wheel_information.center_x);
+		t_locate_information.set_locate_y(t_car_wheel_information.center_y);
+		t_locate_information.set_locate_angle(t_car_wheel_information.car_angle);
+		t_locate_information.set_locate_length(0);
+		t_locate_information.set_locate_width(0);
+		t_locate_information.set_locate_height(0);
+		t_locate_information.set_locate_wheel_base(t_car_wheel_information.wheel_base);
+		t_locate_information.set_locate_wheel_width(t_car_wheel_information.wheel_width);
+		t_locate_information.set_locate_front_theta(t_car_wheel_information.front_theta);
+		t_locate_information.set_locate_correct(t_car_wheel_information.correctness);
+		t_multi_status_msg.mutable_locate_information_realtime()->CopyFrom(t_locate_information);
+
+		t_multi_status_msg.mutable_error_manager()->set_error_code(t_error.get_error_code());
         t_multi_status_msg.mutable_error_manager()->set_error_level((message::Error_level)t_error.get_error_level());
         t_multi_status_msg.mutable_error_manager()->set_error_description(t_error.get_error_description(), t_error.get_description_length());
         std::string t_msg = t_multi_status_msg.SerializeAsString();