Browse Source

20211217, car_license char20 -> GBK18

huli 3 years ago
parent
commit
39d2275fb8

+ 7 - 3
dispatch/dispatch_plc.cpp

@@ -520,9 +520,13 @@ Error_manager Dispatch_plc::update_dispatch_plc_communication()
 	tp_dispatch_request_from_manager_to_plc_for_data->m_request_car_height = m_request_car_height;
 	tp_dispatch_request_from_manager_to_plc_for_data->m_request_car_wheel_base = m_request_car_wheel_base;
 	tp_dispatch_request_from_manager_to_plc_for_data->m_request_car_wheel_width = m_request_car_wheel_width;
+
 	memset(tp_dispatch_request_from_manager_to_plc_for_data->m_request_car_license, 0, 20);
-	int t_size2 = m_request_key.size()<=20 ? m_request_key.size() : 20 ;
-	memcpy(tp_dispatch_request_from_manager_to_plc_for_data->m_request_car_license, m_request_car_license.c_str(), t_size2);
+	tp_dispatch_request_from_manager_to_plc_for_data->m_request_car_license[0] = 18;
+	tp_dispatch_request_from_manager_to_plc_for_data->m_request_car_license[1] = m_request_car_license.length();
+	unsigned char * p_ch = tp_dispatch_request_from_manager_to_plc_for_data->m_request_car_license;
+	memcpy(p_ch+2, m_request_car_license.c_str(), m_request_car_license.length());
+
 	tp_dispatch_request_from_manager_to_plc_for_data->m_request_car_type = m_request_car_type;
 	tp_dispatch_request_from_manager_to_plc_for_data->m_request_uniformed_car_x = m_request_uniformed_car_x;
 	tp_dispatch_request_from_manager_to_plc_for_data->m_request_uniformed_car_y = m_request_uniformed_car_y;
@@ -557,7 +561,7 @@ Error_manager Dispatch_plc::update_dispatch_plc_communication()
 	m_response_car_height = tp_dispatch_response_from_plc_to_manager->m_response_car_height;
 	m_response_car_wheel_base = tp_dispatch_response_from_plc_to_manager->m_response_car_wheel_base;
 	m_response_car_wheel_width = tp_dispatch_response_from_plc_to_manager->m_response_car_wheel_width;
-	m_response_car_license = (char*) tp_dispatch_response_from_plc_to_manager->m_response_car_license;
+	m_response_car_license = (char*) (tp_dispatch_response_from_plc_to_manager->m_response_car_license+2);
 	m_response_car_type = (Common_data::Car_type) tp_dispatch_response_from_plc_to_manager->m_response_car_type;
 	m_response_uniformed_car_x = tp_dispatch_response_from_plc_to_manager->m_response_uniformed_car_x;
 	m_response_uniformed_car_y = tp_dispatch_response_from_plc_to_manager->m_response_uniformed_car_y;

+ 112 - 67
message/parkspace_allocation_message.pb.cc

@@ -614,6 +614,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_status_msg, error_manager_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_status_msg, database_controller_status_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_status_msg, parkspace_manager_satus_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_status_msg, unit_id_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_status_msg, small_parkspace_remaining_number_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_status_msg, medium_parkspace_remaining_number_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_allocation_status_msg, large_parkspace_remaining_number_),
@@ -626,6 +627,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   5,
   6,
   7,
+  8,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_refresh_request_msg, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_refresh_request_msg, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -658,9 +660,9 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROT
   { 111, 120, sizeof(::message::Parkspace_force_update_response_msg)},
   { 124, 133, sizeof(::message::Parkspace_confirm_alloc_request_msg)},
   { 137, 147, sizeof(::message::Parkspace_confirm_alloc_response_msg)},
