浏览代码

2021 0308, wangkang parkspace message修改

wk 4 年之前
父节点
当前提交
214845160a
共有 4 个文件被更改,包括 252 次插入88 次删除
  1. 153 79
      message/message_base.pb.cc
  2. 68 0
      message/message_base.pb.h
  3. 2 0
      message/message_base.proto
  4. 29 9
      parkspace_allocation/parkspace_operating_function.cpp

+ 153 - 79
message/message_base.pb.cc

@@ -247,10 +247,14 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Car_info, car_width_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Car_info, car_height_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Car_info, license_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Car_info, car_wheel_base_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Car_info, car_wheel_width_),
   1,
   2,
   3,
   0,
+  4,
+  5,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_info, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Parkspace_info, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -292,8 +296,8 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROT
   { 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, 87, sizeof(::message::Parkspace_info)},
+  { 54, 65, sizeof(::message::Car_info)},
+  { 71, 91, sizeof(::message::Parkspace_info)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
@@ -341,76 +345,78 @@ void AddDescriptorsImpl() {
       "\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\"\271\004\n\016Parkspace_info\022\035\n"
-      "\025parkingspace_index_id\030\001 \001(\005\0222\n\021parkings"
-      "pace_type\030\002 \001(\0162\027.message.Parkspace_type"
-      "\022\034\n\024parkingspace_unit_id\030\003 \001(\005\022\034\n\024parkin"
-      "gspace_room_id\030\004 \001(\005\0222\n\026parkingspace_dir"
-      "ection\030\005 \001(\0162\022.message.Direction\022\035\n\025park"
-      "ingspace_floor_id\030\006 \001(\005\022\032\n\022parkingspace_"
-      "width\030\007 \001(\002\022\033\n\023parkingspace_height\030\010 \001(\002"
-      "\0226\n\023parkingspace_status\030\t \001(\0162\031.message."
-      "Parkspace_status\022#\n\010car_info\030\n \001(\0132\021.mes"
-      "sage.Car_info\022\022\n\nentry_time\030\013 \001(\t\022\022\n\nlea"
-      "ve_time\030\014 \001(\t\022/\n\016parkspace_path\030\r \001(\0162\027."
-      "message.Parkspace_path\022\032\n\022path_estimate_"
-      "time\030\016 \001(\002\022:\n\027parkspace_status_target\030\017 "
-      "\001(\0162\031.message.Parkspace_status*\317\007\n\014Messa"
-      "ge_type\022\r\n\teBase_msg\020\000\022\020\n\014eCommand_msg\020\001"
-      "\022\026\n\022eLocate_status_msg\020\021\022\027\n\023eLocate_requ"
-      "est_msg\020\022\022\030\n\024eLocate_response_msg\020\023\022\030\n\024e"
-      "Dispatch_status_msg\020!\022\031\n\025eDispatch_reque"
-      "st_msg\020\"\022\032\n\026eDispatch_response_msg\020#\022$\n "
-      "eParkspace_allocation_status_msg\0201\022%\n!eP"
-      "arkspace_allocation_request_msg\0202\022&\n\"ePa"
-      "rkspace_allocation_response_msg\0203\022!\n\035ePa"
-      "rkspace_search_request_msg\0204\022\"\n\036eParkspa"
-      "ce_search_response_msg\0205\022\"\n\036eParkspace_r"
-      "elease_request_msg\0206\022#\n\037eParkspace_relea"
-      "se_response_msg\0207\022\'\n#eParkspace_force_up"
-      "date_request_msg\0208\022(\n$eParkspace_force_u"
-      "pdate_response_msg\0209\022(\n$eParkspace_confi"
-      "rm_alloc_request_msg\020:\022)\n%eParkspace_con"
-      "firm_alloc_response_msg\020;\022\"\n\036eParkspace_"
-      "allocation_data_msg\020<\022\036\n\032eStore_command_"
-      "request_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\032eSt"
-      "oring_process_statu_msg\020\220\001\022\037\n\032ePicking_p"
-      "rocess_statu_msg\020\221\001\022\"\n\035eCentral_controll"
-      "er_statu_msg\020\240\001\022#\n\036eEntrance_manual_oper"
-      "ation_msg\020\260\001\022\"\n\035eProcess_manual_operatio"
-      "n_msg\020\261\001*f\n\014Communicator\022\n\n\006eEmpty\020\000\022\t\n\005"
-      "eMain\020\001\022\016\n\teTerminor\020\200\002\022\017\n\neParkspace\020\200\004"
-      "\022\016\n\teMeasurer\020\200\006\022\016\n\teDispatch\020\200\010**\n\014Proc"
-      "ess_type\022\014\n\010eStoring\020\001\022\014\n\010ePicking\020\002*e\n\013"
-      "Error_level\022\n\n\006NORMAL\020\000\022\024\n\020NEGLIGIBLE_ER"
-      "ROR\020\001\022\017\n\013MINOR_ERROR\020\002\022\017\n\013MAJOR_ERROR\020\003\022"
-      "\022\n\016CRITICAL_ERROR\020\004*\207\001\n\020Parkspace_status"
-      "\022\024\n\020eParkspace_empty\020\000\022\027\n\023eParkspace_occ"
-      "upied\020\001\022\027\n\023eParkspace_reserved\020\002\022\025\n\021ePar"
-      "kspace_locked\020\003\022\024\n\020eParkspace_error\020\004*(\n"
-      "\tDirection\022\014\n\010eForward\020\001\022\r\n\teBackward\020\002*"
-      "[\n\016Parkspace_path\022\020\n\014OPTIMAL_PATH\020\001\022\r\n\tL"
-      "EFT_PATH\020\002\022\016\n\nRIGHT_PATH\020\003\022\030\n\024TEMPORARY_"
-      "CACHE_PATH\020\004*R\n\016Parkspace_type\022\024\n\020MIN_PA"
-      "RKINGSPACE\020\001\022\024\n\020MID_PARKINGSPACE\020\002\022\024\n\020BI"
-      "G_PARKINGSPACE\020\003*\335\002\n\tStep_type\022\017\n\013eAlloc"
-      "_step\020\000\022\021\n\reMeasure_step\020\001\022\021\n\reCompare_s"
-      "tep\020\002\022\022\n\016eDispatch_step\020\003\022\021\n\reConfirm_st"
-      "ep\020\004\022\020\n\014eSearch_step\020\005\022\016\n\neWait_step\020\006\022\021"
-      "\n\reRelease_step\020\007\022\r\n\teComplete\020\010\022\025\n\021eBac"
-      "kConfirm_step\020\t\022\026\n\022eBack_compare_step\020\n\022"
-      "\025\n\021eBackMeasure_step\020\013\022\023\n\017eBackAlloc_ste"
-      "p\020\014\022\022\n\016eBackWait_step\020\r\022\026\n\022eBackDispatch"
-      "_step\020\016\022\024\n\020eBackSearch_step\020\017\022\021\n\reBackCo"
-      "mplete\020\020*C\n\nStep_statu\022\014\n\010eWaiting\020\000\022\014\n\010"
-      "eWorking\020\001\022\n\n\006eError\020\002\022\r\n\teFinished\020\003"
+      "rect\030\t \001(\010\"\207\001\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\022\026\n\016car_wheel_base\030\005 "
+      "\001(\002\022\027\n\017car_wheel_width\030\006 \001(\002\"\271\004\n\016Parkspa"
+      "ce_info\022\035\n\025parkingspace_index_id\030\001 \001(\005\0222"
+      "\n\021parkingspace_type\030\002 \001(\0162\027.message.Park"
+      "space_type\022\034\n\024parkingspace_unit_id\030\003 \001(\005"
+      "\022\034\n\024parkingspace_room_id\030\004 \001(\005\0222\n\026parkin"
+      "gspace_direction\030\005 \001(\0162\022.message.Directi"
+      "on\022\035\n\025parkingspace_floor_id\030\006 \001(\005\022\032\n\022par"
+      "kingspace_width\030\007 \001(\002\022\033\n\023parkingspace_he"
+      "ight\030\010 \001(\002\0226\n\023parkingspace_status\030\t \001(\0162"
+      "\031.message.Parkspace_status\022#\n\010car_info\030\n"
+      " \001(\0132\021.message.Car_info\022\022\n\nentry_time\030\013 "
+      "\001(\t\022\022\n\nleave_time\030\014 \001(\t\022/\n\016parkspace_pat"
+      "h\030\r \001(\0162\027.message.Parkspace_path\022\032\n\022path"
+      "_estimate_time\030\016 \001(\002\022:\n\027parkspace_status"
+      "_target\030\017 \001(\0162\031.message.Parkspace_status"
+      "*\317\007\n\014Message_type\022\r\n\teBase_msg\020\000\022\020\n\014eCom"
+      "mand_msg\020\001\022\026\n\022eLocate_status_msg\020\021\022\027\n\023eL"
+      "ocate_request_msg\020\022\022\030\n\024eLocate_response_"
+      "msg\020\023\022\030\n\024eDispatch_status_msg\020!\022\031\n\025eDisp"
+      "atch_request_msg\020\"\022\032\n\026eDispatch_response"
+      "_msg\020#\022$\n eParkspace_allocation_status_m"
+      "sg\0201\022%\n!eParkspace_allocation_request_ms"
+      "g\0202\022&\n\"eParkspace_allocation_response_ms"
+      "g\0203\022!\n\035eParkspace_search_request_msg\0204\022\""
+      "\n\036eParkspace_search_response_msg\0205\022\"\n\036eP"
+      "arkspace_release_request_msg\0206\022#\n\037eParks"
+      "pace_release_response_msg\0207\022\'\n#eParkspac"
+      "e_force_update_request_msg\0208\022(\n$eParkspa"
+      "ce_force_update_response_msg\0209\022(\n$eParks"
+      "pace_confirm_alloc_request_msg\020:\022)\n%ePar"
+      "kspace_confirm_alloc_response_msg\020;\022\"\n\036e"
+      "Parkspace_allocation_data_msg\020<\022\036\n\032eStor"
+      "e_command_request_msg\020A\022\037\n\033eStore_comman"
+      "d_response_msg\020B\022\037\n\033ePickup_command_requ"
+      "est_msg\020C\022 \n\034ePickup_command_response_ms"
+      "g\020D\022\037\n\032eStoring_process_statu_msg\020\220\001\022\037\n\032"
+      "ePicking_process_statu_msg\020\221\001\022\"\n\035eCentra"
+      "l_controller_statu_msg\020\240\001\022#\n\036eEntrance_m"
+      "anual_operation_msg\020\260\001\022\"\n\035eProcess_manua"
+      "l_operation_msg\020\261\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\014Process_type\022\014\n\010eStoring\020\001\022\014\n\010ePic"
+      "king\020\002*e\n\013Error_level\022\n\n\006NORMAL\020\000\022\024\n\020NEG"
+      "LIGIBLE_ERROR\020\001\022\017\n\013MINOR_ERROR\020\002\022\017\n\013MAJO"
+      "R_ERROR\020\003\022\022\n\016CRITICAL_ERROR\020\004*\207\001\n\020Parksp"
+      "ace_status\022\024\n\020eParkspace_empty\020\000\022\027\n\023ePar"
+      "kspace_occupied\020\001\022\027\n\023eParkspace_reserved"
+      "\020\002\022\025\n\021eParkspace_locked\020\003\022\024\n\020eParkspace_"
+      "error\020\004*(\n\tDirection\022\014\n\010eForward\020\001\022\r\n\teB"
+      "ackward\020\002*[\n\016Parkspace_path\022\020\n\014OPTIMAL_P"
+      "ATH\020\001\022\r\n\tLEFT_PATH\020\002\022\016\n\nRIGHT_PATH\020\003\022\030\n\024"
+      "TEMPORARY_CACHE_PATH\020\004*R\n\016Parkspace_type"
+      "\022\024\n\020MIN_PARKINGSPACE\020\001\022\024\n\020MID_PARKINGSPA"
+      "CE\020\002\022\024\n\020BIG_PARKINGSPACE\020\003*\335\002\n\tStep_type"
+      "\022\017\n\013eAlloc_step\020\000\022\021\n\reMeasure_step\020\001\022\021\n\r"
+      "eCompare_step\020\002\022\022\n\016eDispatch_step\020\003\022\021\n\re"
+      "Confirm_step\020\004\022\020\n\014eSearch_step\020\005\022\016\n\neWai"
+      "t_step\020\006\022\021\n\reRelease_step\020\007\022\r\n\teComplete"
+      "\020\010\022\025\n\021eBackConfirm_step\020\t\022\026\n\022eBack_compa"
+      "re_step\020\n\022\025\n\021eBackMeasure_step\020\013\022\023\n\017eBac"
+      "kAlloc_step\020\014\022\022\n\016eBackWait_step\020\r\022\026\n\022eBa"
+      "ckDispatch_step\020\016\022\024\n\020eBackSearch_step\020\017\022"
+      "\021\n\reBackComplete\020\020*C\n\nStep_statu\022\014\n\010eWai"
+      "ting\020\000\022\014\n\010eWorking\020\001\022\n\n\006eError\020\002\022\r\n\teFin"
+      "ished\020\003"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 3237);
+      descriptor, 3287);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "message_base.proto", &protobuf_RegisterTypes);
 }
