huli 2 years ago
parent
commit
72ae17ffe3
51 changed files with 12931 additions and 2602 deletions
  1. 4 0
      plc调度节点/CMakeLists.txt
  2. 5 0
      plc调度节点/boost_asio/tcp.cpp
  3. 30 0
      plc调度节点/boost_asio/tcp.h
  4. 77 50
      plc调度节点/communication/communication.pb.cc
  5. 47 65
      plc调度节点/communication/communication.pb.h
  6. 86 59
      plc调度节点/dispatch/database_communication_configuration.pb.cc
  7. 50 77
      plc调度节点/dispatch/database_communication_configuration.pb.h
  8. 119 20
      plc调度节点/dispatch/dispatch_command.cpp
  9. 18 3
      plc调度节点/dispatch/dispatch_command.h
  10. 23 4
      plc调度节点/dispatch/dispatch_communication.cpp
  11. 14 1
      plc调度节点/dispatch/dispatch_communication.h
  12. 21 9
      plc调度节点/dispatch/dispatch_ground_lidar.cpp
  13. 3 0
      plc调度节点/dispatch/dispatch_ground_lidar.h
  14. 14 0
      plc调度节点/dispatch/dispatch_manager.cpp
  15. 6 1
      plc调度节点/dispatch/dispatch_manager.h
  16. 103 0
      plc调度节点/dispatch/dispatch_network.cpp
  17. 54 0
      plc调度节点/dispatch/dispatch_network.h
  18. 461 266
      plc调度节点/dispatch/dispatch_parameter.pb.cc
  19. 328 379
      plc调度节点/dispatch/dispatch_parameter.pb.h
  20. 58 4
      plc调度节点/dispatch/dispatch_plc.cpp
  21. 7 0
      plc调度节点/dispatch/dispatch_plc.h
  22. 430 133
      plc调度节点/dispatch/dispatch_singlechip.cpp
  23. 44 5
      plc调度节点/dispatch/dispatch_singlechip.h
  24. 4 1
      plc调度节点/error_code/error_code.h
  25. 11 22
      plc调度节点/main.cpp
  26. 377 219
      plc调度节点/message/message.pb.cc
  27. 220 321
      plc调度节点/message/message.pb.h
  28. 253 137
      plc调度节点/message/message_base.pb.cc
  29. 159 206
      plc调度节点/message/message_base.pb.h
  30. 3565 0
      plc调度节点/message/singlechip_msg.pb.cc
  31. 2623 0
      plc调度节点/message/singlechip_msg.pb.h
  32. 211 0
      plc调度节点/message/singlechip_msg.proto
  33. 1117 0
      plc调度节点/network_communication/network.pb.cc
  34. 730 0
      plc调度节点/network_communication/network.pb.h
  35. 44 0
      plc调度节点/network_communication/network.proto
  36. 721 0
      plc调度节点/network_communication/network_base.cpp
  37. 195 0
      plc调度节点/network_communication/network_base.h
  38. 53 0
      plc调度节点/network_communication/network_message.cpp
  39. 47 0
      plc调度节点/network_communication/network_message.h
  40. 2 0
      plc调度节点/proto.sh
  41. 139 104
      plc调度节点/rabbitmq/rabbitmq.pb.cc
  42. 103 144
      plc调度节点/rabbitmq/rabbitmq.pb.h
  43. 39 0
      plc调度节点/setting/network.prototxt
  44. 39 0
      plc调度节点/setting/network_a.prototxt
  45. 39 0
      plc调度节点/setting/network_b.prototxt
  46. 39 0
      plc调度节点/setting/network_c.prototxt
  47. 20 79
      plc调度节点/setting/rabbitmq_a.prototxt
  48. 19 80
      plc调度节点/setting/rabbitmq_b.prototxt
  49. 19 79
      plc调度节点/setting/rabbitmq_c.prototxt
  50. 86 59
      plc调度节点/snap7_communication/snap7_communication.pb.cc
  51. 55 75
      plc调度节点/snap7_communication/snap7_communication.pb.h

+ 4 - 0
plc调度节点/CMakeLists.txt

@@ -54,6 +54,8 @@ aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/system SYSTEM_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/dispatch DISPATCH_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/snap7_communication SNAP7_COMMUNICATION_SRC )
 aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/rabbitmq RABBITMQ_SRC )
+aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/boost_asio BOOST_ASIO_SRC )
+aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/network_communication NETWORK_COMMUNICATION_SRC )
 
 #aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/parkspace_allocation PARKSPACE_ALLOCATION_SRC )
 
@@ -77,6 +79,8 @@ add_executable(terminal
 		${DISPATCH_SRC}
 		${RABBITMQ_SRC}
 #		${PARKSPACE_ALLOCATION_SRC}
+		${BOOST_ASIO_SRC}
+		${NETWORK_COMMUNICATION_SRC}
 
 		)
 

+ 5 - 0
plc调度节点/boost_asio/tcp.cpp

@@ -0,0 +1,5 @@
+//
+// Created by huli on 2022/12/27.
+//
+
+#include "tcp.h"

+ 30 - 0
plc调度节点/boost_asio/tcp.h

@@ -0,0 +1,30 @@
+//
+// Created by huli on 2022/12/27.
+//
+
+#ifndef NNXX_TESTS_TCP_H
+#define NNXX_TESTS_TCP_H
+
+
+class Tcp
+{
+public:
+	Tcp();
+	Tcp(const Tcp& other)= default;
+	Tcp& operator =(const Tcp& other)= default;
+	~Tcp();
+public://API functions
+    
+public://get or set member variable
+
+protected://member functions
+    
+protected://member variable 
+    
+    
+private:
+    
+};
+
+
+#endif //NNXX_TESTS_TCP_H

+ 77 - 50
plc调度节点/communication/communication.pb.cc

@@ -7,6 +7,7 @@
 
 #include <google/protobuf/stubs/common.h>
 #include <google/protobuf/stubs/port.h>
+#include <google/protobuf/stubs/once.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/wire_format_lite_inl.h>
 #include <google/protobuf/descriptor.h>
@@ -18,10 +19,6 @@
 #include "third_party/protobuf/version.h"
 #endif
 // @@protoc_insertion_point(includes)
-
-namespace protobuf_communication_2eproto {
-extern PROTOBUF_INTERNAL_EXPORT_protobuf_communication_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Communication_parameter;
-}  // namespace protobuf_communication_2eproto
 namespace Communication_proto {
 class Communication_parameterDefaultTypeInternal {
  public:
@@ -35,9 +32,14 @@ class Communication_parameter_allDefaultTypeInternal {
 } _Communication_parameter_all_default_instance_;
 }  // namespace Communication_proto
 namespace protobuf_communication_2eproto {
-static void InitDefaultsCommunication_parameter() {
+void InitDefaultsCommunication_parameterImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   {
     void* ptr = &::Communication_proto::_Communication_parameter_default_instance_;
     new (ptr) ::Communication_proto::Communication_parameter();
@@ -46,12 +48,20 @@ static void InitDefaultsCommunication_parameter() {
   ::Communication_proto::Communication_parameter::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<0> scc_info_Communication_parameter =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCommunication_parameter}, {}};
+void InitDefaultsCommunication_parameter() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCommunication_parameterImpl);
+}
 
-static void InitDefaultsCommunication_parameter_all() {
+void InitDefaultsCommunication_parameter_allImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  protobuf_communication_2eproto::InitDefaultsCommunication_parameter();
   {
     void* ptr = &::Communication_proto::_Communication_parameter_all_default_instance_;
     new (ptr) ::Communication_proto::Communication_parameter_all();
@@ -60,13 +70,9 @@ static void InitDefaultsCommunication_parameter_all() {
   ::Communication_proto::Communication_parameter_all::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<1> scc_info_Communication_parameter_all =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsCommunication_parameter_all}, {
-      &protobuf_communication_2eproto::scc_info_Communication_parameter.base,}};
-
-void InitDefaults() {
-  ::google::protobuf::internal::InitSCC(&scc_info_Communication_parameter.base);
-  ::google::protobuf::internal::InitSCC(&scc_info_Communication_parameter_all.base);
+void InitDefaultsCommunication_parameter_all() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCommunication_parameter_allImpl);
 }
 
 ::google::protobuf::Metadata file_level_metadata[2];
@@ -101,14 +107,15 @@ static ::google::protobuf::Message const * const file_default_instances[] = {
 
 void protobuf_AssignDescriptors() {
   AddDescriptors();
+  ::google::protobuf::MessageFactory* factory = NULL;
   AssignDescriptors(
-      "communication.proto", schemas, file_default_instances, TableStruct::offsets,
+      "communication.proto", schemas, file_default_instances, TableStruct::offsets, factory,
       file_level_metadata, NULL, NULL);
 }
 
 void protobuf_AssignDescriptorsOnce() {
-  static ::google::protobuf::internal::once_flag once;
-  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
 }
 
 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
@@ -134,8 +141,8 @@ void AddDescriptorsImpl() {
 }
 
 void AddDescriptors() {
-  static ::google::protobuf::internal::once_flag once;
-  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
 }
 // Force AddDescriptors() to be called at dynamic initialization time.
 struct StaticDescriptorInitializer {
@@ -157,8 +164,9 @@ const int Communication_parameter::kConnectStringVectorFieldNumber;
 
 Communication_parameter::Communication_parameter()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_communication_2eproto::scc_info_Communication_parameter.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_communication_2eproto::InitDefaultsCommunication_parameter();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:Communication_proto.Communication_parameter)
 }
@@ -166,6 +174,7 @@ Communication_parameter::Communication_parameter(const Communication_parameter&
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
       _has_bits_(from._has_bits_),
+      _cached_size_(0),
       connect_string_vector_(from.connect_string_vector_) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   bind_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -176,6 +185,7 @@ Communication_parameter::Communication_parameter(const Communication_parameter&
 }
 
 void Communication_parameter::SharedCtor() {
+  _cached_size_ = 0;
   bind_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 
@@ -189,7 +199,9 @@ void Communication_parameter::SharedDtor() {
 }
 
 void Communication_parameter::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Communication_parameter::descriptor() {
   ::protobuf_communication_2eproto::protobuf_AssignDescriptorsOnce();
@@ -197,10 +209,17 @@ const ::google::protobuf::Descriptor* Communication_parameter::descriptor() {
 }
 
 const Communication_parameter& Communication_parameter::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_communication_2eproto::scc_info_Communication_parameter.base);
+  ::protobuf_communication_2eproto::InitDefaultsCommunication_parameter();
   return *internal_default_instance();
 }
 
+Communication_parameter* Communication_parameter::New(::google::protobuf::Arena* arena) const {
+  Communication_parameter* n = new Communication_parameter;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Communication_parameter::Clear() {
 // @@protoc_insertion_point(message_clear_start:Communication_proto.Communication_parameter)
@@ -211,7 +230,8 @@ void Communication_parameter::Clear() {
   connect_string_vector_.Clear();
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 0x00000001u) {
-    bind_string_.ClearNonDefaultToEmptyNoArena();
+    GOOGLE_DCHECK(!bind_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+    (*bind_string_.UnsafeRawStringPointer())->clear();
   }
   _has_bits_.Clear();
   _internal_metadata_.Clear();
@@ -223,7 +243,7 @@ bool Communication_parameter::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:Communication_proto.Communication_parameter)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -376,7 +396,9 @@ size_t Communication_parameter::ByteSizeLong() const {
   }
 
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -433,11 +455,11 @@ void Communication_parameter::Swap(Communication_parameter* other) {
 }
 void Communication_parameter::InternalSwap(Communication_parameter* other) {
   using std::swap;
-  connect_string_vector_.InternalSwap(CastToBase(&other->connect_string_vector_));
-  bind_string_.Swap(&other->bind_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
+  connect_string_vector_.InternalSwap(&other->connect_string_vector_);
+  bind_string_.Swap(&other->bind_string_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Communication_parameter::GetMetadata() const {
@@ -458,15 +480,17 @@ const int Communication_parameter_all::kCommunicationParametersFieldNumber;
 
 Communication_parameter_all::Communication_parameter_all()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_communication_2eproto::scc_info_Communication_parameter_all.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_communication_2eproto::InitDefaultsCommunication_parameter_all();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:Communication_proto.Communication_parameter_all)
 }
 Communication_parameter_all::Communication_parameter_all(const Communication_parameter_all& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   if (from.has_communication_parameters()) {
     communication_parameters_ = new ::Communication_proto::Communication_parameter(*from.communication_parameters_);
@@ -477,6 +501,7 @@ Communication_parameter_all::Communication_parameter_all(const Communication_par
 }
 
 void Communication_parameter_all::SharedCtor() {
+  _cached_size_ = 0;
   communication_parameters_ = NULL;
 }
 
@@ -490,7 +515,9 @@ void Communication_parameter_all::SharedDtor() {
 }
 
 void Communication_parameter_all::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Communication_parameter_all::descriptor() {
   ::protobuf_communication_2eproto::protobuf_AssignDescriptorsOnce();
@@ -498,10 +525,17 @@ const ::google::protobuf::Descriptor* Communication_parameter_all::descriptor()
 }
 
 const Communication_parameter_all& Communication_parameter_all::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_communication_2eproto::scc_info_Communication_parameter_all.base);
+  ::protobuf_communication_2eproto::InitDefaultsCommunication_parameter_all();
   return *internal_default_instance();
 }
 
+Communication_parameter_all* Communication_parameter_all::New(::google::protobuf::Arena* arena) const {
+  Communication_parameter_all* n = new Communication_parameter_all;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Communication_parameter_all::Clear() {
 // @@protoc_insertion_point(message_clear_start:Communication_proto.Communication_parameter_all)
@@ -524,7 +558,7 @@ bool Communication_parameter_all::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:Communication_proto.Communication_parameter_all)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -570,7 +604,7 @@ void Communication_parameter_all::SerializeWithCachedSizes(
   // optional .Communication_proto.Communication_parameter communication_parameters = 1;
   if (cached_has_bits & 0x00000001u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      1, this->_internal_communication_parameters(), output);
+      1, *this->communication_parameters_, output);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -592,7 +626,7 @@ void Communication_parameter_all::SerializeWithCachedSizes(
   if (cached_has_bits & 0x00000001u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
-        1, this->_internal_communication_parameters(), deterministic, target);
+        1, *this->communication_parameters_, deterministic, target);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -616,11 +650,13 @@ size_t Communication_parameter_all::ByteSizeLong() const {
   if (has_communication_parameters()) {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *communication_parameters_);
+        *this->communication_parameters_);
   }
 
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -678,6 +714,7 @@ void Communication_parameter_all::InternalSwap(Communication_parameter_all* othe
   swap(communication_parameters_, other->communication_parameters_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Communication_parameter_all::GetMetadata() const {
@@ -688,15 +725,5 @@ void Communication_parameter_all::InternalSwap(Communication_parameter_all* othe
 
 // @@protoc_insertion_point(namespace_scope)
 }  // namespace Communication_proto
-namespace google {
-namespace protobuf {
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::Communication_proto::Communication_parameter* Arena::CreateMaybeMessage< ::Communication_proto::Communication_parameter >(Arena* arena) {
-  return Arena::CreateInternal< ::Communication_proto::Communication_parameter >(arena);
-}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::Communication_proto::Communication_parameter_all* Arena::CreateMaybeMessage< ::Communication_proto::Communication_parameter_all >(Arena* arena) {
-  return Arena::CreateInternal< ::Communication_proto::Communication_parameter_all >(arena);
-}
-}  // namespace protobuf
-}  // namespace google
 
 // @@protoc_insertion_point(global_scope)

+ 47 - 65
plc调度节点/communication/communication.pb.h

@@ -1,19 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: communication.proto
 
-#ifndef PROTOBUF_INCLUDED_communication_2eproto
-#define PROTOBUF_INCLUDED_communication_2eproto
+#ifndef PROTOBUF_communication_2eproto__INCLUDED
+#define PROTOBUF_communication_2eproto__INCLUDED
 
 #include <string>
 
 #include <google/protobuf/stubs/common.h>
 
-#if GOOGLE_PROTOBUF_VERSION < 3006001
+#if GOOGLE_PROTOBUF_VERSION < 3005000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please update
 #error your headers.
 #endif
-#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please
 #error regenerate this file with a newer version of protoc.
@@ -24,14 +24,12 @@
 #include <google/protobuf/arenastring.h>
 #include <google/protobuf/generated_message_table_driven.h>
 #include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/inlined_string_field.h>
 #include <google/protobuf/metadata.h>
 #include <google/protobuf/message.h>
 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
 #include <google/protobuf/extension_set.h>  // IWYU pragma: export
 #include <google/protobuf/unknown_field_set.h>
 // @@protoc_insertion_point(includes)
-#define PROTOBUF_INTERNAL_EXPORT_protobuf_communication_2eproto 
 
 namespace protobuf_communication_2eproto {
 // Internal implementation detail -- do not use these members.
@@ -44,6 +42,14 @@ struct TableStruct {
   static const ::google::protobuf::uint32 offsets[];
 };
 void AddDescriptors();
+void InitDefaultsCommunication_parameterImpl();
+void InitDefaultsCommunication_parameter();
+void InitDefaultsCommunication_parameter_allImpl();
+void InitDefaultsCommunication_parameter_all();
+inline void InitDefaults() {
+  InitDefaultsCommunication_parameter();
+  InitDefaultsCommunication_parameter_all();
+}
 }  // namespace protobuf_communication_2eproto
 namespace Communication_proto {
 class Communication_parameter;
@@ -53,12 +59,6 @@ class Communication_parameter_all;
 class Communication_parameter_allDefaultTypeInternal;
 extern Communication_parameter_allDefaultTypeInternal _Communication_parameter_all_default_instance_;
 }  // namespace Communication_proto
-namespace google {
-namespace protobuf {
-template<> ::Communication_proto::Communication_parameter* Arena::CreateMaybeMessage<::Communication_proto::Communication_parameter>(Arena*);
-template<> ::Communication_proto::Communication_parameter_all* Arena::CreateMaybeMessage<::Communication_proto::Communication_parameter_all>(Arena*);
-}  // namespace protobuf
-}  // namespace google
 namespace Communication_proto {
 
 // ===================================================================
@@ -104,7 +104,7 @@ class Communication_parameter : public ::google::protobuf::Message /* @@protoc_i
     return reinterpret_cast<const Communication_parameter*>(
                &_Communication_parameter_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     0;
 
   void Swap(Communication_parameter* other);
@@ -114,33 +114,28 @@ class Communication_parameter : public ::google::protobuf::Message /* @@protoc_i
 
   // implements Message ----------------------------------------------
 
-  inline Communication_parameter* New() const final {
-    return CreateMaybeMessage<Communication_parameter>(NULL);
-  }
+  inline Communication_parameter* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Communication_parameter* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Communication_parameter>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Communication_parameter* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Communication_parameter& from);
   void MergeFrom(const Communication_parameter& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Communication_parameter* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -151,7 +146,7 @@ class Communication_parameter : public ::google::protobuf::Message /* @@protoc_i
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -201,10 +196,11 @@ class Communication_parameter : public ::google::protobuf::Message /* @@protoc_i
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::google::protobuf::RepeatedPtrField< ::std::string> connect_string_vector_;
   ::google::protobuf::internal::ArenaStringPtr bind_string_;
   friend struct ::protobuf_communication_2eproto::TableStruct;
+  friend void ::protobuf_communication_2eproto::InitDefaultsCommunication_parameterImpl();
 };
 // -------------------------------------------------------------------
 
@@ -249,7 +245,7 @@ class Communication_parameter_all : public ::google::protobuf::Message /* @@prot
     return reinterpret_cast<const Communication_parameter_all*>(
                &_Communication_parameter_all_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     1;
 
   void Swap(Communication_parameter_all* other);
@@ -259,33 +255,28 @@ class Communication_parameter_all : public ::google::protobuf::Message /* @@prot
 
   // implements Message ----------------------------------------------
 
-  inline Communication_parameter_all* New() const final {
-    return CreateMaybeMessage<Communication_parameter_all>(NULL);
-  }
+  inline Communication_parameter_all* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Communication_parameter_all* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Communication_parameter_all>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Communication_parameter_all* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Communication_parameter_all& from);
   void MergeFrom(const Communication_parameter_all& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Communication_parameter_all* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -296,7 +287,7 @@ class Communication_parameter_all : public ::google::protobuf::Message /* @@prot
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -306,9 +297,6 @@ class Communication_parameter_all : public ::google::protobuf::Message /* @@prot
   bool has_communication_parameters() const;
   void clear_communication_parameters();
   static const int kCommunicationParametersFieldNumber = 1;
-  private:
-  const ::Communication_proto::Communication_parameter& _internal_communication_parameters() const;
-  public:
   const ::Communication_proto::Communication_parameter& communication_parameters() const;
   ::Communication_proto::Communication_parameter* release_communication_parameters();
   ::Communication_proto::Communication_parameter* mutable_communication_parameters();
@@ -321,9 +309,10 @@ class Communication_parameter_all : public ::google::protobuf::Message /* @@prot
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::Communication_proto::Communication_parameter* communication_parameters_;
   friend struct ::protobuf_communication_2eproto::TableStruct;
+  friend void ::protobuf_communication_2eproto::InitDefaultsCommunication_parameter_allImpl();
 };
 // ===================================================================
 
@@ -386,11 +375,8 @@ inline ::std::string* Communication_parameter::mutable_bind_string() {
 }
 inline ::std::string* Communication_parameter::release_bind_string() {
   // @@protoc_insertion_point(field_release:Communication_proto.Communication_parameter.bind_string)
-  if (!has_bind_string()) {
-    return NULL;
-  }
   clear_has_bind_string();
-  return bind_string_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return bind_string_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Communication_parameter::set_allocated_bind_string(::std::string* bind_string) {
   if (bind_string != NULL) {
@@ -489,9 +475,6 @@ inline void Communication_parameter_all::clear_communication_parameters() {
   if (communication_parameters_ != NULL) communication_parameters_->Clear();
   clear_has_communication_parameters();
 }
-inline const ::Communication_proto::Communication_parameter& Communication_parameter_all::_internal_communication_parameters() const {
-  return *communication_parameters_;
-}
 inline const ::Communication_proto::Communication_parameter& Communication_parameter_all::communication_parameters() const {
   const ::Communication_proto::Communication_parameter* p = communication_parameters_;
   // @@protoc_insertion_point(field_get:Communication_proto.Communication_parameter_all.communication_parameters)
@@ -508,8 +491,7 @@ inline ::Communication_proto::Communication_parameter* Communication_parameter_a
 inline ::Communication_proto::Communication_parameter* Communication_parameter_all::mutable_communication_parameters() {
   set_has_communication_parameters();
   if (communication_parameters_ == NULL) {
-    auto* p = CreateMaybeMessage<::Communication_proto::Communication_parameter>(GetArenaNoVirtual());
-    communication_parameters_ = p;
+    communication_parameters_ = new ::Communication_proto::Communication_parameter;
   }
   // @@protoc_insertion_point(field_mutable:Communication_proto.Communication_parameter_all.communication_parameters)
   return communication_parameters_;
@@ -545,4 +527,4 @@ inline void Communication_parameter_all::set_allocated_communication_parameters(
 
 // @@protoc_insertion_point(global_scope)
 
-#endif  // PROTOBUF_INCLUDED_communication_2eproto
+#endif  // PROTOBUF_communication_2eproto__INCLUDED

+ 86 - 59
plc调度节点/dispatch/database_communication_configuration.pb.cc

@@ -7,6 +7,7 @@
 
 #include <google/protobuf/stubs/common.h>
 #include <google/protobuf/stubs/port.h>
+#include <google/protobuf/stubs/once.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/wire_format_lite_inl.h>
 #include <google/protobuf/descriptor.h>
@@ -18,10 +19,6 @@
 #include "third_party/protobuf/version.h"
 #endif
 // @@protoc_insertion_point(includes)
-
-namespace protobuf_database_5fcommunication_5fconfiguration_2eproto {
-extern PROTOBUF_INTERNAL_EXPORT_protobuf_database_5fcommunication_5fconfiguration_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Database_communication_configuration;
-}  // namespace protobuf_database_5fcommunication_5fconfiguration_2eproto
 namespace parkspace_proto {
 class Database_communication_configurationDefaultTypeInternal {
  public:
@@ -35,9 +32,14 @@ class Database_communication_configuration_allDefaultTypeInternal {
 } _Database_communication_configuration_all_default_instance_;
 }  // namespace parkspace_proto
 namespace protobuf_database_5fcommunication_5fconfiguration_2eproto {
-static void InitDefaultsDatabase_communication_configuration() {
+void InitDefaultsDatabase_communication_configurationImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   {
     void* ptr = &::parkspace_proto::_Database_communication_configuration_default_instance_;
     new (ptr) ::parkspace_proto::Database_communication_configuration();
@@ -46,12 +48,20 @@ static void InitDefaultsDatabase_communication_configuration() {
   ::parkspace_proto::Database_communication_configuration::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<0> scc_info_Database_communication_configuration =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDatabase_communication_configuration}, {}};
+void InitDefaultsDatabase_communication_configuration() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDatabase_communication_configurationImpl);
+}
 
-static void InitDefaultsDatabase_communication_configuration_all() {
+void InitDefaultsDatabase_communication_configuration_allImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  protobuf_database_5fcommunication_5fconfiguration_2eproto::InitDefaultsDatabase_communication_configuration();
   {
     void* ptr = &::parkspace_proto::_Database_communication_configuration_all_default_instance_;
     new (ptr) ::parkspace_proto::Database_communication_configuration_all();
@@ -60,13 +70,9 @@ static void InitDefaultsDatabase_communication_configuration_all() {
   ::parkspace_proto::Database_communication_configuration_all::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<1> scc_info_Database_communication_configuration_all =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsDatabase_communication_configuration_all}, {
-      &protobuf_database_5fcommunication_5fconfiguration_2eproto::scc_info_Database_communication_configuration.base,}};
-
-void InitDefaults() {
-  ::google::protobuf::internal::InitSCC(&scc_info_Database_communication_configuration.base);
-  ::google::protobuf::internal::InitSCC(&scc_info_Database_communication_configuration_all.base);
+void InitDefaultsDatabase_communication_configuration_all() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDatabase_communication_configuration_allImpl);
 }
 
 ::google::protobuf::Metadata file_level_metadata[2];
@@ -109,14 +115,15 @@ static ::google::protobuf::Message const * const file_default_instances[] = {
 
 void protobuf_AssignDescriptors() {
   AddDescriptors();
+  ::google::protobuf::MessageFactory* factory = NULL;
   AssignDescriptors(
-      "database_communication_configuration.proto", schemas, file_default_instances, TableStruct::offsets,
+      "database_communication_configuration.proto", schemas, file_default_instances, TableStruct::offsets, factory,
       file_level_metadata, NULL, NULL);
 }
 
 void protobuf_AssignDescriptorsOnce() {
-  static ::google::protobuf::internal::once_flag once;
-  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
 }
 
 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
@@ -146,8 +153,8 @@ void AddDescriptorsImpl() {
 }
 
 void AddDescriptors() {
-  static ::google::protobuf::internal::once_flag once;
-  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
 }
 // Force AddDescriptors() to be called at dynamic initialization time.
 struct StaticDescriptorInitializer {
@@ -173,15 +180,17 @@ const int Database_communication_configuration::kDbConnPoolSizeFieldNumber;
 
 Database_communication_configuration::Database_communication_configuration()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_database_5fcommunication_5fconfiguration_2eproto::scc_info_Database_communication_configuration.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_database_5fcommunication_5fconfiguration_2eproto::InitDefaultsDatabase_communication_configuration();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:parkspace_proto.Database_communication_configuration)
 }
 Database_communication_configuration::Database_communication_configuration(const Database_communication_configuration& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   db_ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.has_db_ip()) {
@@ -206,6 +215,7 @@ Database_communication_configuration::Database_communication_configuration(const
 }
 
 void Database_communication_configuration::SharedCtor() {
+  _cached_size_ = 0;
   db_ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   db_username_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   db_passwd_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -228,7 +238,9 @@ void Database_communication_configuration::SharedDtor() {
 }
 
 void Database_communication_configuration::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Database_communication_configuration::descriptor() {
   ::protobuf_database_5fcommunication_5fconfiguration_2eproto::protobuf_AssignDescriptorsOnce();
@@ -236,10 +248,17 @@ const ::google::protobuf::Descriptor* Database_communication_configuration::desc
 }
 
 const Database_communication_configuration& Database_communication_configuration::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_database_5fcommunication_5fconfiguration_2eproto::scc_info_Database_communication_configuration.base);
+  ::protobuf_database_5fcommunication_5fconfiguration_2eproto::InitDefaultsDatabase_communication_configuration();
   return *internal_default_instance();
 }
 
+Database_communication_configuration* Database_communication_configuration::New(::google::protobuf::Arena* arena) const {
+  Database_communication_configuration* n = new Database_communication_configuration;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Database_communication_configuration::Clear() {
 // @@protoc_insertion_point(message_clear_start:parkspace_proto.Database_communication_configuration)
@@ -250,16 +269,20 @@ void Database_communication_configuration::Clear() {
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 15u) {
     if (cached_has_bits & 0x00000001u) {
-      db_ip_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!db_ip_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*db_ip_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000002u) {
-      db_username_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!db_username_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*db_username_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000004u) {
-      db_passwd_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!db_passwd_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*db_passwd_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000008u) {
-      db_name_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!db_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*db_name_.UnsafeRawStringPointer())->clear();
     }
   }
   if (cached_has_bits & 48u) {
@@ -277,7 +300,7 @@ bool Database_communication_configuration::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:parkspace_proto.Database_communication_configuration)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -609,7 +632,9 @@ size_t Database_communication_configuration::ByteSizeLong() const {
   }
 
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -688,18 +713,15 @@ void Database_communication_configuration::Swap(Database_communication_configura
 }
 void Database_communication_configuration::InternalSwap(Database_communication_configuration* other) {
   using std::swap;
-  db_ip_.Swap(&other->db_ip_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
-  db_username_.Swap(&other->db_username_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
-  db_passwd_.Swap(&other->db_passwd_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
-  db_name_.Swap(&other->db_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
+  db_ip_.Swap(&other->db_ip_);
+  db_username_.Swap(&other->db_username_);
+  db_passwd_.Swap(&other->db_passwd_);
+  db_name_.Swap(&other->db_name_);
   swap(db_port_, other->db_port_);
   swap(db_conn_pool_size_, other->db_conn_pool_size_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Database_communication_configuration::GetMetadata() const {
@@ -720,15 +742,17 @@ const int Database_communication_configuration_all::kDatabaseCommunicationConfig
 
 Database_communication_configuration_all::Database_communication_configuration_all()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_database_5fcommunication_5fconfiguration_2eproto::scc_info_Database_communication_configuration_all.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_database_5fcommunication_5fconfiguration_2eproto::InitDefaultsDatabase_communication_configuration_all();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:parkspace_proto.Database_communication_configuration_all)
 }
 Database_communication_configuration_all::Database_communication_configuration_all(const Database_communication_configuration_all& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   if (from.has_database_communication_configurations()) {
     database_communication_configurations_ = new ::parkspace_proto::Database_communication_configuration(*from.database_communication_configurations_);
@@ -739,6 +763,7 @@ Database_communication_configuration_all::Database_communication_configuration_a
 }
 
 void Database_communication_configuration_all::SharedCtor() {
+  _cached_size_ = 0;
   database_communication_configurations_ = NULL;
 }
 
@@ -752,7 +777,9 @@ void Database_communication_configuration_all::SharedDtor() {
 }
 
 void Database_communication_configuration_all::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Database_communication_configuration_all::descriptor() {
   ::protobuf_database_5fcommunication_5fconfiguration_2eproto::protobuf_AssignDescriptorsOnce();
@@ -760,10 +787,17 @@ const ::google::protobuf::Descriptor* Database_communication_configuration_all::
 }
 
 const Database_communication_configuration_all& Database_communication_configuration_all::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_database_5fcommunication_5fconfiguration_2eproto::scc_info_Database_communication_configuration_all.base);
+  ::protobuf_database_5fcommunication_5fconfiguration_2eproto::InitDefaultsDatabase_communication_configuration_all();
   return *internal_default_instance();
 }
 
+Database_communication_configuration_all* Database_communication_configuration_all::New(::google::protobuf::Arena* arena) const {
+  Database_communication_configuration_all* n = new Database_communication_configuration_all;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Database_communication_configuration_all::Clear() {
 // @@protoc_insertion_point(message_clear_start:parkspace_proto.Database_communication_configuration_all)
@@ -786,7 +820,7 @@ bool Database_communication_configuration_all::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:parkspace_proto.Database_communication_configuration_all)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -832,7 +866,7 @@ void Database_communication_configuration_all::SerializeWithCachedSizes(
   // optional .parkspace_proto.Database_communication_configuration database_communication_configurations = 1;
   if (cached_has_bits & 0x00000001u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      1, this->_internal_database_communication_configurations(), output);
+      1, *this->database_communication_configurations_, output);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -854,7 +888,7 @@ void Database_communication_configuration_all::SerializeWithCachedSizes(
   if (cached_has_bits & 0x00000001u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
-        1, this->_internal_database_communication_configurations(), deterministic, target);
+        1, *this->database_communication_configurations_, deterministic, target);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -878,11 +912,13 @@ size_t Database_communication_configuration_all::ByteSizeLong() const {
   if (has_database_communication_configurations()) {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *database_communication_configurations_);
+        *this->database_communication_configurations_);
   }
 
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -943,6 +979,7 @@ void Database_communication_configuration_all::InternalSwap(Database_communicati
   swap(database_communication_configurations_, other->database_communication_configurations_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Database_communication_configuration_all::GetMetadata() const {
@@ -953,15 +990,5 @@ void Database_communication_configuration_all::InternalSwap(Database_communicati
 
 // @@protoc_insertion_point(namespace_scope)
 }  // namespace parkspace_proto
-namespace google {
-namespace protobuf {
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::parkspace_proto::Database_communication_configuration* Arena::CreateMaybeMessage< ::parkspace_proto::Database_communication_configuration >(Arena* arena) {
-  return Arena::CreateInternal< ::parkspace_proto::Database_communication_configuration >(arena);
-}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::parkspace_proto::Database_communication_configuration_all* Arena::CreateMaybeMessage< ::parkspace_proto::Database_communication_configuration_all >(Arena* arena) {
-  return Arena::CreateInternal< ::parkspace_proto::Database_communication_configuration_all >(arena);
-}
-}  // namespace protobuf
-}  // namespace google
 
 // @@protoc_insertion_point(global_scope)

+ 50 - 77
plc调度节点/dispatch/database_communication_configuration.pb.h

@@ -1,19 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: database_communication_configuration.proto
 
-#ifndef PROTOBUF_INCLUDED_database_5fcommunication_5fconfiguration_2eproto
-#define PROTOBUF_INCLUDED_database_5fcommunication_5fconfiguration_2eproto
+#ifndef PROTOBUF_database_5fcommunication_5fconfiguration_2eproto__INCLUDED
+#define PROTOBUF_database_5fcommunication_5fconfiguration_2eproto__INCLUDED
 
 #include <string>
 
 #include <google/protobuf/stubs/common.h>
 
-#if GOOGLE_PROTOBUF_VERSION < 3006001
+#if GOOGLE_PROTOBUF_VERSION < 3005000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please update
 #error your headers.
 #endif
-#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please
 #error regenerate this file with a newer version of protoc.
@@ -24,14 +24,12 @@
 #include <google/protobuf/arenastring.h>
 #include <google/protobuf/generated_message_table_driven.h>
 #include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/inlined_string_field.h>
 #include <google/protobuf/metadata.h>
 #include <google/protobuf/message.h>
 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
 #include <google/protobuf/extension_set.h>  // IWYU pragma: export
 #include <google/protobuf/unknown_field_set.h>
 // @@protoc_insertion_point(includes)
-#define PROTOBUF_INTERNAL_EXPORT_protobuf_database_5fcommunication_5fconfiguration_2eproto 
 
 namespace protobuf_database_5fcommunication_5fconfiguration_2eproto {
 // Internal implementation detail -- do not use these members.
@@ -44,6 +42,14 @@ struct TableStruct {
   static const ::google::protobuf::uint32 offsets[];
 };
 void AddDescriptors();
+void InitDefaultsDatabase_communication_configurationImpl();
+void InitDefaultsDatabase_communication_configuration();
+void InitDefaultsDatabase_communication_configuration_allImpl();
+void InitDefaultsDatabase_communication_configuration_all();
+inline void InitDefaults() {
+  InitDefaultsDatabase_communication_configuration();
+  InitDefaultsDatabase_communication_configuration_all();
+}
 }  // namespace protobuf_database_5fcommunication_5fconfiguration_2eproto
 namespace parkspace_proto {
 class Database_communication_configuration;
@@ -53,12 +59,6 @@ class Database_communication_configuration_all;
 class Database_communication_configuration_allDefaultTypeInternal;
 extern Database_communication_configuration_allDefaultTypeInternal _Database_communication_configuration_all_default_instance_;
 }  // namespace parkspace_proto
-namespace google {
-namespace protobuf {
-template<> ::parkspace_proto::Database_communication_configuration* Arena::CreateMaybeMessage<::parkspace_proto::Database_communication_configuration>(Arena*);
-template<> ::parkspace_proto::Database_communication_configuration_all* Arena::CreateMaybeMessage<::parkspace_proto::Database_communication_configuration_all>(Arena*);
-}  // namespace protobuf
-}  // namespace google
 namespace parkspace_proto {
 
 // ===================================================================
@@ -104,7 +104,7 @@ class Database_communication_configuration : public ::google::protobuf::Message
     return reinterpret_cast<const Database_communication_configuration*>(
                &_Database_communication_configuration_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     0;
 
   void Swap(Database_communication_configuration* other);
@@ -114,33 +114,28 @@ class Database_communication_configuration : public ::google::protobuf::Message
 
   // implements Message ----------------------------------------------
 
-  inline Database_communication_configuration* New() const final {
-    return CreateMaybeMessage<Database_communication_configuration>(NULL);
-  }
+  inline Database_communication_configuration* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Database_communication_configuration* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Database_communication_configuration>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Database_communication_configuration* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Database_communication_configuration& from);
   void MergeFrom(const Database_communication_configuration& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Database_communication_configuration* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -151,7 +146,7 @@ class Database_communication_configuration : public ::google::protobuf::Message
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -251,7 +246,7 @@ class Database_communication_configuration : public ::google::protobuf::Message
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::google::protobuf::internal::ArenaStringPtr db_ip_;
   ::google::protobuf::internal::ArenaStringPtr db_username_;
   ::google::protobuf::internal::ArenaStringPtr db_passwd_;
@@ -259,6 +254,7 @@ class Database_communication_configuration : public ::google::protobuf::Message
   ::google::protobuf::int64 db_port_;
   ::google::protobuf::int64 db_conn_pool_size_;
   friend struct ::protobuf_database_5fcommunication_5fconfiguration_2eproto::TableStruct;
+  friend void ::protobuf_database_5fcommunication_5fconfiguration_2eproto::InitDefaultsDatabase_communication_configurationImpl();
 };
 // -------------------------------------------------------------------
 
@@ -303,7 +299,7 @@ class Database_communication_configuration_all : public ::google::protobuf::Mess
     return reinterpret_cast<const Database_communication_configuration_all*>(
                &_Database_communication_configuration_all_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     1;
 
   void Swap(Database_communication_configuration_all* other);
@@ -313,33 +309,28 @@ class Database_communication_configuration_all : public ::google::protobuf::Mess
 
   // implements Message ----------------------------------------------
 
-  inline Database_communication_configuration_all* New() const final {
-    return CreateMaybeMessage<Database_communication_configuration_all>(NULL);
-  }
+  inline Database_communication_configuration_all* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Database_communication_configuration_all* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Database_communication_configuration_all>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Database_communication_configuration_all* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Database_communication_configuration_all& from);
   void MergeFrom(const Database_communication_configuration_all& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Database_communication_configuration_all* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -350,7 +341,7 @@ class Database_communication_configuration_all : public ::google::protobuf::Mess
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -360,9 +351,6 @@ class Database_communication_configuration_all : public ::google::protobuf::Mess
   bool has_database_communication_configurations() const;
   void clear_database_communication_configurations();
   static const int kDatabaseCommunicationConfigurationsFieldNumber = 1;
-  private:
-  const ::parkspace_proto::Database_communication_configuration& _internal_database_communication_configurations() const;
-  public:
   const ::parkspace_proto::Database_communication_configuration& database_communication_configurations() const;
   ::parkspace_proto::Database_communication_configuration* release_database_communication_configurations();
   ::parkspace_proto::Database_communication_configuration* mutable_database_communication_configurations();
@@ -375,9 +363,10 @@ class Database_communication_configuration_all : public ::google::protobuf::Mess
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::parkspace_proto::Database_communication_configuration* database_communication_configurations_;
   friend struct ::protobuf_database_5fcommunication_5fconfiguration_2eproto::TableStruct;
+  friend void ::protobuf_database_5fcommunication_5fconfiguration_2eproto::InitDefaultsDatabase_communication_configuration_allImpl();
 };
 // ===================================================================
 
@@ -440,11 +429,8 @@ inline ::std::string* Database_communication_configuration::mutable_db_ip() {
 }
 inline ::std::string* Database_communication_configuration::release_db_ip() {
   // @@protoc_insertion_point(field_release:parkspace_proto.Database_communication_configuration.db_ip)
-  if (!has_db_ip()) {
-    return NULL;
-  }
   clear_has_db_ip();
-  return db_ip_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return db_ip_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Database_communication_configuration::set_allocated_db_ip(::std::string* db_ip) {
   if (db_ip != NULL) {
@@ -530,11 +516,8 @@ inline ::std::string* Database_communication_configuration::mutable_db_username(
 }
 inline ::std::string* Database_communication_configuration::release_db_username() {
   // @@protoc_insertion_point(field_release:parkspace_proto.Database_communication_configuration.db_username)
-  if (!has_db_username()) {
-    return NULL;
-  }
   clear_has_db_username();
-  return db_username_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return db_username_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Database_communication_configuration::set_allocated_db_username(::std::string* db_username) {
   if (db_username != NULL) {
@@ -596,11 +579,8 @@ inline ::std::string* Database_communication_configuration::mutable_db_passwd()
 }
 inline ::std::string* Database_communication_configuration::release_db_passwd() {
   // @@protoc_insertion_point(field_release:parkspace_proto.Database_communication_configuration.db_passwd)
-  if (!has_db_passwd()) {
-    return NULL;
-  }
   clear_has_db_passwd();
-  return db_passwd_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return db_passwd_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Database_communication_configuration::set_allocated_db_passwd(::std::string* db_passwd) {
   if (db_passwd != NULL) {
@@ -662,11 +642,8 @@ inline ::std::string* Database_communication_configuration::mutable_db_name() {
 }
 inline ::std::string* Database_communication_configuration::release_db_name() {
   // @@protoc_insertion_point(field_release:parkspace_proto.Database_communication_configuration.db_name)
-  if (!has_db_name()) {
-    return NULL;
-  }
   clear_has_db_name();
-  return db_name_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return db_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Database_communication_configuration::set_allocated_db_name(::std::string* db_name) {
   if (db_name != NULL) {
@@ -720,9 +697,6 @@ inline void Database_communication_configuration_all::clear_database_communicati
   if (database_communication_configurations_ != NULL) database_communication_configurations_->Clear();
   clear_has_database_communication_configurations();
 }
-inline const ::parkspace_proto::Database_communication_configuration& Database_communication_configuration_all::_internal_database_communication_configurations() const {
-  return *database_communication_configurations_;
-}
 inline const ::parkspace_proto::Database_communication_configuration& Database_communication_configuration_all::database_communication_configurations() const {
   const ::parkspace_proto::Database_communication_configuration* p = database_communication_configurations_;
   // @@protoc_insertion_point(field_get:parkspace_proto.Database_communication_configuration_all.database_communication_configurations)
@@ -739,8 +713,7 @@ inline ::parkspace_proto::Database_communication_configuration* Database_communi
 inline ::parkspace_proto::Database_communication_configuration* Database_communication_configuration_all::mutable_database_communication_configurations() {
   set_has_database_communication_configurations();
   if (database_communication_configurations_ == NULL) {
-    auto* p = CreateMaybeMessage<::parkspace_proto::Database_communication_configuration>(GetArenaNoVirtual());
-    database_communication_configurations_ = p;
+    database_communication_configurations_ = new ::parkspace_proto::Database_communication_configuration;
   }
   // @@protoc_insertion_point(field_mutable:parkspace_proto.Database_communication_configuration_all.database_communication_configurations)
   return database_communication_configurations_;
@@ -776,4 +749,4 @@ inline void Database_communication_configuration_all::set_allocated_database_com
 
 // @@protoc_insertion_point(global_scope)
 
-#endif  // PROTOBUF_INCLUDED_database_5fcommunication_5fconfiguration_2eproto
+#endif  // PROTOBUF_database_5fcommunication_5fconfiguration_2eproto__INCLUDED

+ 119 - 20
plc调度节点/dispatch/dispatch_command.cpp

@@ -22,6 +22,7 @@ Dispatch_command::~Dispatch_command()
 //调度开始前, 向数据库发送请求的相关操作, 输入 穿梭机所在的楼层, 调度id 0~2, 空闲出口id, 如果不是0,就表示有空闲的出口
 Error_manager Dispatch_command::dispatch_request_to_sql(int device_floor, int dispatch_id, int outlet_ready)
 {
+	std::unique_lock<std::mutex> t_lock(m_lock);
 	Error_manager t_error;
 
 	m_device_floor = device_floor;
@@ -30,7 +31,7 @@ Error_manager Dispatch_command::dispatch_request_to_sql(int device_floor, int di
 	m_outlet_ready = outlet_ready;
 
 	//获取调度指令, 与数据库同步 command_queue
-	t_error = query_all_dispatch_command();
+	t_error = query_all_dispatch_command(0);
 	if ( t_error != Error_code::SUCCESS )
 	{
 		return t_error;
@@ -137,6 +138,7 @@ Error_manager Dispatch_command::dispatch_request_to_sql(int device_floor, int di
 //调度完成后, 向数据库发送答复的相关操作
 Error_manager Dispatch_command::dispatch_response_to_sql(Error_manager dispatch_result)
 {
+	std::unique_lock<std::mutex> t_lock(m_lock);
 	Error_manager t_error;
 
 	if ( dispatch_result == Error_code::SUCCESS )
@@ -241,6 +243,7 @@ Error_manager Dispatch_command::dispatch_response_to_sql(Error_manager dispatch_
 //调度 , 向数据库 重新分配车位,
 Error_manager Dispatch_command::dispatch_reallocate_to_sql(Common_data::Car_type reallocate_car_type, int outlet_ready)
 {
+	std::unique_lock<std::mutex> t_lock(m_lock);
 	Error_manager t_error;
 
 	m_outlet_ready = outlet_ready;
@@ -308,10 +311,11 @@ Error_manager Dispatch_command::dispatch_reallocate_to_sql(Common_data::Car_type
 //检查出口是否空闲, 检查指令队列的取车完成的出口id是否存在, 不存在就是空闲,返回成功
 Error_manager Dispatch_command::check_export_id_is_ready(int export_id)
 {
+	std::unique_lock<std::mutex> t_lock(m_lock);
 	//检查指令队列, 查询指定单元的取车完成状态指令的 出口id是否存在
 	char check_export_id_sql[1024];
 	memset(check_export_id_sql, 0, 1024);
-	sprintf(check_export_id_sql,"select * from command_queue where statu = 2 and export_id = %d",export_id);
+	sprintf(check_export_id_sql,"select * from command_queue where statu = 2 and type = 2 and export_id = %d",export_id);
 	boost::shared_ptr<sql::ResultSet>  tp_result = nullptr;
 	Error_manager t_error = Database_controller::get_instance_pointer()->sql_query(check_export_id_sql, tp_result);
 
@@ -340,15 +344,111 @@ Error_manager Dispatch_command::check_export_id_is_ready(int export_id)
 	return Error_code::SUCCESS;
 }
 
+//检查出口取车是否完成, 指定的出口有取车完成指令就返回成功, 否则报错.
+Error_manager Dispatch_command::check_pickup_is_finish(int export_id)
+{
+	std::unique_lock<std::mutex> t_lock(m_lock);
+	//检查指令队列, 查询指定单元的取车完成状态指令的 出口id是否存在
+	char check_export_id_sql[1024];
+	memset(check_export_id_sql, 0, 1024);
+	sprintf(check_export_id_sql,"select * from command_queue where statu = 2 and type = 2 and export_id = %d",export_id);
+	boost::shared_ptr<sql::ResultSet>  tp_result = nullptr;
+	Error_manager t_error = Database_controller::get_instance_pointer()->sql_query(check_export_id_sql, tp_result);
+
+	if(t_error == Error_code::SUCCESS)
+	{
+		if (tp_result == nullptr)
+		{
+			return DB_RESULT_SET_EMPTY;
+		}
+
+		//如果存在, 就报错,   不存在就是空闲,返回成功
+		if ( tp_result->next() )
+		{
+			return Error_code::SUCCESS;
+		}
+		else
+		{
+			return Error_manager(Error_code::DB_QUERY_OUTLET_OCCUPY, Error_level::MINOR_ERROR,
+								 " check_export_id_is_ready fun error, 数据库 查询出口被占用 ");
+		}
+	}
+	else
+	{
+		return t_error;
+	}
+	return Error_code::SUCCESS;
+}
+
+//检查入口存车是否开始, 指定的入口有存车开始指令就返回成功, 否则报错.
+Error_manager Dispatch_command::check_park_is_start(int import_id)
+{
+	std::unique_lock<std::mutex> t_lock(m_lock);
+	//检查指令队列, 查询指定单元的取车完成状态指令的 出口id是否存在
+	char check_export_id_sql[1024];
+	memset(check_export_id_sql, 0, 1024);
+	sprintf(check_export_id_sql,"select * from command_queue where type = 1 and import_id = %d and (statu=0 or statu =1)",import_id);
+	boost::shared_ptr<sql::ResultSet>  tp_result = nullptr;
+	Error_manager t_error = Database_controller::get_instance_pointer()->sql_query(check_export_id_sql, tp_result);
 
+	if(t_error == Error_code::SUCCESS)
+	{
+		if (tp_result == nullptr)
+		{
+			return DB_RESULT_SET_EMPTY;
+		}
+
+		//如果存在, 就报错,   不存在就是空闲,返回成功
+		if ( tp_result->next() )
+		{
+			return Error_code::SUCCESS;
+		}
+		else
+		{
+			return Error_manager(Error_code::DB_QUERY_OUTLET_OCCUPY, Error_level::MINOR_ERROR,
+								 " check_export_id_is_ready fun error, 数据库 查询出口被占用 ");
+		}
+	}
+	else
+	{
+		return t_error;
+	}
+	return Error_code::SUCCESS;
+}
 
-//更新调度指令, 与数据库同步 command_queue
-Error_manager Dispatch_command::query_all_dispatch_command()
+//删除 指令队列, 根据出口编号
+Error_manager Dispatch_command::delete_command_queue_for_export_id(int export_id)
+{
+	std::unique_lock<std::mutex> t_lock(m_lock);
+
+	char delete_command_sql[1024];
+	memset(delete_command_sql, 0, 1024);
+	sprintf(delete_command_sql, "delete from command_queue where statu = 2 and type = 2 and export_id = %d ",
+			export_id );
+	Error_manager ec = Database_controller::get_instance_pointer()->sql_delete(delete_command_sql);
+	return ec;
+}
+
+//添加plc数据储存
+Error_manager Dispatch_command::insert_plc_data(std::string plc_data, float hearbeat)
+{
+	std::unique_lock<std::mutex> t_lock(m_lock);
+	char insert_vehicle_sql[4096];
+	memset(insert_vehicle_sql, 0, 4096);
+	sprintf(insert_vehicle_sql, "INSERT INTO plc_data (data, hearbeat) values ('%s',%f)",
+			plc_data.c_str(), hearbeat  );
+	Error_manager ec = Database_controller::get_instance_pointer()->sql_insert(insert_vehicle_sql);
+	std::cout << " huli test :::: " << " ec = " << ec << std::endl;
+	return ec;
+}
+
+//获取调度指令, 与数据库同步 command_queue, statu指令状态, 0:排队等待, 1正在运行, 2:已经完成
+Error_manager Dispatch_command::query_all_dispatch_command(int statu)
 {
 	//从command_queue获取所有排队的指令,
 	char query_all_dispatch_command_sql[1024];
 	memset(query_all_dispatch_command_sql, 0, 1024);
-	sprintf(query_all_dispatch_command_sql,"select * from command_queue where statu = 0 and unit = %d",m_unit);
+	sprintf(query_all_dispatch_command_sql,"select * from command_queue where statu = %d and unit = %d",statu, m_unit);
 	boost::shared_ptr<sql::ResultSet>  tp_result = nullptr;
 	Error_manager t_error = Database_controller::get_instance_pointer()->sql_query(query_all_dispatch_command_sql, tp_result);
 
@@ -765,7 +865,6 @@ Error_manager Dispatch_command::update_parkspace_info_clear_car_number()
 	//执行sql操作
 	char update_space_sql[1024];
 	memset(update_space_sql, 0, 1024);
-	//	sprintf(update_space_sql, "update space set car_number = null, statu = 1 where car_number = '%s' ",
 	sprintf(update_space_sql, "update space set car_number = null where car_number = '%s' ",
 			m_dispatch_command_map[m_car_number_optimal].m_car_number.c_str());
 	Error_manager ec = Database_controller::get_instance_pointer()->sql_update(update_space_sql);
@@ -785,7 +884,7 @@ Error_manager Dispatch_command::update_command_queue_for_statu(int statu)
 	return ec;
 }
 
-//更新 指令队列, 根据车牌号 删除指令
+//删除 指令队列, 根据车牌号 删除指令
 Error_manager Dispatch_command::delete_command_queue_for_statu()
 {
 	char delete_command_sql[1024];
@@ -821,12 +920,12 @@ Error_manager Dispatch_command::create_park_table()
 	t_park_table.set_terminal_id(t_terminal);
 //	std::cout << " huli test :::: " << " iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii m_park_table_msg.entrance_measure_info().cx() = " << m_park_table_msg.entrance_measure_info().cx() << std::endl;
 //	std::cout << " huli test :::: " << " iiiiiiiiiiiiiiiiiiiiiiiiiiiiii t_terminal = " << t_terminal << std::endl;
-	LOG(INFO) << " m_park_table_msg.entrance_measure_info().cx() =  "<< m_park_table_msg.entrance_measure_info().cx() << " --- " << this;
-	LOG(INFO) << " t_terminal =  "<< t_terminal << " --- " << this;
-	LOG(INFO) << " m_device_floor =  "<< m_device_floor << " --- " << this;
-	LOG(INFO) << " m_dispatch_id =  "<< m_dispatch_id << " --- " << this;
-	LOG(INFO) << " m_unit =  "<< m_unit << " --- " << this;
-	LOG(INFO) << " m_outlet_ready =  "<< m_outlet_ready << " --- " << this;
+//	LOG(INFO) << " m_park_table_msg.entrance_measure_info().cx() =  "<< m_park_table_msg.entrance_measure_info().cx() << " --- " << this;
+//	LOG(INFO) << " t_terminal =  "<< t_terminal << " --- " << this;
+//	LOG(INFO) << " m_device_floor =  "<< m_device_floor << " --- " << this;
+//	LOG(INFO) << " m_dispatch_id =  "<< m_dispatch_id << " --- " << this;
+//	LOG(INFO) << " m_unit =  "<< m_unit << " --- " << this;
+//	LOG(INFO) << " m_outlet_ready =  "<< m_outlet_ready << " --- " << this;
 
 	m_park_table_msg = t_park_table;
 	return Error_code::SUCCESS;
@@ -846,12 +945,12 @@ Error_manager Dispatch_command::create_pick_table(int outlet_ready)
 
 	t_pick_table.set_terminal_id(outlet_ready);
 
-	LOG(INFO) << " outlet_ready =  "<< outlet_ready << " --- " << this;
-
-	LOG(INFO) << " m_device_floor =  "<< m_device_floor << " --- " << this;
-	LOG(INFO) << " m_dispatch_id =  "<< m_dispatch_id << " --- " << this;
-	LOG(INFO) << " m_unit =  "<< m_unit << " --- " << this;
-	LOG(INFO) << " m_outlet_ready =  "<< m_outlet_ready << " --- " << this;
+//	LOG(INFO) << " outlet_ready =  "<< outlet_ready << " --- " << this;
+//
+//	LOG(INFO) << " m_device_floor =  "<< m_device_floor << " --- " << this;
+//	LOG(INFO) << " m_dispatch_id =  "<< m_dispatch_id << " --- " << this;
+//	LOG(INFO) << " m_unit =  "<< m_unit << " --- " << this;
+//	LOG(INFO) << " m_outlet_ready =  "<< m_outlet_ready << " --- " << this;
 
 
 	m_pick_table_msg = t_pick_table;
@@ -997,7 +1096,7 @@ Error_manager Dispatch_command::updata_record_for_pick_end_ex()
 	get_parking_time(m_dispatch_command_map[m_car_number_optimal].m_primary_key, parking_time);
 	char parking_time_string[256] = "";
 	int hour = parking_time / 3600;
-    int min = (parking_time / 60)%60;
+	int min = parking_time / 60;
 	int sec = parking_time % 60;
 	sprintf(parking_time_string, " %d:%02d:%02d", hour, min, sec);
 

+ 18 - 3
plc调度节点/dispatch/dispatch_command.h

@@ -82,6 +82,8 @@ public:
 	~Dispatch_command();
 public://API functions
 
+	//检查指令队列, 优先恢复未完成的指令,其次在执行新的指令
+
 
 	//调度开始前, 向数据库发送请求的相关操作, 输入 穿梭机所在的楼层, 调度id 0~2, 空闲出口id, 如果不是0,就表示有空闲的出口
 	Error_manager dispatch_request_to_sql(int plc_floor, int dispatch_id, int outlet_ready);
@@ -94,13 +96,22 @@ public://API functions
 
 	//检查出口是否空闲, 检查指令队列的取车完成的出口id是否存在, 不存在就是空闲,返回成功
 	Error_manager check_export_id_is_ready(int export_id);
+	//检查出口取车是否完成, 指定的出口有取车完成指令就返回成功, 否则报错.
+	Error_manager check_pickup_is_finish(int export_id);
+	//检查入口存车是否开始, 指定的入口有存车开始指令就返回成功, 否则报错.
+	Error_manager check_park_is_start(int import_id);
+
+	//删除 指令队列, 根据出口编号
+	Error_manager delete_command_queue_for_export_id(int export_id);
 
+	//添加plc数据储存
+	Error_manager insert_plc_data(std::string plc_data, float hearbeat);
 public://get or set member variable
 
 protected://member functions
 
-	//获取调度指令, 与数据库同步 command_queue
-	Error_manager query_all_dispatch_command();
+	//获取调度指令, 与数据库同步 command_queue, statu指令状态, 0:排队等待, 1正在运行, 2:已经完成
+	Error_manager query_all_dispatch_command(int statu);
 
 	//对调度指令进行排序, 选出最优解, 比较存车和取车
 	Error_manager sort_dispatch_command_for_total();
@@ -131,7 +142,7 @@ protected://member functions
 	//更新 指令队列, 根据车牌号 修改状态即可,  //指令状态, 0排队中, 1正在工作, 2已完成, 3故障异常
 //	Error_manager update_command_queue_for_statu(int statu, std::string error_description);
 
-	//更新 指令队列, 根据车牌号 删除指令
+	//删除 指令队列, 根据车牌号 删除指令
 	Error_manager delete_command_queue_for_statu();
 
 	//制作存车表单
@@ -139,8 +150,12 @@ protected://member functions
 	//制作取车表单
 	Error_manager create_pick_table(int outlet_ready);
 
+	//增加 车辆表, 存车指令 完成后添加车辆信息
+	Error_manager select_vehicle_for_car_number();
 	//增加 车辆表, 存车指令 完成后添加车辆信息
 	Error_manager insert_vehicle_for_car_number();
+	//增加 车辆表, 存车指令 完成后添加车辆信息, park_statu停车状态, 0:不存在, 1:存车中, 2:取车中, 3:在楼上存车
+	Error_manager updata_vehicle_for_car_number(int park_statu);
 	//删除 车辆表, 取车指令 完成后删除车辆信息
 	Error_manager delete_vehicle_for_car_number();
 

+ 23 - 4
plc调度节点/dispatch/dispatch_communication.cpp

@@ -456,20 +456,38 @@ Error_manager Dispatch_communication::communication_init(int plc_id)
 	t_index += sizeof(unsigned char)*1;
 	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_data_validity", typeid(unsigned char).name(), t_index,sizeof(unsigned char), 1 });
 	t_index += sizeof(unsigned char)*1;
+	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_request_insidedoor_status", typeid(unsigned char).name(), t_index,sizeof(unsigned char), 1 });
+	t_index += sizeof(unsigned char)*1;
+	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_request_outsidedoor_control", typeid(unsigned char).name(), t_index,sizeof(unsigned char), 1 });
+	t_index += sizeof(unsigned char)*1;
 
 //	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_0 +m_plc_id*100, 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::NO_COMMUNICATION);
-	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_0 , 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::NO_COMMUNICATION);
+	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_0 , 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::LOOP_COMMUNICATION);
 	m_receive_buf_map[5] = t_snap7_buf;
 //	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_1 +m_plc_id*100, 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::NO_COMMUNICATION);
-	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_1 , 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::NO_COMMUNICATION);
+	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_1 , 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::LOOP_COMMUNICATION);
 	m_receive_buf_map[6] = t_snap7_buf;
 //	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_2 +m_plc_id*100, 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::NO_COMMUNICATION);
-	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_2 , 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::NO_COMMUNICATION);
+	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_2 , 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::LOOP_COMMUNICATION);
 	m_receive_buf_map[7] = t_snap7_buf;
 //	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_3 +m_plc_id*100, 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::NO_COMMUNICATION);
-	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_3 , 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::NO_COMMUNICATION);
+	t_snap7_buf.init(SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_3 , 0, sizeof(Singlechip_request_from_plc_to_manager), t_variable_information_vector, Snap7_buf::LOOP_COMMUNICATION);
 	m_receive_buf_map[8] = t_snap7_buf;
 
+
+
+	//plc数据储存
+	t_index = 0;
+	t_variable_information_vector.clear();
+	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_plc_data", typeid(float).name(), t_index,sizeof(float), DATA_STORAGE_PLC_DATA_LENGTH });
+	t_index += sizeof(float)*DATA_STORAGE_PLC_DATA_LENGTH;
+	t_variable_information_vector.push_back(Snap7_buf::Variable_information{"m_heartbeat", typeid(float).name(), t_index,sizeof(float), 1 });
+	t_index += sizeof(float)*1;
+
+	t_snap7_buf.init(DATA_STORAGE_FROM_PLC_TO_MANAGER_DBNUMBER_0 , 0, sizeof(Data_storage_from_plc_to_manager), t_variable_information_vector, Snap7_buf::NO_COMMUNICATION);
+	m_receive_buf_map[9] = t_snap7_buf;
+
+
 	switch ( m_plc_id )
 	{
 	    case 0:
@@ -526,6 +544,7 @@ Error_manager Dispatch_communication::updata_receive_buf()
 	memcpy(&m_singlechip_request_from_plc_to_manager[3], m_receive_buf_map[7].mp_buf_obverse, m_receive_buf_map[7].m_size);
 	memcpy(&m_singlechip_request_from_plc_to_manager[4], m_receive_buf_map[8].mp_buf_obverse, m_receive_buf_map[8].m_size);
 
+	memcpy(&m_data_storage_from_plc_to_manager, m_receive_buf_map[9].mp_buf_obverse, m_receive_buf_map[9].m_size);
 
 	return Error_code::SUCCESS;
 }

+ 14 - 1
plc调度节点/dispatch/dispatch_communication.h

@@ -582,10 +582,20 @@ public:
 		unsigned char			m_request_communication_mode = 0;					//通信模式	0 = 未知, 1=自动循环模式,2=手动刷新模式
 		unsigned char			m_request_refresh_command = 0;						//刷新指令 0-255任意数字,与上一次不同即可
 		unsigned char			m_request_data_validity = 0;						//数据有效性, 0 = 未知, 1 = 有效, 2 = 无效
-	};
 
+		unsigned char			m_request_insidedoor_status = 0;					//内门状态,  0:未知, 1:外门开到位, 2:外门关到位,
+		unsigned char			m_request_outsidedoor_control = 0;					//外门控制, 0:必须关门, 1:可以开门, (触发地感后可以开门)
 
+	};
 
+	//plc数据储存
+#define DATA_STORAGE_FROM_PLC_TO_MANAGER_DBNUMBER_0			9500
+#define DATA_STORAGE_PLC_DATA_LENGTH						349
+	struct Data_storage_from_plc_to_manager
+	{
+		float m_plc_data[DATA_STORAGE_PLC_DATA_LENGTH];
+		float m_heartbeat;
+	};
 
 
 #pragma pack(pop)		//取消对齐
@@ -660,6 +670,9 @@ public:
 	//单片机
 	Singlechip_response_from_manager_to_plc					m_singlechip_response_from_manager_to_plc[4];
 	Singlechip_request_from_plc_to_manager					m_singlechip_request_from_plc_to_manager[4];
+
+	//plc数据储存
+	Data_storage_from_plc_to_manager						m_data_storage_from_plc_to_manager;
 private:
 
 };

+ 21 - 9
plc调度节点/dispatch/dispatch_ground_lidar.cpp

@@ -64,7 +64,6 @@ Error_manager Dispatch_ground_lidar::dispatch_ground_lidar_uninit()
 //	return Error_code::SUCCESS;
 //}
 
-
 //调度地面雷达 执行状态消息
 Error_manager Dispatch_ground_lidar::execute_for_ground_status_msg_new(measure_info &t_measure_info)
 {
@@ -72,25 +71,25 @@ Error_manager Dispatch_ground_lidar::execute_for_ground_status_msg_new(measure_i
 	m_measure_info = t_measure_info;
 	m_ground_status_msg_updata_time = std::chrono::system_clock::now();
 	m_ground_status_msg_updata_flag = true;
+
 	//胡力 新增 接受雷达雷达 通信周期 超过1秒就打印
 	int time_key = 10+m_ground_lidar_id;
 	Time_tool::get_instance_references().time_end(time_key);
 	if ( Time_tool::get_instance_references().timetool_map.find(time_key)!=Time_tool::get_instance_references().timetool_map.end() )
 	{
-		if ( Time_tool::get_instance_references().timetool_map[time_key].t_time_difference >= std::chrono::milliseconds(1) )
-		{
-			Time_tool::get_instance_references().cout_time_microsecond(time_key);
-            double dieoutTime=(double)Time_tool::get_instance_references().timetool_map[time_key].t_time_difference.count()/1000000;
-//            std::cout << "计时器:"<<key<<" 计时的时间为:" <<dieoutTime<<" 毫秒" << std::endl;
-            LOG(INFO) << "计时器:"<<time_key<<" 计时的时间为:" <<dieoutTime<<" 毫秒" << " --- " << this;
-		}
+	    if ( Time_tool::get_instance_references().timetool_map[time_key].t_time_difference >= std::chrono::milliseconds(1000) )
+	    {
+			Time_tool::get_instance_references().cout_time_millisecond(time_key);
+			double dieoutTime=(double)Time_tool::get_instance_references().timetool_map[time_key].t_time_difference.count()/1000000;
+			LOG(INFO) << "计时器:"<<time_key<<" 计时的时间为:" <<dieoutTime<<" 毫秒" << " --- " << this;
+	    }
 	}
 	Time_tool::get_instance_references().time_start(time_key);
 	//胡力 新增 接受雷达雷达 通信周期 超过1秒就打印
+
 	return Error_code::SUCCESS;
 }
 
-
 Dispatch_ground_lidar::Dispatch_ground_lidar_status Dispatch_ground_lidar::get_dispatch_ground_lidar_status()
 {
 	return m_dispatch_ground_lidar_status;
@@ -122,6 +121,9 @@ void Dispatch_ground_lidar::execute_thread_fun()
 				std::unique_lock<std::mutex> t_lock(Dispatch_communication::get_instance_references().m_data_lock);
 				std::unique_lock<std::mutex> t_lock2(m_lock);
 
+				check_measure_info(m_measure_info);
+
+
 				//将nnxx的protobuf 转化为 snap7的DB块,  把店面雷达数据转发给plc
 //				int t_inlet_id = m_ground_status_msg.mutable_id_struct()->terminal_id() % 2;
 				int t_inlet_id = m_ground_lidar_id;
@@ -278,7 +280,17 @@ void Dispatch_ground_lidar::execute_thread_fun()
 	}
 }
 
+//检查感测消息
+Error_manager Dispatch_ground_lidar::check_measure_info(measure_info &t_measure_info)
+{
+	if ( t_measure_info.theta() > 10 ||
+	t_measure_info.theta() < -10)
+	{
+	    LOG(INFO) << " 地面雷达数据异常, t_measure_info =  " << t_measure_info.DebugString().c_str()  << " --- " ;
+	}
 
+	return Error_code::SUCCESS;
+}
 
 
 

+ 3 - 0
plc调度节点/dispatch/dispatch_ground_lidar.h

@@ -52,6 +52,9 @@ public://get or set member variable
 protected://member functions
 	//执行外界任务的执行函数
 	void execute_thread_fun();
+
+	//检查感测消息
+	Error_manager check_measure_info(measure_info &t_measure_info);
 protected://member variable
 	std::atomic<Dispatch_ground_lidar_status>				m_dispatch_ground_lidar_status;//调度地面雷达的状态
 

+ 14 - 0
plc调度节点/dispatch/dispatch_manager.cpp

@@ -261,6 +261,20 @@ Error_manager Dispatch_manager::ack_rabbitmq_message_new()
 	return Error_code::SUCCESS;
 }
 
+//网络通信的对外接口. 对单片机通信
+Error_manager Dispatch_manager::execute_network_message_new(Network_message* p_msg)
+{
+	std::unique_lock<std::mutex> t_lock(m_lock);
+
+	//根据自定义的socket_id, 分发给4个单片机模块.
+	if ( 0 <= p_msg->m_socket_id && p_msg->m_socket_id < 4 )
+	{
+		return m_dispatch_singlechip[p_msg->m_socket_id].execute_for_singlechip_data_msg_new(p_msg->m_message_buf);
+	}
+
+	return Error_code::SUCCESS;
+}
+
 //对外的接口函数,负责接受并处理任务单,
 //Error_manager Dispatch_manager::execute_task(Dispatch_manager::Dispatch_motion_direction dispatch_motion_direction)
 //{

+ 6 - 1
plc调度节点/dispatch/dispatch_manager.h

@@ -9,7 +9,7 @@
 #include "../error_code/error_code.h"
 #include "../communication/communication_message.h"
 #include "../system/system_communication.h"
-
+#include "../dispatch/dispatch_network.h"
 
 #include "../tool/singleton.h"
 #include "../tool/thread_condition.h"
@@ -29,6 +29,7 @@
 #include "../dispatch/dispatch_singlechip.h"
 #include "../dispatch/dispatch_command.h"
 
+
 //#include "../message/measure_message.pb.h"
 #include "../message/message.pb.h"
 
@@ -128,6 +129,10 @@ public://API functions
 	//给dispatch_plc底层提供接口, ack答复服务器,
 	Error_manager ack_rabbitmq_message_new();
 
+	//网络通信的对外接口. 对单片机通信
+	Error_manager execute_network_message_new(Network_message* p_msg);
+
+
 	//对外的接口函数,负责接受并处理任务单,
 //	Error_manager execute_task(Dispatch_manager::Dispatch_motion_direction dispatch_motion_direction);
 

+ 103 - 0
plc调度节点/dispatch/dispatch_network.cpp

@@ -0,0 +1,103 @@
+//
+// Created by huli on 2023/1/3.
+//
+
+#include "dispatch_network.h"
+#include "../dispatch/dispatch_manager.h"
+
+Dispatch_network::Dispatch_network()
+{
+
+}
+
+Dispatch_network::~Dispatch_network()
+{
+
+}
+
+//初始化 通信 模块。如下三选一
+Error_manager Dispatch_network::network_init()
+{
+	return Network_base::network_init();
+}
+
+//初始化 通信 模块。如下三选一
+Error_manager Dispatch_network::network_init(int dispatch_id)
+{
+//	return Network_base::network_init();
+	switch ( dispatch_id )
+	{
+		case 0:
+		{
+			return Network_base::network_init_from_protobuf(NETKORK_PARAMETER_PATH_A);
+			break;
+		}
+		case 1:
+		{
+			return Network_base::network_init_from_protobuf(NETKORK_PARAMETER_PATH_B);
+			break;
+		}
+		case 2:
+		{
+			return Network_base::network_init_from_protobuf(NETKORK_PARAMETER_PATH_C);
+			break;
+		}
+		default:
+		{
+			return Error_manager(Error_code::COMMUNICATION_READ_PROTOBUF_ERROR, Error_level::MINOR_ERROR,
+								 " Dispatch_network::communication_init dispatch_id error ");
+			break;
+		}
+	}
+	return Error_code::SUCCESS;
+}
+
+//检查消息是否有效, 主要检查消息类型和接受者, 判断这条消息是不是给我的.
+Error_manager Dispatch_network::check_msg(Network_message*  p_msg)
+{
+return Error_code::SUCCESS;
+}
+
+//检查执行者的状态, 判断能否处理这条消息, 需要子类重载
+Error_manager Dispatch_network::check_executer(Network_message*  p_msg)
+{
+	return Error_code::SUCCESS;
+}
+
+//处理消息, 需要子类重载
+Error_manager Dispatch_network::execute_msg(Network_message* p_msg)
+{
+	return Dispatch_manager::get_instance_references().execute_network_message_new(p_msg);
+}
+
+//定时封装发送消息, 一般为心跳和状态信息, 需要子类重载
+Error_manager Dispatch_network::auto_encapsulate_status()
+{
+	return Error_code::SUCCESS;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 54 - 0
plc调度节点/dispatch/dispatch_network.h

@@ -0,0 +1,54 @@
+//
+// Created by huli on 2023/1/3.
+//
+
+#ifndef NNXX_TESTS_DISPATCH_NETWORK_H
+#define NNXX_TESTS_DISPATCH_NETWORK_H
+
+#include "../tool/singleton.h"
+#include "../network_communication/network_base.h"
+
+
+class Dispatch_network:public Singleton<Dispatch_network>, public Network_base
+{
+// 子类必须把父类设定为友元函数,这样父类才能使用子类的私有构造函数。
+   friend class Singleton<Dispatch_network>;
+
+public:
+#define NETKORK_PARAMETER_PATH_A "../setting/network_a.prototxt"
+#define NETKORK_PARAMETER_PATH_B "../setting/network_b.prototxt"
+#define NETKORK_PARAMETER_PATH_C "../setting/network_c.prototxt"
+private:
+ // 父类的构造函数必须保护,子类的构造函数必须私有。
+   Dispatch_network();
+public:
+    //必须关闭拷贝构造和赋值构造,只能通过 get_instance 函数来进行操作唯一的实例。
+    Dispatch_network(const Dispatch_network& other) = delete;
+    Dispatch_network& operator =(const Dispatch_network& other) = delete;
+    ~Dispatch_network();
+public://API functions
+	//初始化 通信 模块。如下三选一
+	virtual Error_manager network_init();
+	virtual Error_manager network_init(int dispatch_id);
+	//检查消息是否有效, 主要检查消息类型和接受者, 判断这条消息是不是给我的.
+	virtual Error_manager check_msg(Network_message* p_msg);
+	//检查执行者的状态, 判断能否处理这条消息, 需要子类重载
+	virtual Error_manager check_executer(Network_message* p_msg);
+	//处理消息, 需要子类重载
+	virtual Error_manager execute_msg(Network_message* p_msg);
+
+	//定时封装发送消息, 一般为心跳和状态信息, 需要子类重载
+	virtual Error_manager auto_encapsulate_status();
+public://get or set member variable
+
+
+protected://member functions
+
+protected://member variable
+
+
+private:
+
+};
+
+#endif //NNXX_TESTS_DISPATCH_NETWORK_H

File diff suppressed because it is too large
+ 461 - 266
plc调度节点/dispatch/dispatch_parameter.pb.cc


File diff suppressed because it is too large
+ 328 - 379
plc调度节点/dispatch/dispatch_parameter.pb.h


+ 58 - 4
plc调度节点/dispatch/dispatch_plc.cpp

@@ -11,7 +11,7 @@ Dispatch_plc::Dispatch_plc()
 	m_dispatch_plc_status = Dispatch_plc::Dispatch_plc_status::DISPATCH_PLC_UNKNOW;
 	m_plc_id = 0;
 	mp_execute_thread = NULL;
-
+	mp_data_storage_thread = NULL;
 
 }
 
@@ -32,6 +32,9 @@ Error_manager Dispatch_plc::dispatch_plc_init(int plc_id)
 	m_execute_condition.reset(false, true, false);
 	mp_execute_thread = new std::thread(&Dispatch_plc::execute_thread_fun, this);
 
+//	m_data_storage_condition.reset(false, true, false);
+//	mp_data_storage_thread = new std::thread(&Dispatch_plc::data_storage_thread_fun, this);
+
 	m_dispatch_plc_status = Dispatch_plc::Dispatch_plc_status::DISPATCH_PLC_READY;
 	return Error_code::SUCCESS;
 }
@@ -42,12 +45,24 @@ Error_manager Dispatch_plc::dispatch_plc_uninit()
 	{
 		m_execute_condition.kill_all();
 	}
+	if (mp_data_storage_thread)
+	{
+		m_data_storage_condition.kill_all();
+	}
+
+
 	if (mp_execute_thread)
 	{
 		mp_execute_thread->join();
 		delete mp_execute_thread;
 		mp_execute_thread = NULL;
 	}
+	if (mp_data_storage_thread)
+	{
+		mp_data_storage_thread->join();
+		delete mp_data_storage_thread;
+		mp_data_storage_thread = NULL;
+	}
 
 	m_dispatch_plc_status = Dispatch_plc::Dispatch_plc_status::DISPATCH_PLC_UNKNOW;
 
@@ -486,6 +501,45 @@ void Dispatch_plc::execute_thread_fun()
 	}
 }
 
+//数据储存线程函数
+void Dispatch_plc::data_storage_thread_fun()
+{
+	LOG(INFO) << " Dispatch_plc::data_storage_thread_fun() start " << this;
+	Error_manager t_error;
+
+	while (m_data_storage_condition.is_alive())
+	{
+		m_data_storage_condition.wait();
+		if (m_data_storage_condition.is_alive())
+		{
+			std::this_thread::sleep_for(std::chrono::microseconds(1));
+			std::this_thread::sleep_for(std::chrono::milliseconds(1));
+			std::this_thread::sleep_for(std::chrono::seconds(1));
+
+			std::this_thread::yield();
+//			std::unique_lock<std::mutex> t_lock(m_lock);
+
+
+			char buf[16] = {0};	//数据转字符串然后存数据库
+			std::string t_plc_data_string;
+			float t_heartbeat = Dispatch_communication::get_instance_references().m_data_storage_from_plc_to_manager.m_heartbeat;
+			{
+				std::unique_lock<std::mutex> t_lock1(Dispatch_communication::get_instance_references().m_data_lock);
+				char * tp = buf;
+				for (int i = 0; i < DATA_STORAGE_PLC_DATA_LENGTH; ++i)
+				{
+					sprintf(buf, "%g\t", Dispatch_communication::get_instance_references().m_data_storage_from_plc_to_manager.m_plc_data[i]);
+					t_plc_data_string += buf;
+				}
+//				std::cout << " huli test :::: " << " t_plc_data_string = " << t_plc_data_string << std::endl;
+			}
+
+			Dispatch_manager::get_instance_references().m_dispatch_command.insert_plc_data(t_plc_data_string, t_heartbeat);
+
+
+		}
+	}
+}
 
 //封装 给plc的调度请求
 Error_manager Dispatch_plc::encapsulate_dispatch_request_to_plc()
@@ -622,7 +676,7 @@ Error_manager Dispatch_plc::encapsulate_dispatch_request_to_plc_new()
 		//车位信息
 		m_request_parkingspace_index_id = m_park_table_msg.allocated_space_info().id();
 		m_request_parkingspace_unit_id = m_park_table_msg.allocated_space_info().unit_id();
-		int t_parkingspace_label_id = (m_park_table_msg.allocated_space_info().id()-1)%78;
+		int t_parkingspace_label_id = (m_park_table_msg.allocated_space_info().id() - 1 )%78;
 		m_request_parkingspace_label_id = t_parkingspace_label_id+1;
 		m_request_parkingspace_floor_id = m_park_table_msg.allocated_space_info().floor();
 		m_request_parkingspace_room_id = m_park_table_msg.allocated_space_info().room_id();
@@ -665,8 +719,8 @@ Error_manager Dispatch_plc::encapsulate_dispatch_request_to_plc_new()
 		//车位信息
 		m_request_parkingspace_index_id = m_pick_table_msg.actually_space_info().id();
 		m_request_parkingspace_unit_id = m_pick_table_msg.actually_space_info().unit_id();
-		int t_parkingspace_label_id = (m_pick_table_msg.actually_space_info().id()-1)%78;
-		m_request_parkingspace_label_id = t_parkingspace_label_id+1;
+		int t_parkingspace_label_id = (m_pick_table_msg.actually_space_info().id() -1 )%78;
+		m_request_parkingspace_label_id = t_parkingspace_label_id +1 ;
 		m_request_parkingspace_floor_id = m_pick_table_msg.actually_space_info().floor();
 		m_request_parkingspace_room_id = m_pick_table_msg.actually_space_info().room_id();
 		//车位朝向, 奇数朝南, 偶数朝北

+ 7 - 0
plc调度节点/dispatch/dispatch_plc.h

@@ -95,6 +95,8 @@ protected://member functions
 
 	//执行外界任务的执行函数
 	void execute_thread_fun();
+	//数据储存线程函数
+	void data_storage_thread_fun();
 
 	//封装 给plc的调度请求
 	Error_manager encapsulate_dispatch_request_to_plc();
@@ -112,6 +114,7 @@ protected://member functions
 	Error_manager send_dispatch_response_to_main_control_new();
 
 
+
 protected://member variable
 public:
 	std::atomic<Dispatch_plc_status>			m_dispatch_plc_status;			//设备总状态, 控制任务流程(长流程)
@@ -122,6 +125,10 @@ public:
 	std::thread*        						mp_execute_thread;   			//执行的线程指针,内存由本类管理
 	Thread_condition							m_execute_condition;			//执行的条件变量
 
+	//数据存储线程
+	std::thread*        						mp_data_storage_thread;   			//数据存储线程的指针,内存由本类管理
+	Thread_condition							m_data_storage_condition;			//数据存储线程的条件变量
+
 
 	//指令
 	Common_data::Dispatch_process_type			m_dispatch_process_type ;			//调度流程类型

+ 430 - 133
plc调度节点/dispatch/dispatch_singlechip.cpp

@@ -3,8 +3,8 @@
 //
 
 #include "dispatch_singlechip.h"
-
-
+#include "../system/system_communication.h"
+#include "../dispatch/dispatch_manager.h"
 
 Dispatch_singlechip::Dispatch_singlechip()
 {
@@ -29,6 +29,7 @@ Error_manager Dispatch_singlechip::dispatch_singlechip_init(int plc_id, int sing
 	m_singlechip_id = singlechip_id;
 	m_singlechip_direction = singlechip_direction;
 	mp_execute_thread = nullptr ;
+	mp_updata_thread = nullptr ;
 	m_singlechip_data_msg_updata_time = std::chrono::system_clock::now();
 	m_singlechip_data_msg_updata_flag = false;
 
@@ -36,6 +37,10 @@ Error_manager Dispatch_singlechip::dispatch_singlechip_init(int plc_id, int sing
 	m_execute_condition.reset(false, true, false);
 	mp_execute_thread = new std::thread(&Dispatch_singlechip::execute_thread_fun, this);
 
+	//	线程默认开启
+	m_updata_condition.reset(false, true, false);
+	mp_updata_thread = new std::thread(&Dispatch_singlechip::updata_thread_fun, this);
+
 	m_dispatch_singlechip_status = DISPATCH_SINGLECHIP_READY;
 
 	return Error_code::SUCCESS;
@@ -96,20 +101,91 @@ Error_manager Dispatch_singlechip::execute_for_singlechip_data_msg_new(out_mcpu_
 	return Error_code::SUCCESS;
 }
 
+//单片机消息, 数据处理, 去头,去尾 //删除头部 @501, 删除尾部 $,
+Error_manager Dispatch_singlechip::data_processing(std::string & put_in, std::string & put_out)
+{
+	int t_head_index = put_in.find("@");
+	int t_tail_index = put_in.find('$');
+
+	if ( t_head_index >=0 && t_tail_index > t_head_index )
+	{
+		//删除头部 @501, 删除尾部 $, 保留 {}
+		put_out = put_in.substr(4, t_tail_index-t_head_index-4);
+	}
+	else
+	{
+		return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+							 " fun error ");
+	}
+
+	return Error_code::SUCCESS;
+}
+
+//调度单片机 执行状态消息, 单片机通过tcp发过来的原始字符串
+Error_manager Dispatch_singlechip::execute_for_singlechip_data_msg_new(std::string singlechip_data_string)
+{
+	Error_manager t_error;
+	std::string t_singlechip_data_string_processing;	//处理后的临时字符串
+	//单片机消息, 数据处理, 去头,去尾 //删除头部 @501, 删除尾部 $,
+	t_error = data_processing(singlechip_data_string, t_singlechip_data_string_processing);
+	if ( t_error == Error_code::SUCCESS )
+	{
+		//json转protobuf
+		message::Singlechip_data t_singlechip_data_message;	//单片机的数据, proto格式
+		auto result = google::protobuf::util::JsonStringToMessage(t_singlechip_data_string_processing,&t_singlechip_data_message);
+		if ( result.error_code() == 0 )
+		{
+			m_singlechip_data_msg = t_singlechip_data_message;
+			m_singlechip_data_msg_updata_time = std::chrono::system_clock::now();
+			m_singlechip_data_msg_updata_flag = true;
+			m_validity = true;
+		}
+		else
+		{
+			return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+								 " fun error ");
+		}
+	}
+	else
+	{
+		return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+							 " fun error ");
+	}
+
+	return Error_code::SUCCESS;
+}
+
 Dispatch_singlechip::Dispatch_singlechip_status Dispatch_singlechip::get_dispatch_singlechip_status()
 {
 	return m_dispatch_singlechip_status;
 }
 
 
-//判断出口是否空闲
+//判断出口是否空闲, 没有车就是空闲, 返回true
 bool Dispatch_singlechip::is_outlet_ready()
 {
 	std::unique_lock<std::mutex> t_lock(m_lock);
-	//   outside_safety 0无效, 1无车, 2有车
+
+	if ( m_dispatch_singlechip_status == DISPATCH_SINGLECHIP_READY &&
+		 //		 m_singlechip_data_msg.insideexistenceflag() == 0)
+		 m_out_mcpu_statu.outside_safety() == 1)//   outside_safety 0无效, 1无车, 2有车
+	{
+		return true;
+	}
+	else
+	{
+		return false;
+	}
+}
+
+//判断入口是否空闲, 没有车就是空闲, 返回true
+bool Dispatch_singlechip::is_inlet_ready()
+{
+	std::unique_lock<std::mutex> t_lock(m_lock);
+
 	if ( m_dispatch_singlechip_status == DISPATCH_SINGLECHIP_READY &&
-//		 m_singlechip_data_msg.insideexistenceflag() == 0)
-m_out_mcpu_statu.outside_safety() == 1)
+		 //		 m_singlechip_data_msg.insideexistenceflag() == 0)
+		 m_in_mcpu_statu.is_occupy() == 1)//    0无效, 1无车, 2有车
 	{
 		return true;
 	}
@@ -119,8 +195,34 @@ m_out_mcpu_statu.outside_safety() == 1)
 	}
 }
 
+//获取外门状态, 0表示未知, 1表示外门开到位, 2表示外门关到位, 3表示外门运行中 4表示外门故障
+message::Outside_door_status Dispatch_singlechip::get_outside_door_status()
+{
+	std::unique_lock<std::mutex> t_lock(m_lock);
+	if ( m_dispatch_singlechip_status == DISPATCH_SINGLECHIP_READY )
+	{
+		return m_singlechip_data_msg.outsidedoorstatus();
+	}
+	else
+	{
+		return message::Outside_door_status::OUTSIDE_DOOR_STATUS_UNKNOWN;
+	}
+}
+//获取内部是否有车, 0表示无车, 1表示有车. -1表示未知
+int Dispatch_singlechip::get_inside_existence_flag()
+{
+	std::unique_lock<std::mutex> t_lock(m_lock);
+	if ( m_dispatch_singlechip_status == DISPATCH_SINGLECHIP_READY )
+	{
+		return m_singlechip_data_msg.insideexistenceflag();
+	}
+	else
+	{
+		return -1;
+	}
+}
 
-//执行外界任务的执行函数
+//任务执行线程, 负责门控和数据库操作
 void Dispatch_singlechip::execute_thread_fun()
 {
 	LOG(INFO) << " Dispatch_singlechip::execute_thread_fun() start " << this;
@@ -133,157 +235,352 @@ void Dispatch_singlechip::execute_thread_fun()
 		{
 			std::this_thread::sleep_for(std::chrono::milliseconds(1));
 //			std::this_thread::sleep_for(std::chrono::seconds(1));
+			//门控线程, 每1秒循环一次即可.
+			static auto s_last_time = std::chrono::system_clock::now();
+			if ( std::chrono::system_clock::now() - s_last_time >= std::chrono::seconds(1) )
+			{
+			    if ( m_singlechip_direction == 1 )
+			    {
+					inlet_outsidedoor_control();
+			    }
+			    else if ( m_singlechip_direction == 2 )
+				{
+					outlet_outsidedoor_control();
+				}
 
-			std::this_thread::yield();
+				s_last_time = std::chrono::system_clock::now();
+			}
 
-//			std::cout << " huli test :::: " << "uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu m_singlechip_data_msg_updata_flag = " << m_singlechip_data_msg_updata_flag << std::endl;
+			std::this_thread::yield();
 
-			if (m_singlechip_data_msg_updata_flag)
-			{
+			//...
+		}
 
-//				std::cout << " huli test :::: " << "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj m_singlechip_data_msg_updata_flag = " << m_singlechip_data_msg_updata_flag << std::endl;
-//				std::cout << " huli test :::: " << " m_singlechip_data_msg = " << m_singlechip_data_msg.DebugString() << std::endl;
+	}
+}
 
+//入口外门控制函数
+void Dispatch_singlechip::inlet_outsidedoor_control()
+{
+//	return;
+	if ( m_dispatch_singlechip_status == DISPATCH_SINGLECHIP_READY )
+	{
+		int t_terminal_id = m_plc_id*2 + m_singlechip_id;
+		int t_singlechip_index = (m_singlechip_direction-1)*2 + m_singlechip_id;
 
+//		int t_outsidedoor_control = Dispatch_communication::get_instance_references().m_singlechip_request_from_plc_to_manager[t_singlechip_index].m_request_outsidedoor_control;
 
-				std::unique_lock<std::mutex> t_lock(Dispatch_communication::get_instance_references().m_data_lock);
-				std::unique_lock<std::mutex> t_lock2(m_lock);
+//		std::cout << " huli test :::: " << " +++++++++++++++++++++++++++++++++ = " << 1 << std::endl;
+//		std::cout << " huli test :::: " << " get_inside_existence_flag() = " << get_inside_existence_flag() << std::endl;
+//		std::cout << " huli test :::: " << " t_outsidedoor_control = " << t_outsidedoor_control << std::endl;
+//		std::cout << " huli test :::: " << " hhhhhhhh = " << Dispatch_communication::get_instance_references().m_singlechip_request_from_plc_to_manager[t_singlechip_index].m_request_heartbeat << std::endl;
 
-				//将nnxx的protobuf 转化为 snap7的DB块,  把店面雷达数据转发给plc
-//				int t_temp = (m_singlechip_data_msg.terminalid() % 2) + (m_singlechip_data_msg.dispatchdirection()-1)*2;
-				int t_temp = (m_singlechip_direction-1)*2 + m_singlechip_id;
-				Dispatch_communication::Singlechip_response_from_manager_to_plc *p_response = &Dispatch_communication::get_instance_references().m_singlechip_response_from_manager_to_plc[t_temp];
-				Dispatch_communication::Singlechip_request_from_plc_to_manager *p_request = &Dispatch_communication::get_instance_references().m_singlechip_request_from_plc_to_manager[t_temp];
+		//检查出口取车是否完成, 出口有取车完成指令就返回成功, 否则报错.
+		if ( Dispatch_manager::get_instance_references().m_dispatch_command.check_park_is_start(t_terminal_id+1) == Error_code::SUCCESS )
+		{
 
-				if (p_request->m_request_communication_mode != 2)
-				{
-					p_response->m_response_heartbeat = 1+p_response->m_response_heartbeat;
-//					int heartbeat = p_response->m_response_heartbeat;
-//					std::cout << " huli test :::: " << " mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmp_response->m_response_heartbeat = " << heartbeat << std::endl;
-					p_response->m_response_communication_mode = p_request->m_request_communication_mode;
-					p_response->m_response_refresh_command = p_request->m_request_refresh_command;
-					p_response->m_response_data_validity = m_validity;
-
-//					p_response->m_process_status = m_singlechip_data_msg.processstatus();
-//					p_response->m_process_control = m_singlechip_data_msg.processcontrol();
-//					p_response->m_over_border_status = m_singlechip_data_msg.overborderstatus();
-//					p_response->m_car_height_status_current = m_singlechip_data_msg.carheightstatuscurrent();
-//					p_response->m_car_height_status_passing = m_singlechip_data_msg.carheightstatuspassing();
-//					p_response->m_outside_door_status = m_singlechip_data_msg.outsidedoorstatus();
-//					p_response->m_outside_door_control = m_singlechip_data_msg.outsidedoorcontrol();
-//					p_response->m_dispatch_finish_flag = m_singlechip_data_msg.dispatchfinishflag();
-//					p_response->m_inside_existence_flag = m_singlechip_data_msg.insideexistenceflag();
-//					p_response->m_outside_existence_flag = m_singlechip_data_msg.outsideexistenceflag();
-//					p_response->m_reset_flag = m_singlechip_data_msg.resetflag();
-//					p_response->m_stop_flag = m_singlechip_data_msg.stopflag();
-//					p_response->m_error_code = 0;
+			int t_outsidedoor_control = Dispatch_communication::get_instance_references().m_singlechip_request_from_plc_to_manager[t_singlechip_index].m_request_outsidedoor_control;
 //
-//					p_response->m_gpio_input[0] = m_singlechip_data_msg.inputdi().di0();
-//					p_response->m_gpio_input[1] = m_singlechip_data_msg.inputdi().di1();
-//					p_response->m_gpio_input[2] = m_singlechip_data_msg.inputdi().di2();
-//					p_response->m_gpio_input[3] = m_singlechip_data_msg.inputdi().di3();
-//					p_response->m_gpio_input[4] = m_singlechip_data_msg.inputdi().di4();
-//					p_response->m_gpio_input[5] = m_singlechip_data_msg.inputdi().di5();
-//					p_response->m_gpio_input[6] = m_singlechip_data_msg.inputdi().di6();
-//					p_response->m_gpio_input[7] = m_singlechip_data_msg.inputdi().di7();
-//					p_response->m_gpio_input[8] = m_singlechip_data_msg.inputdi().di8();
-//					p_response->m_gpio_input[9] = m_singlechip_data_msg.inputdi().di9();
-//					p_response->m_gpio_input[10] = m_singlechip_data_msg.inputdi().di10();
-//					p_response->m_gpio_input[11] = m_singlechip_data_msg.inputdi().di11();
-//					p_response->m_gpio_input[12] = m_singlechip_data_msg.inputdi().di12();
-//					p_response->m_gpio_input[13] = m_singlechip_data_msg.inputdi().di13();
-//					p_response->m_gpio_input[14] = m_singlechip_data_msg.inputdi().di14();
-//					p_response->m_gpio_input[15] = m_singlechip_data_msg.inputdi().di15();
-
-					if ( m_singlechip_direction ==1 )
-					{
-						p_response->m_outside_door_status = m_in_mcpu_statu.door_statu()-1;
-						p_response->m_over_border_status = m_in_mcpu_statu.back_io()-1;
-						p_response->m_inside_existence_flag = m_in_mcpu_statu.is_occupy()-1;
-						p_response->m_car_height_status_current = m_in_mcpu_statu.heighth()-1;
-					}
-					else if(m_singlechip_direction ==2)
-					{
-						p_response->m_outside_door_status = m_out_mcpu_statu.door_statu()-1;
-						p_response->m_inside_existence_flag = m_out_mcpu_statu.outside_safety()-1;
-					}
-				}
-				else if (p_response->m_response_refresh_command == p_request->m_request_refresh_command)
+//			std::cout << " huli test :::: " << " +++++++++++++++++++++++++++++++++ = " << 1 << std::endl;
+//			std::cout << " huli test :::: " << " get_inside_existence_flag() = " << get_inside_existence_flag() << std::endl;
+//			std::cout << " huli test :::: " << " t_outsidedoor_control = " << t_outsidedoor_control << std::endl;
+
+			//检测入口是否有车, //有车就开门, 检查门的状态, 并发送关门指令
+			if ( get_inside_existence_flag() == 1 || t_outsidedoor_control == 0  )
+			{
+				//有车就开门, 检查门的状态, 并发送关门指令
+				if ( get_outside_door_status() == message::Outside_door_status::OUTSIDE_DOOR_STATUS_OPEN ||
+					 get_outside_door_status() == message::Outside_door_status::OUTSIDE_DOOR_STATUS_RUN )
 				{
-					p_response->m_response_heartbeat = 1+p_response->m_response_heartbeat;
-					p_response->m_response_communication_mode = p_request->m_request_communication_mode;
-					p_response->m_response_refresh_command = p_request->m_request_refresh_command;
+
+					//发送关门指令
+					close_outside_door();
 				}
-				else
+				//else 等待汽车离开
+			}
+			//else  什么也不做
+		}
+		//else 什么也不做
+	}
+	return;
+}
+//出口外门控制函数
+void Dispatch_singlechip::outlet_outsidedoor_control()
+{
+//	return;
+	if ( m_dispatch_singlechip_status == DISPATCH_SINGLECHIP_READY )
+	{
+		int t_terminal_id = m_plc_id*2 + m_singlechip_id;
+		int t_singlechip_index = (m_singlechip_direction-1)*2 + m_singlechip_id;
+		//检查出口取车是否完成, 出口有取车完成指令就返回成功, 否则报错.
+	    if ( Dispatch_manager::get_instance_references().m_dispatch_command.check_pickup_is_finish(t_terminal_id+1) == Error_code::SUCCESS )
+	    {
+			//检测出口是否有车, 如果没有车, 直接清除数据库的指令
+			if ( get_inside_existence_flag() == 0 )
+			{
+			    //delete
+				Dispatch_manager::get_instance_references().m_dispatch_command.delete_command_queue_for_export_id(t_terminal_id+1);
+			}
+			else if ( get_inside_existence_flag() == 1 )
+			{
+				//有车就开门, 检查门的状态, 并发送开门指令
+				if ( get_outside_door_status() == message::Outside_door_status::OUTSIDE_DOOR_STATUS_CLOSE ||
+					 get_outside_door_status() == message::Outside_door_status::OUTSIDE_DOOR_STATUS_RUN )
 				{
-					p_response->m_response_heartbeat = 1+p_response->m_response_heartbeat;
-					p_response->m_response_communication_mode = p_request->m_request_communication_mode;
-					p_response->m_response_refresh_command = p_request->m_request_refresh_command;
-					p_response->m_response_data_validity = m_validity;
-
-//					p_response->m_process_status = m_singlechip_data_msg.processstatus();
-//					p_response->m_process_control = m_singlechip_data_msg.processcontrol();
-//					p_response->m_over_border_status = m_singlechip_data_msg.overborderstatus();
-//					p_response->m_car_height_status_current = m_singlechip_data_msg.carheightstatuscurrent();
-//					p_response->m_car_height_status_passing = m_singlechip_data_msg.carheightstatuspassing();
-//					p_response->m_outside_door_status = m_singlechip_data_msg.outsidedoorstatus();
-//					p_response->m_outside_door_control = m_singlechip_data_msg.outsidedoorcontrol();
-//					p_response->m_dispatch_finish_flag = m_singlechip_data_msg.dispatchfinishflag();
-//					p_response->m_inside_existence_flag = m_singlechip_data_msg.insideexistenceflag();
-//					p_response->m_outside_existence_flag = m_singlechip_data_msg.outsideexistenceflag();
-//					p_response->m_reset_flag = m_singlechip_data_msg.resetflag();
-//					p_response->m_stop_flag = m_singlechip_data_msg.stopflag();
-//					p_response->m_error_code = 0;
-//
-//					p_response->m_gpio_input[0] = m_singlechip_data_msg.inputdi().di0();
-//					p_response->m_gpio_input[1] = m_singlechip_data_msg.inputdi().di1();
-//					p_response->m_gpio_input[2] = m_singlechip_data_msg.inputdi().di2();
-//					p_response->m_gpio_input[3] = m_singlechip_data_msg.inputdi().di3();
-//					p_response->m_gpio_input[4] = m_singlechip_data_msg.inputdi().di4();
-//					p_response->m_gpio_input[5] = m_singlechip_data_msg.inputdi().di5();
-//					p_response->m_gpio_input[6] = m_singlechip_data_msg.inputdi().di6();
-//					p_response->m_gpio_input[7] = m_singlechip_data_msg.inputdi().di7();
-//					p_response->m_gpio_input[8] = m_singlechip_data_msg.inputdi().di8();
-//					p_response->m_gpio_input[9] = m_singlechip_data_msg.inputdi().di9();
-//					p_response->m_gpio_input[10] = m_singlechip_data_msg.inputdi().di10();
-//					p_response->m_gpio_input[11] = m_singlechip_data_msg.inputdi().di11();
-//					p_response->m_gpio_input[12] = m_singlechip_data_msg.inputdi().di12();
-//					p_response->m_gpio_input[13] = m_singlechip_data_msg.inputdi().di13();
-//					p_response->m_gpio_input[14] = m_singlechip_data_msg.inputdi().di14();
-//					p_response->m_gpio_input[15] = m_singlechip_data_msg.inputdi().di15();
-
-					if ( m_singlechip_direction ==1 )
-					{
-						p_response->m_outside_door_status = m_in_mcpu_statu.door_statu()-1;
-						p_response->m_over_border_status = m_in_mcpu_statu.back_io()-1;
-						p_response->m_inside_existence_flag = m_in_mcpu_statu.is_occupy()-1;
-						p_response->m_car_height_status_current = m_in_mcpu_statu.heighth()-1;
-					}
-					else if(m_singlechip_direction ==2)
-					{
-						p_response->m_outside_door_status = m_out_mcpu_statu.door_statu()-1;
-						p_response->m_inside_existence_flag = m_out_mcpu_statu.outside_safety()-1;
-					}
-				}
+					//发送开门指令
+					open_outside_door();
+			    }
+				//else 等待汽车离开
+			}
+			//else  什么也不做
+	    }
+	    //else 什么也不做
+	}
+	return;
+}
 
-				m_singlechip_data_msg_updata_flag = false;
+//发送开门指令
+Error_manager Dispatch_singlechip::open_outside_door()
+{
+	int t_terminal_id = m_plc_id*2 + m_singlechip_id;//terminal_id 0~5
+	char buf[1024] = {0};
+	//ProcessControl 为3表示半自动关门, 为4表示半自动开门
+	sprintf(buf, "{\"TerminalID\": %d, \"DispatchDirection\": %d, \"OutPutDo\": {\"Do0\": 0, \"Do1\": 0, \"Do2\": 0,\"Do3\": 0,\"Do4\": 0, \"Do5\": 0, \"Do6\": 0, \"Do7\": 0}, \"ProcessControl\": 4}",
+			t_terminal_id, m_singlechip_direction);
+
+	//4个单片机分别对应tcp通道口的0~3
+	int t_tcp_id = (m_singlechip_direction-1)*2 + m_singlechip_id;
+	Dispatch_network::get_instance_references().encapsulate_msg(std::string(buf), t_tcp_id);
+
+	return Error_code::SUCCESS;
+}
+//发送关门指令
+Error_manager Dispatch_singlechip::close_outside_door()
+{
+	int t_terminal_id = m_plc_id*2 + m_singlechip_id; //terminal_id 0~5
+	char buf[1024] = {0};
+	//ProcessControl 为3表示半自动关门, 为4表示半自动开门
+	sprintf(buf, "{\"TerminalID\": %d, \"DispatchDirection\": %d, \"OutPutDo\": {\"Do0\": 0, \"Do1\": 0, \"Do2\": 0,\"Do3\": 0,\"Do4\": 0, \"Do5\": 0, \"Do6\": 0, \"Do7\": 0}, \"ProcessControl\": 3}",
+			t_terminal_id, m_singlechip_direction);
+
+	//4个单片机分别对应tcp通道口的0~3
+	int t_tcp_id = (m_singlechip_direction-1)*2 + m_singlechip_id;
+	Dispatch_network::get_instance_references().encapsulate_msg(std::string(buf), t_tcp_id);
+
+	return Error_code::SUCCESS;
+}
+
+//任务执行线程, 负责数据管理, 和通信转化, tcp rabbitmq snap7
+void Dispatch_singlechip::updata_thread_fun()
+{
+	LOG(INFO) << " Dispatch_singlechip::updata_thread_fun() start " << this;
+	Error_manager t_error;
+
+	while (m_updata_condition.is_alive())
+	{
+		m_updata_condition.wait();
+		if (m_updata_condition.is_alive())
+		{
+			std::this_thread::sleep_for(std::chrono::milliseconds(1));
+//			std::this_thread::sleep_for(std::chrono::seconds(1));
+
+			std::this_thread::yield();
+
+			//数据同步更新, tcp->rabbitmq, tcp->snap7
+			updata_singlechip_data();
+		}
+
+	}
+}
+
+//数据同步更新, tcp->rabbitmq, tcp->snap7
+void Dispatch_singlechip::updata_singlechip_data()
+{
+	//如果标志位是true, 就表示最新收到单片机消息, 那么同步数据消息
+	if (m_singlechip_data_msg_updata_flag)
+	{
+		//将protobuf 转化为 snap7的DB块,  把店面雷达数据转发给plc
+		//这个{}只是为了加锁
+		{
+			std::unique_lock<std::mutex> t_lock(Dispatch_communication::get_instance_references().m_data_lock);
+			std::unique_lock<std::mutex> t_lock2(m_lock);
+
+			//获取snap7的共享内存指针
+			int t_temp = (m_singlechip_direction-1)*2 + m_singlechip_id;
+			Dispatch_communication::Singlechip_response_from_manager_to_plc *p_response = &Dispatch_communication::get_instance_references().m_singlechip_response_from_manager_to_plc[t_temp];
+			Dispatch_communication::Singlechip_request_from_plc_to_manager *p_request = &Dispatch_communication::get_instance_references().m_singlechip_request_from_plc_to_manager[t_temp];
+
+			//m_request_communication_mode是刷新模式, 0=未知, 1=自动循环模式, 2=手动刷新模式
+			if (p_request->m_request_communication_mode != 2)
+			{
+				p_response->m_response_heartbeat = 1+p_response->m_response_heartbeat;
+				p_response->m_response_communication_mode = p_request->m_request_communication_mode;
+				p_response->m_response_refresh_command = p_request->m_request_refresh_command;
+				p_response->m_response_data_validity = m_validity;
+
+				p_response->m_process_status = m_singlechip_data_msg.processstatus();
+				p_response->m_process_control = m_singlechip_data_msg.processcontrol();
+				p_response->m_over_border_status = m_singlechip_data_msg.overborderstatus();
+				p_response->m_car_height_status_current = m_singlechip_data_msg.carheightstatuscurrent();
+				p_response->m_car_height_status_passing = m_singlechip_data_msg.carheightstatuspassing();
+				p_response->m_outside_door_status = m_singlechip_data_msg.outsidedoorstatus();
+				p_response->m_outside_door_control = m_singlechip_data_msg.outsidedoorcontrol();
+				p_response->m_dispatch_finish_flag = m_singlechip_data_msg.dispatchfinishflag();
+				p_response->m_inside_existence_flag = m_singlechip_data_msg.insideexistenceflag();
+				p_response->m_outside_existence_flag = m_singlechip_data_msg.outsideexistenceflag();
+				p_response->m_reset_flag = m_singlechip_data_msg.resetflag();
+				p_response->m_stop_flag = m_singlechip_data_msg.stopflag();
+				p_response->m_error_code = 0;
+
+				p_response->m_gpio_input[0] = m_singlechip_data_msg.inputdi().di0();
+				p_response->m_gpio_input[1] = m_singlechip_data_msg.inputdi().di1();
+				p_response->m_gpio_input[2] = m_singlechip_data_msg.inputdi().di2();
+				p_response->m_gpio_input[3] = m_singlechip_data_msg.inputdi().di3();
+				p_response->m_gpio_input[4] = m_singlechip_data_msg.inputdi().di4();
+				p_response->m_gpio_input[5] = m_singlechip_data_msg.inputdi().di5();
+				p_response->m_gpio_input[6] = m_singlechip_data_msg.inputdi().di6();
+				p_response->m_gpio_input[7] = m_singlechip_data_msg.inputdi().di7();
+				p_response->m_gpio_input[8] = m_singlechip_data_msg.inputdi().di8();
+				p_response->m_gpio_input[9] = m_singlechip_data_msg.inputdi().di9();
+				p_response->m_gpio_input[10] = m_singlechip_data_msg.inputdi().di10();
+				p_response->m_gpio_input[11] = m_singlechip_data_msg.inputdi().di11();
+				p_response->m_gpio_input[12] = m_singlechip_data_msg.inputdi().di12();
+				p_response->m_gpio_input[13] = m_singlechip_data_msg.inputdi().di13();
+				p_response->m_gpio_input[14] = m_singlechip_data_msg.inputdi().di14();
+				p_response->m_gpio_input[15] = m_singlechip_data_msg.inputdi().di15();
+
+//			if ( m_singlechip_direction ==1 )
+//			{
+//				p_response->m_outside_door_status = m_in_mcpu_statu.door_statu()-1;
+//				p_response->m_over_border_status = m_in_mcpu_statu.back_io()-1;
+//				p_response->m_inside_existence_flag = m_in_mcpu_statu.is_occupy()-1;
+//				p_response->m_car_height_status_current = m_in_mcpu_statu.heighth()-1;
+//			}
+//			else if(m_singlechip_direction ==2)
+//			{
+//				p_response->m_outside_door_status = m_out_mcpu_statu.door_statu()-1;
+//				p_response->m_inside_existence_flag = m_out_mcpu_statu.outside_safety()-1;
+//			}
+			}
+			else if (p_response->m_response_refresh_command == p_request->m_request_refresh_command)
+			{
+				p_response->m_response_heartbeat = 1+p_response->m_response_heartbeat;
+				p_response->m_response_communication_mode = p_request->m_request_communication_mode;
+				p_response->m_response_refresh_command = p_request->m_request_refresh_command;
+			}
+			else
+			{
+				p_response->m_response_heartbeat = 1+p_response->m_response_heartbeat;
+				p_response->m_response_communication_mode = p_request->m_request_communication_mode;
+				p_response->m_response_refresh_command = p_request->m_request_refresh_command;
+				p_response->m_response_data_validity = m_validity;
+
+				p_response->m_process_status = m_singlechip_data_msg.processstatus();
+				p_response->m_process_control = m_singlechip_data_msg.processcontrol();
+				p_response->m_over_border_status = m_singlechip_data_msg.overborderstatus();
+				p_response->m_car_height_status_current = m_singlechip_data_msg.carheightstatuscurrent();
+				p_response->m_car_height_status_passing = m_singlechip_data_msg.carheightstatuspassing();
+				p_response->m_outside_door_status = m_singlechip_data_msg.outsidedoorstatus();
+				p_response->m_outside_door_control = m_singlechip_data_msg.outsidedoorcontrol();
+				p_response->m_dispatch_finish_flag = m_singlechip_data_msg.dispatchfinishflag();
+				p_response->m_inside_existence_flag = m_singlechip_data_msg.insideexistenceflag();
+				p_response->m_outside_existence_flag = m_singlechip_data_msg.outsideexistenceflag();
+				p_response->m_reset_flag = m_singlechip_data_msg.resetflag();
+				p_response->m_stop_flag = m_singlechip_data_msg.stopflag();
+				p_response->m_error_code = 0;
+
+				p_response->m_gpio_input[0] = m_singlechip_data_msg.inputdi().di0();
+				p_response->m_gpio_input[1] = m_singlechip_data_msg.inputdi().di1();
+				p_response->m_gpio_input[2] = m_singlechip_data_msg.inputdi().di2();
+				p_response->m_gpio_input[3] = m_singlechip_data_msg.inputdi().di3();
+				p_response->m_gpio_input[4] = m_singlechip_data_msg.inputdi().di4();
+				p_response->m_gpio_input[5] = m_singlechip_data_msg.inputdi().di5();
+				p_response->m_gpio_input[6] = m_singlechip_data_msg.inputdi().di6();
+				p_response->m_gpio_input[7] = m_singlechip_data_msg.inputdi().di7();
+				p_response->m_gpio_input[8] = m_singlechip_data_msg.inputdi().di8();
+				p_response->m_gpio_input[9] = m_singlechip_data_msg.inputdi().di9();
+				p_response->m_gpio_input[10] = m_singlechip_data_msg.inputdi().di10();
+				p_response->m_gpio_input[11] = m_singlechip_data_msg.inputdi().di11();
+				p_response->m_gpio_input[12] = m_singlechip_data_msg.inputdi().di12();
+				p_response->m_gpio_input[13] = m_singlechip_data_msg.inputdi().di13();
+				p_response->m_gpio_input[14] = m_singlechip_data_msg.inputdi().di14();
+				p_response->m_gpio_input[15] = m_singlechip_data_msg.inputdi().di15();
+
+//			if ( m_singlechip_direction ==1 )
+//			{
+//				p_response->m_outside_door_status = m_in_mcpu_statu.door_statu()-1;
+//				p_response->m_over_border_status = m_in_mcpu_statu.back_io()-1;
+//				p_response->m_inside_existence_flag = m_in_mcpu_statu.is_occupy()-1;
+//				p_response->m_car_height_status_current = m_in_mcpu_statu.heighth()-1;
+//			}
+//			else if(m_singlechip_direction ==2)
+//			{
+//				p_response->m_outside_door_status = m_out_mcpu_statu.door_statu()-1;
+//				p_response->m_inside_existence_flag = m_out_mcpu_statu.outside_safety()-1;
+//			}
 			}
+		}
+
 
+		//将protobuf 转化为 rabbitmq,
+		//这个{}只是为了加锁
+		{
+			std::unique_lock<std::mutex> t_lock2(m_lock);
 
-			//判断超时
+			//tcp的protobuf 转 rabbitmq的protobuf, 注意了, 所有数据+1
+			if ( m_singlechip_direction ==1 )
 			{
-				std::unique_lock<std::mutex> t_lock3(m_lock);
-				if (std::chrono::system_clock::now() - m_singlechip_data_msg_updata_time > std::chrono::seconds(5))
+				m_in_mcpu_statu.set_door_statu(m_singlechip_data_msg.outsidedoorstatus()+1);
+				m_in_mcpu_statu.set_is_occupy(m_singlechip_data_msg.insideexistenceflag()+1);
+				m_in_mcpu_statu.set_heighth(m_singlechip_data_msg.carheightstatuscurrent()+1);
+
+				//di1是后光电, 1表示光电联通无障碍, 0表示光电阻挡有障碍.
+				if ( m_singlechip_data_msg.inputdi().di1() == 0 )
 				{
-					m_dispatch_singlechip_status = DISPATCH_SINGLECHIP_DISCONNECT;
+					m_in_mcpu_statu.set_back_io(1);//后超界       0无效, 1后超界, 2正常
+				}
+				else if ( m_singlechip_data_msg.inputdi().di1() == 1 )
+				{
+					m_in_mcpu_statu.set_back_io(2);//后超界       0无效, 1后超界, 2正常
 				}
 				else
 				{
-					m_dispatch_singlechip_status = DISPATCH_SINGLECHIP_READY;
+					m_in_mcpu_statu.set_back_io(0);//后超界       0无效, 1后超界, 2正常
 				}
+
+				std::string t_msg = m_in_mcpu_statu.DebugString();
+				//使用的rabbitmq通道要+1, tcp0号口给调度状态了, 1~4分别对应4个单片机
+				int t_rabbitmq_id = (m_singlechip_direction-1)*2 + m_singlechip_id +1; //,每个单元的4个单片机分别对应1~4
+				System_communication::get_instance_references().encapsulate_status_msg(t_msg, t_rabbitmq_id);
+			}
+			else if(m_singlechip_direction ==2)
+			{
+				m_out_mcpu_statu.set_door_statu(m_singlechip_data_msg.outsidedoorstatus()+1);
+				m_out_mcpu_statu.set_outside_safety(m_singlechip_data_msg.insideexistenceflag()+1);
+
+				std::string t_msg = m_out_mcpu_statu.DebugString();
+				int t_rabbitmq_id = (m_singlechip_direction-1)*2 + m_singlechip_id +1; //,每个单元的4个单片机分别对应1~4
+				//使用的rabbitmq通道要+1, tcp0号口给调度状态了, 1~4分别对应4个单片机
+				System_communication::get_instance_references().encapsulate_status_msg(t_msg, t_rabbitmq_id);
 			}
 		}
 
+		//数据更新完成后, 将更新标志位写false,
+		m_singlechip_data_msg_updata_flag = false;
 	}
-}
 
+
+	//判断超时
+	{
+		std::unique_lock<std::mutex> t_lock3(m_lock);
+		if (std::chrono::system_clock::now() - m_singlechip_data_msg_updata_time > std::chrono::seconds(5))
+		{
+			m_dispatch_singlechip_status = DISPATCH_SINGLECHIP_DISCONNECT;
+		}
+		else
+		{
+			m_dispatch_singlechip_status = DISPATCH_SINGLECHIP_READY;
+		}
+	}
+	return;
+}

+ 44 - 5
plc调度节点/dispatch/dispatch_singlechip.h

@@ -14,9 +14,12 @@
 #include "../tool/time_tool.h"
 #include "../task/task_base.h"
 //#include "../message/dispatch_message.pb.h"
-//#include "../message/singlechip_msg.pb.h"
+#include "../message/singlechip_msg.pb.h"
 #include "../message/message.pb.h"
 #include "../dispatch/dispatch_communication.h"
+#include <google/protobuf/message.h>
+#include <google/protobuf/util/json_util.h>
+#include <google/protobuf/text_format.h>
 
 //调度单片机通信
 class Dispatch_singlechip
@@ -48,14 +51,44 @@ public://API functions
 	Error_manager execute_for_singlechip_data_msg_new(in_mcpu_statu &t_in_mcpu_statu, bool validity);
 	//调度单片机 执行状态消息
 	Error_manager execute_for_singlechip_data_msg_new(out_mcpu_statu &t_out_mcpu_statu, bool validity);
-	//判断出口是否空闲
+
+	//单片机消息, 数据处理, 去头,去尾 //删除头部 @501, 删除尾部 $,
+	Error_manager data_processing(std::string & put_in, std::string & put_out);
+	//调度单片机 执行状态消息, 单片机通过tcp发过来的原始字符串
+	Error_manager execute_for_singlechip_data_msg_new(std::string singlechip_data);
+
+
+	//判断出口是否空闲, 没有车就是空闲, 返回true
 	bool is_outlet_ready();
+	//判断入口是否空闲, 没有车就是空闲, 返回true
+	bool is_inlet_ready();
+
 
 public://get or set member variable
 	Dispatch_singlechip_status get_dispatch_singlechip_status();
+
+	//获取外门状态, 0表示未知, 1表示外门开到位, 2表示外门关到位, 3表示外门运行中 4表示外门故障
+	message::Outside_door_status get_outside_door_status();
+	//获取内部是否有车, 0表示无车, 1表示有车. -1表示未知
+	int get_inside_existence_flag();
+
 protected://member functions
-	//执行外界任务的执行函数
+	//任务执行线程, 负责门控和数据库操作
 	void execute_thread_fun();
+	//入口外门控制函数
+	void inlet_outsidedoor_control();
+	//出口外门控制函数
+	void outlet_outsidedoor_control();
+
+	//发送开门指令
+	Error_manager open_outside_door();
+	//发送关门指令
+	Error_manager close_outside_door();
+
+	//任务执行线程, 负责数据管理, 和通信转化, tcp rabbitmq snap7
+	void updata_thread_fun();
+	//数据同步更新, tcp->rabbitmq, tcp->snap7
+	void updata_singlechip_data();
 protected://member variable
 	std::atomic<Dispatch_singlechip_status>				m_dispatch_singlechip_status;//调度单片机的状态
 
@@ -65,18 +98,24 @@ protected://member variable
 	int 										m_singlechip_direction;		//单片机方向, 1是入口, 2是出口
 	std::mutex									m_lock;	//锁
 
-	//任务执行线程
+	//任务执行线程, 负责门控和数据库操作
 	std::thread*        						mp_execute_thread;   			//执行的线程指针,内存由本类管理
 	Thread_condition							m_execute_condition;			//执行的条件变量
+	//任务执行线程, 负责数据管理, 和通信转化, tcp rabbitmq snap7
+	std::thread*        						mp_updata_thread;   			//数据更新的线程指针,内存由本类管理
+	Thread_condition							m_updata_condition;				//数据更新的条件变量
+
 
 	//数据缓存
-//	message::Singlechip_data 						m_singlechip_data_msg;		//旧版单片机消息
+	message::Singlechip_data 						m_singlechip_data_msg;		//单片机的数据, proto格式, 直连单片机tcp
 	in_mcpu_statu 									m_in_mcpu_statu;		//新版入口单片机消息
 	out_mcpu_statu 									m_out_mcpu_statu;		//新版出口单片机消息
 	bool 											m_validity;					//有效性
+
 	std::chrono::system_clock::time_point			m_singlechip_data_msg_updata_time;	//状态更新时间点
 	std::atomic<bool>								m_singlechip_data_msg_updata_flag;
 
+
 private:
 
 };

+ 4 - 1
plc调度节点/error_code/error_code.h

@@ -607,7 +607,10 @@ enum Error_code
 	RABBITMQ_ANALYSIS_TIME_OUT,									//解析超时,
 	RABBITMQ_EXCUTER_IS_BUSY,										//处理器正忙, 请稍等
 
-
+	//Network module, 通信模块
+	NETWORK_BASE_ERROR_BASE					= 0x32010000,
+	NETWORK_READ_PROTOBUF_ERROR,						//通信模块,读取参数错误
+	NETWORK_CREATE_SOCKET_ERROR,						//通信模块, 创建socket错误
 };
 
 //错误等级,用来做故障处理

+ 11 - 22
plc调度节点/main.cpp

@@ -59,40 +59,27 @@ GOOGLE_GLOG_DLL_DECL void shut_down_logging(const char* data, int size)
 }
 
 
+#include "./network_communication/network_base.h"
+#include "./dispatch/dispatch_network.h"
 
 
 int main(int argc,char* argv[])
 {
-//	std::string t = Time_tool::get_instance_references().get_current_time_seconds();
-//	std::cout << " huli test :::: " << " t = " << t << std::endl;
+//	Error_manager e = Dispatch_network::get_instance_references().network_init(1);
+//	std::cout << " huli test :::: " << " e = " << e << std::endl;
 //
-//	Time_tool::get_instance_references().time_start();
-//	Time_tool::get_instance_references().time_end();
-//	Time_tool::get_instance_references().cout_time_seconds();
+//	while ( 1 )
+//	{
 //
-//	std::chrono::system_clock::time_point a = Time_tool::get_instance_references().transform_time_string_seconds("2022-11-16 11:12:34");
-//	std::chrono::system_clock::time_point b = Time_tool::get_instance_references().transform_time_string_seconds("2022-11-16 11:34:56");
-//    double k = (b-a).count();
-//    std::cout << " huli test :::: " << " k = " << k << std::endl;
-//	double d = (b-a).count()/1000000000;
-//	std::cout << " huli test :::: " << " d = " << d << std::endl;
+//	}
 //
-//    std::cout << " huli test :::: " << " a = " << Time_tool::get_instance_references().get_time_string_seconds(a) << std::endl;
-//    std::cout << " huli test :::: " << " b = " << Time_tool::get_instance_references().get_time_string_seconds(b) << std::endl;
-//
-//
-//    int parking_time = d;
-//    char parking_time_string[256] = "";
-//    int hour = parking_time / 3600;
-//    int min = parking_time / 60;
-//    int sec = parking_time % 60;
-//    sprintf(parking_time_string, " %d:%02d:%02d", hour, min, sec);
-//    std::cout << " huli test :::: " << " parking_time_string = " << parking_time_string << std::endl;
 //
 //	return 0;
 
 
 
+
+
 	Error_manager t_error;
 
 	const char* logPath = "./";
@@ -224,6 +211,8 @@ int main(int argc,char* argv[])
 	t_error = System_communication::get_instance_references().communication_init(t_dispatch_id);
 	std::cout << "++++++++++++++++++huli test System_communication:::: " << " t_error = " << t_error << std::endl;
 
+	t_error = Dispatch_network::get_instance_references().network_init(t_dispatch_id);
+	std::cout << "++++++++++++++++++huli test System_communication:::: " << " t_error = " << t_error << std::endl;
 
 	while ( 1 )
 	{

File diff suppressed because it is too large
+ 377 - 219
plc调度节点/message/message.pb.cc


File diff suppressed because it is too large
+ 220 - 321
plc调度节点/message/message.pb.h


+ 253 - 137
plc调度节点/message/message_base.pb.cc

@@ -7,6 +7,7 @@
 
 #include <google/protobuf/stubs/common.h>
 #include <google/protobuf/stubs/port.h>
+#include <google/protobuf/stubs/once.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/wire_format_lite_inl.h>
 #include <google/protobuf/descriptor.h>
@@ -18,11 +19,6 @@
 #include "third_party/protobuf/version.h"
 #endif
 // @@protoc_insertion_point(includes)
-
-namespace protobuf_message_5fbase_2eproto {
-extern PROTOBUF_INTERNAL_EXPORT_protobuf_message_5fbase_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Base_info;
-extern PROTOBUF_INTERNAL_EXPORT_protobuf_message_5fbase_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Car_info;
-}  // namespace protobuf_message_5fbase_2eproto
 namespace message {
 class Base_infoDefaultTypeInternal {
  public:
@@ -61,9 +57,14 @@ class Id_structDefaultTypeInternal {
 } _Id_struct_default_instance_;
 }  // namespace message
 namespace protobuf_message_5fbase_2eproto {
-static void InitDefaultsBase_info() {
+void InitDefaultsBase_infoImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   {
     void* ptr = &::message::_Base_info_default_instance_;
     new (ptr) ::message::Base_info();
@@ -72,12 +73,20 @@ static void InitDefaultsBase_info() {
   ::message::Base_info::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<0> scc_info_Base_info =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsBase_info}, {}};
+void InitDefaultsBase_info() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBase_infoImpl);
+}
 
-static void InitDefaultsBase_msg() {
+void InitDefaultsBase_msgImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  protobuf_message_5fbase_2eproto::InitDefaultsBase_info();
   {
     void* ptr = &::message::_Base_msg_default_instance_;
     new (ptr) ::message::Base_msg();
@@ -86,13 +95,19 @@ static void InitDefaultsBase_msg() {
   ::message::Base_msg::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<1> scc_info_Base_msg =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsBase_msg}, {
-      &protobuf_message_5fbase_2eproto::scc_info_Base_info.base,}};
+void InitDefaultsBase_msg() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBase_msgImpl);
+}
 
-static void InitDefaultsError_manager() {
+void InitDefaultsError_managerImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   {
     void* ptr = &::message::_Error_manager_default_instance_;
     new (ptr) ::message::Error_manager();
@@ -101,12 +116,19 @@ static void InitDefaultsError_manager() {
   ::message::Error_manager::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<0> scc_info_Error_manager =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsError_manager}, {}};
+void InitDefaultsError_manager() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsError_managerImpl);
+}
 
-static void InitDefaultsLocate_information() {
+void InitDefaultsLocate_informationImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   {
     void* ptr = &::message::_Locate_information_default_instance_;
     new (ptr) ::message::Locate_information();
@@ -115,12 +137,19 @@ static void InitDefaultsLocate_information() {
   ::message::Locate_information::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<0> scc_info_Locate_information =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsLocate_information}, {}};
+void InitDefaultsLocate_information() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLocate_informationImpl);
+}
 
-static void InitDefaultsCar_info() {
+void InitDefaultsCar_infoImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   {
     void* ptr = &::message::_Car_info_default_instance_;
     new (ptr) ::message::Car_info();
@@ -129,12 +158,20 @@ static void InitDefaultsCar_info() {
   ::message::Car_info::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<0> scc_info_Car_info =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCar_info}, {}};
+void InitDefaultsCar_info() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCar_infoImpl);
+}
 
-static void InitDefaultsParkspace_info() {
+void InitDefaultsParkspace_infoImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  protobuf_message_5fbase_2eproto::InitDefaultsCar_info();
   {
     void* ptr = &::message::_Parkspace_info_default_instance_;
     new (ptr) ::message::Parkspace_info();
@@ -143,13 +180,19 @@ static void InitDefaultsParkspace_info() {
   ::message::Parkspace_info::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<1> scc_info_Parkspace_info =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsParkspace_info}, {
-      &protobuf_message_5fbase_2eproto::scc_info_Car_info.base,}};
+void InitDefaultsParkspace_info() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsParkspace_infoImpl);
+}
 
-static void InitDefaultsId_struct() {
+void InitDefaultsId_structImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   {
     void* ptr = &::message::_Id_struct_default_instance_;
     new (ptr) ::message::Id_struct();
@@ -158,17 +201,9 @@ static void InitDefaultsId_struct() {
   ::message::Id_struct::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<0> scc_info_Id_struct =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsId_struct}, {}};
-
-void InitDefaults() {
-  ::google::protobuf::internal::InitSCC(&scc_info_Base_info.base);
-  ::google::protobuf::internal::InitSCC(&scc_info_Base_msg.base);
-  ::google::protobuf::internal::InitSCC(&scc_info_Error_manager.base);
-  ::google::protobuf::internal::InitSCC(&scc_info_Locate_information.base);
-  ::google::protobuf::internal::InitSCC(&scc_info_Car_info.base);
-  ::google::protobuf::internal::InitSCC(&scc_info_Parkspace_info.base);
-  ::google::protobuf::internal::InitSCC(&scc_info_Id_struct.base);
+void InitDefaultsId_struct() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsId_structImpl);
 }
 
 ::google::protobuf::Metadata file_level_metadata[7];
@@ -325,14 +360,15 @@ static ::google::protobuf::Message const * const file_default_instances[] = {
 
 void protobuf_AssignDescriptors() {
   AddDescriptors();
+  ::google::protobuf::MessageFactory* factory = NULL;
   AssignDescriptors(
-      "message_base.proto", schemas, file_default_instances, TableStruct::offsets,
+      "message_base.proto", schemas, file_default_instances, TableStruct::offsets, factory,
       file_level_metadata, file_level_enum_descriptors, NULL);
 }
 
 void protobuf_AssignDescriptorsOnce() {
-  static ::google::protobuf::internal::once_flag once;
-  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
 }
 
 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
@@ -471,8 +507,8 @@ void AddDescriptorsImpl() {
 }
 
 void AddDescriptors() {
-  static ::google::protobuf::internal::once_flag once;
-  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
 }
 // Force AddDescriptors() to be called at dynamic initialization time.
 struct StaticDescriptorInitializer {
@@ -761,15 +797,17 @@ const int Base_info::kReceiverFieldNumber;
 
 Base_info::Base_info()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_message_5fbase_2eproto::scc_info_Base_info.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_message_5fbase_2eproto::InitDefaultsBase_info();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:message.Base_info)
 }
 Base_info::Base_info(const Base_info& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   ::memcpy(&msg_type_, &from.msg_type_,
     static_cast<size_t>(reinterpret_cast<char*>(&receiver_) -
@@ -778,6 +816,7 @@ Base_info::Base_info(const Base_info& from)
 }
 
 void Base_info::SharedCtor() {
+  _cached_size_ = 0;
   ::memset(&msg_type_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&receiver_) -
       reinterpret_cast<char*>(&msg_type_)) + sizeof(receiver_));
@@ -792,7 +831,9 @@ void Base_info::SharedDtor() {
 }
 
 void Base_info::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Base_info::descriptor() {
   ::protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce();
@@ -800,10 +841,17 @@ const ::google::protobuf::Descriptor* Base_info::descriptor() {
 }
 
 const Base_info& Base_info::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_message_5fbase_2eproto::scc_info_Base_info.base);
+  ::protobuf_message_5fbase_2eproto::InitDefaultsBase_info();
   return *internal_default_instance();
 }
 
+Base_info* Base_info::New(::google::protobuf::Arena* arena) const {
+  Base_info* n = new Base_info;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Base_info::Clear() {
 // @@protoc_insertion_point(message_clear_start:message.Base_info)
@@ -827,7 +875,7 @@ bool Base_info::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:message.Base_info)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -1058,7 +1106,9 @@ size_t Base_info::ByteSizeLong() const {
   }
 
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -1133,6 +1183,7 @@ void Base_info::InternalSwap(Base_info* other) {
   swap(receiver_, other->receiver_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Base_info::GetMetadata() const {
@@ -1153,15 +1204,17 @@ const int Base_msg::kBaseInfoFieldNumber;
 
 Base_msg::Base_msg()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_message_5fbase_2eproto::scc_info_Base_msg.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_message_5fbase_2eproto::InitDefaultsBase_msg();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:message.Base_msg)
 }
 Base_msg::Base_msg(const Base_msg& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   if (from.has_base_info()) {
     base_info_ = new ::message::Base_info(*from.base_info_);
@@ -1172,6 +1225,7 @@ Base_msg::Base_msg(const Base_msg& from)
 }
 
 void Base_msg::SharedCtor() {
+  _cached_size_ = 0;
   base_info_ = NULL;
 }
 
@@ -1185,7 +1239,9 @@ void Base_msg::SharedDtor() {
 }
 
 void Base_msg::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Base_msg::descriptor() {
   ::protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce();
@@ -1193,10 +1249,17 @@ const ::google::protobuf::Descriptor* Base_msg::descriptor() {
 }
 
 const Base_msg& Base_msg::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_message_5fbase_2eproto::scc_info_Base_msg.base);
+  ::protobuf_message_5fbase_2eproto::InitDefaultsBase_msg();
   return *internal_default_instance();
 }
 
+Base_msg* Base_msg::New(::google::protobuf::Arena* arena) const {
+  Base_msg* n = new Base_msg;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Base_msg::Clear() {
 // @@protoc_insertion_point(message_clear_start:message.Base_msg)
@@ -1219,7 +1282,7 @@ bool Base_msg::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:message.Base_msg)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -1265,7 +1328,7 @@ void Base_msg::SerializeWithCachedSizes(
   // required .message.Base_info base_info = 1;
   if (cached_has_bits & 0x00000001u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      1, this->_internal_base_info(), output);
+      1, *this->base_info_, output);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -1287,7 +1350,7 @@ void Base_msg::SerializeWithCachedSizes(
   if (cached_has_bits & 0x00000001u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
-        1, this->_internal_base_info(), deterministic, target);
+        1, *this->base_info_, deterministic, target);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -1311,10 +1374,12 @@ size_t Base_msg::ByteSizeLong() const {
   if (has_base_info()) {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *base_info_);
+        *this->base_info_);
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -1376,6 +1441,7 @@ void Base_msg::InternalSwap(Base_msg* other) {
   swap(base_info_, other->base_info_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Base_msg::GetMetadata() const {
@@ -1396,15 +1462,17 @@ const int Error_manager::kErrorDescriptionFieldNumber;
 
 Error_manager::Error_manager()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_message_5fbase_2eproto::scc_info_Error_manager.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_message_5fbase_2eproto::InitDefaultsError_manager();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:message.Error_manager)
 }
 Error_manager::Error_manager(const Error_manager& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   error_description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.has_error_description()) {
@@ -1417,6 +1485,7 @@ Error_manager::Error_manager(const Error_manager& from)
 }
 
 void Error_manager::SharedCtor() {
+  _cached_size_ = 0;
   error_description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&error_code_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&error_level_) -
@@ -1433,7 +1502,9 @@ void Error_manager::SharedDtor() {
 }
 
 void Error_manager::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Error_manager::descriptor() {
   ::protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce();
@@ -1441,10 +1512,17 @@ const ::google::protobuf::Descriptor* Error_manager::descriptor() {
 }
 
 const Error_manager& Error_manager::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_message_5fbase_2eproto::scc_info_Error_manager.base);
+  ::protobuf_message_5fbase_2eproto::InitDefaultsError_manager();
   return *internal_default_instance();
 }
 
+Error_manager* Error_manager::New(::google::protobuf::Arena* arena) const {
+  Error_manager* n = new Error_manager;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Error_manager::Clear() {
 // @@protoc_insertion_point(message_clear_start:message.Error_manager)
@@ -1454,7 +1532,8 @@ void Error_manager::Clear() {
 
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 0x00000001u) {
-    error_description_.ClearNonDefaultToEmptyNoArena();
+    GOOGLE_DCHECK(!error_description_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+    (*error_description_.UnsafeRawStringPointer())->clear();
   }
   if (cached_has_bits & 6u) {
     ::memset(&error_code_, 0, static_cast<size_t>(
@@ -1471,7 +1550,7 @@ bool Error_manager::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:message.Error_manager)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -1647,7 +1726,9 @@ size_t Error_manager::ByteSizeLong() const {
   }
 
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -1714,12 +1795,12 @@ void Error_manager::Swap(Error_manager* other) {
 }
 void Error_manager::InternalSwap(Error_manager* other) {
   using std::swap;
-  error_description_.Swap(&other->error_description_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
+  error_description_.Swap(&other->error_description_);
   swap(error_code_, other->error_code_);
   swap(error_level_, other->error_level_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Error_manager::GetMetadata() const {
@@ -1749,15 +1830,17 @@ const int Locate_information::kUniformedCarYFieldNumber;
 
 Locate_information::Locate_information()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_message_5fbase_2eproto::scc_info_Locate_information.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_message_5fbase_2eproto::InitDefaultsLocate_information();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:message.Locate_information)
 }
 Locate_information::Locate_information(const Locate_information& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   ::memcpy(&locate_x_, &from.locate_x_,
     static_cast<size_t>(reinterpret_cast<char*>(&uniformed_car_y_) -
@@ -1766,6 +1849,7 @@ Locate_information::Locate_information(const Locate_information& from)
 }
 
 void Locate_information::SharedCtor() {
+  _cached_size_ = 0;
   ::memset(&locate_x_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&uniformed_car_y_) -
       reinterpret_cast<char*>(&locate_x_)) + sizeof(uniformed_car_y_));
@@ -1780,7 +1864,9 @@ void Locate_information::SharedDtor() {
 }
 
 void Locate_information::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Locate_information::descriptor() {
   ::protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce();
@@ -1788,10 +1874,17 @@ const ::google::protobuf::Descriptor* Locate_information::descriptor() {
 }
 
 const Locate_information& Locate_information::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_message_5fbase_2eproto::scc_info_Locate_information.base);
+  ::protobuf_message_5fbase_2eproto::InitDefaultsLocate_information();
   return *internal_default_instance();
 }
 
+Locate_information* Locate_information::New(::google::protobuf::Arena* arena) const {
+  Locate_information* n = new Locate_information;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Locate_information::Clear() {
 // @@protoc_insertion_point(message_clear_start:message.Locate_information)
@@ -1820,7 +1913,7 @@ bool Locate_information::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:message.Locate_information)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -2236,7 +2329,9 @@ size_t Locate_information::ByteSizeLong() const {
 
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -2345,6 +2440,7 @@ void Locate_information::InternalSwap(Locate_information* other) {
   swap(uniformed_car_y_, other->uniformed_car_y_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Locate_information::GetMetadata() const {
@@ -2369,15 +2465,17 @@ const int Car_info::kCarWheelWidthFieldNumber;
 
 Car_info::Car_info()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_message_5fbase_2eproto::scc_info_Car_info.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_message_5fbase_2eproto::InitDefaultsCar_info();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:message.Car_info)
 }
 Car_info::Car_info(const Car_info& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   license_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.has_license()) {
@@ -2394,6 +2492,7 @@ Car_info::Car_info(const Car_info& from)
 }
 
 void Car_info::SharedCtor() {
+  _cached_size_ = 0;
   license_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   car_numberplate_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&car_length_, 0, static_cast<size_t>(
@@ -2412,7 +2511,9 @@ void Car_info::SharedDtor() {
 }
 
 void Car_info::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Car_info::descriptor() {
   ::protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce();
@@ -2420,10 +2521,17 @@ const ::google::protobuf::Descriptor* Car_info::descriptor() {
 }
 
 const Car_info& Car_info::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_message_5fbase_2eproto::scc_info_Car_info.base);
+  ::protobuf_message_5fbase_2eproto::InitDefaultsCar_info();
   return *internal_default_instance();
 }
 
+Car_info* Car_info::New(::google::protobuf::Arena* arena) const {
+  Car_info* n = new Car_info;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Car_info::Clear() {
 // @@protoc_insertion_point(message_clear_start:message.Car_info)
@@ -2434,10 +2542,12 @@ void Car_info::Clear() {
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 3u) {
     if (cached_has_bits & 0x00000001u) {
-      license_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!license_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*license_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000002u) {
-      car_numberplate_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!car_numberplate_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*car_numberplate_.UnsafeRawStringPointer())->clear();
     }
   }
   if (cached_has_bits & 124u) {
@@ -2455,7 +2565,7 @@ bool Car_info::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:message.Car_info)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -2754,7 +2864,9 @@ size_t Car_info::ByteSizeLong() const {
 
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -2833,10 +2945,8 @@ void Car_info::Swap(Car_info* other) {
 }
 void Car_info::InternalSwap(Car_info* other) {
   using std::swap;
-  license_.Swap(&other->license_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
-  car_numberplate_.Swap(&other->car_numberplate_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
+  license_.Swap(&other->license_);
+  car_numberplate_.Swap(&other->car_numberplate_);
   swap(car_length_, other->car_length_);
   swap(car_width_, other->car_width_);
   swap(car_height_, other->car_height_);
@@ -2844,6 +2954,7 @@ void Car_info::InternalSwap(Car_info* other) {
   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_);
 }
 
 ::google::protobuf::Metadata Car_info::GetMetadata() const {
@@ -2880,15 +2991,17 @@ const int Parkspace_info::kCarTypeFieldNumber;
 
 Parkspace_info::Parkspace_info()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_message_5fbase_2eproto::scc_info_Parkspace_info.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_message_5fbase_2eproto::InitDefaultsParkspace_info();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:message.Parkspace_info)
 }
 Parkspace_info::Parkspace_info(const Parkspace_info& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   entry_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.has_entry_time()) {
@@ -2910,6 +3023,7 @@ Parkspace_info::Parkspace_info(const Parkspace_info& from)
 }
 
 void Parkspace_info::SharedCtor() {
+  _cached_size_ = 0;
   entry_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   leave_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&car_info_, 0, static_cast<size_t>(
@@ -2929,7 +3043,9 @@ void Parkspace_info::SharedDtor() {
 }
 
 void Parkspace_info::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Parkspace_info::descriptor() {
   ::protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce();
@@ -2937,10 +3053,17 @@ const ::google::protobuf::Descriptor* Parkspace_info::descriptor() {
 }
 
 const Parkspace_info& Parkspace_info::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_message_5fbase_2eproto::scc_info_Parkspace_info.base);
+  ::protobuf_message_5fbase_2eproto::InitDefaultsParkspace_info();
   return *internal_default_instance();
 }
 
+Parkspace_info* Parkspace_info::New(::google::protobuf::Arena* arena) const {
+  Parkspace_info* n = new Parkspace_info;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Parkspace_info::Clear() {
 // @@protoc_insertion_point(message_clear_start:message.Parkspace_info)
@@ -2951,10 +3074,12 @@ void Parkspace_info::Clear() {
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 7u) {
     if (cached_has_bits & 0x00000001u) {
-      entry_time_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!entry_time_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*entry_time_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000002u) {
-      leave_time_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!leave_time_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*leave_time_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000004u) {
       GOOGLE_DCHECK(car_info_ != NULL);
@@ -2982,7 +3107,7 @@ bool Parkspace_info::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:message.Parkspace_info)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -3345,7 +3470,7 @@ void Parkspace_info::SerializeWithCachedSizes(
   // optional .message.Car_info car_info = 11;
   if (cached_has_bits & 0x00000004u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      11, this->_internal_car_info(), output);
+      11, *this->car_info_, output);
   }
 
   // optional string entry_time = 12;
@@ -3463,7 +3588,7 @@ void Parkspace_info::SerializeWithCachedSizes(
   if (cached_has_bits & 0x00000004u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
-        11, this->_internal_car_info(), deterministic, target);
+        11, *this->car_info_, deterministic, target);
   }
 
   // optional string entry_time = 12;
@@ -3547,7 +3672,7 @@ size_t Parkspace_info::ByteSizeLong() const {
     if (has_car_info()) {
       total_size += 1 +
         ::google::protobuf::internal::WireFormatLite::MessageSize(
-          *car_info_);
+          *this->car_info_);
     }
 
     // optional int32 parkingspace_index_id = 1;
@@ -3640,7 +3765,9 @@ size_t Parkspace_info::ByteSizeLong() const {
   }
 
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -3752,10 +3879,8 @@ void Parkspace_info::Swap(Parkspace_info* other) {
 }
 void Parkspace_info::InternalSwap(Parkspace_info* other) {
   using std::swap;
-  entry_time_.Swap(&other->entry_time_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
-  leave_time_.Swap(&other->leave_time_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
+  entry_time_.Swap(&other->entry_time_);
+  leave_time_.Swap(&other->leave_time_);
   swap(car_info_, other->car_info_);
   swap(parkingspace_index_id_, other->parkingspace_index_id_);
   swap(parkingspace_type_, other->parkingspace_type_);
@@ -3773,6 +3898,7 @@ void Parkspace_info::InternalSwap(Parkspace_info* other) {
   swap(car_type_, other->car_type_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Parkspace_info::GetMetadata() const {
@@ -3792,15 +3918,17 @@ const int Id_struct::kUnitIdFieldNumber;
 
 Id_struct::Id_struct()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_message_5fbase_2eproto::scc_info_Id_struct.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_message_5fbase_2eproto::InitDefaultsId_struct();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:message.Id_struct)
 }
 Id_struct::Id_struct(const Id_struct& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   ::memcpy(&terminal_id_, &from.terminal_id_,
     static_cast<size_t>(reinterpret_cast<char*>(&unit_id_) -
@@ -3809,6 +3937,7 @@ Id_struct::Id_struct(const Id_struct& from)
 }
 
 void Id_struct::SharedCtor() {
+  _cached_size_ = 0;
   ::memset(&terminal_id_, 0, static_cast<size_t>(
       reinterpret_cast<char*>(&unit_id_) -
       reinterpret_cast<char*>(&terminal_id_)) + sizeof(unit_id_));
@@ -3823,7 +3952,9 @@ void Id_struct::SharedDtor() {
 }
 
 void Id_struct::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Id_struct::descriptor() {
   ::protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce();
@@ -3831,10 +3962,17 @@ const ::google::protobuf::Descriptor* Id_struct::descriptor() {
 }
 
 const Id_struct& Id_struct::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_message_5fbase_2eproto::scc_info_Id_struct.base);
+  ::protobuf_message_5fbase_2eproto::InitDefaultsId_struct();
   return *internal_default_instance();
 }
 
+Id_struct* Id_struct::New(::google::protobuf::Arena* arena) const {
+  Id_struct* n = new Id_struct;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Id_struct::Clear() {
 // @@protoc_insertion_point(message_clear_start:message.Id_struct)
@@ -3858,7 +3996,7 @@ bool Id_struct::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:message.Id_struct)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -3986,7 +4124,9 @@ size_t Id_struct::ByteSizeLong() const {
 
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -4052,6 +4192,7 @@ void Id_struct::InternalSwap(Id_struct* other) {
   swap(unit_id_, other->unit_id_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Id_struct::GetMetadata() const {
@@ -4062,30 +4203,5 @@ void Id_struct::InternalSwap(Id_struct* other) {
 
 // @@protoc_insertion_point(namespace_scope)
 }  // namespace message
-namespace google {
-namespace protobuf {
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::message::Base_info* Arena::CreateMaybeMessage< ::message::Base_info >(Arena* arena) {
-  return Arena::CreateInternal< ::message::Base_info >(arena);
-}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::message::Base_msg* Arena::CreateMaybeMessage< ::message::Base_msg >(Arena* arena) {
-  return Arena::CreateInternal< ::message::Base_msg >(arena);
-}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::message::Error_manager* Arena::CreateMaybeMessage< ::message::Error_manager >(Arena* arena) {
-  return Arena::CreateInternal< ::message::Error_manager >(arena);
-}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::message::Locate_information* Arena::CreateMaybeMessage< ::message::Locate_information >(Arena* arena) {
-  return Arena::CreateInternal< ::message::Locate_information >(arena);
-}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::message::Car_info* Arena::CreateMaybeMessage< ::message::Car_info >(Arena* arena) {
-  return Arena::CreateInternal< ::message::Car_info >(arena);
-}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::message::Parkspace_info* Arena::CreateMaybeMessage< ::message::Parkspace_info >(Arena* arena) {
-  return Arena::CreateInternal< ::message::Parkspace_info >(arena);
-}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::message::Id_struct* Arena::CreateMaybeMessage< ::message::Id_struct >(Arena* arena) {
-  return Arena::CreateInternal< ::message::Id_struct >(arena);
-}
-}  // namespace protobuf
-}  // namespace google
 
 // @@protoc_insertion_point(global_scope)

+ 159 - 206
plc调度节点/message/message_base.pb.h

@@ -1,19 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: message_base.proto
 
-#ifndef PROTOBUF_INCLUDED_message_5fbase_2eproto
-#define PROTOBUF_INCLUDED_message_5fbase_2eproto
+#ifndef PROTOBUF_message_5fbase_2eproto__INCLUDED
+#define PROTOBUF_message_5fbase_2eproto__INCLUDED
 
 #include <string>
 
 #include <google/protobuf/stubs/common.h>
 
-#if GOOGLE_PROTOBUF_VERSION < 3006001
+#if GOOGLE_PROTOBUF_VERSION < 3005000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please update
 #error your headers.
 #endif
-#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please
 #error regenerate this file with a newer version of protoc.
@@ -24,7 +24,6 @@
 #include <google/protobuf/arenastring.h>
 #include <google/protobuf/generated_message_table_driven.h>
 #include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/inlined_string_field.h>
 #include <google/protobuf/metadata.h>
 #include <google/protobuf/message.h>
 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
@@ -32,7 +31,6 @@
 #include <google/protobuf/generated_enum_reflection.h>
 #include <google/protobuf/unknown_field_set.h>
 // @@protoc_insertion_point(includes)
-#define PROTOBUF_INTERNAL_EXPORT_protobuf_message_5fbase_2eproto 
 
 namespace protobuf_message_5fbase_2eproto {
 // Internal implementation detail -- do not use these members.
@@ -45,6 +43,29 @@ struct TableStruct {
   static const ::google::protobuf::uint32 offsets[];
 };
 void AddDescriptors();
+void InitDefaultsBase_infoImpl();
+void InitDefaultsBase_info();
+void InitDefaultsBase_msgImpl();
+void InitDefaultsBase_msg();
+void InitDefaultsError_managerImpl();
+void InitDefaultsError_manager();
+void InitDefaultsLocate_informationImpl();
+void InitDefaultsLocate_information();
+void InitDefaultsCar_infoImpl();
+void InitDefaultsCar_info();
+void InitDefaultsParkspace_infoImpl();
+void InitDefaultsParkspace_info();
+void InitDefaultsId_structImpl();
+void InitDefaultsId_struct();
+inline void InitDefaults() {
+  InitDefaultsBase_info();
+  InitDefaultsBase_msg();
+  InitDefaultsError_manager();
+  InitDefaultsLocate_information();
+  InitDefaultsCar_info();
+  InitDefaultsParkspace_info();
+  InitDefaultsId_struct();
+}
 }  // namespace protobuf_message_5fbase_2eproto
 namespace message {
 class Base_info;
@@ -69,17 +90,6 @@ class Parkspace_info;
 class Parkspace_infoDefaultTypeInternal;
 extern Parkspace_infoDefaultTypeInternal _Parkspace_info_default_instance_;
 }  // namespace message
-namespace google {
-namespace protobuf {
-template<> ::message::Base_info* Arena::CreateMaybeMessage<::message::Base_info>(Arena*);
-template<> ::message::Base_msg* Arena::CreateMaybeMessage<::message::Base_msg>(Arena*);
-template<> ::message::Car_info* Arena::CreateMaybeMessage<::message::Car_info>(Arena*);
-template<> ::message::Error_manager* Arena::CreateMaybeMessage<::message::Error_manager>(Arena*);
-template<> ::message::Id_struct* Arena::CreateMaybeMessage<::message::Id_struct>(Arena*);
-template<> ::message::Locate_information* Arena::CreateMaybeMessage<::message::Locate_information>(Arena*);
-template<> ::message::Parkspace_info* Arena::CreateMaybeMessage<::message::Parkspace_info>(Arena*);
-}  // namespace protobuf
-}  // namespace google
 namespace message {
 
 enum Message_type {
@@ -450,7 +460,7 @@ class Base_info : public ::google::protobuf::Message /* @@protoc_insertion_point
     return reinterpret_cast<const Base_info*>(
                &_Base_info_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     0;
 
   void Swap(Base_info* other);
@@ -460,33 +470,28 @@ class Base_info : public ::google::protobuf::Message /* @@protoc_insertion_point
 
   // implements Message ----------------------------------------------
 
-  inline Base_info* New() const final {
-    return CreateMaybeMessage<Base_info>(NULL);
-  }
+  inline Base_info* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Base_info* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Base_info>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Base_info* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Base_info& from);
   void MergeFrom(const Base_info& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Base_info* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -497,7 +502,7 @@ class Base_info : public ::google::protobuf::Message /* @@protoc_insertion_point
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -547,12 +552,13 @@ class Base_info : public ::google::protobuf::Message /* @@protoc_insertion_point
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   int msg_type_;
   ::google::protobuf::int32 timeout_ms_;
   int sender_;
   int receiver_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
+  friend void ::protobuf_message_5fbase_2eproto::InitDefaultsBase_infoImpl();
 };
 // -------------------------------------------------------------------
 
@@ -597,7 +603,7 @@ class Base_msg : public ::google::protobuf::Message /* @@protoc_insertion_point(
     return reinterpret_cast<const Base_msg*>(
                &_Base_msg_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     1;
 
   void Swap(Base_msg* other);
@@ -607,33 +613,28 @@ class Base_msg : public ::google::protobuf::Message /* @@protoc_insertion_point(
 
   // implements Message ----------------------------------------------
 
-  inline Base_msg* New() const final {
-    return CreateMaybeMessage<Base_msg>(NULL);
-  }
+  inline Base_msg* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Base_msg* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Base_msg>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Base_msg* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Base_msg& from);
   void MergeFrom(const Base_msg& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Base_msg* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -644,7 +645,7 @@ class Base_msg : public ::google::protobuf::Message /* @@protoc_insertion_point(
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -654,9 +655,6 @@ class Base_msg : public ::google::protobuf::Message /* @@protoc_insertion_point(
   bool has_base_info() const;
   void clear_base_info();
   static const int kBaseInfoFieldNumber = 1;
-  private:
-  const ::message::Base_info& _internal_base_info() const;
-  public:
   const ::message::Base_info& base_info() const;
   ::message::Base_info* release_base_info();
   ::message::Base_info* mutable_base_info();
@@ -669,9 +667,10 @@ class Base_msg : public ::google::protobuf::Message /* @@protoc_insertion_point(
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::message::Base_info* base_info_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
+  friend void ::protobuf_message_5fbase_2eproto::InitDefaultsBase_msgImpl();
 };
 // -------------------------------------------------------------------
 
@@ -716,7 +715,7 @@ class Error_manager : public ::google::protobuf::Message /* @@protoc_insertion_p
     return reinterpret_cast<const Error_manager*>(
                &_Error_manager_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     2;
 
   void Swap(Error_manager* other);
@@ -726,33 +725,28 @@ class Error_manager : public ::google::protobuf::Message /* @@protoc_insertion_p
 
   // implements Message ----------------------------------------------
 
-  inline Error_manager* New() const final {
-    return CreateMaybeMessage<Error_manager>(NULL);
-  }
+  inline Error_manager* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Error_manager* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Error_manager>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Error_manager* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Error_manager& from);
   void MergeFrom(const Error_manager& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Error_manager* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -763,7 +757,7 @@ class Error_manager : public ::google::protobuf::Message /* @@protoc_insertion_p
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -809,11 +803,12 @@ class Error_manager : public ::google::protobuf::Message /* @@protoc_insertion_p
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::google::protobuf::internal::ArenaStringPtr error_description_;
   ::google::protobuf::int32 error_code_;
   int error_level_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
+  friend void ::protobuf_message_5fbase_2eproto::InitDefaultsError_managerImpl();
 };
 // -------------------------------------------------------------------
 
@@ -858,7 +853,7 @@ class Locate_information : public ::google::protobuf::Message /* @@protoc_insert
     return reinterpret_cast<const Locate_information*>(
                &_Locate_information_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     3;
 
   void Swap(Locate_information* other);
@@ -868,33 +863,28 @@ class Locate_information : public ::google::protobuf::Message /* @@protoc_insert
 
   // implements Message ----------------------------------------------
 
-  inline Locate_information* New() const final {
-    return CreateMaybeMessage<Locate_information>(NULL);
-  }
+  inline Locate_information* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Locate_information* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Locate_information>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Locate_information* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Locate_information& from);
   void MergeFrom(const Locate_information& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Locate_information* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -905,7 +895,7 @@ class Locate_information : public ::google::protobuf::Message /* @@protoc_insert
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -1024,7 +1014,7 @@ class Locate_information : public ::google::protobuf::Message /* @@protoc_insert
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   float locate_x_;
   float locate_y_;
   float locate_angle_;
@@ -1038,6 +1028,7 @@ class Locate_information : public ::google::protobuf::Message /* @@protoc_insert
   float uniformed_car_x_;
   float uniformed_car_y_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
+  friend void ::protobuf_message_5fbase_2eproto::InitDefaultsLocate_informationImpl();
 };
 // -------------------------------------------------------------------
 
@@ -1082,7 +1073,7 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
     return reinterpret_cast<const Car_info*>(
                &_Car_info_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     4;
 
   void Swap(Car_info* other);
@@ -1092,33 +1083,28 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
 
   // implements Message ----------------------------------------------
 
-  inline Car_info* New() const final {
-    return CreateMaybeMessage<Car_info>(NULL);
-  }
+  inline Car_info* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Car_info* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Car_info>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Car_info* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Car_info& from);
   void MergeFrom(const Car_info& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Car_info* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -1129,7 +1115,7 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -1219,7 +1205,7 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::google::protobuf::internal::ArenaStringPtr license_;
   ::google::protobuf::internal::ArenaStringPtr car_numberplate_;
   float car_length_;
@@ -1228,6 +1214,7 @@ class Car_info : public ::google::protobuf::Message /* @@protoc_insertion_point(
   float car_wheel_base_;
   float car_wheel_width_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
+  friend void ::protobuf_message_5fbase_2eproto::InitDefaultsCar_infoImpl();
 };
 // -------------------------------------------------------------------
 
@@ -1272,7 +1259,7 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
     return reinterpret_cast<const Parkspace_info*>(
                &_Parkspace_info_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     5;
 
   void Swap(Parkspace_info* other);
@@ -1282,33 +1269,28 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
 
   // implements Message ----------------------------------------------
 
-  inline Parkspace_info* New() const final {
-    return CreateMaybeMessage<Parkspace_info>(NULL);
-  }
+  inline Parkspace_info* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Parkspace_info* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Parkspace_info>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Parkspace_info* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Parkspace_info& from);
   void MergeFrom(const Parkspace_info& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Parkspace_info* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -1319,7 +1301,7 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -1359,9 +1341,6 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
   bool has_car_info() const;
   void clear_car_info();
   static const int kCarInfoFieldNumber = 11;
-  private:
-  const ::message::Car_info& _internal_car_info() const;
-  public:
   const ::message::Car_info& car_info() const;
   ::message::Car_info* release_car_info();
   ::message::Car_info* mutable_car_info();
@@ -1504,7 +1483,7 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::google::protobuf::internal::ArenaStringPtr entry_time_;
   ::google::protobuf::internal::ArenaStringPtr leave_time_;
   ::message::Car_info* car_info_;
@@ -1523,6 +1502,7 @@ class Parkspace_info : public ::google::protobuf::Message /* @@protoc_insertion_
   int parkspace_status_target_;
   int car_type_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
+  friend void ::protobuf_message_5fbase_2eproto::InitDefaultsParkspace_infoImpl();
 };
 // -------------------------------------------------------------------
 
@@ -1567,7 +1547,7 @@ class Id_struct : public ::google::protobuf::Message /* @@protoc_insertion_point
     return reinterpret_cast<const Id_struct*>(
                &_Id_struct_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     6;
 
   void Swap(Id_struct* other);
@@ -1577,33 +1557,28 @@ class Id_struct : public ::google::protobuf::Message /* @@protoc_insertion_point
 
   // implements Message ----------------------------------------------
 
-  inline Id_struct* New() const final {
-    return CreateMaybeMessage<Id_struct>(NULL);
-  }
+  inline Id_struct* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Id_struct* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Id_struct>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Id_struct* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Id_struct& from);
   void MergeFrom(const Id_struct& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Id_struct* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -1614,7 +1589,7 @@ class Id_struct : public ::google::protobuf::Message /* @@protoc_insertion_point
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -1643,10 +1618,11 @@ class Id_struct : public ::google::protobuf::Message /* @@protoc_insertion_point
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::google::protobuf::int32 terminal_id_;
   ::google::protobuf::int32 unit_id_;
   friend struct ::protobuf_message_5fbase_2eproto::TableStruct;
+  friend void ::protobuf_message_5fbase_2eproto::InitDefaultsId_structImpl();
 };
 // ===================================================================
 
@@ -1776,9 +1752,6 @@ inline void Base_msg::clear_base_info() {
   if (base_info_ != NULL) base_info_->Clear();
   clear_has_base_info();
 }
-inline const ::message::Base_info& Base_msg::_internal_base_info() const {
-  return *base_info_;
-}
 inline const ::message::Base_info& Base_msg::base_info() const {
   const ::message::Base_info* p = base_info_;
   // @@protoc_insertion_point(field_get:message.Base_msg.base_info)
@@ -1795,8 +1768,7 @@ inline ::message::Base_info* Base_msg::release_base_info() {
 inline ::message::Base_info* Base_msg::mutable_base_info() {
   set_has_base_info();
   if (base_info_ == NULL) {
-    auto* p = CreateMaybeMessage<::message::Base_info>(GetArenaNoVirtual());
-    base_info_ = p;
+    base_info_ = new ::message::Base_info;
   }
   // @@protoc_insertion_point(field_mutable:message.Base_msg.base_info)
   return base_info_;
@@ -1923,11 +1895,8 @@ inline ::std::string* Error_manager::mutable_error_description() {
 }
 inline ::std::string* Error_manager::release_error_description() {
   // @@protoc_insertion_point(field_release:message.Error_manager.error_description)
-  if (!has_error_description()) {
-    return NULL;
-  }
   clear_has_error_description();
-  return error_description_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return error_description_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Error_manager::set_allocated_error_description(::std::string* error_description) {
   if (error_description != NULL) {
@@ -2357,11 +2326,8 @@ inline ::std::string* Car_info::mutable_license() {
 }
 inline ::std::string* Car_info::release_license() {
   // @@protoc_insertion_point(field_release:message.Car_info.license)
-  if (!has_license()) {
-    return NULL;
-  }
   clear_has_license();
-  return license_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return license_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Car_info::set_allocated_license(::std::string* license) {
   if (license != NULL) {
@@ -2423,11 +2389,8 @@ inline ::std::string* Car_info::mutable_car_numberplate() {
 }
 inline ::std::string* Car_info::release_car_numberplate() {
   // @@protoc_insertion_point(field_release:message.Car_info.car_numberPlate)
-  if (!has_car_numberplate()) {
-    return NULL;
-  }
   clear_has_car_numberplate();
-  return car_numberplate_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return car_numberplate_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Car_info::set_allocated_car_numberplate(::std::string* car_numberplate) {
   if (car_numberplate != NULL) {
@@ -2748,9 +2711,6 @@ inline void Parkspace_info::clear_car_info() {
   if (car_info_ != NULL) car_info_->Clear();
   clear_has_car_info();
 }
-inline const ::message::Car_info& Parkspace_info::_internal_car_info() const {
-  return *car_info_;
-}
 inline const ::message::Car_info& Parkspace_info::car_info() const {
   const ::message::Car_info* p = car_info_;
   // @@protoc_insertion_point(field_get:message.Parkspace_info.car_info)
@@ -2767,8 +2727,7 @@ inline ::message::Car_info* Parkspace_info::release_car_info() {
 inline ::message::Car_info* Parkspace_info::mutable_car_info() {
   set_has_car_info();
   if (car_info_ == NULL) {
-    auto* p = CreateMaybeMessage<::message::Car_info>(GetArenaNoVirtual());
-    car_info_ = p;
+    car_info_ = new ::message::Car_info;
   }
   // @@protoc_insertion_point(field_mutable:message.Parkspace_info.car_info)
   return car_info_;
@@ -2842,11 +2801,8 @@ inline ::std::string* Parkspace_info::mutable_entry_time() {
 }
 inline ::std::string* Parkspace_info::release_entry_time() {
   // @@protoc_insertion_point(field_release:message.Parkspace_info.entry_time)
-  if (!has_entry_time()) {
-    return NULL;
-  }
   clear_has_entry_time();
-  return entry_time_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return entry_time_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Parkspace_info::set_allocated_entry_time(::std::string* entry_time) {
   if (entry_time != NULL) {
@@ -2908,11 +2864,8 @@ inline ::std::string* Parkspace_info::mutable_leave_time() {
 }
 inline ::std::string* Parkspace_info::release_leave_time() {
   // @@protoc_insertion_point(field_release:message.Parkspace_info.leave_time)
-  if (!has_leave_time()) {
-    return NULL;
-  }
   clear_has_leave_time();
-  return leave_time_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return leave_time_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Parkspace_info::set_allocated_leave_time(::std::string* leave_time) {
   if (leave_time != NULL) {
@@ -3098,62 +3051,62 @@ inline void Id_struct::set_unit_id(::google::protobuf::int32 value) {
 namespace google {
 namespace protobuf {
 
-template <> struct is_proto_enum< ::message::Message_type> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Message_type> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Message_type>() {
   return ::message::Message_type_descriptor();
 }
-template <> struct is_proto_enum< ::message::Communicator> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Communicator> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Communicator>() {
   return ::message::Communicator_descriptor();
 }
-template <> struct is_proto_enum< ::message::Process_type> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Process_type> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Process_type>() {
   return ::message::Process_type_descriptor();
 }
-template <> struct is_proto_enum< ::message::Error_level> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Error_level> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Error_level>() {
   return ::message::Error_level_descriptor();
 }
-template <> struct is_proto_enum< ::message::Parkspace_status> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Parkspace_status> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Parkspace_status>() {
   return ::message::Parkspace_status_descriptor();
 }
-template <> struct is_proto_enum< ::message::Direction> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Direction> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Direction>() {
   return ::message::Direction_descriptor();
 }
-template <> struct is_proto_enum< ::message::Parkspace_path> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Parkspace_path> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Parkspace_path>() {
   return ::message::Parkspace_path_descriptor();
 }
-template <> struct is_proto_enum< ::message::Parkspace_type> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Parkspace_type> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Parkspace_type>() {
   return ::message::Parkspace_type_descriptor();
 }
-template <> struct is_proto_enum< ::message::Car_type> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Car_type> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Car_type>() {
   return ::message::Car_type_descriptor();
 }
-template <> struct is_proto_enum< ::message::Step_type> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Step_type> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Step_type>() {
   return ::message::Step_type_descriptor();
 }
-template <> struct is_proto_enum< ::message::Step_statu> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Step_statu> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Step_statu>() {
   return ::message::Step_statu_descriptor();
 }
-template <> struct is_proto_enum< ::message::Dispatch_device_type> : ::std::true_type {};
+template <> struct is_proto_enum< ::message::Dispatch_device_type> : ::google::protobuf::internal::true_type {};
 template <>
 inline const EnumDescriptor* GetEnumDescriptor< ::message::Dispatch_device_type>() {
   return ::message::Dispatch_device_type_descriptor();
@@ -3164,4 +3117,4 @@ inline const EnumDescriptor* GetEnumDescriptor< ::message::Dispatch_device_type>
 
 // @@protoc_insertion_point(global_scope)
 
-#endif  // PROTOBUF_INCLUDED_message_5fbase_2eproto
+#endif  // PROTOBUF_message_5fbase_2eproto__INCLUDED

File diff suppressed because it is too large
+ 3565 - 0
plc调度节点/message/singlechip_msg.pb.cc


File diff suppressed because it is too large
+ 2623 - 0
plc调度节点/message/singlechip_msg.pb.h


+ 211 - 0
plc调度节点/message/singlechip_msg.proto

@@ -0,0 +1,211 @@
+syntax = "proto2";
+package message;
+import "message_base.proto";
+//连接口
+message InputDi
+{
+	optional int32	Di0 = 1;  //停车超前光电(0正常,1超界故障)
+	optional int32	Di1 = 2;  //停车超后光电(0正常,1超界故障)
+	optional int32	Di2 = 3;  //停车超左光电(0正常,1超界故障)
+	optional int32	Di3 = 4;  //停车超1550光电(0正常,1超界故障)
+	optional int32	Di4 = 5;  //2050高度(0默认,1被触发)
+	optional int32	Di5 = 6;  //1750高度(0默认,1被触发)
+	optional int32	Di6 = 7;  //2050高度(0默认,1被触发)
+	optional int32	Di7 = 8;  //预留
+	optional int32	Di8 = 9;  //停车库门开到位(1表示开到位)	
+	optional int32	Di9 = 10; //停车库门关到位(1表示关到位)
+	optional int32	Di10 = 11;//预留的门故障位(1表示门故障)
+	optional int32	Di11 = 12;//调度完成标志位,是否允许终端放下一辆车进入入口(0调度正忙,1调度允许下一辆车)
+	optional int32	Di12 = 13;//库内光电,判断门内是否有车(0无车,1有车)
+	optional int32	Di13 = 14;//库外地磁 ,判断门外(0无车,1有车)
+	optional int32	Di14 = 15;//重启
+	optional int32	Di15 = 16;//急停
+}
+//连接口
+message OutputDo
+{
+	optional int32	Do0 = 1;	//外门 开门(1)
+	optional int32	Do1 = 2;    //外门 关门(1)
+	optional int32	Do2 = 3;    //备用
+	optional int32	Do3 = 4;	//备用
+	optional int32	Do4 = 5;	//备用
+	optional int32	Do5 = 6;	//备用
+	optional int32	Do6 = 7;	//备用
+	optional int32	Do7 = 8;	//备用
+
+}
+//流程控制
+enum Process_control
+{
+	PROCESS_CONTROL_UNKNOWN			= 0;//未知
+	PROCESS_CONTROL_FULL_AUTO		= 1;//全自动,
+	PROCESS_CONTROL_MANUAL			= 2;//手动
+	PROCESS_CONTROL_AUTO_CLOSE		= 3;//半自动关门
+	PROCESS_CONTROL_AUTO_OPEN		= 4;//半自动开门
+	PROCESS_CONTROL_TO_READY		= 5;//切换到待机
+
+
+	PROCESS_CONTROL_RESET			= 7;//重启
+	PROCESS_CONTROL_STOP			= 8;//急停
+	PROCESS_CONTROL_FAULT			= 9;//故障
+
+	
+	PROCESS_CONTROL_INLET_0		= 10 ;//未知
+	PROCESS_CONTROL_INLET_1		= 11 ;//未知
+	PROCESS_CONTROL_INLET_2		= 12 ;//未知
+	PROCESS_CONTROL_INLET_3		= 13 ;//未知
+	PROCESS_CONTROL_INLET_4		= 14 ;//未知
+	PROCESS_CONTROL_INLET_5		= 15 ;//未知
+	PROCESS_CONTROL_INLET_6		= 16 ;//未知
+	PROCESS_CONTROL_INLET_7		= 17 ;//未知
+	PROCESS_CONTROL_INLET_8		= 18 ;//未知
+	PROCESS_CONTROL_INLET_9		= 19 ;//未知
+	
+	PROCESS_CONTROL_OUTLET_0		= 30 ;//未知
+	PROCESS_CONTROL_OUTLET_1		= 31 ;//未知
+	PROCESS_CONTROL_OUTLET_2		= 32 ;//未知
+	PROCESS_CONTROL_OUTLET_3		= 33 ;//未知
+	PROCESS_CONTROL_OUTLET_4		= 34 ;//未知
+	PROCESS_CONTROL_OUTLET_5		= 35 ;//未知
+	PROCESS_CONTROL_OUTLET_6		= 36 ;//未知
+	PROCESS_CONTROL_OUTLET_7		= 37 ;//未知
+	PROCESS_CONTROL_OUTLET_8		= 38 ;//未知
+	PROCESS_CONTROL_OUTLET_9		= 39 ;//未知
+	
+};
+//终端给单片机
+message terminal_msg
+{
+    optional    int32		        TerminalID = 1;		// 终端号(单片机号)
+    optional    int32   		    DispatchDirection= 2;	// 方向(1入口,2出口)
+    optional    int32 	            ProcessControl= 3;	 	// 门控
+    optional    OutputDo       	    OutPutDo= 4; 		// 输入口
+
+}
+//超界状态
+enum Over_border_status
+{
+	OVER_BORDER_STATUS_UNKNOWN		= 0 ;//未知
+	OVER_BORDER_STATUS_NORMAL		= 1 ;//正常
+	OVER_BORDER_STATUS_FRONT		= 2 ;//前超界
+	OVER_BORDER_STATUS_BACK			= 3 ;//后超界
+	OVER_BORDER_STATUS_LEFT			= 4 ;//左超界
+	OVER_BORDER_STATUS_RIGHT		= 5 ;//右超界
+};
+//车高状态
+enum Car_height_status	
+{
+	CAR_HEIGHT_STATUS_UNKNOWN		= 0 ;//未知
+	CAR_HEIGHT_STATUS_SMALL 		= 1 ;//小车
+	CAR_HEIGHT_STATUS_MEDIUM 		= 2 ;//中车
+	CAR_HEIGHT_STATUS_LARGE			= 3 ;//大车
+	CAR_HEIGHT_STATUS_HUGE			= 4 ;//巨大车
+	CAR_HEIGHT_STATUS_FAULT			= 5 ;//故障车
+};
+
+//外门的状态
+enum Outside_door_status
+{
+	OUTSIDE_DOOR_STATUS_UNKNOWN		= 0 ;//未知
+	OUTSIDE_DOOR_STATUS_OPEN		= 1 ;//外门开到位
+	OUTSIDE_DOOR_STATUS_CLOSE		= 2 ;//外门关到位
+	OUTSIDE_DOOR_STATUS_RUN			= 3 ;//外门运行中
+	OUTSIDE_DOOR_STATUS_FAULT		= 4 ;//外门故障
+};
+
+//外门的控制
+enum Outside_door_control
+{
+	OUTSIDE_DOOR_CONTROL_UNKNOWN	= 0 ;//未知
+	OUTSIDE_DOOR_CONTROL_OPEN		= 1 ;//外门开
+	OUTSIDE_DOOR_CONTROL_CLOSE		= 2 ;//外门关
+
+};
+//流程状态
+enum Process_status
+{
+	PROCESS_STATUS_UNKNOWN			= 0;//未知
+	PROCESS_STATUS_FULL_AUTO	    = 1;//全自动,
+	PROCESS_STATUS_MANUAL			= 2;//手动
+	PROCESS_STATUS_AUTO_CLOSE		= 3;//半自动关门
+	PROCESS_STATUS_AUTO_OPEN		= 4;//半自动开门
+	PROCESS_STATUS_TO_READY			= 5;//切换到待机
+	
+	PROCESS_STATUS_RESET			= 7;//重启
+	PROCESS_STATUS_STOP				= 8;//急停
+	PROCESS_STATUS_FAULT			= 9;//故障
+	
+	//自动模式的步骤
+	PROCESS_STATUS_INLET_0		= 10 ;//入口待机, 等待门外地感触发。
+	PROCESS_STATUS_INLET_1		= 11 ;//执行开门
+	PROCESS_STATUS_INLET_2		= 12 ;//等待门开到位
+	PROCESS_STATUS_INLET_3		= 13 ;//等待汽车进入
+	PROCESS_STATUS_INLET_4		= 14 ;//停车完成,统计汽车经过门口的车高。
+	PROCESS_STATUS_INLET_5		= 15 ;//等待终端关门,执行关门
+	PROCESS_STATUS_INLET_6		= 16 ;//等待门关到位
+	PROCESS_STATUS_INLET_7		= 17 ;//等待plc调度,或者终端重置
+	PROCESS_STATUS_INLET_8		= 18 ;//未知
+	PROCESS_STATUS_INLET_9		= 19 ;//未知
+
+	PROCESS_STATUS_INLET_10		= 20 ;//入口待机, 等待门外地感触发。
+	PROCESS_STATUS_INLET_11		= 21 ;//执行开门
+	PROCESS_STATUS_INLET_12		= 22 ;//等待门开到位
+	PROCESS_STATUS_INLET_13		= 23 ;//等待汽车进入
+	PROCESS_STATUS_INLET_14		= 24 ;//停车完成,统计汽车经过门口的车高。
+	PROCESS_STATUS_INLET_15		= 25 ;//等待终端关门,执行关门
+	PROCESS_STATUS_INLET_16		= 26 ;//等待门关到位
+	PROCESS_STATUS_INLET_17		= 27 ;//等待plc调度,或者终端重置
+	PROCESS_STATUS_INLET_18		= 28 ;//未知
+	PROCESS_STATUS_INLET_19		= 29 ;//未知
+	
+	PROCESS_STATUS_OUTLET_0		= 30 ;//出口待机,等待终端开门,执行开门
+	PROCESS_STATUS_OUTLET_1		= 31 ;//等待门开到位
+	PROCESS_STATUS_OUTLET_2		= 32 ;//等待门口的光电产生信号,表示汽车正从车库出去。汽车正在离开中。
+	PROCESS_STATUS_OUTLET_3		= 33 ;//汽车离开后,延迟5秒关门,执行关门
+	PROCESS_STATUS_OUTLET_4		= 34 ;//等待门关到位
+	PROCESS_STATUS_OUTLET_5		= 35 ;//等待plc调度,或者终端重置
+	PROCESS_STATUS_OUTLET_6		= 36 ;//未知
+	PROCESS_STATUS_OUTLET_7		= 37 ;//未知
+	PROCESS_STATUS_OUTLET_8		= 38 ;//未知
+	PROCESS_STATUS_OUTLET_9		= 39 ;//未知
+	
+	PROCESS_STATUS_OUTLET_10		= 40 ;//出口待机,等待终端开门,执行开门
+	PROCESS_STATUS_OUTLET_11		= 41 ;//等待门开到位
+	PROCESS_STATUS_OUTLET_12		= 42 ;//等待门口的光电产生信号,表示汽车正从车库出去。汽车正在离开中。
+	PROCESS_STATUS_OUTLET_13		= 43 ;//汽车离开后,延迟5秒关门,执行关门
+	PROCESS_STATUS_OUTLET_14		= 44 ;//等待门关到位
+	PROCESS_STATUS_OUTLET_15		= 45 ;//等待plc调度,或者终端重置
+	PROCESS_STATUS_OUTLET_16		= 46 ;//未知
+	PROCESS_STATUS_OUTLET_17		= 47 ;//未知
+	PROCESS_STATUS_OUTLET_18		= 48 ;//未知
+	PROCESS_STATUS_OUTLET_19		= 49 ;//未知
+};
+//单片机给终端
+message Singlechip_data
+{
+    optional  int32		            TerminalID= 1;	  	// 终端号(单片机号)
+    optional  int32   		        DispatchDirection= 2;	// 方向(1入口,2出口)
+    optional  Process_status	    ProcessStatus=   3;		//流程状态
+    optional  InputDi		        InPutDi = 4; 		// 输入口
+    optional  int32		            ResetFlag = 5;		//重置标志位
+    optional  Process_control	    ProcessControl = 6;		//流程控制
+    optional  int32		            InsideExistenceFlag = 7;	//内部存在标志
+    optional  Over_border_status	OverBorderStatus = 8;	//边界状态
+    optional  Car_height_status	    CarHeightStatusCurrent = 9;	//当前车高状态--斜角对射光电
+    optional  Car_height_status	    CarHeightStatusPassing = 10;	//车高状态--门口经过式光电
+    optional  int32		            StopFlag = 11;		//停车标志位
+    optional  Outside_door_status	OutsideDoorStatus = 12;	//外门状态
+    optional  Outside_door_control	OutsideDoorControl = 13;	//外门控制
+    optional  int32		            DispatchFinishFlag = 14;	//调度完成标志
+    optional  int32		            OutsideExistenceFlag = 15;	//外部存在标志
+}
+//终端状态消息
+message Terminal_status_msg
+{
+	required Base_info	 	    base_info =1; //消息类型
+	optional Id_struct 	 	        id_struct=2; //终端号
+	optional Singlechip_data	singlechipData=3; //单片机的数据
+	optional bool		singlechip_validity = 4;//单片机数据有效性
+}
+
+

File diff suppressed because it is too large
+ 1117 - 0
plc调度节点/network_communication/network.pb.cc


+ 730 - 0
plc调度节点/network_communication/network.pb.h

@@ -0,0 +1,730 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: network.proto
+
+#ifndef PROTOBUF_network_2eproto__INCLUDED
+#define PROTOBUF_network_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please update
+#error your headers.
+#endif
+#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_table_driven.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>  // IWYU pragma: export
+#include <google/protobuf/extension_set.h>  // IWYU pragma: export
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace protobuf_network_2eproto {
+// Internal implementation detail -- do not use these members.
+struct TableStruct {
+  static const ::google::protobuf::internal::ParseTableField entries[];
+  static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
+  static const ::google::protobuf::internal::ParseTable schema[3];
+  static const ::google::protobuf::internal::FieldMetadata field_metadata[];
+  static const ::google::protobuf::internal::SerializationTable serialization_table[];
+  static const ::google::protobuf::uint32 offsets[];
+};
+void AddDescriptors();
+void InitDefaultsNetwork_informationImpl();
+void InitDefaultsNetwork_information();
+void InitDefaultsNetwork_parameterImpl();
+void InitDefaultsNetwork_parameter();
+void InitDefaultsNetwork_parameter_allImpl();
+void InitDefaultsNetwork_parameter_all();
+inline void InitDefaults() {
+  InitDefaultsNetwork_information();
+  InitDefaultsNetwork_parameter();
+  InitDefaultsNetwork_parameter_all();
+}
+}  // namespace protobuf_network_2eproto
+namespace Network_proto {
+class Network_information;
+class Network_informationDefaultTypeInternal;
+extern Network_informationDefaultTypeInternal _Network_information_default_instance_;
+class Network_parameter;
+class Network_parameterDefaultTypeInternal;
+extern Network_parameterDefaultTypeInternal _Network_parameter_default_instance_;
+class Network_parameter_all;
+class Network_parameter_allDefaultTypeInternal;
+extern Network_parameter_allDefaultTypeInternal _Network_parameter_all_default_instance_;
+}  // namespace Network_proto
+namespace Network_proto {
+
+enum Network_mode {
+  NETWORK_UNKNOWN = 0,
+  TCP_CLIENT = 1,
+  TCP_SERVER = 2,
+  UDP = 3
+};
+bool Network_mode_IsValid(int value);
+const Network_mode Network_mode_MIN = NETWORK_UNKNOWN;
+const Network_mode Network_mode_MAX = UDP;
+const int Network_mode_ARRAYSIZE = Network_mode_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* Network_mode_descriptor();
+inline const ::std::string& Network_mode_Name(Network_mode value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    Network_mode_descriptor(), value);
+}
+inline bool Network_mode_Parse(
+    const ::std::string& name, Network_mode* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<Network_mode>(
+    Network_mode_descriptor(), name, value);
+}
+// ===================================================================
+
+class Network_information : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Network_proto.Network_information) */ {
+ public:
+  Network_information();
+  virtual ~Network_information();
+
+  Network_information(const Network_information& from);
+
+  inline Network_information& operator=(const Network_information& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  Network_information(Network_information&& from) noexcept
+    : Network_information() {
+    *this = ::std::move(from);
+  }
+
+  inline Network_information& operator=(Network_information&& from) noexcept {
+    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+      if (this != &from) InternalSwap(&from);
+    } else {
+      CopyFrom(from);
+    }
+    return *this;
+  }
+  #endif
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _internal_metadata_.unknown_fields();
+  }
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return _internal_metadata_.mutable_unknown_fields();
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const Network_information& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const Network_information* internal_default_instance() {
+    return reinterpret_cast<const Network_information*>(
+               &_Network_information_default_instance_);
+  }
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+    0;
+
+  void Swap(Network_information* other);
+  friend void swap(Network_information& a, Network_information& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline Network_information* New() const PROTOBUF_FINAL { return New(NULL); }
+
+  Network_information* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void CopyFrom(const Network_information& from);
+  void MergeFrom(const Network_information& from);
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
+
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
+  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
+  void InternalSwap(Network_information* other);
+  private:
+  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+    return NULL;
+  }
+  inline void* MaybeArenaPtr() const {
+    return NULL;
+  }
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional string ip = 3 [default = ""];
+  bool has_ip() const;
+  void clear_ip();
+  static const int kIpFieldNumber = 3;
+  const ::std::string& ip() const;
+  void set_ip(const ::std::string& value);
+  #if LANG_CXX11
+  void set_ip(::std::string&& value);
+  #endif
+  void set_ip(const char* value);
+  void set_ip(const char* value, size_t size);
+  ::std::string* mutable_ip();
+  ::std::string* release_ip();
+  void set_allocated_ip(::std::string* ip);
+
+  // optional .Network_proto.Network_mode network_mode = 1 [default = NETWORK_UNKNOWN];
+  bool has_network_mode() const;
+  void clear_network_mode();
+  static const int kNetworkModeFieldNumber = 1;
+  ::Network_proto::Network_mode network_mode() const;
+  void set_network_mode(::Network_proto::Network_mode value);
+
+  // optional int32 socket_id = 2 [default = 0];
+  bool has_socket_id() const;
+  void clear_socket_id();
+  static const int kSocketIdFieldNumber = 2;
+  ::google::protobuf::int32 socket_id() const;
+  void set_socket_id(::google::protobuf::int32 value);
+
+  // optional int32 port = 4 [default = 0];
+  bool has_port() const;
+  void clear_port();
+  static const int kPortFieldNumber = 4;
+  ::google::protobuf::int32 port() const;
+  void set_port(::google::protobuf::int32 value);
+
+  // @@protoc_insertion_point(class_scope:Network_proto.Network_information)
+ private:
+  void set_has_network_mode();
+  void clear_has_network_mode();
+  void set_has_socket_id();
+  void clear_has_socket_id();
+  void set_has_ip();
+  void clear_has_ip();
+  void set_has_port();
+  void clear_has_port();
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::internal::HasBits<1> _has_bits_;
+  mutable int _cached_size_;
+  ::google::protobuf::internal::ArenaStringPtr ip_;
+  int network_mode_;
+  ::google::protobuf::int32 socket_id_;
+  ::google::protobuf::int32 port_;
+  friend struct ::protobuf_network_2eproto::TableStruct;
+  friend void ::protobuf_network_2eproto::InitDefaultsNetwork_informationImpl();
+};
+// -------------------------------------------------------------------
+
+class Network_parameter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Network_proto.Network_parameter) */ {
+ public:
+  Network_parameter();
+  virtual ~Network_parameter();
+
+  Network_parameter(const Network_parameter& from);
+
+  inline Network_parameter& operator=(const Network_parameter& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  Network_parameter(Network_parameter&& from) noexcept
+    : Network_parameter() {
+    *this = ::std::move(from);
+  }
+
+  inline Network_parameter& operator=(Network_parameter&& from) noexcept {
+    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+      if (this != &from) InternalSwap(&from);
+    } else {
+      CopyFrom(from);
+    }
+    return *this;
+  }
+  #endif
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _internal_metadata_.unknown_fields();
+  }
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return _internal_metadata_.mutable_unknown_fields();
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const Network_parameter& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const Network_parameter* internal_default_instance() {
+    return reinterpret_cast<const Network_parameter*>(
+               &_Network_parameter_default_instance_);
+  }
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+    1;
+
+  void Swap(Network_parameter* other);
+  friend void swap(Network_parameter& a, Network_parameter& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline Network_parameter* New() const PROTOBUF_FINAL { return New(NULL); }
+
+  Network_parameter* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void CopyFrom(const Network_parameter& from);
+  void MergeFrom(const Network_parameter& from);
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
+
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
+  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
+  void InternalSwap(Network_parameter* other);
+  private:
+  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+    return NULL;
+  }
+  inline void* MaybeArenaPtr() const {
+    return NULL;
+  }
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // repeated .Network_proto.Network_information network_information_vector = 1;
+  int network_information_vector_size() const;
+  void clear_network_information_vector();
+  static const int kNetworkInformationVectorFieldNumber = 1;
+  const ::Network_proto::Network_information& network_information_vector(int index) const;
+  ::Network_proto::Network_information* mutable_network_information_vector(int index);
+  ::Network_proto::Network_information* add_network_information_vector();
+  ::google::protobuf::RepeatedPtrField< ::Network_proto::Network_information >*
+      mutable_network_information_vector();
+  const ::google::protobuf::RepeatedPtrField< ::Network_proto::Network_information >&
+      network_information_vector() const;
+
+  // @@protoc_insertion_point(class_scope:Network_proto.Network_parameter)
+ private:
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::internal::HasBits<1> _has_bits_;
+  mutable int _cached_size_;
+  ::google::protobuf::RepeatedPtrField< ::Network_proto::Network_information > network_information_vector_;
+  friend struct ::protobuf_network_2eproto::TableStruct;
+  friend void ::protobuf_network_2eproto::InitDefaultsNetwork_parameterImpl();
+};
+// -------------------------------------------------------------------
+
+class Network_parameter_all : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Network_proto.Network_parameter_all) */ {
+ public:
+  Network_parameter_all();
+  virtual ~Network_parameter_all();
+
+  Network_parameter_all(const Network_parameter_all& from);
+
+  inline Network_parameter_all& operator=(const Network_parameter_all& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  Network_parameter_all(Network_parameter_all&& from) noexcept
+    : Network_parameter_all() {
+    *this = ::std::move(from);
+  }
+
+  inline Network_parameter_all& operator=(Network_parameter_all&& from) noexcept {
+    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+      if (this != &from) InternalSwap(&from);
+    } else {
+      CopyFrom(from);
+    }
+    return *this;
+  }
+  #endif
+  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+    return _internal_metadata_.unknown_fields();
+  }
+  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+    return _internal_metadata_.mutable_unknown_fields();
+  }
+
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const Network_parameter_all& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const Network_parameter_all* internal_default_instance() {
+    return reinterpret_cast<const Network_parameter_all*>(
+               &_Network_parameter_all_default_instance_);
+  }
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+    2;
+
+  void Swap(Network_parameter_all* other);
+  friend void swap(Network_parameter_all& a, Network_parameter_all& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline Network_parameter_all* New() const PROTOBUF_FINAL { return New(NULL); }
+
+  Network_parameter_all* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void CopyFrom(const Network_parameter_all& from);
+  void MergeFrom(const Network_parameter_all& from);
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
+
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
+  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
+  void InternalSwap(Network_parameter_all* other);
+  private:
+  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+    return NULL;
+  }
+  inline void* MaybeArenaPtr() const {
+    return NULL;
+  }
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // optional .Network_proto.Network_parameter network_parameters = 1;
+  bool has_network_parameters() const;
+  void clear_network_parameters();
+  static const int kNetworkParametersFieldNumber = 1;
+  const ::Network_proto::Network_parameter& network_parameters() const;
+  ::Network_proto::Network_parameter* release_network_parameters();
+  ::Network_proto::Network_parameter* mutable_network_parameters();
+  void set_allocated_network_parameters(::Network_proto::Network_parameter* network_parameters);
+
+  // @@protoc_insertion_point(class_scope:Network_proto.Network_parameter_all)
+ private:
+  void set_has_network_parameters();
+  void clear_has_network_parameters();
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::internal::HasBits<1> _has_bits_;
+  mutable int _cached_size_;
+  ::Network_proto::Network_parameter* network_parameters_;
+  friend struct ::protobuf_network_2eproto::TableStruct;
+  friend void ::protobuf_network_2eproto::InitDefaultsNetwork_parameter_allImpl();
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#ifdef __GNUC__
+  #pragma GCC diagnostic push
+  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif  // __GNUC__
+// Network_information
+
+// optional .Network_proto.Network_mode network_mode = 1 [default = NETWORK_UNKNOWN];
+inline bool Network_information::has_network_mode() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void Network_information::set_has_network_mode() {
+  _has_bits_[0] |= 0x00000002u;
+}
+inline void Network_information::clear_has_network_mode() {
+  _has_bits_[0] &= ~0x00000002u;
+}
+inline void Network_information::clear_network_mode() {
+  network_mode_ = 0;
+  clear_has_network_mode();
+}
+inline ::Network_proto::Network_mode Network_information::network_mode() const {
+  // @@protoc_insertion_point(field_get:Network_proto.Network_information.network_mode)
+  return static_cast< ::Network_proto::Network_mode >(network_mode_);
+}
+inline void Network_information::set_network_mode(::Network_proto::Network_mode value) {
+  assert(::Network_proto::Network_mode_IsValid(value));
+  set_has_network_mode();
+  network_mode_ = value;
+  // @@protoc_insertion_point(field_set:Network_proto.Network_information.network_mode)
+}
+
+// optional int32 socket_id = 2 [default = 0];
+inline bool Network_information::has_socket_id() const {
+  return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void Network_information::set_has_socket_id() {
+  _has_bits_[0] |= 0x00000004u;
+}
+inline void Network_information::clear_has_socket_id() {
+  _has_bits_[0] &= ~0x00000004u;
+}
+inline void Network_information::clear_socket_id() {
+  socket_id_ = 0;
+  clear_has_socket_id();
+}
+inline ::google::protobuf::int32 Network_information::socket_id() const {
+  // @@protoc_insertion_point(field_get:Network_proto.Network_information.socket_id)
+  return socket_id_;
+}
+inline void Network_information::set_socket_id(::google::protobuf::int32 value) {
+  set_has_socket_id();
+  socket_id_ = value;
+  // @@protoc_insertion_point(field_set:Network_proto.Network_information.socket_id)
+}
+
+// optional string ip = 3 [default = ""];
+inline bool Network_information::has_ip() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void Network_information::set_has_ip() {
+  _has_bits_[0] |= 0x00000001u;
+}
+inline void Network_information::clear_has_ip() {
+  _has_bits_[0] &= ~0x00000001u;
+}
+inline void Network_information::clear_ip() {
+  ip_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  clear_has_ip();
+}
+inline const ::std::string& Network_information::ip() const {
+  // @@protoc_insertion_point(field_get:Network_proto.Network_information.ip)
+  return ip_.GetNoArena();
+}
+inline void Network_information::set_ip(const ::std::string& value) {
+  set_has_ip();
+  ip_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:Network_proto.Network_information.ip)
+}
+#if LANG_CXX11
+inline void Network_information::set_ip(::std::string&& value) {
+  set_has_ip();
+  ip_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:Network_proto.Network_information.ip)
+}
+#endif
+inline void Network_information::set_ip(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  set_has_ip();
+  ip_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:Network_proto.Network_information.ip)
+}
+inline void Network_information::set_ip(const char* value, size_t size) {
+  set_has_ip();
+  ip_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:Network_proto.Network_information.ip)
+}
+inline ::std::string* Network_information::mutable_ip() {
+  set_has_ip();
+  // @@protoc_insertion_point(field_mutable:Network_proto.Network_information.ip)
+  return ip_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Network_information::release_ip() {
+  // @@protoc_insertion_point(field_release:Network_proto.Network_information.ip)
+  clear_has_ip();
+  return ip_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Network_information::set_allocated_ip(::std::string* ip) {
+  if (ip != NULL) {
+    set_has_ip();
+  } else {
+    clear_has_ip();
+  }
+  ip_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ip);
+  // @@protoc_insertion_point(field_set_allocated:Network_proto.Network_information.ip)
+}
+
+// optional int32 port = 4 [default = 0];
+inline bool Network_information::has_port() const {
+  return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void Network_information::set_has_port() {
+  _has_bits_[0] |= 0x00000008u;
+}
+inline void Network_information::clear_has_port() {
+  _has_bits_[0] &= ~0x00000008u;
+}
+inline void Network_information::clear_port() {
+  port_ = 0;
+  clear_has_port();
+}
+inline ::google::protobuf::int32 Network_information::port() const {
+  // @@protoc_insertion_point(field_get:Network_proto.Network_information.port)
+  return port_;
+}
+inline void Network_information::set_port(::google::protobuf::int32 value) {
+  set_has_port();
+  port_ = value;
+  // @@protoc_insertion_point(field_set:Network_proto.Network_information.port)
+}
+
+// -------------------------------------------------------------------
+
+// Network_parameter
+
+// repeated .Network_proto.Network_information network_information_vector = 1;
+inline int Network_parameter::network_information_vector_size() const {
+  return network_information_vector_.size();
+}
+inline void Network_parameter::clear_network_information_vector() {
+  network_information_vector_.Clear();
+}
+inline const ::Network_proto::Network_information& Network_parameter::network_information_vector(int index) const {
+  // @@protoc_insertion_point(field_get:Network_proto.Network_parameter.network_information_vector)
+  return network_information_vector_.Get(index);
+}
+inline ::Network_proto::Network_information* Network_parameter::mutable_network_information_vector(int index) {
+  // @@protoc_insertion_point(field_mutable:Network_proto.Network_parameter.network_information_vector)
+  return network_information_vector_.Mutable(index);
+}
+inline ::Network_proto::Network_information* Network_parameter::add_network_information_vector() {
+  // @@protoc_insertion_point(field_add:Network_proto.Network_parameter.network_information_vector)
+  return network_information_vector_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::Network_proto::Network_information >*
+Network_parameter::mutable_network_information_vector() {
+  // @@protoc_insertion_point(field_mutable_list:Network_proto.Network_parameter.network_information_vector)
+  return &network_information_vector_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::Network_proto::Network_information >&
+Network_parameter::network_information_vector() const {
+  // @@protoc_insertion_point(field_list:Network_proto.Network_parameter.network_information_vector)
+  return network_information_vector_;
+}
+
+// -------------------------------------------------------------------
+
+// Network_parameter_all
+
+// optional .Network_proto.Network_parameter network_parameters = 1;
+inline bool Network_parameter_all::has_network_parameters() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void Network_parameter_all::set_has_network_parameters() {
+  _has_bits_[0] |= 0x00000001u;
+}
+inline void Network_parameter_all::clear_has_network_parameters() {
+  _has_bits_[0] &= ~0x00000001u;
+}
+inline void Network_parameter_all::clear_network_parameters() {
+  if (network_parameters_ != NULL) network_parameters_->Clear();
+  clear_has_network_parameters();
+}
+inline const ::Network_proto::Network_parameter& Network_parameter_all::network_parameters() const {
+  const ::Network_proto::Network_parameter* p = network_parameters_;
+  // @@protoc_insertion_point(field_get:Network_proto.Network_parameter_all.network_parameters)
+  return p != NULL ? *p : *reinterpret_cast<const ::Network_proto::Network_parameter*>(
+      &::Network_proto::_Network_parameter_default_instance_);
+}
+inline ::Network_proto::Network_parameter* Network_parameter_all::release_network_parameters() {
+  // @@protoc_insertion_point(field_release:Network_proto.Network_parameter_all.network_parameters)
+  clear_has_network_parameters();
+  ::Network_proto::Network_parameter* temp = network_parameters_;
+  network_parameters_ = NULL;
+  return temp;
+}
+inline ::Network_proto::Network_parameter* Network_parameter_all::mutable_network_parameters() {
+  set_has_network_parameters();
+  if (network_parameters_ == NULL) {
+    network_parameters_ = new ::Network_proto::Network_parameter;
+  }
+  // @@protoc_insertion_point(field_mutable:Network_proto.Network_parameter_all.network_parameters)
+  return network_parameters_;
+}
+inline void Network_parameter_all::set_allocated_network_parameters(::Network_proto::Network_parameter* network_parameters) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete network_parameters_;
+  }
+  if (network_parameters) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      network_parameters = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, network_parameters, submessage_arena);
+    }
+    set_has_network_parameters();
+  } else {
+    clear_has_network_parameters();
+  }
+  network_parameters_ = network_parameters;
+  // @@protoc_insertion_point(field_set_allocated:Network_proto.Network_parameter_all.network_parameters)
+}
+
+#ifdef __GNUC__
+  #pragma GCC diagnostic pop
+#endif  // __GNUC__
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+}  // namespace Network_proto
+
+namespace google {
+namespace protobuf {
+
+template <> struct is_proto_enum< ::Network_proto::Network_mode> : ::google::protobuf::internal::true_type {};
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::Network_proto::Network_mode>() {
+  return ::Network_proto::Network_mode_descriptor();
+}
+
+}  // namespace protobuf
+}  // namespace google
+
+// @@protoc_insertion_point(global_scope)
+
+#endif  // PROTOBUF_network_2eproto__INCLUDED

+ 44 - 0
plc调度节点/network_communication/network.proto

@@ -0,0 +1,44 @@
+syntax = "proto2";
+package Network_proto;
+
+//network 网络通信的配置参数
+
+//网络连接模式
+enum Network_mode
+{
+    NETWORK_UNKNOWN = 0;
+    TCP_CLIENT = 1;
+    TCP_SERVER = 2;
+    UDP = 3;
+}
+
+//单个网络连接参数
+message Network_information
+{
+    optional Network_mode               network_mode = 1[default = NETWORK_UNKNOWN];
+    optional int32                      socket_id = 2[default = 0];         //自定义的socket编号
+    optional string                     ip = 3[default = ""];
+    optional int32                      port = 4[default = 0];
+}
+
+//多个网络连接参数
+message Network_parameter
+{
+    repeated Network_information        network_information_vector = 1;
+}
+
+message Network_parameter_all
+{
+    optional Network_parameter          network_parameters = 1;
+}
+
+
+
+
+
+
+
+
+
+
+

+ 721 - 0
plc调度节点/network_communication/network_base.cpp

@@ -0,0 +1,721 @@
+//
+// Created by huli on 2022/12/30.
+//
+
+#include "network_base.h"
+#include "../tool/proto_tool.h"
+#include "../tool/time_tool.h"
+
+Network_base::Network_base()
+{
+	m_network_status = NETWORK_STATUS_UNKNOW;
+
+	mp_receive_data_thread = NULL;
+	mp_analysis_data_thread = NULL;
+	mp_send_data_thread = NULL;
+	mp_encapsulate_data_thread = NULL;
+
+	m_analysis_cycle_time = 1000;//默认1000ms,就自动解析(接受list)
+	m_encapsulate_cycle_time = 1000;//默认1000ms,就自动发送一次状态信息
+}
+
+Network_base::~Network_base()
+{
+	network_uninit();
+}
+
+//初始化 通信 模块。如下三选一
+Error_manager Network_base::network_init()
+{
+	LOG(INFO) << " ---Network_base::network_init() run--- "<< this;
+	return network_init_from_protobuf(NETKORK_PARAMETER_PATH);
+}
+//初始化 通信 模块。从文件读取
+Error_manager Network_base::network_init_from_protobuf(std::string prototxt_path)
+{
+	Network_proto::Network_parameter_all t_network_parameter_all;
+	if(!  proto_tool::read_proto_param(prototxt_path,t_network_parameter_all) )
+	{
+		return Error_manager(NETWORK_READ_PROTOBUF_ERROR,MINOR_ERROR,
+							 "network_init_from_protobuf read_proto_param  failed");
+	}
+	return network_init_from_protobuf(t_network_parameter_all);
+}
+//初始化 通信 模块。从protobuf读取
+Error_manager Network_base::network_init_from_protobuf(Network_proto::Network_parameter_all & network_parameter_all)
+{
+	LOG(INFO) << " ---Rabbitmq_base::network_init_from_protobuf() run--- "<< this;
+
+	m_network_parameter_all = network_parameter_all;
+
+	//根据参数创建socket连接
+	for (int i = 0; i < m_network_parameter_all.network_parameters().network_information_vector_size(); ++i)
+	{
+		//导入参数
+		int t_socket_id = m_network_parameter_all.network_parameters().network_information_vector(i).socket_id();
+		Network_socket t_network_socket;
+		t_network_socket.m_network_information = m_network_parameter_all.network_parameters().network_information_vector(i);
+
+		//tcp 客户端
+		if ( t_network_socket.m_network_information.network_mode() == Network_proto::TCP_CLIENT )
+		{
+			//创建socket
+			t_network_socket.m_socket_fd = socket(AF_INET, SOCK_STREAM, 0);    //直接创建socket返回给Communication_tcp的成员
+			if (t_network_socket.m_socket_fd == -1)
+			{
+				printf(" create tcp socket failed ");
+				return Error_manager(Error_code::NETWORK_CREATE_SOCKET_ERROR, Error_level::MINOR_ERROR,
+									 " fun error ");
+			}
+
+			//配置ip地址
+			sockaddr_in saddr;   //设置连接对象的结构体
+			saddr.sin_family = AF_INET;
+			saddr.sin_port = htons(t_network_socket.m_network_information.port());
+			saddr.sin_addr.s_addr = inet_addr(t_network_socket.m_network_information.ip().c_str());  //字符串转整型
+
+			set_block(t_network_socket.m_socket_fd, false);    //将socket改成非阻塞模式,此时它会立即返回  所以通过fd_set
+			fd_set rfds, wfds;	    //文件句柄数组,在这个数组中,存放当前每个文件句柄的状态
+
+			if (connect(t_network_socket.m_socket_fd, (sockaddr*)&saddr, sizeof(saddr)) != 0)   //此时connect马上返回,状态为未成功连接
+			{
+
+				FD_ZERO(&rfds);  //首先把文件句柄的数组置空
+				FD_ZERO(&wfds);
+				FD_SET(t_network_socket.m_socket_fd, &rfds);   //把sock的网络句柄加入到该句柄数组中
+				FD_SET(t_network_socket.m_socket_fd, &wfds);
+
+
+				timeval tm;  //超时参数的结构体
+				tm.tv_sec = NETKORK_CONNECT_TIME;//默认5秒
+				tm.tv_usec = 0;
+
+				int selres = select(t_network_socket.m_socket_fd + 1, &rfds, &wfds, NULL, &tm);   //(阻塞函数)(监听的文件句柄的最大值加1,可读序列文件列表,可写的序列文件列表,错误处理,超时)使用select监听文件序列set是否有可读可写,这里监听set数组(里面只有sock),只要其中的句柄有一个变得可写(在这里是sock连接成功了以后就会变得可写,就返回),就返回
+				switch (selres)
+				{
+
+					case -1:
+						printf("select error\n");
+						return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+											 " fun error ");
+					case 0:
+						printf("select time out\n");
+						return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+											 " fun error ");
+					default:
+						if (FD_ISSET(t_network_socket.m_socket_fd, &rfds) || FD_ISSET(t_network_socket.m_socket_fd, &wfds))
+						{
+							connect(t_network_socket.m_socket_fd, (sockaddr*)&saddr, sizeof(saddr));    //再次连接一次进行确认
+							int err = errno;
+							if  (err == EISCONN||err == EINPROGRESS)     //已经连接到该套接字 或 套接字为非阻塞套接字,且连接请求没有立即完成
+							{
+								//在这里, 就表示连接正常
+								printf("connect finished(success).\n");
+//								set_block(t_network_socket.m_socket_fd,true);   //成功之后重新把sock改成阻塞模式,以便后面发送/接收数据
+								t_network_socket.m_network_status = NETWORK_STATUS_READY;
+								m_network_socket_map[t_socket_id] = t_network_socket;
+								m_network_socket_map[t_socket_id].m_updata_time = std::chrono::system_clock::now();
+							}
+							else
+							{
+								printf("connect %s : %d finished(failed). errno = %d\n",t_network_socket.m_network_information.ip().c_str(),t_network_socket.m_network_information.port(),errno);
+								// printf("FD_ISSET(sock_fd, &rfds): %d\n FD_ISSET(sock_fd, &wfds): %d\n", FD_ISSET(sock_fd, &rfds) , FD_ISSET(sock_fd, &wfds));
+								return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+													 " fun error ");
+							}
+						}
+						else
+						{
+							printf("connect %s : %d finished(failed).",t_network_socket.m_network_information.ip().c_str(),t_network_socket.m_network_information.port());
+							return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+												 " fun error ");
+						}
+				}
+			}
+			else  //连接正常
+			{
+				set_block(t_network_socket.m_socket_fd, true);   //成功之后重新把sock改成阻塞模式,以便后面发送/接收数据
+				printf("connect %s : %d finished(success).\n",t_network_socket.m_network_information.ip().c_str(),t_network_socket.m_network_information.port());
+			}
+		}
+		else
+		{
+			t_network_socket.m_network_status = NETWORK_STATUS_FAULT;
+			t_network_socket.m_socket_fd = 0;
+			m_network_socket_map[t_socket_id] = t_network_socket;
+		}
+	}
+
+	network_run();
+
+	return Error_code::SUCCESS;
+}
+
+//启动通信, run thread
+Error_manager Network_base::network_run()
+{
+	m_network_status = NETWORK_STATUS_UNKNOW;
+	//启动4个线程。
+	//接受线程默认循环, 内部的nn_recv进行等待, 超时1ms
+	m_receive_condition.reset(false, false, false);
+	mp_receive_data_thread = new std::thread(&Network_base::receive_data_thread, this);
+	//解析线程默认等待, 需要接受线程去唤醒, 超时1ms, 超时后主动遍历m_receive_data_list
+	m_analysis_data_condition.reset(false, false, false);
+	mp_analysis_data_thread = new std::thread(&Network_base::analysis_data_thread, this);
+	//发送线程默认循环, 内部的wait_and_pop进行等待,
+	m_send_data_condition.reset(false, true, false);
+	mp_send_data_thread = new std::thread(&Network_base::send_data_thread, this);
+	//封装线程默认等待, ...., 超时1ms, 超时后主动 封装心跳和状态信息,
+	m_encapsulate_data_condition.reset(false, false, false);
+	mp_encapsulate_data_thread = new std::thread(&Network_base::encapsulate_data_thread, this);
+
+	return Error_code::SUCCESS;
+}
+
+
+//反初始化 通信 模块。
+Error_manager Network_base::network_uninit()
+{
+	for (auto iter = m_network_socket_map.begin(); iter != m_network_socket_map.end(); ++iter)
+	{
+		int t_socket_fd = iter->second.m_socket_fd;
+		if (t_socket_fd <= 0)
+		{
+			printf("socket %d error \n", t_socket_fd);  //打印ip和端口
+		}
+		else
+		{
+			close(t_socket_fd);
+		}
+	}
+	return Error_code::SUCCESS;
+}
+//重连, 快速uninit, init
+Error_manager Network_base::network_reconnnect()
+{
+	return Error_code::SUCCESS;
+}
+
+void Network_base::set_analysis_cycle_time(unsigned int analysis_cycle_time)
+{
+	m_analysis_cycle_time = analysis_cycle_time;
+}
+void Network_base::set_encapsulate_cycle_time(unsigned int encapsulate_cycle_time)
+{
+	m_encapsulate_cycle_time = encapsulate_cycle_time;
+}
+
+bool Network_base::set_block(int socket_fd, bool isblock)  //设置阻塞模式  (希望只有在connect的时候是非阻塞的,而接收数据时候是阻塞的)
+{
+	if (socket_fd <= 0)
+	{
+		printf(" set tcp socket block failed\n ");
+		return false;
+	}
+
+	int flags = fcntl(socket_fd, F_GETFL, 0);  //获取socket的属性
+	if (flags < 0)
+		return false; //获取属性出错
+	if (isblock)
+	{
+		flags = flags&~O_NONBLOCK;  //把非阻塞这位设为0
+	}
+	else
+	{
+		flags = flags | O_NONBLOCK; //把非阻塞这位设为1
+	}
+	if (fcntl(socket_fd, F_SETFL, flags))
+		return false;  //把标准位设回去
+
+//	if (!isblock)
+//		printf("set tcp socket not block success\n");
+//	if (isblock)
+//		printf("set tcp socket block success\n");
+
+	return true;
+}
+
+
+int Network_base::network_recv(int socket_fd, char *buf, int size)                      //接收数据
+{
+	return recv(socket_fd, buf, size, 0);
+}
+
+int Network_base::network_send(int socket_fd, const char *buf, int size)					     //发送数据
+{
+	int sendedSize = 0;   //已发送成功的长度
+
+	while (sendedSize != size)   //若没发送完成,则从断点开始继续发送 直到完成
+	{
+		try
+		{
+			int len = send(socket_fd, buf + sendedSize, size - sendedSize, 0);
+			if (len <= 0)
+				break;
+			sendedSize += len;
+		}
+		catch (char *str)
+		{
+			std::cout << " 断线---" << str<< std::endl;
+			break;
+		}
+
+	}
+	return sendedSize;
+}
+
+bool Network_base::is_connected(int socket_fd)
+{
+	struct tcp_info info;
+	int len=sizeof(info);
+	getsockopt(socket_fd, IPPROTO_TCP, TCP_INFO, &info, (socklen_t *)&len);
+	if((info.tcpi_state==TCP_ESTABLISHED))
+	{
+		return true;
+	}
+	return false;
+}
+
+//检查网络,如果断连, 就立刻重连, socket_fd会重新分配新的
+Error_manager Network_base::check_and_reconnect(int socket_id)
+{
+	int t_socket_fd = m_network_socket_map[socket_id].m_socket_fd;
+	if ( is_connected(t_socket_fd) == false )
+	{
+		//关闭连接
+		close(t_socket_fd);
+
+
+		//导入参数
+		Network_socket t_network_socket;
+		t_network_socket.m_network_information = m_network_socket_map[socket_id].m_network_information;
+
+		//tcp 客户端
+		if ( t_network_socket.m_network_information.network_mode() == Network_proto::TCP_CLIENT )
+		{
+			//创建socket
+			t_network_socket.m_socket_fd = socket(AF_INET, SOCK_STREAM, 0);    //直接创建socket返回给Communication_tcp的成员
+			if (t_network_socket.m_socket_fd == -1)
+			{
+				printf(" create tcp socket failed ");
+				return Error_manager(Error_code::NETWORK_CREATE_SOCKET_ERROR, Error_level::MINOR_ERROR,
+									 " fun error ");
+			}
+
+			//配置ip地址
+			sockaddr_in saddr;   //设置连接对象的结构体
+			saddr.sin_family = AF_INET;
+			saddr.sin_port = htons(t_network_socket.m_network_information.port());
+			saddr.sin_addr.s_addr = inet_addr(t_network_socket.m_network_information.ip().c_str());  //字符串转整型
+
+			set_block(t_network_socket.m_socket_fd, false);    //将socket改成非阻塞模式,此时它会立即返回  所以通过fd_set
+			fd_set rfds, wfds;	    //文件句柄数组,在这个数组中,存放当前每个文件句柄的状态
+
+			if (connect(t_network_socket.m_socket_fd, (sockaddr*)&saddr, sizeof(saddr)) != 0)   //此时connect马上返回,状态为未成功连接
+			{
+
+				FD_ZERO(&rfds);  //首先把文件句柄的数组置空
+				FD_ZERO(&wfds);
+				FD_SET(t_network_socket.m_socket_fd, &rfds);   //把sock的网络句柄加入到该句柄数组中
+				FD_SET(t_network_socket.m_socket_fd, &wfds);
+
+
+				timeval tm;  //超时参数的结构体
+				tm.tv_sec = NETKORK_CONNECT_TIME;//默认5秒
+				tm.tv_usec = 0;
+
+				int selres = select(t_network_socket.m_socket_fd + 1, &rfds, &wfds, NULL, &tm);   //(阻塞函数)(监听的文件句柄的最大值加1,可读序列文件列表,可写的序列文件列表,错误处理,超时)使用select监听文件序列set是否有可读可写,这里监听set数组(里面只有sock),只要其中的句柄有一个变得可写(在这里是sock连接成功了以后就会变得可写,就返回),就返回
+				switch (selres)
+				{
+
+					case -1:
+						printf("select error\n");
+						return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+											 " fun error ");
+					case 0:
+						printf("select time out\n");
+						return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+											 " fun error ");
+					default:
+						if (FD_ISSET(t_network_socket.m_socket_fd, &rfds) || FD_ISSET(t_network_socket.m_socket_fd, &wfds))
+						{
+							connect(t_network_socket.m_socket_fd, (sockaddr*)&saddr, sizeof(saddr));    //再次连接一次进行确认
+							int err = errno;
+							if  (err == EISCONN||err == EINPROGRESS)     //已经连接到该套接字 或 套接字为非阻塞套接字,且连接请求没有立即完成
+							{
+								//在这里, 就表示连接正常
+								printf("connect finished(success).\n");
+//								set_block(t_network_socket.m_socket_fd,true);   //成功之后重新把sock改成阻塞模式,以便后面发送/接收数据
+								t_network_socket.m_network_status = NETWORK_STATUS_READY;
+								m_network_socket_map[socket_id] = t_network_socket;
+								m_network_socket_map[socket_id].m_updata_time = std::chrono::system_clock::now();
+							}
+							else
+							{
+								printf("connect %s : %d finished(failed). errno = %d\n",t_network_socket.m_network_information.ip().c_str(),t_network_socket.m_network_information.port(),errno);
+								// printf("FD_ISSET(sock_fd, &rfds): %d\n FD_ISSET(sock_fd, &wfds): %d\n", FD_ISSET(sock_fd, &rfds) , FD_ISSET(sock_fd, &wfds));
+								return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+													 " fun error ");
+							}
+						}
+						else
+						{
+							printf("connect %s : %d finished(failed).",t_network_socket.m_network_information.ip().c_str(),t_network_socket.m_network_information.port());
+							return Error_manager(Error_code::ERROR, Error_level::MINOR_ERROR,
+												 " fun error ");
+						}
+				}
+			}
+			else  //连接正常
+			{
+				set_block(t_network_socket.m_socket_fd, true);   //成功之后重新把sock改成阻塞模式,以便后面发送/接收数据
+				printf("connect %s : %d finished(success).\n",t_network_socket.m_network_information.ip().c_str(),t_network_socket.m_network_information.port());
+			}
+		}
+		else
+		{
+			t_network_socket.m_network_status = NETWORK_STATUS_FAULT;
+			t_network_socket.m_socket_fd = 0;
+			m_network_socket_map[socket_id] = t_network_socket;
+		}
+
+	}
+	else
+	{
+		m_network_socket_map[socket_id].m_updata_time = std::chrono::system_clock::now();
+	    return Error_code::SUCCESS;
+	}
+
+	return Error_code::SUCCESS;
+}
+
+//mp_receive_data_thread 接受线程执行函数,
+//receive_data_thread 内部线程负责接受消息
+void Network_base::receive_data_thread()
+{
+	LOG(INFO) << " Network_base::receive_data_thread start "<< this;
+
+	//通信接受线程, 负责接受socket消息, 并存入 m_receive_data_list
+	while (m_receive_condition.is_alive())
+	{
+		m_receive_condition.wait_for_ex(std::chrono::microseconds(1));
+		if ( m_receive_condition.is_alive() )
+		{
+			std::this_thread::yield();
+
+			for (auto iter = m_network_socket_map.begin(); iter != m_network_socket_map.end(); ++iter)
+			{
+				//如果超时2秒就检查重连
+				if ( std::chrono::system_clock::now() - iter->second.m_updata_time > std::chrono::seconds(NETKORK_RECONNECT_OVER_TIME) )
+				{
+					Time_tool::get_instance_references().time_start(123);
+				    check_and_reconnect(iter->first);
+					Time_tool::get_instance_references().time_end(123);
+					Time_tool::get_instance_references().cout_time_microsecond(123);
+				}
+
+				int recv_len = 0;
+				char recv_buf[NETWORK_BUFFER_SIZE] = {0};
+				{//这个大括号表示只对 recv 和 send 加锁, 不要因为后面的复杂逻辑影响通信效率
+					std::unique_lock<std::mutex> lk(m_mutex);
+					//接受数据. 必须非阻塞
+					recv_len = network_recv(iter->second.m_socket_fd, recv_buf, NETWORK_BUFFER_SIZE);
+
+//					if ( iter->second.m_network_information.socket_id() == 2 && recv_len !=-1)
+//					{
+//						std::cout << " huli test :::: " << " ----------------------------------------------- = "  << std::endl;
+//						std::cout << " huli test :::: " << " socket_id = " << iter->second.m_network_information.socket_id() << std::endl;
+//						std::cout << " huli test :::: " << " ip = " << iter->second.m_network_information.ip() << std::endl;
+//						std::cout << " huli test :::: " << " recv_len = " << recv_len << std::endl;
+//					}
+
+				}
+				if ( recv_len>0 )
+				{
+					Network_message  * tp_network_message = new Network_message;
+					tp_network_message->reset(std::string(recv_buf, recv_len),
+											  iter->second.m_network_information.socket_id(),
+											  iter->second.m_network_information.ip(),
+											  iter->second.m_network_information.port());
+					//检查消息是否有效, 主要检查消息类型和接受者, 判断这条消息是不是给我的.
+					if ( check_msg(tp_network_message) == SUCCESS )
+					{
+						//接受信息成功, 刷新时间
+						iter->second.m_updata_time = std::chrono::system_clock::now();
+
+						bool is_push = m_receive_data_list.push(tp_network_message);
+						//push成功之后, tp_communication_message内存的管理权限交给链表, 如果失败就要回收内存
+						if ( is_push )
+						{
+							//唤醒解析线程一次,
+							m_analysis_data_condition.notify_all(false, true);
+						}
+						else
+						{
+//						push失败, 就要回收内存
+							delete(tp_network_message);
+							tp_network_message = NULL;
+//					return Error_manager(Error_code::CONTAINER_IS_TERMINATE, Error_level::MINOR_ERROR,
+//										 " m_receive_data_list.push error ");
+						}
+					}
+					else
+					{
+						delete(tp_network_message);
+						tp_network_message = NULL;
+					}
+				}
+				//没有接受到消息, 返回空字符串
+			}
+
+		}
+	}
+
+	LOG(INFO) << " Network_base::receive_data_thread end "<< this;
+	return;
+}
+
+//检查消息是否有效, 主要检查消息类型和接受者, 判断这条消息是不是给我的.
+Error_manager Network_base::check_msg(Network_message*  p_msg)
+{
+	return Error_code::SUCCESS;
+}
+
+
+//mp_analysis_data_thread 解析线程执行函数,
+//analysis_data_thread 内部线程负责解析消息
+void Network_base::analysis_data_thread()
+{
+	LOG(INFO) << " Network_base::analysis_data_thread start "<< this;
+
+	//通信解析线程, 负责巡检m_receive_data_list, 并解析和处理消息
+	while (m_analysis_data_condition.is_alive())
+	{
+		bool t_pass_flag = m_analysis_data_condition.wait_for_millisecond(m_analysis_cycle_time);
+		if ( m_analysis_data_condition.is_alive() )
+		{
+			std::this_thread::yield();
+			//如果解析线程被主动唤醒, 那么就表示 收到新的消息, 那就遍历整个链表
+			if ( t_pass_flag )
+			{
+				analysis_receive_list();
+			}
+				//如果解析线程超时通过, 那么就定时处理链表残留的消息,
+			else
+			{
+				analysis_receive_list();
+			}
+		}
+	}
+
+	LOG(INFO) << " Network_base::analysis_data_thread end "<< this;
+	return;
+}
+
+//循环接受链表, 解析消息,
+Error_manager Network_base::analysis_receive_list()
+{
+	Error_manager t_error;
+	if ( m_receive_data_list.m_termination_flag )
+	{
+		return Error_manager(Error_code::CONTAINER_IS_TERMINATE, Error_level::MINOR_ERROR,
+							 " Network_base::analysis_receive_list error ");
+	}
+	else
+	{
+		std::unique_lock<std::mutex> lk(m_receive_data_list.m_mutex);
+		for (auto iter = m_receive_data_list.m_data_list.begin(); iter != m_receive_data_list.m_data_list.end(); )
+		{
+			Network_message* tp_msg = **iter;
+			if ( tp_msg == NULL )
+			{
+				iter = m_receive_data_list.m_data_list.erase(iter);
+				//注:erase 删除当前 iter 之后返回下一个节点,当前的 iter 无效化,
+			}
+			else
+			{
+				//检查消息是否可以被处理
+				t_error = check_executer(tp_msg);
+				if ( t_error == SUCCESS)
+				{
+					//处理消息
+					t_error = execute_msg(tp_msg);
+//				if ( t_error )
+//				{
+//					//执行结果不管
+//				}
+//				else
+//				{
+//					//执行结果不管
+//				}
+					delete(tp_msg);
+					tp_msg = NULL;
+					iter = m_receive_data_list.m_data_list.erase(iter);
+					//注:erase 删除当前 iter 之后返回下一个节点,当前的 iter 无效化,
+				}
+				else if( t_error == COMMUNICATION_EXCUTER_IS_BUSY)
+				{
+					//处理器正忙, 那就不做处理, 直接处理下一个
+					//注:这条消息就被保留了下来, wait_for_millisecond 超时通过之后, 会循环检查残留的消息.
+					iter++;
+				}
+				else //if( t_error == COMMUNICATION_ANALYSIS_TIME_OUT )
+				{
+					//超时了就直接删除
+					delete(tp_msg);
+					tp_msg = NULL;
+					iter = m_receive_data_list.m_data_list.erase(iter);
+					//注:erase 删除当前 iter 之后返回下一个节点,当前的 iter 无效化,
+
+					//注:消息删除之后, 不需要发送答复消息, 发送方也会有超时处理的,  只有 execute_msg 里面可以答复消息
+				}
+			}
+		}
+	}
+	return Error_code::SUCCESS;
+}
+
+
+//检查执行者的状态, 判断能否处理这条消息, 需要子类重载
+Error_manager Network_base::check_executer(Network_message*  p_msg)
+{
+	return Error_code::SUCCESS;
+}
+
+//处理消息
+Error_manager Network_base::execute_msg(Network_message*  p_msg)
+{
+	//先将 p_msg 转化为 对应的格式, 使用对应模块的protobuf来二次解析
+	// 不能一直使用 Network_message*  p_msg, 这个是要销毁的
+	//然后处理这个消息, 就是调用对应模块的 execute 接口函数
+	//执行结果不管, 如果需要答复, 那么对应模块 在自己内部 封装一条消息发送即可.
+	//子类重载, 需要完全重写, 以后再写.
+
+	//注注注注注意了, 本模块只是用来做通信,
+	//在做处理消息的时候, 可能会调用执行者的接口函数,
+	//这里不应该长时间阻塞或者处理复杂的逻辑,
+	//请执行者另开线程来处理任务.
+
+	std::cout << "Network_base::excute_msg  p_buf =  " << p_msg->m_message_buf << std::endl;
+	std::cout << "Network_base::excute_msg   size =  " << p_msg->m_message_buf.size() << std::endl;
+	return Error_code::SUCCESS;
+}
+
+
+//mp_send_data_thread 发送线程执行函数,
+//send_data_thread 内部线程负责发送消息
+void Network_base::send_data_thread()
+{
+	LOG(INFO) << " Network_base::send_data_thread start "<< this;
+
+	//通信发送线程, 负责巡检m_send_data_list, 并发送消息
+	while (m_send_data_condition.is_alive())
+	{
+		m_send_data_condition.wait();
+		if ( m_send_data_condition.is_alive() )
+		{
+			std::this_thread::yield();
+
+			Network_message* tp_msg = NULL;
+			//这里 wait_and_pop 会使用链表内部的 m_data_cond 条件变量来控制等待,
+			//封装线程使用push的时候, 会唤醒线程并通过等待, 此时 m_send_data_condition 是一直通过的.
+			//如果需要退出, 那么就要 m_send_data_list.termination_list();	和 m_send_data_condition.kill_all();
+			bool is_pop = m_send_data_list.wait_and_pop(tp_msg);
+			if ( is_pop )
+			{
+				if ( tp_msg != NULL )
+				{
+					{//这个大括号表示只对 recv 和 send 加锁, 不要因为后面的复杂逻辑影响通信效率
+						std::unique_lock<std::mutex> lk(m_mutex);
+
+						network_send(m_network_socket_map[tp_msg->m_socket_id].m_socket_fd,
+									 tp_msg->m_message_buf.c_str(),
+									 tp_msg->m_message_buf.size());
+					}
+					delete(tp_msg);
+					tp_msg = NULL;
+				}
+			}
+			else
+			{
+				//没有取出, 那么应该就是 m_termination_flag 结束了
+//				return Error_manager(Error_code::CONTAINER_IS_TERMINATE, Error_level::MINOR_ERROR,
+//									 " Network_base::send_data_thread() error ");
+			}
+		}
+	}
+
+	LOG(INFO) << " Network_base::send_data_thread end "<< this;
+	return;
+}
+
+//mp_encapsulate_data_thread 封装线程执行函数,
+//encapsulate_data_thread 内部线程负责封装消息
+void Network_base::encapsulate_data_thread()
+{
+	LOG(INFO) << " Network_base::encapsulate_data_thread start "<< this;
+
+	//通信封装线程, 负责定时封装消息, 并存入 m_send_data_list
+	while (m_encapsulate_data_condition.is_alive())
+	{
+		bool t_pass_flag = m_encapsulate_data_condition.wait_for_millisecond(m_encapsulate_cycle_time);
+
+		if ( m_encapsulate_data_condition.is_alive() )
+		{
+			std::this_thread::yield();
+			//如果封装线程被主动唤醒, 那么就表示 需要主动发送消息,
+			if ( t_pass_flag )
+			{
+				//主动发送消息,
+			}
+				//如果封装线程超时通过, 那么就定时封装心跳和状态信息
+			else
+			{
+				auto_encapsulate_status();
+			}
+		}
+	}
+
+	LOG(INFO) << " Network_base::encapsulate_data_thread end "<< this;
+	return;
+}
+
+
+//定时封装发送消息, 一般为心跳和状态信息, 需要子类重载
+Error_manager Network_base::auto_encapsulate_status()
+{
+
+	return Error_code::SUCCESS;
+}
+
+
+
+//封装消息, 需要子类重载
+Error_manager Network_base::encapsulate_msg(std::string message, int socket_id)
+{
+	Network_message* tp_msg = new Network_message(message, socket_id);
+	bool is_push = m_send_data_list.push(tp_msg);
+	if ( is_push == false )
+	{
+		delete(tp_msg);
+		tp_msg = NULL;
+		return Error_manager(Error_code::CONTAINER_IS_TERMINATE, Error_level::MINOR_ERROR,
+							 " Network_base::encapsulate_msg error ");
+	}
+	return Error_code::SUCCESS;
+}
+
+//封装消息, 需要子类重载
+Error_manager Network_base::encapsulate_msg(Network_message* p_msg)
+{
+	Network_message* tp_msg = new Network_message(*p_msg);
+	bool is_push = m_send_data_list.push(tp_msg);
+	if ( is_push == false )
+	{
+		delete(tp_msg);
+		tp_msg = NULL;
+		return Error_manager(Error_code::CONTAINER_IS_TERMINATE, Error_level::MINOR_ERROR,
+							 " Network_base::encapsulate_msg error ");
+	}
+	return Error_code::SUCCESS;
+}

+ 195 - 0
plc调度节点/network_communication/network_base.h

@@ -0,0 +1,195 @@
+//
+// Created by huli on 2022/12/30.
+//
+
+#ifndef NNXX_TESTS_NETWORK_BASE_H
+#define NNXX_TESTS_NETWORK_BASE_H
+
+#include <string>
+#include <iostream>
+#include <arpa/inet.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <pthread.h>
+#include<netinet/tcp.h>
+
+#include <map>
+#include <mutex>
+#include <glog/logging.h>
+#include "../error_code/error_code.h"
+#include "../tool/binary_buf.h"
+#include "../tool/thread_safe_list.h"
+#include "../tool/thread_condition.h"
+
+#include "../network_communication/network_message.h"
+#include "../network_communication/network.pb.h"
+
+
+
+
+//网络通信的基类, linux C语言, 目前只有TCP client,
+class Network_base
+{
+public:
+
+#define NETKORK_PARAMETER_PATH "../setting/network.prototxt"
+#define NETKORK_PARAMETER_PATH_A "../setting/network_a.prototxt"
+#define NETKORK_PARAMETER_PATH_B "../setting/network_b.prototxt"
+#define NETKORK_PARAMETER_PATH_C "../setting/network_c.prototxt"
+
+#define NETKORK_CONNECT_TIME 	5		//连接时间, 单位秒
+#define NETKORK_RECONNECT_OVER_TIME 	2		//重连超时判断的时间, 单位秒
+#define NETWORK_BUFFER_SIZE		1024	//接受缓存, 每帧最多 1024 byte
+
+	//通信状态
+	enum Network_status
+	{
+		NETWORK_STATUS_UNKNOW = 0,            	//通信状态 未知
+		NETWORK_STATUS_READY = 1,            	//通信状态 正常
+		NETWORK_STATUS_DISCONNECT = 11,            	//通信状态 断连(可能会在断连和重连之间反复跳动)
+		NETWORK_STATUS_RECONNNECT = 12,            	//通信状态 重连(可能会在断连和重连之间反复跳动)
+
+
+		NETWORK_STATUS_FAULT = 100,         	//通信状态 错误
+	};
+
+////网络连接模式
+//	enum Network_mode
+//	{
+//		NETWORK_UNKNOWN = 0;
+//		TCP_CLIENT = 1;
+//		TCP_SERVER = 2;
+//		UDP = 3;
+//	}
+//
+////单个网络连接参数
+//	message Network_information
+//	{
+//		optional Network_mode               network_mode = 1[default = NETWORK_UNKNOWN];
+//		optional int32                      socket_id = 2[default = 0];         //自定义的socket编号
+//		optional string                     ip = 3[default = ""];
+//		optional int32                      port = 4[default = 0];
+//	}
+	
+	//网络连接的 socket
+	struct Network_socket
+	{
+		Network_status						m_network_status;				//每一个连接的状态
+	    int 								m_socket_fd;					//系统自动分配的编号 socket_fd
+
+		Network_proto::Network_information	m_network_information;			//单个网络连接参数
+		std::chrono::system_clock::time_point m_updata_time;				//通信更新时间
+	};
+
+
+	
+public:
+	Network_base();
+	Network_base(const Network_base& other)= default;
+	Network_base& operator =(const Network_base& other)= default;
+	~Network_base();
+public://API functions
+	//初始化 通信 模块。如下三选一
+	Error_manager network_init();
+	//初始化 通信 模块。从文件读取
+	Error_manager network_init_from_protobuf(std::string prototxt_path);
+	//初始化 通信 模块。从protobuf读取
+	Error_manager network_init_from_protobuf(Network_proto::Network_parameter_all & network_parameter_all);
+
+	//启动通信, run thread
+	Error_manager network_run();
+
+	//反初始化 通信 模块。
+	Error_manager network_uninit();
+	//重连, 快速uninit, init
+	Error_manager network_reconnnect();
+
+public://get or set member variable
+	void set_analysis_cycle_time(unsigned int analysis_cycle_time);
+	void set_encapsulate_cycle_time(unsigned int encapsulate_cycle_time);
+
+protected://member functions
+	bool set_block(int socket_fd, bool isblock);  //设置阻塞模式  (希望只有在connect的时候是非阻塞的,而接收数据时候是阻塞的)
+	int network_recv(int socket_fd, char *buf, int size);          //接收数据
+	int network_send(int socket_fd, const char *buf, int size);	//发送数据
+	bool is_connected(int socket_fd);//判断连接状态
+	Error_manager check_and_reconnect(int socket_id);//检查网络,如果断连, 就立刻重连, socket_fd会重新分配新的
+
+protected://member functions
+	//mp_receive_data_thread 接受线程执行函数,
+	//receive_data_thread 内部线程负责接受消息
+	void receive_data_thread();
+
+	//检查消息是否有效, 主要检查消息类型和接受者, 判断这条消息是不是给我的.
+	virtual Error_manager check_msg(Network_message* p_msg);
+
+	//mp_analysis_data_thread 解析线程执行函数,
+	//analysis_data_thread 内部线程负责解析消息
+	void analysis_data_thread();
+
+	//遍历接受链表, 解析消息,
+	Error_manager analysis_receive_list();
+
+	//检查执行者的状态, 判断能否处理这条消息, 需要子类重载
+	virtual Error_manager check_executer(Network_message* p_msg);
+
+	//处理消息, 需要子类重载
+	virtual Error_manager execute_msg(Network_message* p_msg);
+
+	//mp_send_data_thread 发送线程执行函数,
+	//send_data_thread 内部线程负责发送消息
+	void send_data_thread();
+
+	//mp_encapsulate_data_thread 封装线程执行函数,
+	//encapsulate_data_thread 内部线程负责封装消息
+	void encapsulate_data_thread();
+
+	//定时封装发送消息, 一般为心跳和状态信息, 需要子类重载
+	virtual Error_manager auto_encapsulate_status();
+
+public:
+	//封装消息, 需要子类重载
+	virtual Error_manager encapsulate_msg(std::string message, int socket_id = 0);
+	//封装消息, 需要子类重载
+	virtual Error_manager encapsulate_msg(Network_message* p_msg);
+
+
+
+protected://member variable
+
+	Network_status								m_network_status;		//通信总状态
+
+	Network_proto::Network_parameter_all		m_network_parameter_all;	//配置文件导入参数
+	std::map<int, Network_socket>				m_network_socket_map; 	//网络连接配置, key是自定义的socket_id编号
+
+	std::mutex 									m_mutex;		// 数据锁
+
+	//接受模块,
+	Thread_safe_list<Network_message*>		m_receive_data_list; 			//接受的list容器
+	std::thread*						mp_receive_data_thread;    		//接受的线程指针
+	Thread_condition					m_receive_condition;			//接受的条件变量
+	std::thread*						mp_analysis_data_thread;    	//解析的线程指针
+	Thread_condition					m_analysis_data_condition;		//解析的条件变量
+	unsigned int 						m_analysis_cycle_time;			//自动解析的时间周期
+
+	//发送模块,
+	Thread_safe_list<Network_message*>		m_send_data_list;				//发送的list容器
+	std::thread*						mp_send_data_thread;    		//发送的线程指针
+	Thread_condition					m_send_data_condition;			//发送的条件变量
+	std::thread*						mp_encapsulate_data_thread;    	//封装的线程指针
+	Thread_condition					m_encapsulate_data_condition;	//封装的条件变量
+	unsigned int 						m_encapsulate_cycle_time;		//自动封装的时间周期
+
+	//回调函数,
+	// //可以选择设置回调函数,或者子类继承重载,二选一.
+	Error_manager (*check_msg_callback)(Network_message* p_msg);
+	Error_manager (*check_executer_callback)(Network_message* p_msg);
+	Error_manager (*execute_msg_callback)(Network_message* p_msg);
+	Error_manager (*encapsulate_status_callback)();
+
+private:
+
+};
+
+
+#endif //NNXX_TESTS_NETWORK_BASE_H

+ 53 - 0
plc调度节点/network_communication/network_message.cpp

@@ -0,0 +1,53 @@
+//
+// Created by huli on 2022/12/30.
+//
+
+#include "network_message.h"
+
+Network_message::Network_message()
+{
+
+}
+Network_message::Network_message(std::string message_buf, int socket_id, std::string ip, int port)
+{
+	m_message_buf = message_buf;
+	m_socket_id = socket_id;
+	m_ip = ip;
+	m_port = port;
+}
+Network_message::Network_message(std::string message_buf, int socket_id)
+{
+	m_message_buf = message_buf;
+	m_socket_id = socket_id;
+	m_ip.clear();
+	m_port = 0;
+}
+
+
+Network_message::~Network_message()
+{
+
+}
+
+
+void Network_message::reset(std::string message_buf, int socket_id, std::string ip, int port)
+{
+	m_message_buf = message_buf;
+	m_socket_id = socket_id;
+	m_ip = ip;
+	m_port = port;
+}
+void Network_message::reset(std::string message_buf, int socket_id)
+{
+	m_message_buf = message_buf;
+	m_socket_id = socket_id;
+	m_ip.clear();
+	m_port = 0;
+}
+
+
+
+
+
+
+

+ 47 - 0
plc调度节点/network_communication/network_message.h

@@ -0,0 +1,47 @@
+//
+// Created by huli on 2022/12/30.
+//
+
+#ifndef NNXX_TESTS_NETWORK_MESSAGE_H
+#define NNXX_TESTS_NETWORK_MESSAGE_H
+
+#include "../error_code/error_code.h"
+#include <string>
+
+
+//网络通信的数据包,
+class Network_message
+{
+public:
+	Network_message();
+	Network_message(std::string message_buf, int socket_id, std::string ip, int port);
+	Network_message(std::string message_buf, int socket_id = 0);
+
+	Network_message(const Network_message& other)= default;
+	Network_message& operator =(const Network_message& other)= default;
+	~Network_message();
+public://API functions
+	void reset(std::string message_buf, int socket_id, std::string ip, int port);
+	void reset(std::string message_buf, int socket_id = 0);
+
+public://get or set member variable
+
+protected://member functions
+
+protected://member variable
+public:
+	//数据包属性
+	int 												m_socket_id;				//自定义的socket编号, 不能为0
+	std::string											m_ip;						//连接的ip, 接受特有, 发送没有
+	int													m_port;						//连接的端口, 接受特有, 发送没有
+
+	//数据包内容
+	std::string											m_message_buf;				//消息数据
+
+
+private:
+
+};
+
+
+#endif //NNXX_TESTS_NETWORK_MESSAGE_H

+ 2 - 0
plc调度节点/proto.sh

@@ -4,6 +4,7 @@ protoc -I=./snap7_communication snap7_communication.proto --cpp_out=./snap7_comm
 protoc -I=./dispatch dispatch_parameter.proto --cpp_out=./dispatch
 protoc -I=./rabbitmq rabbitmq.proto --cpp_out=./rabbitmq
 protoc -I=./dispatch database_communication_configuration.proto --cpp_out=./dispatch
+protoc -I=./network_communication network.proto --cpp_out=./network_communication
 
 
 protoc -I=./message message_base.proto --cpp_out=./message
@@ -16,6 +17,7 @@ protoc -I=./message message_base.proto --cpp_out=./message
 #protoc -I=./message notify_message.proto --cpp_out=./message
 
 protoc -I=./message message.proto --cpp_out=./message
+protoc -I=./message singlechip_msg.proto --cpp_out=./message
 
 
 #protoc -I=./message central_control_message.proto --cpp_out=./message

+ 139 - 104
plc调度节点/rabbitmq/rabbitmq.pb.cc

@@ -7,6 +7,7 @@
 
 #include <google/protobuf/stubs/common.h>
 #include <google/protobuf/stubs/port.h>
+#include <google/protobuf/stubs/once.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/wire_format_lite_inl.h>
 #include <google/protobuf/descriptor.h>
@@ -18,11 +19,6 @@
 #include "third_party/protobuf/version.h"
 #endif
 // @@protoc_insertion_point(includes)
-
-namespace protobuf_rabbitmq_2eproto {
-extern PROTOBUF_INTERNAL_EXPORT_protobuf_rabbitmq_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Rabbitmq_channel_queue_consume;
-extern PROTOBUF_INTERNAL_EXPORT_protobuf_rabbitmq_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Rabbitmq_parameter;
-}  // namespace protobuf_rabbitmq_2eproto
 namespace Rabbitmq_proto {
 class Rabbitmq_channel_queue_consumeDefaultTypeInternal {
  public:
@@ -41,9 +37,14 @@ class Rabbitmq_parameter_allDefaultTypeInternal {
 } _Rabbitmq_parameter_all_default_instance_;
 }  // namespace Rabbitmq_proto
 namespace protobuf_rabbitmq_2eproto {
-static void InitDefaultsRabbitmq_channel_queue_consume() {
+void InitDefaultsRabbitmq_channel_queue_consumeImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
   {
     void* ptr = &::Rabbitmq_proto::_Rabbitmq_channel_queue_consume_default_instance_;
     new (ptr) ::Rabbitmq_proto::Rabbitmq_channel_queue_consume();
@@ -52,12 +53,20 @@ static void InitDefaultsRabbitmq_channel_queue_consume() {
   ::Rabbitmq_proto::Rabbitmq_channel_queue_consume::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<0> scc_info_Rabbitmq_channel_queue_consume =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRabbitmq_channel_queue_consume}, {}};
+void InitDefaultsRabbitmq_channel_queue_consume() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRabbitmq_channel_queue_consumeImpl);
+}
 
-static void InitDefaultsRabbitmq_parameter() {
+void InitDefaultsRabbitmq_parameterImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  protobuf_rabbitmq_2eproto::InitDefaultsRabbitmq_channel_queue_consume();
   {
     void* ptr = &::Rabbitmq_proto::_Rabbitmq_parameter_default_instance_;
     new (ptr) ::Rabbitmq_proto::Rabbitmq_parameter();
@@ -66,13 +75,20 @@ static void InitDefaultsRabbitmq_parameter() {
   ::Rabbitmq_proto::Rabbitmq_parameter::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<1> scc_info_Rabbitmq_parameter =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRabbitmq_parameter}, {
-      &protobuf_rabbitmq_2eproto::scc_info_Rabbitmq_channel_queue_consume.base,}};
+void InitDefaultsRabbitmq_parameter() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRabbitmq_parameterImpl);
+}
 
-static void InitDefaultsRabbitmq_parameter_all() {
+void InitDefaultsRabbitmq_parameter_allImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  protobuf_rabbitmq_2eproto::InitDefaultsRabbitmq_parameter();
   {
     void* ptr = &::Rabbitmq_proto::_Rabbitmq_parameter_all_default_instance_;
     new (ptr) ::Rabbitmq_proto::Rabbitmq_parameter_all();
@@ -81,14 +97,9 @@ static void InitDefaultsRabbitmq_parameter_all() {
   ::Rabbitmq_proto::Rabbitmq_parameter_all::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<1> scc_info_Rabbitmq_parameter_all =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRabbitmq_parameter_all}, {
-      &protobuf_rabbitmq_2eproto::scc_info_Rabbitmq_parameter.base,}};
-
-void InitDefaults() {
-  ::google::protobuf::internal::InitSCC(&scc_info_Rabbitmq_channel_queue_consume.base);
-  ::google::protobuf::internal::InitSCC(&scc_info_Rabbitmq_parameter.base);
-  ::google::protobuf::internal::InitSCC(&scc_info_Rabbitmq_parameter_all.base);
+void InitDefaultsRabbitmq_parameter_all() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRabbitmq_parameter_allImpl);
 }
 
 ::google::protobuf::Metadata file_level_metadata[3];
@@ -170,14 +181,15 @@ static ::google::protobuf::Message const * const file_default_instances[] = {
 
 void protobuf_AssignDescriptors() {
   AddDescriptors();
+  ::google::protobuf::MessageFactory* factory = NULL;
   AssignDescriptors(
-      "rabbitmq.proto", schemas, file_default_instances, TableStruct::offsets,
+      "rabbitmq.proto", schemas, file_default_instances, TableStruct::offsets, factory,
       file_level_metadata, NULL, NULL);
 }
 
 void protobuf_AssignDescriptorsOnce() {
-  static ::google::protobuf::internal::once_flag once;
-  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
 }
 
 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
@@ -219,8 +231,8 @@ void AddDescriptorsImpl() {
 }
 
 void AddDescriptors() {
-  static ::google::protobuf::internal::once_flag once;
-  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
 }
 // Force AddDescriptors() to be called at dynamic initialization time.
 struct StaticDescriptorInitializer {
@@ -255,15 +267,17 @@ const int Rabbitmq_channel_queue_consume::kConsumeExclusiveFieldNumber;
 
 Rabbitmq_channel_queue_consume::Rabbitmq_channel_queue_consume()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_rabbitmq_2eproto::scc_info_Rabbitmq_channel_queue_consume.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_rabbitmq_2eproto::InitDefaultsRabbitmq_channel_queue_consume();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:Rabbitmq_proto.Rabbitmq_channel_queue_consume)
 }
 Rabbitmq_channel_queue_consume::Rabbitmq_channel_queue_consume(const Rabbitmq_channel_queue_consume& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   exchange_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.has_exchange_name()) {
@@ -292,6 +306,7 @@ Rabbitmq_channel_queue_consume::Rabbitmq_channel_queue_consume(const Rabbitmq_ch
 }
 
 void Rabbitmq_channel_queue_consume::SharedCtor() {
+  _cached_size_ = 0;
   exchange_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   routing_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   binding_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -316,7 +331,9 @@ void Rabbitmq_channel_queue_consume::SharedDtor() {
 }
 
 void Rabbitmq_channel_queue_consume::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Rabbitmq_channel_queue_consume::descriptor() {
   ::protobuf_rabbitmq_2eproto::protobuf_AssignDescriptorsOnce();
@@ -324,10 +341,17 @@ const ::google::protobuf::Descriptor* Rabbitmq_channel_queue_consume::descriptor
 }
 
 const Rabbitmq_channel_queue_consume& Rabbitmq_channel_queue_consume::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_rabbitmq_2eproto::scc_info_Rabbitmq_channel_queue_consume.base);
+  ::protobuf_rabbitmq_2eproto::InitDefaultsRabbitmq_channel_queue_consume();
   return *internal_default_instance();
 }
 
+Rabbitmq_channel_queue_consume* Rabbitmq_channel_queue_consume::New(::google::protobuf::Arena* arena) const {
+  Rabbitmq_channel_queue_consume* n = new Rabbitmq_channel_queue_consume;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Rabbitmq_channel_queue_consume::Clear() {
 // @@protoc_insertion_point(message_clear_start:Rabbitmq_proto.Rabbitmq_channel_queue_consume)
@@ -338,19 +362,24 @@ void Rabbitmq_channel_queue_consume::Clear() {
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 31u) {
     if (cached_has_bits & 0x00000001u) {
-      exchange_name_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!exchange_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*exchange_name_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000002u) {
-      routing_key_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!routing_key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*routing_key_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000004u) {
-      binding_key_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!binding_key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*binding_key_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000008u) {
-      queue_name_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!queue_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*queue_name_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000010u) {
-      consume_name_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!consume_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*consume_name_.UnsafeRawStringPointer())->clear();
     }
   }
   if (cached_has_bits & 224u) {
@@ -373,7 +402,7 @@ bool Rabbitmq_channel_queue_consume::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:Rabbitmq_proto.Rabbitmq_channel_queue_consume)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -971,7 +1000,9 @@ size_t Rabbitmq_channel_queue_consume::ByteSizeLong() const {
 
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -1080,16 +1111,11 @@ void Rabbitmq_channel_queue_consume::Swap(Rabbitmq_channel_queue_consume* other)
 }
 void Rabbitmq_channel_queue_consume::InternalSwap(Rabbitmq_channel_queue_consume* other) {
   using std::swap;
-  exchange_name_.Swap(&other->exchange_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
-  routing_key_.Swap(&other->routing_key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
-  binding_key_.Swap(&other->binding_key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
-  queue_name_.Swap(&other->queue_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
-  consume_name_.Swap(&other->consume_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
+  exchange_name_.Swap(&other->exchange_name_);
+  routing_key_.Swap(&other->routing_key_);
+  binding_key_.Swap(&other->binding_key_);
+  queue_name_.Swap(&other->queue_name_);
+  consume_name_.Swap(&other->consume_name_);
   swap(channel_, other->channel_);
   swap(timeout_ms_, other->timeout_ms_);
   swap(queue_passive_, other->queue_passive_);
@@ -1102,6 +1128,7 @@ void Rabbitmq_channel_queue_consume::InternalSwap(Rabbitmq_channel_queue_consume
   swap(consume_exclusive_, other->consume_exclusive_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Rabbitmq_channel_queue_consume::GetMetadata() const {
@@ -1126,8 +1153,9 @@ const int Rabbitmq_parameter::kRabbitmqSenderStatusVectorFieldNumber;
 
 Rabbitmq_parameter::Rabbitmq_parameter()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_rabbitmq_2eproto::scc_info_Rabbitmq_parameter.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_rabbitmq_2eproto::InitDefaultsRabbitmq_parameter();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:Rabbitmq_proto.Rabbitmq_parameter)
 }
@@ -1135,6 +1163,7 @@ Rabbitmq_parameter::Rabbitmq_parameter(const Rabbitmq_parameter& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
       _has_bits_(from._has_bits_),
+      _cached_size_(0),
       rabbitmq_reciever_vector_(from.rabbitmq_reciever_vector_),
       rabbitmq_sender_request_vector_(from.rabbitmq_sender_request_vector_),
       rabbitmq_sender_status_vector_(from.rabbitmq_sender_status_vector_) {
@@ -1156,6 +1185,7 @@ Rabbitmq_parameter::Rabbitmq_parameter(const Rabbitmq_parameter& from)
 }
 
 void Rabbitmq_parameter::SharedCtor() {
+  _cached_size_ = 0;
   ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   user_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   password_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -1174,7 +1204,9 @@ void Rabbitmq_parameter::SharedDtor() {
 }
 
 void Rabbitmq_parameter::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Rabbitmq_parameter::descriptor() {
   ::protobuf_rabbitmq_2eproto::protobuf_AssignDescriptorsOnce();
@@ -1182,10 +1214,17 @@ const ::google::protobuf::Descriptor* Rabbitmq_parameter::descriptor() {
 }
 
 const Rabbitmq_parameter& Rabbitmq_parameter::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_rabbitmq_2eproto::scc_info_Rabbitmq_parameter.base);
+  ::protobuf_rabbitmq_2eproto::InitDefaultsRabbitmq_parameter();
   return *internal_default_instance();
 }
 
+Rabbitmq_parameter* Rabbitmq_parameter::New(::google::protobuf::Arena* arena) const {
+  Rabbitmq_parameter* n = new Rabbitmq_parameter;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Rabbitmq_parameter::Clear() {
 // @@protoc_insertion_point(message_clear_start:Rabbitmq_proto.Rabbitmq_parameter)
@@ -1199,13 +1238,16 @@ void Rabbitmq_parameter::Clear() {
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 7u) {
     if (cached_has_bits & 0x00000001u) {
-      ip_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!ip_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*ip_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000002u) {
-      user_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!user_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*user_.UnsafeRawStringPointer())->clear();
     }
     if (cached_has_bits & 0x00000004u) {
-      password_.ClearNonDefaultToEmptyNoArena();
+      GOOGLE_DCHECK(!password_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
+      (*password_.UnsafeRawStringPointer())->clear();
     }
   }
   port_ = 0;
@@ -1219,7 +1261,7 @@ bool Rabbitmq_parameter::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:Rabbitmq_proto.Rabbitmq_parameter)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -1289,8 +1331,7 @@ bool Rabbitmq_parameter::MergePartialFromCodedStream(
       case 5: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
-          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
-                input, add_rabbitmq_reciever_vector()));
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_rabbitmq_reciever_vector()));
         } else {
           goto handle_unusual;
         }
@@ -1301,8 +1342,7 @@ bool Rabbitmq_parameter::MergePartialFromCodedStream(
       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_rabbitmq_sender_request_vector()));
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_rabbitmq_sender_request_vector()));
         } else {
           goto handle_unusual;
         }
@@ -1313,8 +1353,7 @@ bool Rabbitmq_parameter::MergePartialFromCodedStream(
       case 7: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
-          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
-                input, add_rabbitmq_sender_status_vector()));
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_rabbitmq_sender_status_vector()));
         } else {
           goto handle_unusual;
         }
@@ -1387,27 +1426,21 @@ void Rabbitmq_parameter::SerializeWithCachedSizes(
   for (unsigned int i = 0,
       n = static_cast<unsigned int>(this->rabbitmq_reciever_vector_size()); i < n; i++) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      5,
-      this->rabbitmq_reciever_vector(static_cast<int>(i)),
-      output);
+      5, this->rabbitmq_reciever_vector(static_cast<int>(i)), output);
   }
 
   // repeated .Rabbitmq_proto.Rabbitmq_channel_queue_consume rabbitmq_sender_request_vector = 6;
   for (unsigned int i = 0,
       n = static_cast<unsigned int>(this->rabbitmq_sender_request_vector_size()); i < n; i++) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      6,
-      this->rabbitmq_sender_request_vector(static_cast<int>(i)),
-      output);
+      6, this->rabbitmq_sender_request_vector(static_cast<int>(i)), output);
   }
 
   // repeated .Rabbitmq_proto.Rabbitmq_channel_queue_consume rabbitmq_sender_status_vector = 7;
   for (unsigned int i = 0,
       n = static_cast<unsigned int>(this->rabbitmq_sender_status_vector_size()); i < n; i++) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      7,
-      this->rabbitmq_sender_status_vector(static_cast<int>(i)),
-      output);
+      7, this->rabbitmq_sender_status_vector(static_cast<int>(i)), output);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -1568,7 +1601,9 @@ size_t Rabbitmq_parameter::ByteSizeLong() const {
 
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -1642,18 +1677,16 @@ void Rabbitmq_parameter::Swap(Rabbitmq_parameter* other) {
 }
 void Rabbitmq_parameter::InternalSwap(Rabbitmq_parameter* other) {
   using std::swap;
-  CastToBase(&rabbitmq_reciever_vector_)->InternalSwap(CastToBase(&other->rabbitmq_reciever_vector_));
-  CastToBase(&rabbitmq_sender_request_vector_)->InternalSwap(CastToBase(&other->rabbitmq_sender_request_vector_));
-  CastToBase(&rabbitmq_sender_status_vector_)->InternalSwap(CastToBase(&other->rabbitmq_sender_status_vector_));
-  ip_.Swap(&other->ip_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
-  user_.Swap(&other->user_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
-  password_.Swap(&other->password_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
+  rabbitmq_reciever_vector_.InternalSwap(&other->rabbitmq_reciever_vector_);
+  rabbitmq_sender_request_vector_.InternalSwap(&other->rabbitmq_sender_request_vector_);
+  rabbitmq_sender_status_vector_.InternalSwap(&other->rabbitmq_sender_status_vector_);
+  ip_.Swap(&other->ip_);
+  user_.Swap(&other->user_);
+  password_.Swap(&other->password_);
   swap(port_, other->port_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Rabbitmq_parameter::GetMetadata() const {
@@ -1674,15 +1707,17 @@ const int Rabbitmq_parameter_all::kRabbitmqParametersFieldNumber;
 
 Rabbitmq_parameter_all::Rabbitmq_parameter_all()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_rabbitmq_2eproto::scc_info_Rabbitmq_parameter_all.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_rabbitmq_2eproto::InitDefaultsRabbitmq_parameter_all();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:Rabbitmq_proto.Rabbitmq_parameter_all)
 }
 Rabbitmq_parameter_all::Rabbitmq_parameter_all(const Rabbitmq_parameter_all& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   if (from.has_rabbitmq_parameters()) {
     rabbitmq_parameters_ = new ::Rabbitmq_proto::Rabbitmq_parameter(*from.rabbitmq_parameters_);
@@ -1693,6 +1728,7 @@ Rabbitmq_parameter_all::Rabbitmq_parameter_all(const Rabbitmq_parameter_all& fro
 }
 
 void Rabbitmq_parameter_all::SharedCtor() {
+  _cached_size_ = 0;
   rabbitmq_parameters_ = NULL;
 }
 
@@ -1706,7 +1742,9 @@ void Rabbitmq_parameter_all::SharedDtor() {
 }
 
 void Rabbitmq_parameter_all::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Rabbitmq_parameter_all::descriptor() {
   ::protobuf_rabbitmq_2eproto::protobuf_AssignDescriptorsOnce();
@@ -1714,10 +1752,17 @@ const ::google::protobuf::Descriptor* Rabbitmq_parameter_all::descriptor() {
 }
 
 const Rabbitmq_parameter_all& Rabbitmq_parameter_all::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_rabbitmq_2eproto::scc_info_Rabbitmq_parameter_all.base);
+  ::protobuf_rabbitmq_2eproto::InitDefaultsRabbitmq_parameter_all();
   return *internal_default_instance();
 }
 
+Rabbitmq_parameter_all* Rabbitmq_parameter_all::New(::google::protobuf::Arena* arena) const {
+  Rabbitmq_parameter_all* n = new Rabbitmq_parameter_all;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Rabbitmq_parameter_all::Clear() {
 // @@protoc_insertion_point(message_clear_start:Rabbitmq_proto.Rabbitmq_parameter_all)
@@ -1740,7 +1785,7 @@ bool Rabbitmq_parameter_all::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:Rabbitmq_proto.Rabbitmq_parameter_all)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -1786,7 +1831,7 @@ void Rabbitmq_parameter_all::SerializeWithCachedSizes(
   // optional .Rabbitmq_proto.Rabbitmq_parameter rabbitmq_parameters = 1;
   if (cached_has_bits & 0x00000001u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      1, this->_internal_rabbitmq_parameters(), output);
+      1, *this->rabbitmq_parameters_, output);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -1808,7 +1853,7 @@ void Rabbitmq_parameter_all::SerializeWithCachedSizes(
   if (cached_has_bits & 0x00000001u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
-        1, this->_internal_rabbitmq_parameters(), deterministic, target);
+        1, *this->rabbitmq_parameters_, deterministic, target);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -1832,11 +1877,13 @@ size_t Rabbitmq_parameter_all::ByteSizeLong() const {
   if (has_rabbitmq_parameters()) {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *rabbitmq_parameters_);
+        *this->rabbitmq_parameters_);
   }
 
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -1894,6 +1941,7 @@ void Rabbitmq_parameter_all::InternalSwap(Rabbitmq_parameter_all* other) {
   swap(rabbitmq_parameters_, other->rabbitmq_parameters_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Rabbitmq_parameter_all::GetMetadata() const {
@@ -1904,18 +1952,5 @@ void Rabbitmq_parameter_all::InternalSwap(Rabbitmq_parameter_all* other) {
 
 // @@protoc_insertion_point(namespace_scope)
 }  // namespace Rabbitmq_proto
-namespace google {
-namespace protobuf {
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* Arena::CreateMaybeMessage< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >(Arena* arena) {
-  return Arena::CreateInternal< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >(arena);
-}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::Rabbitmq_proto::Rabbitmq_parameter* Arena::CreateMaybeMessage< ::Rabbitmq_proto::Rabbitmq_parameter >(Arena* arena) {
-  return Arena::CreateInternal< ::Rabbitmq_proto::Rabbitmq_parameter >(arena);
-}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::Rabbitmq_proto::Rabbitmq_parameter_all* Arena::CreateMaybeMessage< ::Rabbitmq_proto::Rabbitmq_parameter_all >(Arena* arena) {
-  return Arena::CreateInternal< ::Rabbitmq_proto::Rabbitmq_parameter_all >(arena);
-}
-}  // namespace protobuf
-}  // namespace google
 
 // @@protoc_insertion_point(global_scope)

+ 103 - 144
plc调度节点/rabbitmq/rabbitmq.pb.h

@@ -1,19 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: rabbitmq.proto
 
-#ifndef PROTOBUF_INCLUDED_rabbitmq_2eproto
-#define PROTOBUF_INCLUDED_rabbitmq_2eproto
+#ifndef PROTOBUF_rabbitmq_2eproto__INCLUDED
+#define PROTOBUF_rabbitmq_2eproto__INCLUDED
 
 #include <string>
 
 #include <google/protobuf/stubs/common.h>
 
-#if GOOGLE_PROTOBUF_VERSION < 3006001
+#if GOOGLE_PROTOBUF_VERSION < 3005000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please update
 #error your headers.
 #endif
-#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please
 #error regenerate this file with a newer version of protoc.
@@ -24,14 +24,12 @@
 #include <google/protobuf/arenastring.h>
 #include <google/protobuf/generated_message_table_driven.h>
 #include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/inlined_string_field.h>
 #include <google/protobuf/metadata.h>
 #include <google/protobuf/message.h>
 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
 #include <google/protobuf/extension_set.h>  // IWYU pragma: export
 #include <google/protobuf/unknown_field_set.h>
 // @@protoc_insertion_point(includes)
-#define PROTOBUF_INTERNAL_EXPORT_protobuf_rabbitmq_2eproto 
 
 namespace protobuf_rabbitmq_2eproto {
 // Internal implementation detail -- do not use these members.
@@ -44,6 +42,17 @@ struct TableStruct {
   static const ::google::protobuf::uint32 offsets[];
 };
 void AddDescriptors();
+void InitDefaultsRabbitmq_channel_queue_consumeImpl();
+void InitDefaultsRabbitmq_channel_queue_consume();
+void InitDefaultsRabbitmq_parameterImpl();
+void InitDefaultsRabbitmq_parameter();
+void InitDefaultsRabbitmq_parameter_allImpl();
+void InitDefaultsRabbitmq_parameter_all();
+inline void InitDefaults() {
+  InitDefaultsRabbitmq_channel_queue_consume();
+  InitDefaultsRabbitmq_parameter();
+  InitDefaultsRabbitmq_parameter_all();
+}
 }  // namespace protobuf_rabbitmq_2eproto
 namespace Rabbitmq_proto {
 class Rabbitmq_channel_queue_consume;
@@ -56,13 +65,6 @@ class Rabbitmq_parameter_all;
 class Rabbitmq_parameter_allDefaultTypeInternal;
 extern Rabbitmq_parameter_allDefaultTypeInternal _Rabbitmq_parameter_all_default_instance_;
 }  // namespace Rabbitmq_proto
-namespace google {
-namespace protobuf {
-template<> ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* Arena::CreateMaybeMessage<::Rabbitmq_proto::Rabbitmq_channel_queue_consume>(Arena*);
-template<> ::Rabbitmq_proto::Rabbitmq_parameter* Arena::CreateMaybeMessage<::Rabbitmq_proto::Rabbitmq_parameter>(Arena*);
-template<> ::Rabbitmq_proto::Rabbitmq_parameter_all* Arena::CreateMaybeMessage<::Rabbitmq_proto::Rabbitmq_parameter_all>(Arena*);
-}  // namespace protobuf
-}  // namespace google
 namespace Rabbitmq_proto {
 
 // ===================================================================
@@ -108,7 +110,7 @@ class Rabbitmq_channel_queue_consume : public ::google::protobuf::Message /* @@p
     return reinterpret_cast<const Rabbitmq_channel_queue_consume*>(
                &_Rabbitmq_channel_queue_consume_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     0;
 
   void Swap(Rabbitmq_channel_queue_consume* other);
@@ -118,33 +120,28 @@ class Rabbitmq_channel_queue_consume : public ::google::protobuf::Message /* @@p
 
   // implements Message ----------------------------------------------
 
-  inline Rabbitmq_channel_queue_consume* New() const final {
-    return CreateMaybeMessage<Rabbitmq_channel_queue_consume>(NULL);
-  }
+  inline Rabbitmq_channel_queue_consume* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Rabbitmq_channel_queue_consume* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Rabbitmq_channel_queue_consume>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Rabbitmq_channel_queue_consume* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Rabbitmq_channel_queue_consume& from);
   void MergeFrom(const Rabbitmq_channel_queue_consume& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Rabbitmq_channel_queue_consume* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -155,7 +152,7 @@ class Rabbitmq_channel_queue_consume : public ::google::protobuf::Message /* @@p
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -341,7 +338,7 @@ class Rabbitmq_channel_queue_consume : public ::google::protobuf::Message /* @@p
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::google::protobuf::internal::ArenaStringPtr exchange_name_;
   ::google::protobuf::internal::ArenaStringPtr routing_key_;
   ::google::protobuf::internal::ArenaStringPtr binding_key_;
@@ -358,6 +355,7 @@ class Rabbitmq_channel_queue_consume : public ::google::protobuf::Message /* @@p
   ::google::protobuf::int32 consume_no_ack_;
   ::google::protobuf::int32 consume_exclusive_;
   friend struct ::protobuf_rabbitmq_2eproto::TableStruct;
+  friend void ::protobuf_rabbitmq_2eproto::InitDefaultsRabbitmq_channel_queue_consumeImpl();
 };
 // -------------------------------------------------------------------
 
@@ -402,7 +400,7 @@ class Rabbitmq_parameter : public ::google::protobuf::Message /* @@protoc_insert
     return reinterpret_cast<const Rabbitmq_parameter*>(
                &_Rabbitmq_parameter_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     1;
 
   void Swap(Rabbitmq_parameter* other);
@@ -412,33 +410,28 @@ class Rabbitmq_parameter : public ::google::protobuf::Message /* @@protoc_insert
 
   // implements Message ----------------------------------------------
 
-  inline Rabbitmq_parameter* New() const final {
-    return CreateMaybeMessage<Rabbitmq_parameter>(NULL);
-  }
+  inline Rabbitmq_parameter* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Rabbitmq_parameter* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Rabbitmq_parameter>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Rabbitmq_parameter* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Rabbitmq_parameter& from);
   void MergeFrom(const Rabbitmq_parameter& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Rabbitmq_parameter* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -449,7 +442,7 @@ class Rabbitmq_parameter : public ::google::protobuf::Message /* @@protoc_insert
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -459,11 +452,11 @@ class Rabbitmq_parameter : public ::google::protobuf::Message /* @@protoc_insert
   int rabbitmq_reciever_vector_size() const;
   void clear_rabbitmq_reciever_vector();
   static const int kRabbitmqRecieverVectorFieldNumber = 5;
+  const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& rabbitmq_reciever_vector(int index) const;
   ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* mutable_rabbitmq_reciever_vector(int index);
+  ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* add_rabbitmq_reciever_vector();
   ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >*
       mutable_rabbitmq_reciever_vector();
-  const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& rabbitmq_reciever_vector(int index) const;
-  ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* add_rabbitmq_reciever_vector();
   const ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >&
       rabbitmq_reciever_vector() const;
 
@@ -471,11 +464,11 @@ class Rabbitmq_parameter : public ::google::protobuf::Message /* @@protoc_insert
   int rabbitmq_sender_request_vector_size() const;
   void clear_rabbitmq_sender_request_vector();
   static const int kRabbitmqSenderRequestVectorFieldNumber = 6;
+  const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& rabbitmq_sender_request_vector(int index) const;
   ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* mutable_rabbitmq_sender_request_vector(int index);
+  ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* add_rabbitmq_sender_request_vector();
   ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >*
       mutable_rabbitmq_sender_request_vector();
-  const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& rabbitmq_sender_request_vector(int index) const;
-  ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* add_rabbitmq_sender_request_vector();
   const ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >&
       rabbitmq_sender_request_vector() const;
 
@@ -483,11 +476,11 @@ class Rabbitmq_parameter : public ::google::protobuf::Message /* @@protoc_insert
   int rabbitmq_sender_status_vector_size() const;
   void clear_rabbitmq_sender_status_vector();
   static const int kRabbitmqSenderStatusVectorFieldNumber = 7;
+  const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& rabbitmq_sender_status_vector(int index) const;
   ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* mutable_rabbitmq_sender_status_vector(int index);
+  ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* add_rabbitmq_sender_status_vector();
   ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >*
       mutable_rabbitmq_sender_status_vector();
-  const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& rabbitmq_sender_status_vector(int index) const;
-  ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* add_rabbitmq_sender_status_vector();
   const ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >&
       rabbitmq_sender_status_vector() const;
 
@@ -556,7 +549,7 @@ class Rabbitmq_parameter : public ::google::protobuf::Message /* @@protoc_insert
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume > rabbitmq_reciever_vector_;
   ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume > rabbitmq_sender_request_vector_;
   ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume > rabbitmq_sender_status_vector_;
@@ -565,6 +558,7 @@ class Rabbitmq_parameter : public ::google::protobuf::Message /* @@protoc_insert
   ::google::protobuf::internal::ArenaStringPtr password_;
   ::google::protobuf::int32 port_;
   friend struct ::protobuf_rabbitmq_2eproto::TableStruct;
+  friend void ::protobuf_rabbitmq_2eproto::InitDefaultsRabbitmq_parameterImpl();
 };
 // -------------------------------------------------------------------
 
@@ -609,7 +603,7 @@ class Rabbitmq_parameter_all : public ::google::protobuf::Message /* @@protoc_in
     return reinterpret_cast<const Rabbitmq_parameter_all*>(
                &_Rabbitmq_parameter_all_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     2;
 
   void Swap(Rabbitmq_parameter_all* other);
@@ -619,33 +613,28 @@ class Rabbitmq_parameter_all : public ::google::protobuf::Message /* @@protoc_in
 
   // implements Message ----------------------------------------------
 
-  inline Rabbitmq_parameter_all* New() const final {
-    return CreateMaybeMessage<Rabbitmq_parameter_all>(NULL);
-  }
+  inline Rabbitmq_parameter_all* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Rabbitmq_parameter_all* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Rabbitmq_parameter_all>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Rabbitmq_parameter_all* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Rabbitmq_parameter_all& from);
   void MergeFrom(const Rabbitmq_parameter_all& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Rabbitmq_parameter_all* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -656,7 +645,7 @@ class Rabbitmq_parameter_all : public ::google::protobuf::Message /* @@protoc_in
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -666,9 +655,6 @@ class Rabbitmq_parameter_all : public ::google::protobuf::Message /* @@protoc_in
   bool has_rabbitmq_parameters() const;
   void clear_rabbitmq_parameters();
   static const int kRabbitmqParametersFieldNumber = 1;
-  private:
-  const ::Rabbitmq_proto::Rabbitmq_parameter& _internal_rabbitmq_parameters() const;
-  public:
   const ::Rabbitmq_proto::Rabbitmq_parameter& rabbitmq_parameters() const;
   ::Rabbitmq_proto::Rabbitmq_parameter* release_rabbitmq_parameters();
   ::Rabbitmq_proto::Rabbitmq_parameter* mutable_rabbitmq_parameters();
@@ -681,9 +667,10 @@ class Rabbitmq_parameter_all : public ::google::protobuf::Message /* @@protoc_in
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::Rabbitmq_proto::Rabbitmq_parameter* rabbitmq_parameters_;
   friend struct ::protobuf_rabbitmq_2eproto::TableStruct;
+  friend void ::protobuf_rabbitmq_2eproto::InitDefaultsRabbitmq_parameter_allImpl();
 };
 // ===================================================================
 
@@ -770,11 +757,8 @@ inline ::std::string* Rabbitmq_channel_queue_consume::mutable_exchange_name() {
 }
 inline ::std::string* Rabbitmq_channel_queue_consume::release_exchange_name() {
   // @@protoc_insertion_point(field_release:Rabbitmq_proto.Rabbitmq_channel_queue_consume.exchange_name)
-  if (!has_exchange_name()) {
-    return NULL;
-  }
   clear_has_exchange_name();
-  return exchange_name_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return exchange_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Rabbitmq_channel_queue_consume::set_allocated_exchange_name(::std::string* exchange_name) {
   if (exchange_name != NULL) {
@@ -836,11 +820,8 @@ inline ::std::string* Rabbitmq_channel_queue_consume::mutable_routing_key() {
 }
 inline ::std::string* Rabbitmq_channel_queue_consume::release_routing_key() {
   // @@protoc_insertion_point(field_release:Rabbitmq_proto.Rabbitmq_channel_queue_consume.routing_key)
-  if (!has_routing_key()) {
-    return NULL;
-  }
   clear_has_routing_key();
-  return routing_key_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return routing_key_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Rabbitmq_channel_queue_consume::set_allocated_routing_key(::std::string* routing_key) {
   if (routing_key != NULL) {
@@ -926,11 +907,8 @@ inline ::std::string* Rabbitmq_channel_queue_consume::mutable_binding_key() {
 }
 inline ::std::string* Rabbitmq_channel_queue_consume::release_binding_key() {
   // @@protoc_insertion_point(field_release:Rabbitmq_proto.Rabbitmq_channel_queue_consume.binding_key)
-  if (!has_binding_key()) {
-    return NULL;
-  }
   clear_has_binding_key();
-  return binding_key_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return binding_key_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Rabbitmq_channel_queue_consume::set_allocated_binding_key(::std::string* binding_key) {
   if (binding_key != NULL) {
@@ -992,11 +970,8 @@ inline ::std::string* Rabbitmq_channel_queue_consume::mutable_queue_name() {
 }
 inline ::std::string* Rabbitmq_channel_queue_consume::release_queue_name() {
   // @@protoc_insertion_point(field_release:Rabbitmq_proto.Rabbitmq_channel_queue_consume.queue_name)
-  if (!has_queue_name()) {
-    return NULL;
-  }
   clear_has_queue_name();
-  return queue_name_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return queue_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Rabbitmq_channel_queue_consume::set_allocated_queue_name(::std::string* queue_name) {
   if (queue_name != NULL) {
@@ -1178,11 +1153,8 @@ inline ::std::string* Rabbitmq_channel_queue_consume::mutable_consume_name() {
 }
 inline ::std::string* Rabbitmq_channel_queue_consume::release_consume_name() {
   // @@protoc_insertion_point(field_release:Rabbitmq_proto.Rabbitmq_channel_queue_consume.consume_name)
-  if (!has_consume_name()) {
-    return NULL;
-  }
   clear_has_consume_name();
-  return consume_name_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return consume_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Rabbitmq_channel_queue_consume::set_allocated_consume_name(::std::string* consume_name) {
   if (consume_name != NULL) {
@@ -1320,11 +1292,8 @@ inline ::std::string* Rabbitmq_parameter::mutable_ip() {
 }
 inline ::std::string* Rabbitmq_parameter::release_ip() {
   // @@protoc_insertion_point(field_release:Rabbitmq_proto.Rabbitmq_parameter.ip)
-  if (!has_ip()) {
-    return NULL;
-  }
   clear_has_ip();
-  return ip_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return ip_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Rabbitmq_parameter::set_allocated_ip(::std::string* ip) {
   if (ip != NULL) {
@@ -1410,11 +1379,8 @@ inline ::std::string* Rabbitmq_parameter::mutable_user() {
 }
 inline ::std::string* Rabbitmq_parameter::release_user() {
   // @@protoc_insertion_point(field_release:Rabbitmq_proto.Rabbitmq_parameter.user)
-  if (!has_user()) {
-    return NULL;
-  }
   clear_has_user();
-  return user_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return user_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Rabbitmq_parameter::set_allocated_user(::std::string* user) {
   if (user != NULL) {
@@ -1476,11 +1442,8 @@ inline ::std::string* Rabbitmq_parameter::mutable_password() {
 }
 inline ::std::string* Rabbitmq_parameter::release_password() {
   // @@protoc_insertion_point(field_release:Rabbitmq_proto.Rabbitmq_parameter.password)
-  if (!has_password()) {
-    return NULL;
-  }
   clear_has_password();
-  return password_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  return password_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
 inline void Rabbitmq_parameter::set_allocated_password(::std::string* password) {
   if (password != NULL) {
@@ -1499,23 +1462,23 @@ inline int Rabbitmq_parameter::rabbitmq_reciever_vector_size() const {
 inline void Rabbitmq_parameter::clear_rabbitmq_reciever_vector() {
   rabbitmq_reciever_vector_.Clear();
 }
+inline const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& Rabbitmq_parameter::rabbitmq_reciever_vector(int index) const {
+  // @@protoc_insertion_point(field_get:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_reciever_vector)
+  return rabbitmq_reciever_vector_.Get(index);
+}
 inline ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* Rabbitmq_parameter::mutable_rabbitmq_reciever_vector(int index) {
   // @@protoc_insertion_point(field_mutable:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_reciever_vector)
   return rabbitmq_reciever_vector_.Mutable(index);
 }
+inline ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* Rabbitmq_parameter::add_rabbitmq_reciever_vector() {
+  // @@protoc_insertion_point(field_add:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_reciever_vector)
+  return rabbitmq_reciever_vector_.Add();
+}
 inline ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >*
 Rabbitmq_parameter::mutable_rabbitmq_reciever_vector() {
   // @@protoc_insertion_point(field_mutable_list:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_reciever_vector)
   return &rabbitmq_reciever_vector_;
 }
-inline const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& Rabbitmq_parameter::rabbitmq_reciever_vector(int index) const {
-  // @@protoc_insertion_point(field_get:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_reciever_vector)
-  return rabbitmq_reciever_vector_.Get(index);
-}
-inline ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* Rabbitmq_parameter::add_rabbitmq_reciever_vector() {
-  // @@protoc_insertion_point(field_add:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_reciever_vector)
-  return rabbitmq_reciever_vector_.Add();
-}
 inline const ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >&
 Rabbitmq_parameter::rabbitmq_reciever_vector() const {
   // @@protoc_insertion_point(field_list:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_reciever_vector)
@@ -1529,23 +1492,23 @@ inline int Rabbitmq_parameter::rabbitmq_sender_request_vector_size() const {
 inline void Rabbitmq_parameter::clear_rabbitmq_sender_request_vector() {
   rabbitmq_sender_request_vector_.Clear();
 }
+inline const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& Rabbitmq_parameter::rabbitmq_sender_request_vector(int index) const {
+  // @@protoc_insertion_point(field_get:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_request_vector)
+  return rabbitmq_sender_request_vector_.Get(index);
+}
 inline ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* Rabbitmq_parameter::mutable_rabbitmq_sender_request_vector(int index) {
   // @@protoc_insertion_point(field_mutable:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_request_vector)
   return rabbitmq_sender_request_vector_.Mutable(index);
 }
+inline ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* Rabbitmq_parameter::add_rabbitmq_sender_request_vector() {
+  // @@protoc_insertion_point(field_add:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_request_vector)
+  return rabbitmq_sender_request_vector_.Add();
+}
 inline ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >*
 Rabbitmq_parameter::mutable_rabbitmq_sender_request_vector() {
   // @@protoc_insertion_point(field_mutable_list:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_request_vector)
   return &rabbitmq_sender_request_vector_;
 }
-inline const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& Rabbitmq_parameter::rabbitmq_sender_request_vector(int index) const {
-  // @@protoc_insertion_point(field_get:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_request_vector)
-  return rabbitmq_sender_request_vector_.Get(index);
-}
-inline ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* Rabbitmq_parameter::add_rabbitmq_sender_request_vector() {
-  // @@protoc_insertion_point(field_add:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_request_vector)
-  return rabbitmq_sender_request_vector_.Add();
-}
 inline const ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >&
 Rabbitmq_parameter::rabbitmq_sender_request_vector() const {
   // @@protoc_insertion_point(field_list:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_request_vector)
@@ -1559,23 +1522,23 @@ inline int Rabbitmq_parameter::rabbitmq_sender_status_vector_size() const {
 inline void Rabbitmq_parameter::clear_rabbitmq_sender_status_vector() {
   rabbitmq_sender_status_vector_.Clear();
 }
+inline const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& Rabbitmq_parameter::rabbitmq_sender_status_vector(int index) const {
+  // @@protoc_insertion_point(field_get:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_status_vector)
+  return rabbitmq_sender_status_vector_.Get(index);
+}
 inline ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* Rabbitmq_parameter::mutable_rabbitmq_sender_status_vector(int index) {
   // @@protoc_insertion_point(field_mutable:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_status_vector)
   return rabbitmq_sender_status_vector_.Mutable(index);
 }
+inline ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* Rabbitmq_parameter::add_rabbitmq_sender_status_vector() {
+  // @@protoc_insertion_point(field_add:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_status_vector)
+  return rabbitmq_sender_status_vector_.Add();
+}
 inline ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >*
 Rabbitmq_parameter::mutable_rabbitmq_sender_status_vector() {
   // @@protoc_insertion_point(field_mutable_list:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_status_vector)
   return &rabbitmq_sender_status_vector_;
 }
-inline const ::Rabbitmq_proto::Rabbitmq_channel_queue_consume& Rabbitmq_parameter::rabbitmq_sender_status_vector(int index) const {
-  // @@protoc_insertion_point(field_get:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_status_vector)
-  return rabbitmq_sender_status_vector_.Get(index);
-}
-inline ::Rabbitmq_proto::Rabbitmq_channel_queue_consume* Rabbitmq_parameter::add_rabbitmq_sender_status_vector() {
-  // @@protoc_insertion_point(field_add:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_status_vector)
-  return rabbitmq_sender_status_vector_.Add();
-}
 inline const ::google::protobuf::RepeatedPtrField< ::Rabbitmq_proto::Rabbitmq_channel_queue_consume >&
 Rabbitmq_parameter::rabbitmq_sender_status_vector() const {
   // @@protoc_insertion_point(field_list:Rabbitmq_proto.Rabbitmq_parameter.rabbitmq_sender_status_vector)
@@ -1600,9 +1563,6 @@ inline void Rabbitmq_parameter_all::clear_rabbitmq_parameters() {
   if (rabbitmq_parameters_ != NULL) rabbitmq_parameters_->Clear();
   clear_has_rabbitmq_parameters();
 }
-inline const ::Rabbitmq_proto::Rabbitmq_parameter& Rabbitmq_parameter_all::_internal_rabbitmq_parameters() const {
-  return *rabbitmq_parameters_;
-}
 inline const ::Rabbitmq_proto::Rabbitmq_parameter& Rabbitmq_parameter_all::rabbitmq_parameters() const {
   const ::Rabbitmq_proto::Rabbitmq_parameter* p = rabbitmq_parameters_;
   // @@protoc_insertion_point(field_get:Rabbitmq_proto.Rabbitmq_parameter_all.rabbitmq_parameters)
@@ -1619,8 +1579,7 @@ inline ::Rabbitmq_proto::Rabbitmq_parameter* Rabbitmq_parameter_all::release_rab
 inline ::Rabbitmq_proto::Rabbitmq_parameter* Rabbitmq_parameter_all::mutable_rabbitmq_parameters() {
   set_has_rabbitmq_parameters();
   if (rabbitmq_parameters_ == NULL) {
-    auto* p = CreateMaybeMessage<::Rabbitmq_proto::Rabbitmq_parameter>(GetArenaNoVirtual());
-    rabbitmq_parameters_ = p;
+    rabbitmq_parameters_ = new ::Rabbitmq_proto::Rabbitmq_parameter;
   }
   // @@protoc_insertion_point(field_mutable:Rabbitmq_proto.Rabbitmq_parameter_all.rabbitmq_parameters)
   return rabbitmq_parameters_;
@@ -1658,4 +1617,4 @@ inline void Rabbitmq_parameter_all::set_allocated_rabbitmq_parameters(::Rabbitmq
 
 // @@protoc_insertion_point(global_scope)
 
-#endif  // PROTOBUF_INCLUDED_rabbitmq_2eproto
+#endif  // PROTOBUF_rabbitmq_2eproto__INCLUDED

+ 39 - 0
plc调度节点/setting/network.prototxt

@@ -0,0 +1,39 @@
+
+
+network_parameters
+{
+   network_information_vector
+   {
+        network_mode : TCP_CLIENT
+        socket_id : 0
+        ip : "192.168.1.120"
+        port : 40002
+   }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 1
+       ip : "192.168.1.121"
+       port : 40002
+  }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 2
+       ip : "192.168.1.130"
+       port : 40002
+  }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 3
+       ip : "192.168.1.131"
+       port : 40002
+  }
+
+
+}
+

+ 39 - 0
plc调度节点/setting/network_a.prototxt

@@ -0,0 +1,39 @@
+
+
+network_parameters
+{
+   network_information_vector
+   {
+        network_mode : TCP_CLIENT
+        socket_id : 0
+        ip : "192.168.1.120"
+        port : 40002
+   }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 1
+       ip : "192.168.1.121"
+       port : 40002
+  }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 2
+       ip : "192.168.1.130"
+       port : 40002
+  }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 3
+       ip : "192.168.1.131"
+       port : 40002
+  }
+
+
+}
+

+ 39 - 0
plc调度节点/setting/network_b.prototxt

@@ -0,0 +1,39 @@
+
+
+network_parameters
+{
+   network_information_vector
+   {
+        network_mode : TCP_CLIENT
+        socket_id : 0
+        ip : "192.168.1.122"
+        port : 40002
+   }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 1
+       ip : "192.168.1.123"
+       port : 40002
+  }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 2
+       ip : "192.168.1.132"
+       port : 40002
+  }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 3
+       ip : "192.168.1.133"
+       port : 40002
+  }
+
+
+}
+

+ 39 - 0
plc调度节点/setting/network_c.prototxt

@@ -0,0 +1,39 @@
+
+
+network_parameters
+{
+   network_information_vector
+   {
+        network_mode : TCP_CLIENT
+        socket_id : 0
+        ip : "192.168.1.124"
+        port : 40002
+   }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 1
+       ip : "192.168.1.125"
+       port : 40002
+  }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 2
+       ip : "192.168.1.134"
+       port : 40002
+  }
+
+   network_information_vector
+  {
+       network_mode : TCP_CLIENT
+       socket_id : 3
+       ip : "192.168.1.135"
+       port : 40002
+  }
+
+
+}
+

+ 20 - 79
plc调度节点/setting/rabbitmq_a.prototxt

@@ -79,105 +79,46 @@ rabbitmq_parameters
         consume_exclusive:0
     }
 
-    rabbitmq_reciever_vector
-    {
-        channel:701
-        exchange_name:"statu_ex"
 
-        binding_key:"in_mcpu_1_statu_port"
-        queue_name:"in_mcpu_1_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"in_mcpu_1_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
-    }
 
-    rabbitmq_reciever_vector
-    {
-        channel:702
-        exchange_name:"statu_ex"
 
-        binding_key:"in_mcpu_2_statu_port"
-        queue_name:"in_mcpu_2_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"in_mcpu_2_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
-    }
-
-    rabbitmq_reciever_vector
+    rabbitmq_sender_status_vector
     {
-        channel:801
+        channel:451
         exchange_name:"statu_ex"
-
-        binding_key:"out_mcpu_1_statu_port"
-        queue_name:"out_mcpu_1_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"out_mcpu_1_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
+        routing_key:"dispatch_1_statu_port"
+        timeout_ms:10000
     }
 
-    rabbitmq_reciever_vector
+    rabbitmq_sender_status_vector
     {
-        channel:802
+        channel:452
         exchange_name:"statu_ex"
-
-        binding_key:"out_mcpu_2_statu_port"
-        queue_name:"out_mcpu_2_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"out_mcpu_2_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
+        routing_key:"in_mcpu_1_statu_port"
+        timeout_ms:10000
     }
 
-
-
-
-
-
-    rabbitmq_sender_request_vector
+    rabbitmq_sender_status_vector
     {
-        channel:431
-        exchange_name:"command_ex"
-        routing_key:"request_command_port"
-        timeout_ms:0
+        channel:453
+        exchange_name:"statu_ex"
+        routing_key:"in_mcpu_2_statu_port"
+        timeout_ms:10000
     }
 
-    rabbitmq_sender_request_vector
+    rabbitmq_sender_status_vector
     {
-        channel:441
-        exchange_name:"command_ex"
-        routing_key:"command_completed_port"
-        timeout_ms:0
+        channel:454
+        exchange_name:"statu_ex"
+        routing_key:"out_mcpu_1_statu_port"
+        timeout_ms:10000
     }
 
     rabbitmq_sender_status_vector
     {
-        channel:451
+        channel:455
         exchange_name:"statu_ex"
-        routing_key:"dispatch_1_statu_port"
+        routing_key:"out_mcpu_2_statu_port"
         timeout_ms:10000
     }
-
 }

+ 19 - 80
plc调度节点/setting/rabbitmq_b.prototxt

@@ -81,105 +81,44 @@ rabbitmq_parameters
         consume_exclusive:0
     }
 
-    rabbitmq_reciever_vector
-    {
-        channel:703
-        exchange_name:"statu_ex"
 
-        binding_key:"in_mcpu_3_statu_port"
-        queue_name:"in_mcpu_3_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"in_mcpu_3_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
-    }
-
-    rabbitmq_reciever_vector
+    rabbitmq_sender_status_vector
     {
-        channel:704
+        channel:452
         exchange_name:"statu_ex"
-
-        binding_key:"in_mcpu_4_statu_port"
-        queue_name:"in_mcpu_4_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"in_mcpu_4_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
+        routing_key:"dispatch_2_statu_port"
+        timeout_ms:10000
     }
 
-    rabbitmq_reciever_vector
+    rabbitmq_sender_status_vector
     {
-        channel:803
+        channel:452
         exchange_name:"statu_ex"
-
-        binding_key:"out_mcpu_3_statu_port"
-        queue_name:"out_mcpu_3_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"out_mcpu_3_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
+        routing_key:"in_mcpu_3_statu_port"
+        timeout_ms:10000
     }
 
-    rabbitmq_reciever_vector
+    rabbitmq_sender_status_vector
     {
-        channel:804
+        channel:453
         exchange_name:"statu_ex"
-
-        binding_key:"out_mcpu_4_statu_port"
-        queue_name:"out_mcpu_4_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"out_mcpu_4_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
-    }
-
-
-
-
-
-
-    rabbitmq_sender_request_vector
-    {
-        channel:432
-        exchange_name:"command_ex"
-        routing_key:"request_command_port"
-        timeout_ms:0
+        routing_key:"in_mcpu_4_statu_port"
+        timeout_ms:10000
     }
 
-    rabbitmq_sender_request_vector
+    rabbitmq_sender_status_vector
     {
-        channel:442
-        exchange_name:"command_ex"
-        routing_key:"command_completed_port"
-        timeout_ms:0
+        channel:454
+        exchange_name:"statu_ex"
+        routing_key:"out_mcpu_3_statu_port"
+        timeout_ms:10000
     }
 
     rabbitmq_sender_status_vector
     {
-        channel:452
+        channel:455
         exchange_name:"statu_ex"
-        routing_key:"dispatch_2_statu_port"
+        routing_key:"out_mcpu_4_statu_port"
         timeout_ms:10000
     }
-
 }

+ 19 - 79
plc调度节点/setting/rabbitmq_c.prototxt

@@ -81,105 +81,45 @@ rabbitmq_parameters
         consume_exclusive:0
     }
 
-    rabbitmq_reciever_vector
-    {
-        channel:705
-        exchange_name:"statu_ex"
 
-        binding_key:"in_mcpu_5_statu_port"
-        queue_name:"in_mcpu_5_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"in_mcpu_5_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
-    }
 
-    rabbitmq_reciever_vector
+    rabbitmq_sender_status_vector
     {
-        channel:706
+        channel:453
         exchange_name:"statu_ex"
-
-        binding_key:"in_mcpu_6_statu_port"
-        queue_name:"in_mcpu_6_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"in_mcpu_6_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
+        routing_key:"dispatch_3_statu_port"
+        timeout_ms:10000
     }
 
-    rabbitmq_reciever_vector
+    rabbitmq_sender_status_vector
     {
-        channel:805
+        channel:452
         exchange_name:"statu_ex"
-
-        binding_key:"out_mcpu_5_statu_port"
-        queue_name:"out_mcpu_5_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"out_mcpu_5_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
+        routing_key:"in_mcpu_5_statu_port"
+        timeout_ms:10000
     }
 
-    rabbitmq_reciever_vector
+    rabbitmq_sender_status_vector
     {
-        channel:806
+        channel:453
         exchange_name:"statu_ex"
-
-        binding_key:"out_mcpu_6_statu_port"
-        queue_name:"out_mcpu_6_statu_queue_for_dispatch"
-        queue_passive:0
-        queue_durable:0
-        queue_exclusive:0
-        queue_auto_delete:1
-       queue_meassage_ttl:1000
-        consume_name:"out_mcpu_6_statu_consume_for_dispatch"
-        consume_no_local:0
-        consume_no_ack:1
-        consume_exclusive:0
-    }
-
-
-
-
-
-
-    rabbitmq_sender_request_vector
-    {
-        channel:433
-        exchange_name:"command_ex"
-        routing_key:"request_command_port"
-        timeout_ms:0
+        routing_key:"in_mcpu_6_statu_port"
+        timeout_ms:10000
     }
 
-    rabbitmq_sender_request_vector
+    rabbitmq_sender_status_vector
     {
-        channel:443
-        exchange_name:"command_ex"
-        routing_key:"command_completed_port"
-        timeout_ms:0
+        channel:454
+        exchange_name:"statu_ex"
+        routing_key:"out_mcpu_5_statu_port"
+        timeout_ms:10000
     }
 
     rabbitmq_sender_status_vector
     {
-        channel:453
+        channel:455
         exchange_name:"statu_ex"
-        routing_key:"dispatch_3_statu_port"
+        routing_key:"out_mcpu_6_statu_port"
         timeout_ms:10000
     }
-
 }

+ 86 - 59
plc调度节点/snap7_communication/snap7_communication.pb.cc

@@ -7,6 +7,7 @@
 
 #include <google/protobuf/stubs/common.h>
 #include <google/protobuf/stubs/port.h>
+#include <google/protobuf/stubs/once.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/wire_format_lite_inl.h>
 #include <google/protobuf/descriptor.h>
@@ -18,10 +19,6 @@
 #include "third_party/protobuf/version.h"
 #endif
 // @@protoc_insertion_point(includes)
-
-namespace protobuf_snap7_5fcommunication_2eproto {
-extern PROTOBUF_INTERNAL_EXPORT_protobuf_snap7_5fcommunication_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Snap7_communication_parameter;
-}  // namespace protobuf_snap7_5fcommunication_2eproto
 namespace Snap7_communication_proto {
 class Snap7_communication_parameterDefaultTypeInternal {
  public:
@@ -35,13 +32,18 @@ class Snap7_communication_parameter_allDefaultTypeInternal {
 } _Snap7_communication_parameter_all_default_instance_;
 }  // namespace Snap7_communication_proto
 namespace protobuf_snap7_5fcommunication_2eproto {
-static void InitDefaultsSnap7_communication_parameter() {
+void InitDefaultsSnap7_communication_parameterImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
-  ::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.DefaultConstruct();
-  *::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get_mutable() = ::std::string("192.168.0.1", 11);
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.DefaultConstruct();
+  *::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get_mutable() = ::std::string("192.168.0.1", 11);
   ::google::protobuf::internal::OnShutdownDestroyString(
-      ::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get_mutable());
+      ::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get_mutable());
   {
     void* ptr = &::Snap7_communication_proto::_Snap7_communication_parameter_default_instance_;
     new (ptr) ::Snap7_communication_proto::Snap7_communication_parameter();
@@ -50,12 +52,20 @@ static void InitDefaultsSnap7_communication_parameter() {
   ::Snap7_communication_proto::Snap7_communication_parameter::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<0> scc_info_Snap7_communication_parameter =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSnap7_communication_parameter}, {}};
+void InitDefaultsSnap7_communication_parameter() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsSnap7_communication_parameterImpl);
+}
 
-static void InitDefaultsSnap7_communication_parameter_all() {
+void InitDefaultsSnap7_communication_parameter_allImpl() {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+  ::google::protobuf::internal::InitProtobufDefaults();
+#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+  protobuf_snap7_5fcommunication_2eproto::InitDefaultsSnap7_communication_parameter();
   {
     void* ptr = &::Snap7_communication_proto::_Snap7_communication_parameter_all_default_instance_;
     new (ptr) ::Snap7_communication_proto::Snap7_communication_parameter_all();
@@ -64,13 +74,9 @@ static void InitDefaultsSnap7_communication_parameter_all() {
   ::Snap7_communication_proto::Snap7_communication_parameter_all::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<1> scc_info_Snap7_communication_parameter_all =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSnap7_communication_parameter_all}, {
-      &protobuf_snap7_5fcommunication_2eproto::scc_info_Snap7_communication_parameter.base,}};
-
-void InitDefaults() {
-  ::google::protobuf::internal::InitSCC(&scc_info_Snap7_communication_parameter.base);
-  ::google::protobuf::internal::InitSCC(&scc_info_Snap7_communication_parameter_all.base);
+void InitDefaultsSnap7_communication_parameter_all() {
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsSnap7_communication_parameter_allImpl);
 }
 
 ::google::protobuf::Metadata file_level_metadata[2];
@@ -103,14 +109,15 @@ static ::google::protobuf::Message const * const file_default_instances[] = {
 
 void protobuf_AssignDescriptors() {
   AddDescriptors();
+  ::google::protobuf::MessageFactory* factory = NULL;
   AssignDescriptors(
-      "snap7_communication.proto", schemas, file_default_instances, TableStruct::offsets,
+      "snap7_communication.proto", schemas, file_default_instances, TableStruct::offsets, factory,
       file_level_metadata, NULL, NULL);
 }
 
 void protobuf_AssignDescriptorsOnce() {
-  static ::google::protobuf::internal::once_flag once;
-  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
 }
 
 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
@@ -137,8 +144,8 @@ void AddDescriptorsImpl() {
 }
 
 void AddDescriptors() {
-  static ::google::protobuf::internal::once_flag once;
-  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
+  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
 }
 // Force AddDescriptors() to be called at dynamic initialization time.
 struct StaticDescriptorInitializer {
@@ -153,32 +160,35 @@ namespace Snap7_communication_proto {
 
 void Snap7_communication_parameter::InitAsDefaultInstance() {
 }
-::google::protobuf::internal::ExplicitlyConstructed<::std::string> Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_;
+::google::protobuf::internal::ExplicitlyConstructed< ::std::string> Snap7_communication_parameter::_default_ip_string_;
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int Snap7_communication_parameter::kIpStringFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 Snap7_communication_parameter::Snap7_communication_parameter()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_snap7_5fcommunication_2eproto::scc_info_Snap7_communication_parameter.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_snap7_5fcommunication_2eproto::InitDefaultsSnap7_communication_parameter();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:Snap7_communication_proto.Snap7_communication_parameter)
 }
 Snap7_communication_parameter::Snap7_communication_parameter(const Snap7_communication_parameter& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
-  ip_string_.UnsafeSetDefault(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get());
+  ip_string_.UnsafeSetDefault(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get());
   if (from.has_ip_string()) {
-    ip_string_.AssignWithDefault(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get(), from.ip_string_);
+    ip_string_.AssignWithDefault(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get(), from.ip_string_);
   }
   // @@protoc_insertion_point(copy_constructor:Snap7_communication_proto.Snap7_communication_parameter)
 }
 
 void Snap7_communication_parameter::SharedCtor() {
-  ip_string_.UnsafeSetDefault(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get());
+  _cached_size_ = 0;
+  ip_string_.UnsafeSetDefault(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get());
 }
 
 Snap7_communication_parameter::~Snap7_communication_parameter() {
@@ -187,11 +197,13 @@ Snap7_communication_parameter::~Snap7_communication_parameter() {
 }
 
 void Snap7_communication_parameter::SharedDtor() {
-  ip_string_.DestroyNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get());
+  ip_string_.DestroyNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get());
 }
 
 void Snap7_communication_parameter::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Snap7_communication_parameter::descriptor() {
   ::protobuf_snap7_5fcommunication_2eproto::protobuf_AssignDescriptorsOnce();
@@ -199,10 +211,17 @@ const ::google::protobuf::Descriptor* Snap7_communication_parameter::descriptor(
 }
 
 const Snap7_communication_parameter& Snap7_communication_parameter::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_snap7_5fcommunication_2eproto::scc_info_Snap7_communication_parameter.base);
+  ::protobuf_snap7_5fcommunication_2eproto::InitDefaultsSnap7_communication_parameter();
   return *internal_default_instance();
 }
 
+Snap7_communication_parameter* Snap7_communication_parameter::New(::google::protobuf::Arena* arena) const {
+  Snap7_communication_parameter* n = new Snap7_communication_parameter;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Snap7_communication_parameter::Clear() {
 // @@protoc_insertion_point(message_clear_start:Snap7_communication_proto.Snap7_communication_parameter)
@@ -212,7 +231,8 @@ void Snap7_communication_parameter::Clear() {
 
   cached_has_bits = _has_bits_[0];
   if (cached_has_bits & 0x00000001u) {
-    ip_string_.UnsafeMutablePointer()->assign(*&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get());
+    GOOGLE_DCHECK(!ip_string_.IsDefault(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get()));
+    (*ip_string_.UnsafeRawStringPointer())->assign(*&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get());
   }
   _has_bits_.Clear();
   _internal_metadata_.Clear();
@@ -224,7 +244,7 @@ bool Snap7_communication_parameter::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:Snap7_communication_proto.Snap7_communication_parameter)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -331,7 +351,9 @@ size_t Snap7_communication_parameter::ByteSizeLong() const {
         this->ip_string());
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -359,7 +381,7 @@ void Snap7_communication_parameter::MergeFrom(const Snap7_communication_paramete
 
   if (from.has_ip_string()) {
     set_has_ip_string();
-    ip_string_.AssignWithDefault(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get(), from.ip_string_);
+    ip_string_.AssignWithDefault(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get(), from.ip_string_);
   }
 }
 
@@ -388,10 +410,10 @@ void Snap7_communication_parameter::Swap(Snap7_communication_parameter* other) {
 }
 void Snap7_communication_parameter::InternalSwap(Snap7_communication_parameter* other) {
   using std::swap;
-  ip_string_.Swap(&other->ip_string_, &::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get(),
-    GetArenaNoVirtual());
+  ip_string_.Swap(&other->ip_string_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Snap7_communication_parameter::GetMetadata() const {
@@ -412,15 +434,17 @@ const int Snap7_communication_parameter_all::kSnap7CommunicationParametersFieldN
 
 Snap7_communication_parameter_all::Snap7_communication_parameter_all()
   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
-  ::google::protobuf::internal::InitSCC(
-      &protobuf_snap7_5fcommunication_2eproto::scc_info_Snap7_communication_parameter_all.base);
+  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+    ::protobuf_snap7_5fcommunication_2eproto::InitDefaultsSnap7_communication_parameter_all();
+  }
   SharedCtor();
   // @@protoc_insertion_point(constructor:Snap7_communication_proto.Snap7_communication_parameter_all)
 }
 Snap7_communication_parameter_all::Snap7_communication_parameter_all(const Snap7_communication_parameter_all& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL),
-      _has_bits_(from._has_bits_) {
+      _has_bits_(from._has_bits_),
+      _cached_size_(0) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
   if (from.has_snap7_communication_parameters()) {
     snap7_communication_parameters_ = new ::Snap7_communication_proto::Snap7_communication_parameter(*from.snap7_communication_parameters_);
@@ -431,6 +455,7 @@ Snap7_communication_parameter_all::Snap7_communication_parameter_all(const Snap7
 }
 
 void Snap7_communication_parameter_all::SharedCtor() {
+  _cached_size_ = 0;
   snap7_communication_parameters_ = NULL;
 }
 
@@ -444,7 +469,9 @@ void Snap7_communication_parameter_all::SharedDtor() {
 }
 
 void Snap7_communication_parameter_all::SetCachedSize(int size) const {
-  _cached_size_.Set(size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
 const ::google::protobuf::Descriptor* Snap7_communication_parameter_all::descriptor() {
   ::protobuf_snap7_5fcommunication_2eproto::protobuf_AssignDescriptorsOnce();
@@ -452,10 +479,17 @@ const ::google::protobuf::Descriptor* Snap7_communication_parameter_all::descrip
 }
 
 const Snap7_communication_parameter_all& Snap7_communication_parameter_all::default_instance() {
-  ::google::protobuf::internal::InitSCC(&protobuf_snap7_5fcommunication_2eproto::scc_info_Snap7_communication_parameter_all.base);
+  ::protobuf_snap7_5fcommunication_2eproto::InitDefaultsSnap7_communication_parameter_all();
   return *internal_default_instance();
 }
 
+Snap7_communication_parameter_all* Snap7_communication_parameter_all::New(::google::protobuf::Arena* arena) const {
+  Snap7_communication_parameter_all* n = new Snap7_communication_parameter_all;
+  if (arena != NULL) {
+    arena->Own(n);
+  }
+  return n;
+}
 
 void Snap7_communication_parameter_all::Clear() {
 // @@protoc_insertion_point(message_clear_start:Snap7_communication_proto.Snap7_communication_parameter_all)
@@ -478,7 +512,7 @@ bool Snap7_communication_parameter_all::MergePartialFromCodedStream(
   ::google::protobuf::uint32 tag;
   // @@protoc_insertion_point(parse_start:Snap7_communication_proto.Snap7_communication_parameter_all)
   for (;;) {
-    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
@@ -524,7 +558,7 @@ void Snap7_communication_parameter_all::SerializeWithCachedSizes(
   // required .Snap7_communication_proto.Snap7_communication_parameter snap7_communication_parameters = 1;
   if (cached_has_bits & 0x00000001u) {
     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      1, this->_internal_snap7_communication_parameters(), output);
+      1, *this->snap7_communication_parameters_, output);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -546,7 +580,7 @@ void Snap7_communication_parameter_all::SerializeWithCachedSizes(
   if (cached_has_bits & 0x00000001u) {
     target = ::google::protobuf::internal::WireFormatLite::
       InternalWriteMessageToArray(
-        1, this->_internal_snap7_communication_parameters(), deterministic, target);
+        1, *this->snap7_communication_parameters_, deterministic, target);
   }
 
   if (_internal_metadata_.have_unknown_fields()) {
@@ -570,10 +604,12 @@ size_t Snap7_communication_parameter_all::ByteSizeLong() const {
   if (has_snap7_communication_parameters()) {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::MessageSize(
-        *snap7_communication_parameters_);
+        *this->snap7_communication_parameters_);
   }
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
-  SetCachedSize(cached_size);
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = cached_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -635,6 +671,7 @@ void Snap7_communication_parameter_all::InternalSwap(Snap7_communication_paramet
   swap(snap7_communication_parameters_, other->snap7_communication_parameters_);
   swap(_has_bits_[0], other->_has_bits_[0]);
   _internal_metadata_.Swap(&other->_internal_metadata_);
+  swap(_cached_size_, other->_cached_size_);
 }
 
 ::google::protobuf::Metadata Snap7_communication_parameter_all::GetMetadata() const {
@@ -645,15 +682,5 @@ void Snap7_communication_parameter_all::InternalSwap(Snap7_communication_paramet
 
 // @@protoc_insertion_point(namespace_scope)
 }  // namespace Snap7_communication_proto
-namespace google {
-namespace protobuf {
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::Snap7_communication_proto::Snap7_communication_parameter* Arena::CreateMaybeMessage< ::Snap7_communication_proto::Snap7_communication_parameter >(Arena* arena) {
-  return Arena::CreateInternal< ::Snap7_communication_proto::Snap7_communication_parameter >(arena);
-}
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::Snap7_communication_proto::Snap7_communication_parameter_all* Arena::CreateMaybeMessage< ::Snap7_communication_proto::Snap7_communication_parameter_all >(Arena* arena) {
-  return Arena::CreateInternal< ::Snap7_communication_proto::Snap7_communication_parameter_all >(arena);
-}
-}  // namespace protobuf
-}  // namespace google
 
 // @@protoc_insertion_point(global_scope)

+ 55 - 75
plc调度节点/snap7_communication/snap7_communication.pb.h

@@ -1,19 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: snap7_communication.proto
 
-#ifndef PROTOBUF_INCLUDED_snap7_5fcommunication_2eproto
-#define PROTOBUF_INCLUDED_snap7_5fcommunication_2eproto
+#ifndef PROTOBUF_snap7_5fcommunication_2eproto__INCLUDED
+#define PROTOBUF_snap7_5fcommunication_2eproto__INCLUDED
 
 #include <string>
 
 #include <google/protobuf/stubs/common.h>
 
-#if GOOGLE_PROTOBUF_VERSION < 3006001
+#if GOOGLE_PROTOBUF_VERSION < 3005000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please update
 #error your headers.
 #endif
-#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers.  Please
 #error regenerate this file with a newer version of protoc.
@@ -24,14 +24,12 @@
 #include <google/protobuf/arenastring.h>
 #include <google/protobuf/generated_message_table_driven.h>
 #include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/inlined_string_field.h>
 #include <google/protobuf/metadata.h>
 #include <google/protobuf/message.h>
 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
 #include <google/protobuf/extension_set.h>  // IWYU pragma: export
 #include <google/protobuf/unknown_field_set.h>
 // @@protoc_insertion_point(includes)
-#define PROTOBUF_INTERNAL_EXPORT_protobuf_snap7_5fcommunication_2eproto 
 
 namespace protobuf_snap7_5fcommunication_2eproto {
 // Internal implementation detail -- do not use these members.
@@ -44,6 +42,14 @@ struct TableStruct {
   static const ::google::protobuf::uint32 offsets[];
 };
 void AddDescriptors();
+void InitDefaultsSnap7_communication_parameterImpl();
+void InitDefaultsSnap7_communication_parameter();
+void InitDefaultsSnap7_communication_parameter_allImpl();
+void InitDefaultsSnap7_communication_parameter_all();
+inline void InitDefaults() {
+  InitDefaultsSnap7_communication_parameter();
+  InitDefaultsSnap7_communication_parameter_all();
+}
 }  // namespace protobuf_snap7_5fcommunication_2eproto
 namespace Snap7_communication_proto {
 class Snap7_communication_parameter;
@@ -53,12 +59,6 @@ class Snap7_communication_parameter_all;
 class Snap7_communication_parameter_allDefaultTypeInternal;
 extern Snap7_communication_parameter_allDefaultTypeInternal _Snap7_communication_parameter_all_default_instance_;
 }  // namespace Snap7_communication_proto
-namespace google {
-namespace protobuf {
-template<> ::Snap7_communication_proto::Snap7_communication_parameter* Arena::CreateMaybeMessage<::Snap7_communication_proto::Snap7_communication_parameter>(Arena*);
-template<> ::Snap7_communication_proto::Snap7_communication_parameter_all* Arena::CreateMaybeMessage<::Snap7_communication_proto::Snap7_communication_parameter_all>(Arena*);
-}  // namespace protobuf
-}  // namespace google
 namespace Snap7_communication_proto {
 
 // ===================================================================
@@ -104,7 +104,7 @@ class Snap7_communication_parameter : public ::google::protobuf::Message /* @@pr
     return reinterpret_cast<const Snap7_communication_parameter*>(
                &_Snap7_communication_parameter_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     0;
 
   void Swap(Snap7_communication_parameter* other);
@@ -114,33 +114,28 @@ class Snap7_communication_parameter : public ::google::protobuf::Message /* @@pr
 
   // implements Message ----------------------------------------------
 
-  inline Snap7_communication_parameter* New() const final {
-    return CreateMaybeMessage<Snap7_communication_parameter>(NULL);
-  }
+  inline Snap7_communication_parameter* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Snap7_communication_parameter* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Snap7_communication_parameter>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Snap7_communication_parameter* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Snap7_communication_parameter& from);
   void MergeFrom(const Snap7_communication_parameter& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Snap7_communication_parameter* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -151,7 +146,7 @@ class Snap7_communication_parameter : public ::google::protobuf::Message /* @@pr
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -179,12 +174,11 @@ class Snap7_communication_parameter : public ::google::protobuf::Message /* @@pr
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
-  public:
-  static ::google::protobuf::internal::ExplicitlyConstructed< ::std::string> _i_give_permission_to_break_this_code_default_ip_string_;
-  private:
+  mutable int _cached_size_;
+  static ::google::protobuf::internal::ExplicitlyConstructed< ::std::string> _default_ip_string_;
   ::google::protobuf::internal::ArenaStringPtr ip_string_;
   friend struct ::protobuf_snap7_5fcommunication_2eproto::TableStruct;
+  friend void ::protobuf_snap7_5fcommunication_2eproto::InitDefaultsSnap7_communication_parameterImpl();
 };
 // -------------------------------------------------------------------
 
@@ -229,7 +223,7 @@ class Snap7_communication_parameter_all : public ::google::protobuf::Message /*
     return reinterpret_cast<const Snap7_communication_parameter_all*>(
                &_Snap7_communication_parameter_all_default_instance_);
   }
-  static constexpr int kIndexInFileMessages =
+  static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
     1;
 
   void Swap(Snap7_communication_parameter_all* other);
@@ -239,33 +233,28 @@ class Snap7_communication_parameter_all : public ::google::protobuf::Message /*
 
   // implements Message ----------------------------------------------
 
-  inline Snap7_communication_parameter_all* New() const final {
-    return CreateMaybeMessage<Snap7_communication_parameter_all>(NULL);
-  }
+  inline Snap7_communication_parameter_all* New() const PROTOBUF_FINAL { return New(NULL); }
 
-  Snap7_communication_parameter_all* New(::google::protobuf::Arena* arena) const final {
-    return CreateMaybeMessage<Snap7_communication_parameter_all>(arena);
-  }
-  void CopyFrom(const ::google::protobuf::Message& from) final;
-  void MergeFrom(const ::google::protobuf::Message& from) final;
+  Snap7_communication_parameter_all* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+  void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+  void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
   void CopyFrom(const Snap7_communication_parameter_all& from);
   void MergeFrom(const Snap7_communication_parameter_all& from);
-  void Clear() final;
-  bool IsInitialized() const final;
+  void Clear() PROTOBUF_FINAL;
+  bool IsInitialized() const PROTOBUF_FINAL;
 
-  size_t ByteSizeLong() const final;
+  size_t ByteSizeLong() const PROTOBUF_FINAL;
   bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input) final;
+      ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
   void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const final;
+      ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
-      bool deterministic, ::google::protobuf::uint8* target) const final;
-  int GetCachedSize() const final { return _cached_size_.Get(); }
-
+      bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+  int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
   private:
   void SharedCtor();
   void SharedDtor();
-  void SetCachedSize(int size) const final;
+  void SetCachedSize(int size) const PROTOBUF_FINAL;
   void InternalSwap(Snap7_communication_parameter_all* other);
   private:
   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
@@ -276,7 +265,7 @@ class Snap7_communication_parameter_all : public ::google::protobuf::Message /*
   }
   public:
 
-  ::google::protobuf::Metadata GetMetadata() const final;
+  ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
 
   // nested types ----------------------------------------------------
 
@@ -286,9 +275,6 @@ class Snap7_communication_parameter_all : public ::google::protobuf::Message /*
   bool has_snap7_communication_parameters() const;
   void clear_snap7_communication_parameters();
   static const int kSnap7CommunicationParametersFieldNumber = 1;
-  private:
-  const ::Snap7_communication_proto::Snap7_communication_parameter& _internal_snap7_communication_parameters() const;
-  public:
   const ::Snap7_communication_proto::Snap7_communication_parameter& snap7_communication_parameters() const;
   ::Snap7_communication_proto::Snap7_communication_parameter* release_snap7_communication_parameters();
   ::Snap7_communication_proto::Snap7_communication_parameter* mutable_snap7_communication_parameters();
@@ -301,9 +287,10 @@ class Snap7_communication_parameter_all : public ::google::protobuf::Message /*
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
-  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  mutable int _cached_size_;
   ::Snap7_communication_proto::Snap7_communication_parameter* snap7_communication_parameters_;
   friend struct ::protobuf_snap7_5fcommunication_2eproto::TableStruct;
+  friend void ::protobuf_snap7_5fcommunication_2eproto::InitDefaultsSnap7_communication_parameter_allImpl();
 };
 // ===================================================================
 
@@ -327,7 +314,7 @@ inline void Snap7_communication_parameter::clear_has_ip_string() {
   _has_bits_[0] &= ~0x00000001u;
 }
 inline void Snap7_communication_parameter::clear_ip_string() {
-  ip_string_.ClearToDefaultNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get());
+  ip_string_.ClearToDefaultNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get());
   clear_has_ip_string();
 }
 inline const ::std::string& Snap7_communication_parameter::ip_string() const {
@@ -336,41 +323,38 @@ inline const ::std::string& Snap7_communication_parameter::ip_string() const {
 }
 inline void Snap7_communication_parameter::set_ip_string(const ::std::string& value) {
   set_has_ip_string();
-  ip_string_.SetNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get(), value);
+  ip_string_.SetNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get(), value);
   // @@protoc_insertion_point(field_set:Snap7_communication_proto.Snap7_communication_parameter.ip_string)
 }
 #if LANG_CXX11
 inline void Snap7_communication_parameter::set_ip_string(::std::string&& value) {
   set_has_ip_string();
   ip_string_.SetNoArena(
-    &::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get(), ::std::move(value));
+    &::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get(), ::std::move(value));
   // @@protoc_insertion_point(field_set_rvalue:Snap7_communication_proto.Snap7_communication_parameter.ip_string)
 }
 #endif
 inline void Snap7_communication_parameter::set_ip_string(const char* value) {
   GOOGLE_DCHECK(value != NULL);
   set_has_ip_string();
-  ip_string_.SetNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get(), ::std::string(value));
+  ip_string_.SetNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get(), ::std::string(value));
   // @@protoc_insertion_point(field_set_char:Snap7_communication_proto.Snap7_communication_parameter.ip_string)
 }
 inline void Snap7_communication_parameter::set_ip_string(const char* value, size_t size) {
   set_has_ip_string();
-  ip_string_.SetNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get(),
+  ip_string_.SetNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get(),
       ::std::string(reinterpret_cast<const char*>(value), size));
   // @@protoc_insertion_point(field_set_pointer:Snap7_communication_proto.Snap7_communication_parameter.ip_string)
 }
 inline ::std::string* Snap7_communication_parameter::mutable_ip_string() {
   set_has_ip_string();
   // @@protoc_insertion_point(field_mutable:Snap7_communication_proto.Snap7_communication_parameter.ip_string)
-  return ip_string_.MutableNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get());
+  return ip_string_.MutableNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get());
 }
 inline ::std::string* Snap7_communication_parameter::release_ip_string() {
   // @@protoc_insertion_point(field_release:Snap7_communication_proto.Snap7_communication_parameter.ip_string)
-  if (!has_ip_string()) {
-    return NULL;
-  }
   clear_has_ip_string();
-  return ip_string_.ReleaseNonDefaultNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get());
+  return ip_string_.ReleaseNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get());
 }
 inline void Snap7_communication_parameter::set_allocated_ip_string(::std::string* ip_string) {
   if (ip_string != NULL) {
@@ -378,7 +362,7 @@ inline void Snap7_communication_parameter::set_allocated_ip_string(::std::string
   } else {
     clear_has_ip_string();
   }
-  ip_string_.SetAllocatedNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_i_give_permission_to_break_this_code_default_ip_string_.get(), ip_string);
+  ip_string_.SetAllocatedNoArena(&::Snap7_communication_proto::Snap7_communication_parameter::_default_ip_string_.get(), ip_string);
   // @@protoc_insertion_point(field_set_allocated:Snap7_communication_proto.Snap7_communication_parameter.ip_string)
 }
 
@@ -400,9 +384,6 @@ inline void Snap7_communication_parameter_all::clear_snap7_communication_paramet
   if (snap7_communication_parameters_ != NULL) snap7_communication_parameters_->Clear();
   clear_has_snap7_communication_parameters();
 }
-inline const ::Snap7_communication_proto::Snap7_communication_parameter& Snap7_communication_parameter_all::_internal_snap7_communication_parameters() const {
-  return *snap7_communication_parameters_;
-}
 inline const ::Snap7_communication_proto::Snap7_communication_parameter& Snap7_communication_parameter_all::snap7_communication_parameters() const {
   const ::Snap7_communication_proto::Snap7_communication_parameter* p = snap7_communication_parameters_;
   // @@protoc_insertion_point(field_get:Snap7_communication_proto.Snap7_communication_parameter_all.snap7_communication_parameters)
@@ -419,8 +400,7 @@ inline ::Snap7_communication_proto::Snap7_communication_parameter* Snap7_communi
 inline ::Snap7_communication_proto::Snap7_communication_parameter* Snap7_communication_parameter_all::mutable_snap7_communication_parameters() {
   set_has_snap7_communication_parameters();
   if (snap7_communication_parameters_ == NULL) {
-    auto* p = CreateMaybeMessage<::Snap7_communication_proto::Snap7_communication_parameter>(GetArenaNoVirtual());
-    snap7_communication_parameters_ = p;
+    snap7_communication_parameters_ = new ::Snap7_communication_proto::Snap7_communication_parameter;
   }
   // @@protoc_insertion_point(field_mutable:Snap7_communication_proto.Snap7_communication_parameter_all.snap7_communication_parameters)
   return snap7_communication_parameters_;
@@ -456,4 +436,4 @@ inline void Snap7_communication_parameter_all::set_allocated_snap7_communication
 
 // @@protoc_insertion_point(global_scope)
 
-#endif  // PROTOBUF_INCLUDED_snap7_5fcommunication_2eproto
+#endif  // PROTOBUF_snap7_5fcommunication_2eproto__INCLUDED