-  { 152, 165, sizeof(::message::Parkspace_allocation_status_msg)},
-  { 173, 179, sizeof(::message::Parkspace_refresh_request_msg)},
-  { 180, 188, sizeof(::message::Parkspace_allocation_data_msg)},
+  { 152, 166, sizeof(::message::Parkspace_allocation_status_msg)},
+  { 175, 181, sizeof(::message::Parkspace_refresh_request_msg)},
+  { 182, 190, sizeof(::message::Parkspace_allocation_data_msg)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
@@ -760,36 +762,37 @@ void AddDescriptorsImpl() {
       "d_key\030\002 \002(\t\022-\n\rerror_manager\030\003 \002(\0132\026.mes"
       "sage.Error_manager\022:\n\031confirm_parkspace_"
       "info_ex\030\004 \003(\0132\027.message.Parkspace_info\022#"
-      "\n\010car_type\030\005 \001(\0162\021.message.Car_type\"\254\003\n\037"
+      "\n\010car_type\030\005 \001(\0162\021.message.Car_type\"\275\003\n\037"
       "Parkspace_allocation_status_msg\022%\n\tbase_"
       "info\030\001 \002(\0132\022.message.Base_info\022-\n\rerror_"
       "manager\030\002 \002(\0132\026.message.Error_manager\022G\n"
       "\032database_controller_status\030\003 \002(\0162#.mess"
       "age.Database_controller_status\022A\n\027parksp"
       "ace_manager_satus\030\004 \002(\0162 .message.Parksp"
-      "ace_manager_satus\022(\n small_parkspace_rem"
-      "aining_number\030\005 \002(\005\022)\n!medium_parkspace_"
-      "remaining_number\030\006 \002(\005\022(\n large_parkspac"
-      "e_remaining_number\030\007 \002(\005\022(\n total_parksp"
-      "ace_remaining_number\030\010 \002(\005\"F\n\035Parkspace_"
-      "refresh_request_msg\022%\n\tbase_info\030\001 \002(\0132\022"
-      ".message.Base_info\"\251\001\n\035Parkspace_allocat"
-      "ion_data_msg\022%\n\tbase_info\030\001 \002(\0132\022.messag"
-      "e.Base_info\022-\n\rerror_manager\030\002 \002(\0132\026.mes"
-      "sage.Error_manager\0222\n\021parkspace_info_ex\030"
-      "\003 \003(\0132\027.message.Parkspace_info*\225\001\n\016Vehic"
-      "le_status\022\024\n\020eVehicle_unknown\020\000\022\021\n\reVehi"
-      "cle_idle\020\001\022\026\n\022eVehicle_in_garage\020\002\022\024\n\020eV"
-      "ehicle_parking\020\003\022\025\n\021eVehicle_fetching\020\004\022"
-      "\025\n\021eVehicle_reserved\020\005*W\n\032Database_contr"
-      "oller_status\022\r\n\tE_UNKNOWN\020\000\022\013\n\007E_READY\020\001"
-      "\022\020\n\014E_DISCONNECT\020\002\022\013\n\007E_FAULT\020\003*v\n\027Parks"
-      "pace_manager_satus\022\036\n\032eParkspace_manager"
-      "_unknown\020\000\022\035\n\031eParkspace_manager_normal\020"
-      "\001\022\034\n\030eParkspace_manager_fault\020\002"
+      "ace_manager_satus\022\017\n\007unit_id\030\005 \002(\005\022(\n sm"
+      "all_parkspace_remaining_number\030\006 \002(\005\022)\n!"
+      "medium_parkspace_remaining_number\030\007 \002(\005\022"
+      "(\n large_parkspace_remaining_number\030\010 \002("
+      "\005\022(\n total_parkspace_remaining_number\030\t "
+      "\002(\005\"F\n\035Parkspace_refresh_request_msg\022%\n\t"
+      "base_info\030\001 \002(\0132\022.message.Base_info\"\251\001\n\035"
+      "Parkspace_allocation_data_msg\022%\n\tbase_in"
+      "fo\030\001 \002(\0132\022.message.Base_info\022-\n\rerror_ma"
+      "nager\030\002 \002(\0132\026.message.Error_manager\0222\n\021p"
+      "arkspace_info_ex\030\003 \003(\0132\027.message.Parkspa"
+      "ce_info*\225\001\n\016Vehicle_status\022\024\n\020eVehicle_u"
+      "nknown\020\000\022\021\n\reVehicle_idle\020\001\022\026\n\022eVehicle_"
+      "in_garage\020\002\022\024\n\020eVehicle_parking\020\003\022\025\n\021eVe"
+      "hicle_fetching\020\004\022\025\n\021eVehicle_reserved\020\005*"
+      "W\n\032Database_controller_status\022\r\n\tE_UNKNO"
+      "WN\020\000\022\013\n\007E_READY\020\001\022\020\n\014E_DISCONNECT\020\002\022\013\n\007E"
+      "_FAULT\020\003*v\n\027Parkspace_manager_satus\022\036\n\032e"
+      "Parkspace_manager_unknown\020\000\022\035\n\031eParkspac"
+      "e_manager_normal\020\001\022\034\n\030eParkspace_manager"
+      "_fault\020\002"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 3351);
+      descriptor, 3368);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "parkspace_allocation_message.proto", &protobuf_RegisterTypes);
   ::protobuf_message_5fbase_2eproto::AddDescriptors();