@@ -2188,6 +2194,8 @@ const int Car_info::kCarLengthFieldNumber;
 const int Car_info::kCarWidthFieldNumber;
 const int Car_info::kCarHeightFieldNumber;
 const int Car_info::kLicenseFieldNumber;
+const int Car_info::kCarWheelBaseFieldNumber;
+const int Car_info::kCarWheelWidthFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Car_info::Car_info()
@@ -2209,8 +2217,8 @@ Car_info::Car_info(const Car_info& from)
     license_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.license_);
   }
   ::memcpy(&car_length_, &from.car_length_,
-    static_cast<size_t>(reinterpret_cast<char*>(&car_height_) -
-    reinterpret_cast<char*>(&car_length_)) + sizeof(car_height_));
+    static_cast<size_t>(reinterpret_cast<char*>(&car_wheel_width_) -
+    reinterpret_cast<char*>(&car_length_)) + sizeof(car_wheel_width_));
   // @@protoc_insertion_point(copy_constructor:message.Car_info)
 }
 
@@ -2218,8 +2226,8 @@ void Car_info::SharedCtor() {
   _cached_size_ = 0;
   license_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&car_length_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&car_height_) -
-      reinterpret_cast<char*>(&car_length_)) + sizeof(car_height_));
+      reinterpret_cast<char*>(&car_wheel_width_) -
+      reinterpret_cast<char*>(&car_length_)) + sizeof(car_wheel_width_));
 }
 
 Car_info::~Car_info() {
@@ -2265,10 +2273,10 @@ void Car_info::Clear() {
     GOOGLE_DCHECK(!license_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
     (*license_.UnsafeRawStringPointer())->clear();
   }
-  if (cached_has_bits & 14u) {
+  if (cached_has_bits & 62u) {
     ::memset(&car_length_, 0, static_cast<size_t>(
-        reinterpret_cast<char*>(&car_height_) -
-        reinterpret_cast<char*>(&car_length_)) + sizeof(car_height_));
+        reinterpret_cast<char*>(&car_wheel_width_) -
+        reinterpret_cast<char*>(&car_length_)) + sizeof(car_wheel_width_));
   }
   _has_bits_.Clear();
   _internal_metadata_.Clear();
@@ -2342,6 +2350,34 @@ bool Car_info::MergePartialFromCodedStream(
         break;
       }
 
+      // optional float car_wheel_base = 5;
+      case 5: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(45u /* 45 & 0xFF */)) {
+          set_has_car_wheel_base();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
+                 input, &car_wheel_base_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // optional float car_wheel_width = 6;
+      case 6: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(53u /* 53 & 0xFF */)) {
+          set_has_car_wheel_width();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
+                 input, &car_wheel_width_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
       default: {
       handle_unusual:
         if (tag == 0) {
@@ -2394,6 +2430,16 @@ void Car_info::SerializeWithCachedSizes(
       4, this->license(), output);
   }
 
+  // optional float car_wheel_base = 5;
+  if (cached_has_bits & 0x00000010u) {
+    ::google::protobuf::internal::WireFormatLite::WriteFloat(5, this->car_wheel_base(), output);
+  }
+
+  // optional float car_wheel_width = 6;
+  if (cached_has_bits & 0x00000020u) {
+    ::google::protobuf::internal::WireFormatLite::WriteFloat(6, this->car_wheel_width(), output);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
         _internal_metadata_.unknown_fields(), output);
@@ -2435,6 +2481,16 @@ void Car_info::SerializeWithCachedSizes(
         4, this->license(), target);
   }
 
+  // optional float car_wheel_base = 5;
+  if (cached_has_bits & 0x00000010u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(5, this->car_wheel_base(), target);
+  }
+
+  // optional float car_wheel_width = 6;
+  if (cached_has_bits & 0x00000020u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(6, this->car_wheel_width(), target);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
         _internal_metadata_.unknown_fields(), target);
@@ -2452,7 +2508,7 @@ size_t Car_info::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
         _internal_metadata_.unknown_fields());
   }
