|
@@ -1,722 +0,0 @@
|
|
|
-// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
|
-// source: plc_module.proto
|
|
|
-
|
|
|
-#include "plc_module.pb.h"
|
|
|
-
|
|
|
-#include <algorithm>
|
|
|
-
|
|
|
-#include <google/protobuf/io/coded_stream.h>
|
|
|
-#include <google/protobuf/extension_set.h>
|
|
|
-#include <google/protobuf/wire_format_lite.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>
|
|
|
-// @@protoc_insertion_point(includes)
|
|
|
-#include <google/protobuf/port_def.inc>
|
|
|
-namespace plc_module {
|
|
|
-class plc_connection_paramsDefaultTypeInternal {
|
|
|
- public:
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<plc_connection_params> _instance;
|
|
|
-} _plc_connection_params_default_instance_;
|
|
|
-class Plc_msgDefaultTypeInternal {
|
|
|
- public:
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Plc_msg> _instance;
|
|
|
-} _Plc_msg_default_instance_;
|
|
|
-} // namespace plc_module
|
|
|
-static void InitDefaultsscc_info_Plc_msg_plc_5fmodule_2eproto() {
|
|
|
- GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
-
|
|
|
- {
|
|
|
- void* ptr = &::plc_module::_Plc_msg_default_instance_;
|
|
|
- new (ptr) ::plc_module::Plc_msg();
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
|
|
|
- }
|
|
|
- ::plc_module::Plc_msg::InitAsDefaultInstance();
|
|
|
-}
|
|
|
-
|
|
|
-::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Plc_msg_plc_5fmodule_2eproto =
|
|
|
- {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Plc_msg_plc_5fmodule_2eproto}, {}};
|
|
|
-
|
|
|
-static void InitDefaultsscc_info_plc_connection_params_plc_5fmodule_2eproto() {
|
|
|
- GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
-
|
|
|
- {
|
|
|
- void* ptr = &::plc_module::_plc_connection_params_default_instance_;
|
|
|
- new (ptr) ::plc_module::plc_connection_params();
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
|
|
|
- }
|
|
|
- ::plc_module::plc_connection_params::InitAsDefaultInstance();
|
|
|
-}
|
|
|
-
|
|
|
-::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_plc_connection_params_plc_5fmodule_2eproto =
|
|
|
- {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_plc_connection_params_plc_5fmodule_2eproto}, {}};
|
|
|
-
|
|
|
-static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_plc_5fmodule_2eproto[2];
|
|
|
-static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_plc_5fmodule_2eproto[1];
|
|
|
-static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_plc_5fmodule_2eproto = nullptr;
|
|
|
-
|
|
|
-const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_plc_5fmodule_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
- PROTOBUF_FIELD_OFFSET(::plc_module::plc_connection_params, _has_bits_),
|
|
|
- PROTOBUF_FIELD_OFFSET(::plc_module::plc_connection_params, _internal_metadata_),
|
|
|
- ~0u, // no _extensions_
|
|
|
- ~0u, // no _oneof_case_
|
|
|
- ~0u, // no _weak_field_map_
|
|
|
- PROTOBUF_FIELD_OFFSET(::plc_module::plc_connection_params, ip_),
|
|
|
- PROTOBUF_FIELD_OFFSET(::plc_module::plc_connection_params, port_),
|
|
|
- PROTOBUF_FIELD_OFFSET(::plc_module::plc_connection_params, slave_id_),
|
|
|
- 0,
|
|
|
- 1,
|
|
|
- 2,
|
|
|
- PROTOBUF_FIELD_OFFSET(::plc_module::Plc_msg, _has_bits_),
|
|
|
- PROTOBUF_FIELD_OFFSET(::plc_module::Plc_msg, _internal_metadata_),
|
|
|
- ~0u, // no _extensions_
|
|
|
- ~0u, // no _oneof_case_
|
|
|
- ~0u, // no _weak_field_map_
|
|
|
- PROTOBUF_FIELD_OFFSET(::plc_module::Plc_msg, status_),
|
|
|
- PROTOBUF_FIELD_OFFSET(::plc_module::Plc_msg, plc_values_),
|
|
|
- 0,
|
|
|
- ~0u,
|
|
|
-};
|
|
|
-static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
- { 0, 8, sizeof(::plc_module::plc_connection_params)},
|
|
|
- { 11, 18, sizeof(::plc_module::Plc_msg)},
|
|
|
-};
|
|
|
-
|
|
|
-static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
|
|
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::plc_module::_plc_connection_params_default_instance_),
|
|
|
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::plc_module::_Plc_msg_default_instance_),
|
|
|
-};
|
|
|
-
|
|
|
-const char descriptor_table_protodef_plc_5fmodule_2eproto[] PROTOBUF_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\"E\n\007Plc_msg\022&\n\006status"
|
|
|
- "\030\001 \001(\0162\026.plc_module.PLC_STATUS\022\022\n\nplc_va"
|
|
|
- "lues\030\002 \003(\005*W\n\nPLC_STATUS\022\021\n\rePLCConnecte"
|
|
|
- "d\020\000\022\024\n\020ePLCDisconnected\020\001\022\017\n\013ePLCRefused"
|
|
|
- "\020\002\022\017\n\013ePLCUnknown\020\003"
|
|
|
- ;
|
|
|
-static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_plc_5fmodule_2eproto_deps[1] = {
|
|
|
-};
|
|
|
-static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_plc_5fmodule_2eproto_sccs[2] = {
|
|
|
- &scc_info_Plc_msg_plc_5fmodule_2eproto.base,
|
|
|
- &scc_info_plc_connection_params_plc_5fmodule_2eproto.base,
|
|
|
-};
|
|
|
-static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_plc_5fmodule_2eproto_once;
|
|
|
-const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_plc_5fmodule_2eproto = {
|
|
|
- false, false, descriptor_table_protodef_plc_5fmodule_2eproto, "plc_module.proto", 259,
|
|
|
- &descriptor_table_plc_5fmodule_2eproto_once, descriptor_table_plc_5fmodule_2eproto_sccs, descriptor_table_plc_5fmodule_2eproto_deps, 2, 0,
|
|
|
- schemas, file_default_instances, TableStruct_plc_5fmodule_2eproto::offsets,
|
|
|
- file_level_metadata_plc_5fmodule_2eproto, 2, file_level_enum_descriptors_plc_5fmodule_2eproto, file_level_service_descriptors_plc_5fmodule_2eproto,
|
|
|
-};
|
|
|
-
|
|
|
-// Force running AddDescriptors() at dynamic initialization time.
|
|
|
-static bool dynamic_init_dummy_plc_5fmodule_2eproto = (static_cast<void>(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_plc_5fmodule_2eproto)), true);
|
|
|
-namespace plc_module {
|
|
|
-const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PLC_STATUS_descriptor() {
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_plc_5fmodule_2eproto);
|
|
|
- return file_level_enum_descriptors_plc_5fmodule_2eproto[0];
|
|
|
-}
|
|
|
-bool PLC_STATUS_IsValid(int value) {
|
|
|
- switch (value) {
|
|
|
- case 0:
|
|
|
- case 1:
|
|
|
- case 2:
|
|
|
- case 3:
|
|
|
- return true;
|
|
|
- default:
|
|
|
- return false;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-// ===================================================================
|
|
|
-
|
|
|
-void plc_connection_params::InitAsDefaultInstance() {
|
|
|
-}
|
|
|
-class plc_connection_params::_Internal {
|
|
|
- public:
|
|
|
- using HasBits = decltype(std::declval<plc_connection_params>()._has_bits_);
|
|
|
- static void set_has_ip(HasBits* has_bits) {
|
|
|
- (*has_bits)[0] |= 1u;
|
|
|
- }
|
|
|
- static void set_has_port(HasBits* has_bits) {
|
|
|
- (*has_bits)[0] |= 2u;
|
|
|
- }
|
|
|
- static void set_has_slave_id(HasBits* has_bits) {
|
|
|
- (*has_bits)[0] |= 4u;
|
|
|
- }
|
|
|
- static bool MissingRequiredFields(const HasBits& has_bits) {
|
|
|
- return ((has_bits[0] & 0x00000007) ^ 0x00000007) != 0;
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
-plc_connection_params::plc_connection_params(::PROTOBUF_NAMESPACE_ID::Arena* arena)
|
|
|
- : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
|
|
|
- SharedCtor();
|
|
|
- RegisterArenaDtor(arena);
|
|
|
- // @@protoc_insertion_point(arena_constructor:plc_module.plc_connection_params)
|
|
|
-}
|
|
|
-plc_connection_params::plc_connection_params(const plc_connection_params& from)
|
|
|
- : ::PROTOBUF_NAMESPACE_ID::Message(),
|
|
|
- _has_bits_(from._has_bits_) {
|
|
|
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
|
- ip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (from._internal_has_ip()) {
|
|
|
- ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_ip(),
|
|
|
- GetArena());
|
|
|
- }
|
|
|
- ::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() {
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_plc_connection_params_plc_5fmodule_2eproto.base);
|
|
|
- ip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::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();
|
|
|
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
|
-}
|
|
|
-
|
|
|
-void plc_connection_params::SharedDtor() {
|
|
|
- GOOGLE_DCHECK(GetArena() == nullptr);
|
|
|
- ip_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
|
-}
|
|
|
-
|
|
|
-void plc_connection_params::ArenaDtor(void* object) {
|
|
|
- plc_connection_params* _this = reinterpret_cast< plc_connection_params* >(object);
|
|
|
- (void)_this;
|
|
|
-}
|
|
|
-void plc_connection_params::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
|
|
|
-}
|
|
|
-void plc_connection_params::SetCachedSize(int size) const {
|
|
|
- _cached_size_.Set(size);
|
|
|
-}
|
|
|
-const plc_connection_params& plc_connection_params::default_instance() {
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_plc_connection_params_plc_5fmodule_2eproto.base);
|
|
|
- return *internal_default_instance();
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-void plc_connection_params::Clear() {
|
|
|
-// @@protoc_insertion_point(message_clear_start:plc_module.plc_connection_params)
|
|
|
- ::PROTOBUF_NAMESPACE_ID::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) {
|
|
|
- ip_.ClearNonDefaultToEmpty();
|
|
|
- }
|
|
|
- if (cached_has_bits & 0x00000006u) {
|
|
|
- ::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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
|
-}
|
|
|
-
|
|
|
-const char* plc_connection_params::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
|
|
-#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
|
- _Internal::HasBits has_bits{};
|
|
|
- ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
|
|
|
- while (!ctx->Done(&ptr)) {
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
|
|
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
|
|
- CHK_(ptr);
|
|
|
- switch (tag >> 3) {
|
|
|
- // required string ip = 1;
|
|
|
- case 1:
|
|
|
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
|
|
|
- auto str = _internal_mutable_ip();
|
|
|
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
|
|
|
- #ifndef NDEBUG
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "plc_module.plc_connection_params.ip");
|
|
|
- #endif // !NDEBUG
|
|
|
- CHK_(ptr);
|
|
|
- } else goto handle_unusual;
|
|
|
- continue;
|
|
|
- // required int32 port = 2;
|
|
|
- case 2:
|
|
|
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
|
|
|
- _Internal::set_has_port(&has_bits);
|
|
|
- port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
|
- CHK_(ptr);
|
|
|
- } else goto handle_unusual;
|
|
|
- continue;
|
|
|
- // required int32 slave_id = 3;
|
|
|
- case 3:
|
|
|
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
|
|
|
- _Internal::set_has_slave_id(&has_bits);
|
|
|
- slave_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
|
- CHK_(ptr);
|
|
|
- } else goto handle_unusual;
|
|
|
- continue;
|
|
|
- default: {
|
|
|
- handle_unusual:
|
|
|
- if ((tag & 7) == 4 || tag == 0) {
|
|
|
- ctx->SetLastTag(tag);
|
|
|
- goto success;
|
|
|
- }
|
|
|
- ptr = UnknownFieldParse(tag,
|
|
|
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
|
- ptr, ctx);
|
|
|
- CHK_(ptr != nullptr);
|
|
|
- continue;
|
|
|
- }
|
|
|
- } // switch
|
|
|
- } // while
|
|
|
-success:
|
|
|
- _has_bits_.Or(has_bits);
|
|
|
- return ptr;
|
|
|
-failure:
|
|
|
- ptr = nullptr;
|
|
|
- goto success;
|
|
|
-#undef CHK_
|
|
|
-}
|
|
|
-
|
|
|
-::PROTOBUF_NAMESPACE_ID::uint8* plc_connection_params::_InternalSerialize(
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
|
- // @@protoc_insertion_point(serialize_to_array_start:plc_module.plc_connection_params)
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- cached_has_bits = _has_bits_[0];
|
|
|
- // required string ip = 1;
|
|
|
- if (cached_has_bits & 0x00000001u) {
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
|
|
|
- this->_internal_ip().data(), static_cast<int>(this->_internal_ip().length()),
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
|
|
|
- "plc_module.plc_connection_params.ip");
|
|
|
- target = stream->WriteStringMaybeAliased(
|
|
|
- 1, this->_internal_ip(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // required int32 port = 2;
|
|
|
- if (cached_has_bits & 0x00000002u) {
|
|
|
- target = stream->EnsureSpace(target);
|
|
|
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_port(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // required int32 slave_id = 3;
|
|
|
- if (cached_has_bits & 0x00000004u) {
|
|
|
- target = stream->EnsureSpace(target);
|
|
|
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_slave_id(), target);
|
|
|
- }
|
|
|
-
|
|
|
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
|
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
|
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
|
- }
|
|
|
- // @@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 (_internal_has_ip()) {
|
|
|
- // required string ip = 1;
|
|
|
- total_size += 1 +
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
|
- this->_internal_ip());
|
|
|
- }
|
|
|
-
|
|
|
- if (_internal_has_port()) {
|
|
|
- // required int32 port = 2;
|
|
|
- total_size += 1 +
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
|
|
|
- this->_internal_port());
|
|
|
- }
|
|
|
-
|
|
|
- if (_internal_has_slave_id()) {
|
|
|
- // required int32 slave_id = 3;
|
|
|
- total_size += 1 +
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
|
|
|
- this->_internal_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 (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
|
|
|
- // required string ip = 1;
|
|
|
- total_size += 1 +
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
|
- this->_internal_ip());
|
|
|
-
|
|
|
- // required int32 port = 2;
|
|
|
- total_size += 1 +
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
|
|
|
- this->_internal_port());
|
|
|
-
|
|
|
- // required int32 slave_id = 3;
|
|
|
- total_size += 1 +
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
|
|
|
- this->_internal_slave_id());
|
|
|
-
|
|
|
- } else {
|
|
|
- total_size += RequiredFieldsByteSizeFallback();
|
|
|
- }
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
|
- // Prevent compiler warnings about cached_has_bits being unused
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
|
- return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
|
|
|
- _internal_metadata_, total_size, &_cached_size_);
|
|
|
- }
|
|
|
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
|
|
- SetCachedSize(cached_size);
|
|
|
- return total_size;
|
|
|
-}
|
|
|
-
|
|
|
-void plc_connection_params::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_merge_from_start:plc_module.plc_connection_params)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- const plc_connection_params* source =
|
|
|
- ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<plc_connection_params>(
|
|
|
- &from);
|
|
|
- if (source == nullptr) {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:plc_module.plc_connection_params)
|
|
|
- ::PROTOBUF_NAMESPACE_ID::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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- cached_has_bits = from._has_bits_[0];
|
|
|
- if (cached_has_bits & 0x00000007u) {
|
|
|
- if (cached_has_bits & 0x00000001u) {
|
|
|
- _internal_set_ip(from._internal_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 ::PROTOBUF_NAMESPACE_ID::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 (_Internal::MissingRequiredFields(_has_bits_)) return false;
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-void plc_connection_params::InternalSwap(plc_connection_params* other) {
|
|
|
- using std::swap;
|
|
|
- _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
|
|
|
- swap(_has_bits_[0], other->_has_bits_[0]);
|
|
|
- ip_.Swap(&other->ip_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
|
|
- PROTOBUF_FIELD_OFFSET(plc_connection_params, slave_id_)
|
|
|
- + sizeof(plc_connection_params::slave_id_)
|
|
|
- - PROTOBUF_FIELD_OFFSET(plc_connection_params, port_)>(
|
|
|
- reinterpret_cast<char*>(&port_),
|
|
|
- reinterpret_cast<char*>(&other->port_));
|
|
|
-}
|
|
|
-
|
|
|
-::PROTOBUF_NAMESPACE_ID::Metadata plc_connection_params::GetMetadata() const {
|
|
|
- return GetMetadataStatic();
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-// ===================================================================
|
|
|
-
|
|
|
-void Plc_msg::InitAsDefaultInstance() {
|
|
|
-}
|
|
|
-class Plc_msg::_Internal {
|
|
|
- public:
|
|
|
- using HasBits = decltype(std::declval<Plc_msg>()._has_bits_);
|
|
|
- static void set_has_status(HasBits* has_bits) {
|
|
|
- (*has_bits)[0] |= 1u;
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
-Plc_msg::Plc_msg(::PROTOBUF_NAMESPACE_ID::Arena* arena)
|
|
|
- : ::PROTOBUF_NAMESPACE_ID::Message(arena),
|
|
|
- plc_values_(arena) {
|
|
|
- SharedCtor();
|
|
|
- RegisterArenaDtor(arena);
|
|
|
- // @@protoc_insertion_point(arena_constructor:plc_module.Plc_msg)
|
|
|
-}
|
|
|
-Plc_msg::Plc_msg(const Plc_msg& from)
|
|
|
- : ::PROTOBUF_NAMESPACE_ID::Message(),
|
|
|
- _has_bits_(from._has_bits_),
|
|
|
- plc_values_(from.plc_values_) {
|
|
|
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
|
- status_ = from.status_;
|
|
|
- // @@protoc_insertion_point(copy_constructor:plc_module.Plc_msg)
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::SharedCtor() {
|
|
|
- status_ = 0;
|
|
|
-}
|
|
|
-
|
|
|
-Plc_msg::~Plc_msg() {
|
|
|
- // @@protoc_insertion_point(destructor:plc_module.Plc_msg)
|
|
|
- SharedDtor();
|
|
|
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::SharedDtor() {
|
|
|
- GOOGLE_DCHECK(GetArena() == nullptr);
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::ArenaDtor(void* object) {
|
|
|
- Plc_msg* _this = reinterpret_cast< Plc_msg* >(object);
|
|
|
- (void)_this;
|
|
|
-}
|
|
|
-void Plc_msg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
|
|
|
-}
|
|
|
-void Plc_msg::SetCachedSize(int size) const {
|
|
|
- _cached_size_.Set(size);
|
|
|
-}
|
|
|
-const Plc_msg& Plc_msg::default_instance() {
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Plc_msg_plc_5fmodule_2eproto.base);
|
|
|
- return *internal_default_instance();
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-void Plc_msg::Clear() {
|
|
|
-// @@protoc_insertion_point(message_clear_start:plc_module.Plc_msg)
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
|
- // Prevent compiler warnings about cached_has_bits being unused
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- plc_values_.Clear();
|
|
|
- status_ = 0;
|
|
|
- _has_bits_.Clear();
|
|
|
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
|
-}
|
|
|
-
|
|
|
-const char* Plc_msg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
|
|
-#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
|
- _Internal::HasBits has_bits{};
|
|
|
- ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
|
|
|
- while (!ctx->Done(&ptr)) {
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
|
|
|
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
|
|
- CHK_(ptr);
|
|
|
- switch (tag >> 3) {
|
|
|
- // optional .plc_module.PLC_STATUS status = 1;
|
|
|
- case 1:
|
|
|
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
|
- CHK_(ptr);
|
|
|
- if (PROTOBUF_PREDICT_TRUE(::plc_module::PLC_STATUS_IsValid(val))) {
|
|
|
- _internal_set_status(static_cast<::plc_module::PLC_STATUS>(val));
|
|
|
- } else {
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
|
|
|
- }
|
|
|
- } else goto handle_unusual;
|
|
|
- continue;
|
|
|
- // repeated int32 plc_values = 2;
|
|
|
- case 2:
|
|
|
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
|
|
|
- ptr -= 1;
|
|
|
- do {
|
|
|
- ptr += 1;
|
|
|
- _internal_add_plc_values(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
|
- CHK_(ptr);
|
|
|
- if (!ctx->DataAvailable(ptr)) break;
|
|
|
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
|
|
|
- } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18) {
|
|
|
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_plc_values(), ptr, ctx);
|
|
|
- CHK_(ptr);
|
|
|
- } else goto handle_unusual;
|
|
|
- continue;
|
|
|
- default: {
|
|
|
- handle_unusual:
|
|
|
- if ((tag & 7) == 4 || tag == 0) {
|
|
|
- ctx->SetLastTag(tag);
|
|
|
- goto success;
|
|
|
- }
|
|
|
- ptr = UnknownFieldParse(tag,
|
|
|
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
|
- ptr, ctx);
|
|
|
- CHK_(ptr != nullptr);
|
|
|
- continue;
|
|
|
- }
|
|
|
- } // switch
|
|
|
- } // while
|
|
|
-success:
|
|
|
- _has_bits_.Or(has_bits);
|
|
|
- return ptr;
|
|
|
-failure:
|
|
|
- ptr = nullptr;
|
|
|
- goto success;
|
|
|
-#undef CHK_
|
|
|
-}
|
|
|
-
|
|
|
-::PROTOBUF_NAMESPACE_ID::uint8* Plc_msg::_InternalSerialize(
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
|
- // @@protoc_insertion_point(serialize_to_array_start:plc_module.Plc_msg)
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- cached_has_bits = _has_bits_[0];
|
|
|
- // optional .plc_module.PLC_STATUS status = 1;
|
|
|
- if (cached_has_bits & 0x00000001u) {
|
|
|
- target = stream->EnsureSpace(target);
|
|
|
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
|
|
|
- 1, this->_internal_status(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // repeated int32 plc_values = 2;
|
|
|
- for (int i = 0, n = this->_internal_plc_values_size(); i < n; i++) {
|
|
|
- target = stream->EnsureSpace(target);
|
|
|
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_plc_values(i), target);
|
|
|
- }
|
|
|
-
|
|
|
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
|
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
|
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_to_array_end:plc_module.Plc_msg)
|
|
|
- return target;
|
|
|
-}
|
|
|
-
|
|
|
-size_t Plc_msg::ByteSizeLong() const {
|
|
|
-// @@protoc_insertion_point(message_byte_size_start:plc_module.Plc_msg)
|
|
|
- size_t total_size = 0;
|
|
|
-
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
|
- // Prevent compiler warnings about cached_has_bits being unused
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // repeated int32 plc_values = 2;
|
|
|
- {
|
|
|
- size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
|
- Int32Size(this->plc_values_);
|
|
|
- total_size += 1 *
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_plc_values_size());
|
|
|
- total_size += data_size;
|
|
|
- }
|
|
|
-
|
|
|
- // optional .plc_module.PLC_STATUS status = 1;
|
|
|
- cached_has_bits = _has_bits_[0];
|
|
|
- if (cached_has_bits & 0x00000001u) {
|
|
|
- total_size += 1 +
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_status());
|
|
|
- }
|
|
|
-
|
|
|
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
|
- return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
|
|
|
- _internal_metadata_, total_size, &_cached_size_);
|
|
|
- }
|
|
|
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
|
|
- SetCachedSize(cached_size);
|
|
|
- return total_size;
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_merge_from_start:plc_module.Plc_msg)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- const Plc_msg* source =
|
|
|
- ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Plc_msg>(
|
|
|
- &from);
|
|
|
- if (source == nullptr) {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:plc_module.Plc_msg)
|
|
|
- ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
|
|
|
- } else {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_success:plc_module.Plc_msg)
|
|
|
- MergeFrom(*source);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::MergeFrom(const Plc_msg& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_merge_from_start:plc_module.Plc_msg)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
|
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- plc_values_.MergeFrom(from.plc_values_);
|
|
|
- if (from._internal_has_status()) {
|
|
|
- _internal_set_status(from._internal_status());
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_copy_from_start:plc_module.Plc_msg)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::CopyFrom(const Plc_msg& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_copy_from_start:plc_module.Plc_msg)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-bool Plc_msg::IsInitialized() const {
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::InternalSwap(Plc_msg* other) {
|
|
|
- using std::swap;
|
|
|
- _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
|
|
|
- swap(_has_bits_[0], other->_has_bits_[0]);
|
|
|
- plc_values_.InternalSwap(&other->plc_values_);
|
|
|
- swap(status_, other->status_);
|
|
|
-}
|
|
|
-
|
|
|
-::PROTOBUF_NAMESPACE_ID::Metadata Plc_msg::GetMetadata() const {
|
|
|
- return GetMetadataStatic();
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-// @@protoc_insertion_point(namespace_scope)
|
|
|
-} // namespace plc_module
|
|
|
-PROTOBUF_NAMESPACE_OPEN
|
|
|
-template<> PROTOBUF_NOINLINE ::plc_module::plc_connection_params* Arena::CreateMaybeMessage< ::plc_module::plc_connection_params >(Arena* arena) {
|
|
|
- return Arena::CreateMessageInternal< ::plc_module::plc_connection_params >(arena);
|
|
|
-}
|
|
|
-template<> PROTOBUF_NOINLINE ::plc_module::Plc_msg* Arena::CreateMaybeMessage< ::plc_module::Plc_msg >(Arena* arena) {
|
|
|
- return Arena::CreateMessageInternal< ::plc_module::Plc_msg >(arena);
|
|
|
-}
|
|
|
-PROTOBUF_NAMESPACE_CLOSE
|
|
|
-
|
|
|
-// @@protoc_insertion_point(global_scope)
|
|
|
-#include <google/protobuf/port_undef.inc>
|