@@ -6215,6 +6218,7 @@ const int Parkspace_allocation_status_msg::kBaseInfoFieldNumber;
 const int Parkspace_allocation_status_msg::kErrorManagerFieldNumber;
 const int Parkspace_allocation_status_msg::kDatabaseControllerStatusFieldNumber;
 const int Parkspace_allocation_status_msg::kParkspaceManagerSatusFieldNumber;
+const int Parkspace_allocation_status_msg::kUnitIdFieldNumber;
 const int Parkspace_allocation_status_msg::kSmallParkspaceRemainingNumberFieldNumber;
 const int Parkspace_allocation_status_msg::kMediumParkspaceRemainingNumberFieldNumber;
 const int Parkspace_allocation_status_msg::kLargeParkspaceRemainingNumberFieldNumber;
@@ -6310,9 +6314,10 @@ void Parkspace_allocation_status_msg::Clear() {
   }
   if (cached_has_bits & 252u) {
     ::memset(&database_controller_status_, 0, static_cast<size_t>(
-        reinterpret_cast<char*>(&total_parkspace_remaining_number_) -
-        reinterpret_cast<char*>(&database_controller_status_)) + sizeof(total_parkspace_remaining_number_));
+        reinterpret_cast<char*>(&large_parkspace_remaining_number_) -
+        reinterpret_cast<char*>(&database_controller_status_)) + sizeof(large_parkspace_remaining_number_));
   }
+  total_parkspace_remaining_number_ = 0;
   _has_bits_.Clear();
   _internal_metadata_.Clear();
 }
@@ -6391,52 +6396,66 @@ bool Parkspace_allocation_status_msg::MergePartialFromCodedStream(
         break;
       }
 
-      // required int32 small_parkspace_remaining_number = 5;
+      // required int32 unit_id = 5;
       case 5: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
-          set_has_small_parkspace_remaining_number();
+          set_has_unit_id();
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                    ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
-                 input, &small_parkspace_remaining_number_)));
+                 input, &unit_id_)));
         } else {
           goto handle_unusual;
         }
         break;
       }
 
-      // required int32 medium_parkspace_remaining_number = 6;
+      // required int32 small_parkspace_remaining_number = 6;
       case 6: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
-          set_has_medium_parkspace_remaining_number();
+          set_has_small_parkspace_remaining_number();
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                    ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
-                 input, &medium_parkspace_remaining_number_)));
+                 input, &small_parkspace_remaining_number_)));
         } else {
           goto handle_unusual;
         }
         break;
       }
 
-      // required int32 large_parkspace_remaining_number = 7;
+      // required int32 medium_parkspace_remaining_number = 7;
       case 7: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