-  if (_has_bits_[0 / 32] & 15u) {
+  if (_has_bits_[0 / 32] & 63u) {
     // optional string license = 4;
     if (has_license()) {
       total_size += 1 +
@@ -2475,6 +2531,16 @@ size_t Car_info::ByteSizeLong() const {
       total_size += 1 + 4;
     }
 
+    // optional float car_wheel_base = 5;
+    if (has_car_wheel_base()) {
+      total_size += 1 + 4;
+    }
+
+    // optional float car_wheel_width = 6;
+    if (has_car_wheel_width()) {
+      total_size += 1 + 4;
+    }
+
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
@@ -2506,7 +2572,7 @@ void Car_info::MergeFrom(const Car_info& from) {
   (void) cached_has_bits;
 
   cached_has_bits = from._has_bits_[0];
-  if (cached_has_bits & 15u) {
+  if (cached_has_bits & 63u) {
     if (cached_has_bits & 0x00000001u) {
       set_has_license();
       license_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.license_);
@@ -2520,6 +2586,12 @@ void Car_info::MergeFrom(const Car_info& from) {
     if (cached_has_bits & 0x00000008u) {
       car_height_ = from.car_height_;
     }
+    if (cached_has_bits & 0x00000010u) {
+      car_wheel_base_ = from.car_wheel_base_;
+    }
+    if (cached_has_bits & 0x00000020u) {
+      car_wheel_width_ = from.car_wheel_width_;
+    }
     _has_bits_[0] |= cached_has_bits;
   }
 }
@@ -2552,6 +2624,8 @@ void Car_info::InternalSwap(Car_info* other) {
   swap(car_length_, other->car_length_);
   swap(car_width_, other->car_width_);
   swap(car_height_, other->car_height_);
+  swap(car_wheel_base_, other->car_wheel_base_);
+  swap(car_wheel_width_, other->car_wheel_width_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
   swap(_cached_size_, other->_cached_size_);

+ 68 - 0
message/message_base.pb.h

@@ -1043,6 +1043,20 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
   float car_height() const;
   void set_car_height(float value);
 
+  // optional float car_wheel_base = 5;
+  bool has_car_wheel_base() const;
+  void clear_car_wheel_base();
+  static const int kCarWheelBaseFieldNumber = 5;
+  float car_wheel_base() const;
+  void set_car_wheel_base(float value);
+
+  // optional float car_wheel_width = 6;
+  bool has_car_wheel_width() const;
+  void clear_car_wheel_width();
+  static const int kCarWheelWidthFieldNumber = 6;
+  float car_wheel_width() const;
+  void set_car_wheel_width(float value);
+
   // @@protoc_insertion_point(class_scope:message.Car_info)
  private:
   void set_has_car_length();
@@ -1053,6 +1067,10 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
   void clear_has_car_height();
   void set_has_license();
   void clear_has_license();
+  void set_has_car_wheel_base();
+  void clear_has_car_wheel_base();
+  void set_has_car_wheel_width();
+  void clear_has_car_wheel_width();
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
@@ -1061,6 +1079,8 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
   float car_length_;
   float car_width_;
   float car_height_;
+  float car_wheel_base_;
+  float car_wheel_width_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
   friend void ::protobuf_message_5fbase_2eproto::InitDefaultsCar_infoImpl();
 };
@@ -1975,6 +1995,54 @@ inline void Car_info::set_allocated_license(::std::string* license) {
   // @@protoc_insertion_point(field_set_allocated:message.Car_info.license)
 }
 
+// optional float car_wheel_base = 5;
+inline bool Car_info::has_car_wheel_base() const {
+  return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void Car_info::set_has_car_wheel_base() {
+  _has_bits_[0] |= 0x00000010u;
+}
+inline void Car_info::clear_has_car_wheel_base() {
+  _has_bits_[0] &= ~0x00000010u;
+}
+inline void Car_info::clear_car_wheel_base() {
+  car_wheel_base_ = 0;
+  clear_has_car_wheel_base();
+}
+inline float Car_info::car_wheel_base() const {
+  // @@protoc_insertion_point(field_get:message.Car_info.car_wheel_base)
+  return car_wheel_base_;
+}
+inline void Car_info::set_car_wheel_base(float value) {
+  set_has_car_wheel_base();
+  car_wheel_base_ = value;
+  // @@protoc_insertion_point(field_set:message.Car_info.car_wheel_base)
+}
+
+// optional float car_wheel_width = 6;
+inline bool Car_info::has_car_wheel_width() const {
+  return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void Car_info::set_has_car_wheel_width() {
+  _has_bits_[0] |= 0x00000020u;
+}
+inline void Car_info::clear_has_car_wheel_width() {
+  _has_bits_[0] &= ~0x00000020u;
+}
+inline void Car_info::clear_car_wheel_width() {
+  car_wheel_width_ = 0;
+  clear_has_car_wheel_width();
+}
+inline float Car_info::car_wheel_width() const {
+  // @@protoc_insertion_point(field_get:message.Car_info.car_wheel_width)
+  return car_wheel_width_;
+}
+inline void Car_info::set_car_wheel_width(float value) {
+  set_has_car_wheel_width();
+  car_wheel_width_ = value;
+  // @@protoc_insertion_point(field_set:message.Car_info.car_wheel_width)
+}
+
 // -------------------------------------------------------------------
 
 // Parkspace_info

+ 2 - 0
message/message_base.proto

@@ -133,6 +133,8 @@ message Car_info
     optional float                      car_width=2;            //车宽
     optional float                      car_height=3;           //车高
     optional string                     license=4;              //车辆凭证号
+    optional float                      car_wheel_base = 5;	    //整车的轮距; 前后轮的距离; 用于机器人或agv的抓车
+    optional float                      car_wheel_width = 6;	//整车的轮距; 左右轮的距离; 用于机器人或agv的抓车
 }
 
 //车位状态枚举

+ 29 - 9
parkspace_allocation/parkspace_operating_function.cpp

@@ -70,6 +70,8 @@ Error_manager Parkspace_operating_function::get_all_parkspace_info(message::Park
 				t_parkspace->mutable_car_info()->set_car_length(tp_result->getDouble("parkSpaceCarLength"));
 				t_parkspace->mutable_car_info()->set_car_width(tp_result->getDouble("parkSpaceCarWidth"));
 				t_parkspace->mutable_car_info()->set_car_height(tp_result->getDouble("parkSpaceCarHeight"));
+				t_parkspace->mutable_car_info()->set_car_wheel_base(tp_result->getDouble("parkSpaceCarWheelBase"));
+				t_parkspace->mutable_car_info()->set_car_wheel_width(tp_result->getDouble("parkSpaceCarWheelWidth"));
 				t_parkspace->set_entry_time(tp_result->getString("entryTime"));
 				t_parkspace->set_leave_time(tp_result->getString("leaveTime"));
 			}
@@ -93,7 +95,7 @@ Error_manager Parkspace_operating_function::get_all_parkspace_info(message::Park
 	    return ec;
 	}
 }
-// 从数据库获得所有型车位信息,用于车位模块初始化
+// 从数据库获得所有指定类型车位信息,用于车位模块初始化
 Error_manager Parkspace_operating_function::get_specify_the_type_parkspace_info(message::Parkspace_allocation_data_msg &all_specify_the_type_parkspace_info,int parkspace_type)
 {
 	//执行sql操作
@@ -155,6 +157,8 @@ Error_manager Parkspace_operating_function::get_specify_the_type_parkspace_info(
 				t_parkspace->mutable_car_info()->set_car_length(tp_result->getDouble("parkSpaceCarLength"));
 				t_parkspace->mutable_car_info()->set_car_width(tp_result->getDouble("parkSpaceCarWidth"));
 				t_parkspace->mutable_car_info()->set_car_height(tp_result->getDouble("parkSpaceCarHeight"));
+				t_parkspace->mutable_car_info()->set_car_wheel_base(tp_result->getDouble("parkSpaceCarWheelBase"));
+				t_parkspace->mutable_car_info()->set_car_wheel_width(tp_result->getDouble("parkSpaceCarWheelWidth"));
 				t_parkspace->set_entry_time(tp_result->getString("entryTime"));
 				t_parkspace->set_leave_time(tp_result->getString("leaveTime"));
 			}
@@ -185,7 +189,7 @@ Error_manager Parkspace_operating_function::clear_all_parkspace_info()
 	//执行sql操作
 	char update_space_sql[1024];
 	memset(update_space_sql, 0, 1024);
-	sprintf(update_space_sql, "update parkingspace set parkingspace_status = 0,parkSpaceCarLicense = NULL,parkSpaceCarLength = 0,parkSpaceCarWidth = 0,parkSpaceCarHeight = 0,entryTime = NULL,leaveTime = NULL");
+	sprintf(update_space_sql, "update parkingspace set parkingspace_status = 0,parkSpaceCarLicense = NULL,parkSpaceCarLength = 0,parkSpaceCarWidth = 0,parkSpaceCarHeight = 0,parkSpaceCarWheelBase = 0,parkSpaceCarWheelWidth = 0,entryTime = NULL,leaveTime = NULL");
 	Error_manager ec = Database_controller::get_instance_pointer()->sql_update(update_space_sql);
 	return ec;
 }
@@ -221,18 +225,20 @@ Error_manager Parkspace_operating_function::update_parkspace_data(message::Parks
 	}
 	if(parkspace_info.has_car_info() && status!=message::Parkspace_status::eParkspace_empty)
 	{
-		sprintf(update_space_sql, "update parkingspace set parkingspace_status = %d,parkSpaceCarLicense = '%s',parkSpaceCarLength = %.3f,parkSpaceCarWidth = %.3f,parkSpaceCarHeight = %.3f,entryTime = '%s',leaveTime = '%s' where parkingSpaceID = %d",
+		sprintf(update_space_sql, "update parkingspace set parkingspace_status = %d,parkSpaceCarLicense = '%s',parkSpaceCarLength = %.3f,parkSpaceCarWidth = %.3f,parkSpaceCarHeight = %.3f,parkSpaceCarWheelBase = %.3f,parkSpaceCarWheelWidth = %.3f,entryTime = '%s',leaveTime = '%s' where parkingSpaceID = %d",
 				status,
 				parkspace_info.car_info().license().c_str(),
 				parkspace_info.car_info().has_car_length()?parkspace_info.car_info().car_length():0.0f,
 				parkspace_info.car_info().car_width(),
 				parkspace_info.car_info().car_height(),
+				parkspace_info.car_info().car_wheel_base(),
+				parkspace_info.car_info().car_wheel_width(),
 				parkspace_info.entry_time().c_str(),
 				parkspace_info.leave_time().c_str(),
 				parkspace_info.parkingspace_index_id());
 	}else
 	{
-		sprintf(update_space_sql, "update parkingspace set parkingspace_status = %d,parkSpaceCarLicense = NULL,parkSpaceCarLength = 0,parkSpaceCarWidth = 0,parkSpaceCarHeight = 0,entryTime = NULL,leaveTime = NULL where parkingSpaceID = %d", status, parkspace_info.parkingspace_index_id());
+		sprintf(update_space_sql, "update parkingspace set parkingspace_status = %d,parkSpaceCarLicense = NULL,parkSpaceCarLength = 0,parkSpaceCarWidth = 0,parkSpaceCarHeight = 0,parkSpaceCarWheelBase = 0,parkSpaceCarWheelWidth = 0,entryTime = NULL,leaveTime = NULL where parkingSpaceID = %d", status, parkspace_info.parkingspace_index_id());
 	}
 	//boost::shared_ptr<sql::ResultSet>  tp_result = nullptr;
 	Error_manager ec = Database_controller::get_instance_pointer()->sql_update(update_space_sql);
@@ -286,21 +292,25 @@ Error_manager Parkspace_operating_function::update_vehicle_with_parkspace(messag
 		//车位为空,仅更新车辆状态与长宽高
 		if(parkspace_info.parkingspace_index_id() <= 0)
 		{
-			sprintf(update_vehicle_sql, "update vehicle set vehicleParkState = %d,carLength=%.3f,carWidth=%.3f,carHeight=%.3f where numberPlate = '%s'",
+			sprintf(update_vehicle_sql, "update vehicle set vehicleParkState = %d,carLength=%.3f,carWidth=%.3f,carHeight=%.3f,carWheelBase = %.3f,carWheelWidth = %.3f where numberPlate = '%s'",
 					vehicle_status_code,
 					parkspace_info.car_info().car_length(),
 					parkspace_info.car_info().car_width(),
 					parkspace_info.car_info().car_height(),
+					parkspace_info.car_info().car_wheel_base(),
+					parkspace_info.car_info().car_wheel_width(),
 					parkspace_info.car_info().license().c_str());
 		}
 		//车位不为空,表示车辆所在车位,同时更新
 		else
 		{
-			 sprintf(update_vehicle_sql, "update vehicle set vehicleParkState = %d,carLength=%.3f,carWidth=%.3f,carHeight=%.3f,parkingSpaceID=%d where numberPlate = '%s'",
+			 sprintf(update_vehicle_sql, "update vehicle set vehicleParkState = %d,carLength=%.3f,carWidth=%.3f,carHeight=%.3f,carWheelBase = %.3f,carWheelWidth = %.3f,parkingSpaceID=%d where numberPlate = '%s'",
 					vehicle_status_code,
 					parkspace_info.car_info().car_length(),
 					parkspace_info.car_info().car_width(),
 					parkspace_info.car_info().car_height(),
+					parkspace_info.car_info().car_wheel_base(),
+					parkspace_info.car_info().car_wheel_width(),
 					parkspace_info.parkingspace_index_id(),
 					parkspace_info.car_info().license().c_str());
 		}
@@ -364,22 +374,26 @@ Error_manager Parkspace_operating_function::insert_vehicle_with_parkspace(messag
 	//车位为空,仅更新车辆状态与长宽高
 	if(parkspace_info.parkingspace_index_id() <= 0)
 	{
-		sprintf(insert_vehicle_sql, "INSERT INTO vehicle (numberPlate,vehicleParkState,carLength,carWidth,carHeight) values ('%s',%d,%.3f,%.3f,%.3f)",
+		sprintf(insert_vehicle_sql, "INSERT INTO vehicle (numberPlate,vehicleParkState,carLength,carWidth,carHeight,carWheelBase,carWheelWidth) values ('%s',%d,%.3f,%.3f,%.3f)",
 				parkspace_info.car_info().license().c_str(),
 				vehicle_status_code,
 				parkspace_info.car_info().car_length(),
 				parkspace_info.car_info().car_width(),
-				parkspace_info.car_info().car_height());
+				parkspace_info.car_info().car_height(),
+				parkspace_info.car_info().car_wheel_base(),
+				parkspace_info.car_info().car_wheel_width());
 	}
 	//车位不为空,表示车辆在车位,同时更新
 	else
 	{
-		sprintf(insert_vehicle_sql, "INSERT INTO vehicle (numberPlate,vehicleParkState,carLength,carWidth,carHeight,parkingSpaceID) values ('%s',%d,%.3f,%.3f,%.3f,%d)",
+		sprintf(insert_vehicle_sql, "INSERT INTO vehicle (numberPlate,vehicleParkState,carLength,carWidth,carHeight,carWheelBase,carWheelWidth,parkingSpaceID) values ('%s',%d,%.3f,%.3f,%.3f,%d)",
 			parkspace_info.car_info().license().c_str(),
 			vehicle_status_code,
 			parkspace_info.car_info().car_length(),
 			parkspace_info.car_info().car_width(),
 			parkspace_info.car_info().car_height(),
+			parkspace_info.car_info().car_wheel_base(),
+			parkspace_info.car_info().car_wheel_width(),
 			parkspace_info.parkingspace_index_id());
 	}
 	Error_manager ec = Database_controller::get_instance_pointer()->sql_insert(insert_vehicle_sql);
@@ -481,6 +495,8 @@ Error_manager Parkspace_operating_function::query_one_parkspace_with_parkspace_i
 				parkspace_info.mutable_car_info()->set_car_length(tp_result->getDouble("parkSpaceCarLength"));
 				parkspace_info.mutable_car_info()->set_car_width(tp_result->getDouble("parkSpaceCarWidth"));
 				parkspace_info.mutable_car_info()->set_car_height(tp_result->getDouble("parkSpaceCarHeight"));
+				parkspace_info.mutable_car_info()->set_car_wheel_base(tp_result->getDouble("parkSpaceCarWheelBase"));
+				parkspace_info.mutable_car_info()->set_car_wheel_width(tp_result->getDouble("parkSpaceCarWheelWidth"));
 				parkspace_info.set_entry_time(tp_result->getString("entryTime"));
 				parkspace_info.set_leave_time(tp_result->getString("leaveTime"));
 			}
@@ -569,6 +585,8 @@ Error_manager Parkspace_operating_function::query_one_parkspace_with_license(std
 				parkspace_info.mutable_car_info()->set_car_length(tp_result->getDouble("parkSpaceCarLength"));
 				parkspace_info.mutable_car_info()->set_car_width(tp_result->getDouble("parkSpaceCarWidth"));
 				parkspace_info.mutable_car_info()->set_car_height(tp_result->getDouble("parkSpaceCarHeight"));
+				parkspace_info.mutable_car_info()->set_car_wheel_base(tp_result->getDouble("parkSpaceCarWheelBase"));
+				parkspace_info.mutable_car_info()->set_car_wheel_width(tp_result->getDouble("parkSpaceCarWheelWidth"));
 				parkspace_info.set_entry_time(tp_result->getString("entryTime"));
 				parkspace_info.set_leave_time(tp_result->getString("leaveTime"));
 			}
@@ -639,6 +657,8 @@ Error_manager Parkspace_operating_function::query_one_empty_parkspace(message::P
 				parkspace_info.mutable_car_info()->set_car_length(tp_result->getDouble("parkSpaceCarLength"));
 				parkspace_info.mutable_car_info()->set_car_width(tp_result->getDouble("parkSpaceCarWidth"));
 				parkspace_info.mutable_car_info()->set_car_height(tp_result->getDouble("parkSpaceCarHeight"));
+				parkspace_info.mutable_car_info()->set_car_wheel_base(tp_result->getDouble("parkSpaceCarWheelBase"));
+				parkspace_info.mutable_car_info()->set_car_wheel_width(tp_result->getDouble("parkSpaceCarWheelWidth"));
 				parkspace_info.set_entry_time(tp_result->getString("entryTime"));
 				parkspace_info.set_leave_time(tp_result->getString("leaveTime"));
 			}