|
@@ -0,0 +1,500 @@
|
|
|
+// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
|
+// source: plc_module.proto
|
|
|
+
|
|
|
+#include "plc_module.pb.h"
|
|
|
+
|
|
|
+#include <algorithm>
|
|
|
+
|
|
|
+#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>
|
|
|
+#include <google/protobuf/generated_message_reflection.h>
|
|
|
+#include <google/protobuf/reflection_ops.h>
|
|
|
+#include <google/protobuf/wire_format.h>
|
|
|
+// This is a temporary google only hack
|
|
|
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
|
|
|
+#include "third_party/protobuf/version.h"
|
|
|
+#endif
|
|
|
+// @@protoc_insertion_point(includes)
|
|
|
+namespace plc_module {
|
|
|
+class plc_connection_paramsDefaultTypeInternal {
|
|
|
+ public:
|
|
|
+ ::google::protobuf::internal::ExplicitlyConstructed<plc_connection_params>
|
|
|
+ _instance;
|
|
|
+} _plc_connection_params_default_instance_;
|
|
|
+} // namespace plc_module
|
|
|
+namespace protobuf_plc_5fmodule_2eproto {
|
|
|
+void InitDefaultsplc_connection_paramsImpl() {
|
|
|
+ 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 = &::plc_module::_plc_connection_params_default_instance_;
|
|
|
+ new (ptr) ::plc_module::plc_connection_params();
|
|
|
+ ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
+ }
|
|
|
+ ::plc_module::plc_connection_params::InitAsDefaultInstance();
|
|
|
+}
|
|
|
+
|
|
|
+void InitDefaultsplc_connection_params() {
|
|
|
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
|
|
+ ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsplc_connection_paramsImpl);
|
|
|
+}
|
|
|
+
|
|
|
+::google::protobuf::Metadata file_level_metadata[1];
|
|
|
+
|
|
|
+const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::plc_module::plc_connection_params, _has_bits_),
|
|
|
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::plc_module::plc_connection_params, _internal_metadata_),
|
|
|
+ ~0u, // no _extensions_
|
|
|
+ ~0u, // no _oneof_case_
|
|
|
+ ~0u, // no _weak_field_map_
|
|
|
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::plc_module::plc_connection_params, ip_),
|
|
|
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::plc_module::plc_connection_params, port_),
|
|
|
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::plc_module::plc_connection_params, slave_id_),
|
|
|
+ 0,
|
|
|
+ 1,
|
|
|
+ 2,
|
|
|
+};
|
|
|
+static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
+ { 0, 8, sizeof(::plc_module::plc_connection_params)},
|
|
|
+};
|
|
|
+
|
|
|
+static ::google::protobuf::Message const * const file_default_instances[] = {
|
|
|
+ reinterpret_cast<const ::google::protobuf::Message*>(&::plc_module::_plc_connection_params_default_instance_),
|
|
|
+};
|
|
|
+
|
|
|
+void protobuf_AssignDescriptors() {
|
|
|
+ AddDescriptors();
|
|
|
+ ::google::protobuf::MessageFactory* factory = NULL;
|
|
|
+ AssignDescriptors(
|
|
|
+ "plc_module.proto", schemas, file_default_instances, TableStruct::offsets, factory,
|
|
|
+ file_level_metadata, NULL, NULL);
|
|
|
+}
|
|
|
+
|
|
|
+void protobuf_AssignDescriptorsOnce() {
|
|
|
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
|
|
+ ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
|
|
|
+}
|
|
|
+
|
|
|
+void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
|
|
|
+void protobuf_RegisterTypes(const ::std::string&) {
|
|
|
+ protobuf_AssignDescriptorsOnce();
|
|
|
+ ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
|
|
|
+}
|
|
|
+
|
|
|
+void AddDescriptorsImpl() {
|
|
|
+ InitDefaults();
|
|
|
+ static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
+ "\n\020plc_module.proto\022\nplc_module\"C\n\025plc_co"
|
|
|
+ "nnection_params\022\n\n\002ip\030\001 \002(\t\022\014\n\004port\030\002 \002("
|
|
|
+ "\005\022\020\n\010slave_id\030\003 \002(\005"
|
|
|
+ };
|
|
|
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
|
|
+ descriptor, 99);
|
|
|
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
|
|
+ "plc_module.proto", &protobuf_RegisterTypes);
|
|
|
+}
|
|
|
+
|
|
|
+void AddDescriptors() {
|
|
|
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
|
|
+ ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
|
|
|
+}
|
|
|
+// Force AddDescriptors() to be called at dynamic initialization time.
|
|
|
+struct StaticDescriptorInitializer {
|
|
|
+ StaticDescriptorInitializer() {
|
|
|
+ AddDescriptors();
|
|
|
+ }
|
|
|
+} static_descriptor_initializer;
|
|
|
+} // namespace protobuf_plc_5fmodule_2eproto
|
|
|
+namespace plc_module {
|
|
|
+
|
|
|
+// ===================================================================
|
|
|
+
|
|
|
+void plc_connection_params::InitAsDefaultInstance() {
|
|
|
+}
|
|
|
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
+const int plc_connection_params::kIpFieldNumber;
|
|
|
+const int plc_connection_params::kPortFieldNumber;
|
|
|
+const int plc_connection_params::kSlaveIdFieldNumber;
|
|
|
+#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
+
|
|
|
+plc_connection_params::plc_connection_params()
|
|
|
+ : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
|
+ if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
|
|
+ ::protobuf_plc_5fmodule_2eproto::InitDefaultsplc_connection_params();
|
|
|
+ }
|
|
|
+ SharedCtor();
|
|
|
+ // @@protoc_insertion_point(constructor:plc_module.plc_connection_params)
|
|
|
+}
|
|
|
+plc_connection_params::plc_connection_params(const plc_connection_params& from)
|
|
|
+ : ::google::protobuf::Message(),
|
|
|
+ _internal_metadata_(NULL),
|
|
|
+ _has_bits_(from._has_bits_),
|
|
|
+ _cached_size_(0) {
|
|
|
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
+ ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
+ if (from.has_ip()) {
|
|
|
+ ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ip_);
|
|
|
+ }
|
|
|
+ ::memcpy(&port_, &from.port_,
|
|
|
+ static_cast<size_t>(reinterpret_cast<char*>(&slave_id_) -
|
|
|
+ reinterpret_cast<char*>(&port_)) + sizeof(slave_id_));
|
|
|
+ // @@protoc_insertion_point(copy_constructor:plc_module.plc_connection_params)
|
|
|
+}
|
|
|
+
|
|
|
+void plc_connection_params::SharedCtor() {
|
|
|
+ _cached_size_ = 0;
|
|
|
+ ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
+ ::memset(&port_, 0, static_cast<size_t>(
|
|
|
+ reinterpret_cast<char*>(&slave_id_) -
|
|
|
+ reinterpret_cast<char*>(&port_)) + sizeof(slave_id_));
|
|
|
+}
|
|
|
+
|
|
|
+plc_connection_params::~plc_connection_params() {
|
|
|
+ // @@protoc_insertion_point(destructor:plc_module.plc_connection_params)
|
|
|
+ SharedDtor();
|
|
|
+}
|
|
|
+
|
|
|
+void plc_connection_params::SharedDtor() {
|
|
|
+ ip_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
+}
|
|
|
+
|
|
|
+void plc_connection_params::SetCachedSize(int size) const {
|
|
|
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
+ _cached_size_ = size;
|
|
|
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
+}
|
|
|
+const ::google::protobuf::Descriptor* plc_connection_params::descriptor() {
|
|
|
+ ::protobuf_plc_5fmodule_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
+ return ::protobuf_plc_5fmodule_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
|
+}
|
|
|
+
|
|
|
+const plc_connection_params& plc_connection_params::default_instance() {
|
|
|
+ ::protobuf_plc_5fmodule_2eproto::InitDefaultsplc_connection_params();
|
|
|
+ return *internal_default_instance();
|
|
|
+}
|
|
|
+
|
|
|
+plc_connection_params* plc_connection_params::New(::google::protobuf::Arena* arena) const {
|
|
|
+ plc_connection_params* n = new plc_connection_params;
|
|
|
+ if (arena != NULL) {
|
|
|
+ arena->Own(n);
|
|
|
+ }
|
|
|
+ return n;
|
|
|
+}
|
|
|
+
|
|
|
+void plc_connection_params::Clear() {
|
|
|
+// @@protoc_insertion_point(message_clear_start:plc_module.plc_connection_params)
|
|
|
+ ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
+ // Prevent compiler warnings about cached_has_bits being unused
|
|
|
+ (void) cached_has_bits;
|
|
|
+
|
|
|
+ cached_has_bits = _has_bits_[0];
|
|
|
+ if (cached_has_bits & 0x00000001u) {
|
|
|
+ GOOGLE_DCHECK(!ip_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
|
|
|
+ (*ip_.UnsafeRawStringPointer())->clear();
|
|
|
+ }
|
|
|
+ if (cached_has_bits & 6u) {
|
|
|
+ ::memset(&port_, 0, static_cast<size_t>(
|
|
|
+ reinterpret_cast<char*>(&slave_id_) -
|
|
|
+ reinterpret_cast<char*>(&port_)) + sizeof(slave_id_));
|
|
|
+ }
|
|
|
+ _has_bits_.Clear();
|
|
|
+ _internal_metadata_.Clear();
|
|
|
+}
|
|
|
+
|
|
|
+bool plc_connection_params::MergePartialFromCodedStream(
|
|
|
+ ::google::protobuf::io::CodedInputStream* input) {
|
|
|
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
|
+ ::google::protobuf::uint32 tag;
|
|
|
+ // @@protoc_insertion_point(parse_start:plc_module.plc_connection_params)
|
|
|
+ for (;;) {
|
|
|
+ ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
|
+ tag = p.first;
|
|
|
+ if (!p.second) goto handle_unusual;
|
|
|
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
|
+ // required string ip = 1;
|
|
|
+ case 1: {
|
|
|
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
+ static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
|
|
|
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
|
+ input, this->mutable_ip()));
|
|
|
+ ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
|
|
+ this->ip().data(), static_cast<int>(this->ip().length()),
|
|
|
+ ::google::protobuf::internal::WireFormat::PARSE,
|
|
|
+ "plc_module.plc_connection_params.ip");
|
|
|
+ } else {
|
|
|
+ goto handle_unusual;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ // required int32 port = 2;
|
|
|
+ case 2: {
|
|
|
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
+ static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
|
+ set_has_port();
|
|
|
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
|
+ input, &port_)));
|
|
|
+ } else {
|
|
|
+ goto handle_unusual;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ // required int32 slave_id = 3;
|
|
|
+ case 3: {
|
|
|
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
+ static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
|
|
|
+ set_has_slave_id();
|
|
|
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
|
+ input, &slave_id_)));
|
|
|
+ } else {
|
|
|
+ goto handle_unusual;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ default: {
|
|
|
+ handle_unusual:
|
|
|
+ if (tag == 0) {
|
|
|
+ goto success;
|
|
|
+ }
|
|
|
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
|
+ input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+success:
|
|
|
+ // @@protoc_insertion_point(parse_success:plc_module.plc_connection_params)
|
|
|
+ return true;
|
|
|
+failure:
|
|
|
+ // @@protoc_insertion_point(parse_failure:plc_module.plc_connection_params)
|
|
|
+ return false;
|
|
|
+#undef DO_
|
|
|
+}
|
|
|
+
|
|
|
+void plc_connection_params::SerializeWithCachedSizes(
|
|
|
+ ::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
+ // @@protoc_insertion_point(serialize_start:plc_module.plc_connection_params)
|
|
|
+ ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
+ (void) cached_has_bits;
|
|
|
+
|
|
|
+ cached_has_bits = _has_bits_[0];
|
|
|
+ // required string ip = 1;
|
|
|
+ if (cached_has_bits & 0x00000001u) {
|
|
|
+ ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
|
|
+ this->ip().data(), static_cast<int>(this->ip().length()),
|
|
|
+ ::google::protobuf::internal::WireFormat::SERIALIZE,
|
|
|
+ "plc_module.plc_connection_params.ip");
|
|
|
+ ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
|
+ 1, this->ip(), output);
|
|
|
+ }
|
|
|
+
|
|
|
+ // required int32 port = 2;
|
|
|
+ if (cached_has_bits & 0x00000002u) {
|
|
|
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->port(), output);
|
|
|
+ }
|
|
|
+
|
|
|
+ // required int32 slave_id = 3;
|
|
|
+ if (cached_has_bits & 0x00000004u) {
|
|
|
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->slave_id(), output);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (_internal_metadata_.have_unknown_fields()) {
|
|
|
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
|
+ _internal_metadata_.unknown_fields(), output);
|
|
|
+ }
|
|
|
+ // @@protoc_insertion_point(serialize_end:plc_module.plc_connection_params)
|
|
|
+}
|
|
|
+
|
|
|
+::google::protobuf::uint8* plc_connection_params::InternalSerializeWithCachedSizesToArray(
|
|
|
+ bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
+ (void)deterministic; // Unused
|
|
|
+ // @@protoc_insertion_point(serialize_to_array_start:plc_module.plc_connection_params)
|
|
|
+ ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
+ (void) cached_has_bits;
|
|
|
+
|
|
|
+ cached_has_bits = _has_bits_[0];
|
|
|
+ // required string ip = 1;
|
|
|
+ if (cached_has_bits & 0x00000001u) {
|
|
|
+ ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
|
|
+ this->ip().data(), static_cast<int>(this->ip().length()),
|
|
|
+ ::google::protobuf::internal::WireFormat::SERIALIZE,
|
|
|
+ "plc_module.plc_connection_params.ip");
|
|
|
+ target =
|
|
|
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
|
|
+ 1, this->ip(), target);
|
|
|
+ }
|
|
|
+
|
|
|
+ // required int32 port = 2;
|
|
|
+ if (cached_has_bits & 0x00000002u) {
|
|
|
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->port(), target);
|
|
|
+ }
|
|
|
+
|
|
|
+ // required int32 slave_id = 3;
|
|
|
+ if (cached_has_bits & 0x00000004u) {
|
|
|
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->slave_id(), target);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (_internal_metadata_.have_unknown_fields()) {
|
|
|
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
|
+ _internal_metadata_.unknown_fields(), target);
|
|
|
+ }
|
|
|
+ // @@protoc_insertion_point(serialize_to_array_end:plc_module.plc_connection_params)
|
|
|
+ return target;
|
|
|
+}
|
|
|
+
|
|
|
+size_t plc_connection_params::RequiredFieldsByteSizeFallback() const {
|
|
|
+// @@protoc_insertion_point(required_fields_byte_size_fallback_start:plc_module.plc_connection_params)
|
|
|
+ size_t total_size = 0;
|
|
|
+
|
|
|
+ if (has_ip()) {
|
|
|
+ // required string ip = 1;
|
|
|
+ total_size += 1 +
|
|
|
+ ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
|
+ this->ip());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (has_port()) {
|
|
|
+ // required int32 port = 2;
|
|
|
+ total_size += 1 +
|
|
|
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
|
+ this->port());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (has_slave_id()) {
|
|
|
+ // required int32 slave_id = 3;
|
|
|
+ total_size += 1 +
|
|
|
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
|
+ this->slave_id());
|
|
|
+ }
|
|
|
+
|
|
|
+ return total_size;
|
|
|
+}
|
|
|
+size_t plc_connection_params::ByteSizeLong() const {
|
|
|
+// @@protoc_insertion_point(message_byte_size_start:plc_module.plc_connection_params)
|
|
|
+ size_t total_size = 0;
|
|
|
+
|
|
|
+ if (_internal_metadata_.have_unknown_fields()) {
|
|
|
+ total_size +=
|
|
|
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
+ _internal_metadata_.unknown_fields());
|
|
|
+ }
|
|
|
+ if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
|
|
|
+ // required string ip = 1;
|
|
|
+ total_size += 1 +
|
|
|
+ ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
|
+ this->ip());
|
|
|
+
|
|
|
+ // required int32 port = 2;
|
|
|
+ total_size += 1 +
|
|
|
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
|
+ this->port());
|
|
|
+
|
|
|
+ // required int32 slave_id = 3;
|
|
|
+ total_size += 1 +
|
|
|
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
|
+ this->slave_id());
|
|
|
+
|
|
|
+ } else {
|
|
|
+ total_size += RequiredFieldsByteSizeFallback();
|
|
|
+ }
|
|
|
+ int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
|
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
+ _cached_size_ = cached_size;
|
|
|
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
+ return total_size;
|
|
|
+}
|
|
|
+
|
|
|
+void plc_connection_params::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
+// @@protoc_insertion_point(generalized_merge_from_start:plc_module.plc_connection_params)
|
|
|
+ GOOGLE_DCHECK_NE(&from, this);
|
|
|
+ const plc_connection_params* source =
|
|
|
+ ::google::protobuf::internal::DynamicCastToGenerated<const plc_connection_params>(
|
|
|
+ &from);
|
|
|
+ if (source == NULL) {
|
|
|
+ // @@protoc_insertion_point(generalized_merge_from_cast_fail:plc_module.plc_connection_params)
|
|
|
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
|
+ } else {
|
|
|
+ // @@protoc_insertion_point(generalized_merge_from_cast_success:plc_module.plc_connection_params)
|
|
|
+ MergeFrom(*source);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+void plc_connection_params::MergeFrom(const plc_connection_params& from) {
|
|
|
+// @@protoc_insertion_point(class_specific_merge_from_start:plc_module.plc_connection_params)
|
|
|
+ GOOGLE_DCHECK_NE(&from, this);
|
|
|
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
+ ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
+ (void) cached_has_bits;
|
|
|
+
|
|
|
+ cached_has_bits = from._has_bits_[0];
|
|
|
+ if (cached_has_bits & 7u) {
|
|
|
+ if (cached_has_bits & 0x00000001u) {
|
|
|
+ set_has_ip();
|
|
|
+ ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ip_);
|
|
|
+ }
|
|
|
+ if (cached_has_bits & 0x00000002u) {
|
|
|
+ port_ = from.port_;
|
|
|
+ }
|
|
|
+ if (cached_has_bits & 0x00000004u) {
|
|
|
+ slave_id_ = from.slave_id_;
|
|
|
+ }
|
|
|
+ _has_bits_[0] |= cached_has_bits;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+void plc_connection_params::CopyFrom(const ::google::protobuf::Message& from) {
|
|
|
+// @@protoc_insertion_point(generalized_copy_from_start:plc_module.plc_connection_params)
|
|
|
+ if (&from == this) return;
|
|
|
+ Clear();
|
|
|
+ MergeFrom(from);
|
|
|
+}
|
|
|
+
|
|
|
+void plc_connection_params::CopyFrom(const plc_connection_params& from) {
|
|
|
+// @@protoc_insertion_point(class_specific_copy_from_start:plc_module.plc_connection_params)
|
|
|
+ if (&from == this) return;
|
|
|
+ Clear();
|
|
|
+ MergeFrom(from);
|
|
|
+}
|
|
|
+
|
|
|
+bool plc_connection_params::IsInitialized() const {
|
|
|
+ if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
|
|
|
+ return true;
|
|
|
+}
|
|
|
+
|
|
|
+void plc_connection_params::Swap(plc_connection_params* other) {
|
|
|
+ if (other == this) return;
|
|
|
+ InternalSwap(other);
|
|
|
+}
|
|
|
+void plc_connection_params::InternalSwap(plc_connection_params* other) {
|
|
|
+ using std::swap;
|
|
|
+ ip_.Swap(&other->ip_);
|
|
|
+ swap(port_, other->port_);
|
|
|
+ swap(slave_id_, other->slave_id_);
|
|
|
+ swap(_has_bits_[0], other->_has_bits_[0]);
|
|
|
+ _internal_metadata_.Swap(&other->_internal_metadata_);
|
|
|
+ swap(_cached_size_, other->_cached_size_);
|
|
|
+}
|
|
|
+
|
|
|
+::google::protobuf::Metadata plc_connection_params::GetMetadata() const {
|
|
|
+ protobuf_plc_5fmodule_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
+ return ::protobuf_plc_5fmodule_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+// @@protoc_insertion_point(namespace_scope)
|
|
|
+} // namespace plc_module
|
|
|
+
|
|
|
+// @@protoc_insertion_point(global_scope)
|