-          set_has_large_parkspace_remaining_number();
+          set_has_medium_parkspace_remaining_number();
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                    ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
-                 input, &large_parkspace_remaining_number_)));
+                 input, &medium_parkspace_remaining_number_)));
         } else {
           goto handle_unusual;
         }
         break;
       }
 
-      // required int32 total_parkspace_remaining_number = 8;
+      // required int32 large_parkspace_remaining_number = 8;
       case 8: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
+          set_has_large_parkspace_remaining_number();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+                 input, &large_parkspace_remaining_number_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // required int32 total_parkspace_remaining_number = 9;
+      case 9: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
           set_has_total_parkspace_remaining_number();
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                    ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
@@ -6498,24 +6517,29 @@ void Parkspace_allocation_status_msg::SerializeWithCachedSizes(
       4, this->parkspace_manager_satus(), output);
   }
 
-  // required int32 small_parkspace_remaining_number = 5;
+  // required int32 unit_id = 5;
   if (cached_has_bits & 0x00000010u) {
-    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->small_parkspace_remaining_number(), output);
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->unit_id(), output);
   }
 
-  // required int32 medium_parkspace_remaining_number = 6;
+  // required int32 small_parkspace_remaining_number = 6;
   if (cached_has_bits & 0x00000020u) {
-    ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->medium_parkspace_remaining_number(), output);
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->small_parkspace_remaining_number(), output);
   }
 
-  // required int32 large_parkspace_remaining_number = 7;
+  // required int32 medium_parkspace_remaining_number = 7;
   if (cached_has_bits & 0x00000040u) {
-    ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->large_parkspace_remaining_number(), output);
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->medium_parkspace_remaining_number(), output);
   }
 
-  // required int32 total_parkspace_remaining_number = 8;
+  // required int32 large_parkspace_remaining_number = 8;
   if (cached_has_bits & 0x00000080u) {
-    ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->total_parkspace_remaining_number(), output);
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->large_parkspace_remaining_number(), output);
+  }
+
+  // required int32 total_parkspace_remaining_number = 9;
+  if (cached_has_bits & 0x00000100u) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->total_parkspace_remaining_number(), output);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -6559,24 +6583,29 @@ void Parkspace_allocation_status_msg::SerializeWithCachedSizes(
       4, this->parkspace_manager_satus(), target);
   }
 
-  // required int32 small_parkspace_remaining_number = 5;
+  // required int32 unit_id = 5;
   if (cached_has_bits & 0x00000010u) {
-    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->small_parkspace_remaining_number(), target);
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->unit_id(), target);
   }
 
-  // required int32 medium_parkspace_remaining_number = 6;
+  // required int32 small_parkspace_remaining_number = 6;
   if (cached_has_bits & 0x00000020u) {
-    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->medium_parkspace_remaining_number(), target);
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->small_parkspace_remaining_number(), target);
   }
 
-  // required int32 large_parkspace_remaining_number = 7;
+  // required int32 medium_parkspace_remaining_number = 7;
   if (cached_has_bits & 0x00000040u) {
-    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->large_parkspace_remaining_number(), target);
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->medium_parkspace_remaining_number(), target);
   }
 
-  // required int32 total_parkspace_remaining_number = 8;
+  // required int32 large_parkspace_remaining_number = 8;
   if (cached_has_bits & 0x00000080u) {
-    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->total_parkspace_remaining_number(), target);
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->large_parkspace_remaining_number(), target);
+  }
+
+  // required int32 total_parkspace_remaining_number = 9;
+  if (cached_has_bits & 0x00000100u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->total_parkspace_remaining_number(), target);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -6617,29 +6646,36 @@ size_t Parkspace_allocation_status_msg::RequiredFieldsByteSizeFallback() const {
       ::google::protobuf::internal::WireFormatLite::EnumSize(this->parkspace_manager_satus());
   }
 
+  if (has_unit_id()) {
+    // required int32 unit_id = 5;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::Int32Size(
+        this->unit_id());
+  }
+
   if (has_small_parkspace_remaining_number()) {
-    // required int32 small_parkspace_remaining_number = 5;
+    // required int32 small_parkspace_remaining_number = 6;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::Int32Size(
         this->small_parkspace_remaining_number());
   }
 
   if (has_medium_parkspace_remaining_number()) {
-    // required int32 medium_parkspace_remaining_number = 6;
+    // required int32 medium_parkspace_remaining_number = 7;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::Int32Size(
         this->medium_parkspace_remaining_number());
   }
 
   if (has_large_parkspace_remaining_number()) {
-    // required int32 large_parkspace_remaining_number = 7;
+    // required int32 large_parkspace_remaining_number = 8;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::Int32Size(
         this->large_parkspace_remaining_number());
   }
 
   if (has_total_parkspace_remaining_number()) {
-    // required int32 total_parkspace_remaining_number = 8;
+    // required int32 total_parkspace_remaining_number = 9;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::Int32Size(
         this->total_parkspace_remaining_number());
@@ -6656,7 +6692,7 @@ size_t Parkspace_allocation_status_msg::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
         _internal_metadata_.unknown_fields());
   }
-  if (((_has_bits_[0] & 0x000000ff) ^ 0x000000ff) == 0) {  // All required fields are present.
+  if (((_has_bits_[0] & 0x000001ff) ^ 0x000001ff) == 0) {  // All required fields are present.
     // required .message.Base_info base_info = 1;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
@@ -6675,22 +6711,27 @@ size_t Parkspace_allocation_status_msg::ByteSizeLong() const {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::EnumSize(this->parkspace_manager_satus());
 
-    // required int32 small_parkspace_remaining_number = 5;
+    // required int32 unit_id = 5;
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::Int32Size(
+        this->unit_id());
+
+    // required int32 small_parkspace_remaining_number = 6;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::Int32Size(
         this->small_parkspace_remaining_number());
 
-    // required int32 medium_parkspace_remaining_number = 6;
+    // required int32 medium_parkspace_remaining_number = 7;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::Int32Size(
         this->medium_parkspace_remaining_number());
 
-    // required int32 large_parkspace_remaining_number = 7;
+    // required int32 large_parkspace_remaining_number = 8;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::Int32Size(
         this->large_parkspace_remaining_number());
 
-    // required int32 total_parkspace_remaining_number = 8;
+    // required int32 total_parkspace_remaining_number = 9;
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::Int32Size(
         this->total_parkspace_remaining_number());
@@ -6742,19 +6783,22 @@ void Parkspace_allocation_status_msg::MergeFrom(const Parkspace_allocation_statu
       parkspace_manager_satus_ = from.parkspace_manager_satus_;
     }
     if (cached_has_bits & 0x00000010u) {
-      small_parkspace_remaining_number_ = from.small_parkspace_remaining_number_;
+      unit_id_ = from.unit_id_;
     }
     if (cached_has_bits & 0x00000020u) {
-      medium_parkspace_remaining_number_ = from.medium_parkspace_remaining_number_;
+      small_parkspace_remaining_number_ = from.small_parkspace_remaining_number_;
     }
     if (cached_has_bits & 0x00000040u) {
-      large_parkspace_remaining_number_ = from.large_parkspace_remaining_number_;
+      medium_parkspace_remaining_number_ = from.medium_parkspace_remaining_number_;
     }
     if (cached_has_bits & 0x00000080u) {
-      total_parkspace_remaining_number_ = from.total_parkspace_remaining_number_;
+      large_parkspace_remaining_number_ = from.large_parkspace_remaining_number_;
     }
     _has_bits_[0] |= cached_has_bits;
   }
+  if (cached_has_bits & 0x00000100u) {
+    set_total_parkspace_remaining_number(from.total_parkspace_remaining_number());
+  }
 }
 
 void Parkspace_allocation_status_msg::CopyFrom(const ::google::protobuf::Message& from) {
@@ -6772,7 +6816,7 @@ void Parkspace_allocation_status_msg::CopyFrom(const Parkspace_allocation_status
 }
 
 bool Parkspace_allocation_status_msg::IsInitialized() const {
-  if ((_has_bits_[0] & 0x000000ff) != 0x000000ff) return false;
+  if ((_has_bits_[0] & 0x000001ff) != 0x000001ff) return false;
   if (has_base_info()) {
     if (!this->base_info_->IsInitialized()) return false;
   }
@@ -6792,6 +6836,7 @@ void Parkspace_allocation_status_msg::InternalSwap(Parkspace_allocation_status_m
   swap(error_manager_, other->error_manager_);
   swap(database_controller_status_, other->database_controller_status_);
   swap(parkspace_manager_satus_, other->parkspace_manager_satus_);
+  swap(unit_id_, other->unit_id_);
   swap(small_parkspace_remaining_number_, other->small_parkspace_remaining_number_);
   swap(medium_parkspace_remaining_number_, other->medium_parkspace_remaining_number_);
   swap(large_parkspace_remaining_number_, other->large_parkspace_remaining_number_);

+ 58 - 24
message/parkspace_allocation_message.pb.h

@@ -2191,31 +2191,38 @@ class Parkspace_allocation_status_msg : public ::google::protobuf::Message /* @@
   ::message::Parkspace_manager_satus parkspace_manager_satus() const;
   void set_parkspace_manager_satus(::message::Parkspace_manager_satus value);
 
-  // required int32 small_parkspace_remaining_number = 5;
+  // required int32 unit_id = 5;
+  bool has_unit_id() const;
+  void clear_unit_id();
+  static const int kUnitIdFieldNumber = 5;
+  ::google::protobuf::int32 unit_id() const;
+  void set_unit_id(::google::protobuf::int32 value);
+
+  // required int32 small_parkspace_remaining_number = 6;
   bool has_small_parkspace_remaining_number() const;
   void clear_small_parkspace_remaining_number();
-  static const int kSmallParkspaceRemainingNumberFieldNumber = 5;
+  static const int kSmallParkspaceRemainingNumberFieldNumber = 6;
   ::google::protobuf::int32 small_parkspace_remaining_number() const;
   void set_small_parkspace_remaining_number(::google::protobuf::int32 value);
 
-  // required int32 medium_parkspace_remaining_number = 6;
+  // required int32 medium_parkspace_remaining_number = 7;
   bool has_medium_parkspace_remaining_number() const;
   void clear_medium_parkspace_remaining_number();
-  static const int kMediumParkspaceRemainingNumberFieldNumber = 6;
+  static const int kMediumParkspaceRemainingNumberFieldNumber = 7;
   ::google::protobuf::int32 medium_parkspace_remaining_number() const;
   void set_medium_parkspace_remaining_number(::google::protobuf::int32 value);
 
-  // required int32 large_parkspace_remaining_number = 7;
+  // required int32 large_parkspace_remaining_number = 8;
   bool has_large_parkspace_remaining_number() const;
   void clear_large_parkspace_remaining_number();
-  static const int kLargeParkspaceRemainingNumberFieldNumber = 7;
+  static const int kLargeParkspaceRemainingNumberFieldNumber = 8;
   ::google::protobuf::int32 large_parkspace_remaining_number() const;
   void set_large_parkspace_remaining_number(::google::protobuf::int32 value);
 
-  // required int32 total_parkspace_remaining_number = 8;
+  // required int32 total_parkspace_remaining_number = 9;
   bool has_total_parkspace_remaining_number() const;
   void clear_total_parkspace_remaining_number();
-  static const int kTotalParkspaceRemainingNumberFieldNumber = 8;
+  static const int kTotalParkspaceRemainingNumberFieldNumber = 9;
   ::google::protobuf::int32 total_parkspace_remaining_number() const;
   void set_total_parkspace_remaining_number(::google::protobuf::int32 value);
 
@@ -2229,6 +2236,8 @@ class Parkspace_allocation_status_msg : public ::google::protobuf::Message /* @@
   void clear_has_database_controller_status();
   void set_has_parkspace_manager_satus();
   void clear_has_parkspace_manager_satus();
+  void set_has_unit_id();
+  void clear_has_unit_id();
   void set_has_small_parkspace_remaining_number();
   void clear_has_small_parkspace_remaining_number();
   void set_has_medium_parkspace_remaining_number();
@@ -2248,6 +2257,7 @@ class Parkspace_allocation_status_msg : public ::google::protobuf::Message /* @@
   ::message::Error_manager* error_manager_;
   int database_controller_status_;
   int parkspace_manager_satus_;
+  ::google::protobuf::int32 unit_id_;
   ::google::protobuf::int32 small_parkspace_remaining_number_;
   ::google::protobuf::int32 medium_parkspace_remaining_number_;
   ::google::protobuf::int32 large_parkspace_remaining_number_;
@@ -4890,16 +4900,40 @@ inline void Parkspace_allocation_status_msg::set_parkspace_manager_satus(::messa
   // @@protoc_insertion_point(field_set:message.Parkspace_allocation_status_msg.parkspace_manager_satus)
 }
 
-// required int32 small_parkspace_remaining_number = 5;
-inline bool Parkspace_allocation_status_msg::has_small_parkspace_remaining_number() const {
+// required int32 unit_id = 5;
+inline bool Parkspace_allocation_status_msg::has_unit_id() const {
   return (_has_bits_[0] & 0x00000010u) != 0;
 }
-inline void Parkspace_allocation_status_msg::set_has_small_parkspace_remaining_number() {
+inline void Parkspace_allocation_status_msg::set_has_unit_id() {
   _has_bits_[0] |= 0x00000010u;
 }
-inline void Parkspace_allocation_status_msg::clear_has_small_parkspace_remaining_number() {
+inline void Parkspace_allocation_status_msg::clear_has_unit_id() {
   _has_bits_[0] &= ~0x00000010u;
 }
+inline void Parkspace_allocation_status_msg::clear_unit_id() {
+  unit_id_ = 0;
+  clear_has_unit_id();
+}
+inline ::google::protobuf::int32 Parkspace_allocation_status_msg::unit_id() const {
+  // @@protoc_insertion_point(field_get:message.Parkspace_allocation_status_msg.unit_id)
+  return unit_id_;
+}
+inline void Parkspace_allocation_status_msg::set_unit_id(::google::protobuf::int32 value) {
+  set_has_unit_id();
+  unit_id_ = value;
+  // @@protoc_insertion_point(field_set:message.Parkspace_allocation_status_msg.unit_id)
+}
+
+// required int32 small_parkspace_remaining_number = 6;
+inline bool Parkspace_allocation_status_msg::has_small_parkspace_remaining_number() const {
+  return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void Parkspace_allocation_status_msg::set_has_small_parkspace_remaining_number() {
+  _has_bits_[0] |= 0x00000020u;
+}
+inline void Parkspace_allocation_status_msg::clear_has_small_parkspace_remaining_number() {
+  _has_bits_[0] &= ~0x00000020u;
+}
 inline void Parkspace_allocation_status_msg::clear_small_parkspace_remaining_number() {
   small_parkspace_remaining_number_ = 0;
   clear_has_small_parkspace_remaining_number();
@@ -4914,15 +4948,15 @@ inline void Parkspace_allocation_status_msg::set_small_parkspace_remaining_numbe
   // @@protoc_insertion_point(field_set:message.Parkspace_allocation_status_msg.small_parkspace_remaining_number)
 }
 
-// required int32 medium_parkspace_remaining_number = 6;
+// required int32 medium_parkspace_remaining_number = 7;
 inline bool Parkspace_allocation_status_msg::has_medium_parkspace_remaining_number() const {
-  return (_has_bits_[0] & 0x00000020u) != 0;
+  return (_has_bits_[0] & 0x00000040u) != 0;
 }
 inline void Parkspace_allocation_status_msg::set_has_medium_parkspace_remaining_number() {
-  _has_bits_[0] |= 0x00000020u;
+  _has_bits_[0] |= 0x00000040u;
 }
 inline void Parkspace_allocation_status_msg::clear_has_medium_parkspace_remaining_number() {
-  _has_bits_[0] &= ~0x00000020u;
+  _has_bits_[0] &= ~0x00000040u;
 }
 inline void Parkspace_allocation_status_msg::clear_medium_parkspace_remaining_number() {
   medium_parkspace_remaining_number_ = 0;
@@ -4938,15 +4972,15 @@ inline void Parkspace_allocation_status_msg::set_medium_parkspace_remaining_numb
   // @@protoc_insertion_point(field_set:message.Parkspace_allocation_status_msg.medium_parkspace_remaining_number)
 }
 
-// required int32 large_parkspace_remaining_number = 7;
+// required int32 large_parkspace_remaining_number = 8;
 inline bool Parkspace_allocation_status_msg::has_large_parkspace_remaining_number() const {
-  return (_has_bits_[0] & 0x00000040u) != 0;
+  return (_has_bits_[0] & 0x00000080u) != 0;
 }
 inline void Parkspace_allocation_status_msg::set_has_large_parkspace_remaining_number() {
-  _has_bits_[0] |= 0x00000040u;
+  _has_bits_[0] |= 0x00000080u;
 }
 inline void Parkspace_allocation_status_msg::clear_has_large_parkspace_remaining_number() {
-  _has_bits_[0] &= ~0x00000040u;
+  _has_bits_[0] &= ~0x00000080u;
 }
 inline void Parkspace_allocation_status_msg::clear_large_parkspace_remaining_number() {
   large_parkspace_remaining_number_ = 0;
@@ -4962,15 +4996,15 @@ inline void Parkspace_allocation_status_msg::set_large_parkspace_remaining_numbe
   // @@protoc_insertion_point(field_set:message.Parkspace_allocation_status_msg.large_parkspace_remaining_number)
 }
 
-// required int32 total_parkspace_remaining_number = 8;
+// required int32 total_parkspace_remaining_number = 9;
 inline bool Parkspace_allocation_status_msg::has_total_parkspace_remaining_number() const {
-  return (_has_bits_[0] & 0x00000080u) != 0;
+  return (_has_bits_[0] & 0x00000100u) != 0;
 }
 inline void Parkspace_allocation_status_msg::set_has_total_parkspace_remaining_number() {
-  _has_bits_[0] |= 0x00000080u;
+  _has_bits_[0] |= 0x00000100u;
 }
 inline void Parkspace_allocation_status_msg::clear_has_total_parkspace_remaining_number() {
-  _has_bits_[0] &= ~0x00000080u;
+  _has_bits_[0] &= ~0x00000100u;
 }
 inline void Parkspace_allocation_status_msg::clear_total_parkspace_remaining_number() {
   total_parkspace_remaining_number_ = 0;

+ 5 - 4
message/parkspace_allocation_message.proto

@@ -149,10 +149,11 @@ message Parkspace_allocation_status_msg
     required Error_manager                  error_manager=2;
     required Database_controller_status     database_controller_status=3;           //数据库的状态
     required Parkspace_manager_satus        parkspace_manager_satus=4;              //车位管理状态
-    required int32                          small_parkspace_remaining_number=5;    //小型车位剩余数量
-    required int32                          medium_parkspace_remaining_number=6;   //中型车位剩余数量
-    required int32                          large_parkspace_remaining_number=7;    //大型车位剩余数量
-    required int32                          total_parkspace_remaining_number=8;    //所有车位剩余数量
+	required int32                          unit_id=5;								//单元号
+    required int32                          small_parkspace_remaining_number=6;    //小型车位剩余数量
+    required int32                          medium_parkspace_remaining_number=7;   //中型车位剩余数量
+    required int32                          large_parkspace_remaining_number=8;    //大型车位剩余数量
+    required int32                          total_parkspace_remaining_number=9;    //所有车位剩余数量
 }
 
 //更新车位数据请求