|
@@ -1,851 +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/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_;
|
|
|
-class Plc_msgDefaultTypeInternal {
|
|
|
- public:
|
|
|
- ::google::protobuf::internal::ExplicitlyConstructed<Plc_msg>
|
|
|
- _instance;
|
|
|
-} _Plc_msg_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);
|
|
|
-}
|
|
|
-
|
|
|
-void InitDefaultsPlc_msgImpl() {
|
|
|
- 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_msg_default_instance_;
|
|
|
- new (ptr) ::plc_module::Plc_msg();
|
|
|
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
- }
|
|
|
- ::plc_module::Plc_msg::InitAsDefaultInstance();
|
|
|
-}
|
|
|
-
|
|
|
-void InitDefaultsPlc_msg() {
|
|
|
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
|
|
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsPlc_msgImpl);
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::Metadata file_level_metadata[2];
|
|
|
-const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[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,
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::plc_module::Plc_msg, _has_bits_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::plc_module::Plc_msg, _internal_metadata_),
|
|
|
- ~0u, // no _extensions_
|
|
|
- ~0u, // no _oneof_case_
|
|
|
- ~0u, // no _weak_field_map_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::plc_module::Plc_msg, status_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::plc_module::Plc_msg, plc_values_),
|
|
|
- 0,
|
|
|
- ~0u,
|
|
|
-};
|
|
|
-static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
- { 0, 8, sizeof(::plc_module::plc_connection_params)},
|
|
|
- { 11, 18, sizeof(::plc_module::Plc_msg)},
|
|
|
-};
|
|
|
-
|
|
|
-static ::google::protobuf::Message const * const file_default_instances[] = {
|
|
|
- reinterpret_cast<const ::google::protobuf::Message*>(&::plc_module::_plc_connection_params_default_instance_),
|
|
|
- reinterpret_cast<const ::google::protobuf::Message*>(&::plc_module::_Plc_msg_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, file_level_enum_descriptors, 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, 2);
|
|
|
-}
|
|
|
-
|
|
|
-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\"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"
|
|
|
- };
|
|
|
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
|
|
- descriptor, 259);
|
|
|
- ::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 {
|
|
|
-const ::google::protobuf::EnumDescriptor* PLC_STATUS_descriptor() {
|
|
|
- protobuf_plc_5fmodule_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return protobuf_plc_5fmodule_2eproto::file_level_enum_descriptors[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() {
|
|
|
-}
|
|
|
-#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];
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-// ===================================================================
|
|
|
-
|
|
|
-void Plc_msg::InitAsDefaultInstance() {
|
|
|
-}
|
|
|
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-const int Plc_msg::kStatusFieldNumber;
|
|
|
-const int Plc_msg::kPlcValuesFieldNumber;
|
|
|
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-
|
|
|
-Plc_msg::Plc_msg()
|
|
|
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
|
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
|
|
- ::protobuf_plc_5fmodule_2eproto::InitDefaultsPlc_msg();
|
|
|
- }
|
|
|
- SharedCtor();
|
|
|
- // @@protoc_insertion_point(constructor:plc_module.Plc_msg)
|
|
|
-}
|
|
|
-Plc_msg::Plc_msg(const Plc_msg& from)
|
|
|
- : ::google::protobuf::Message(),
|
|
|
- _internal_metadata_(NULL),
|
|
|
- _has_bits_(from._has_bits_),
|
|
|
- _cached_size_(0),
|
|
|
- plc_values_(from.plc_values_) {
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- status_ = from.status_;
|
|
|
- // @@protoc_insertion_point(copy_constructor:plc_module.Plc_msg)
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::SharedCtor() {
|
|
|
- _cached_size_ = 0;
|
|
|
- status_ = 0;
|
|
|
-}
|
|
|
-
|
|
|
-Plc_msg::~Plc_msg() {
|
|
|
- // @@protoc_insertion_point(destructor:plc_module.Plc_msg)
|
|
|
- SharedDtor();
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::SharedDtor() {
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::SetCachedSize(int size) const {
|
|
|
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
- _cached_size_ = size;
|
|
|
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
-}
|
|
|
-const ::google::protobuf::Descriptor* Plc_msg::descriptor() {
|
|
|
- ::protobuf_plc_5fmodule_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_plc_5fmodule_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
|
-}
|
|
|
-
|
|
|
-const Plc_msg& Plc_msg::default_instance() {
|
|
|
- ::protobuf_plc_5fmodule_2eproto::InitDefaultsPlc_msg();
|
|
|
- return *internal_default_instance();
|
|
|
-}
|
|
|
-
|
|
|
-Plc_msg* Plc_msg::New(::google::protobuf::Arena* arena) const {
|
|
|
- Plc_msg* n = new Plc_msg;
|
|
|
- if (arena != NULL) {
|
|
|
- arena->Own(n);
|
|
|
- }
|
|
|
- return n;
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::Clear() {
|
|
|
-// @@protoc_insertion_point(message_clear_start:plc_module.Plc_msg)
|
|
|
- ::google::protobuf::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();
|
|
|
-}
|
|
|
-
|
|
|
-bool Plc_msg::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_msg)
|
|
|
- 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)) {
|
|
|
- // optional .plc_module.PLC_STATUS status = 1;
|
|
|
- case 1: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
|
- int value;
|
|
|
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
|
|
- input, &value)));
|
|
|
- if (::plc_module::PLC_STATUS_IsValid(value)) {
|
|
|
- set_status(static_cast< ::plc_module::PLC_STATUS >(value));
|
|
|
- } else {
|
|
|
- mutable_unknown_fields()->AddVarint(
|
|
|
- 1, static_cast< ::google::protobuf::uint64>(value));
|
|
|
- }
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // repeated int32 plc_values = 2;
|
|
|
- case 2: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
|
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
|
|
|
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
|
- 1, 16u, input, this->mutable_plc_values())));
|
|
|
- } else if (
|
|
|
- static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
|
|
|
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
|
|
|
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
|
- input, this->mutable_plc_values())));
|
|
|
- } 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_msg)
|
|
|
- return true;
|
|
|
-failure:
|
|
|
- // @@protoc_insertion_point(parse_failure:plc_module.Plc_msg)
|
|
|
- return false;
|
|
|
-#undef DO_
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::SerializeWithCachedSizes(
|
|
|
- ::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
- // @@protoc_insertion_point(serialize_start:plc_module.Plc_msg)
|
|
|
- ::google::protobuf::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) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
|
|
|
- 1, this->status(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // repeated int32 plc_values = 2;
|
|
|
- for (int i = 0, n = this->plc_values_size(); i < n; i++) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteInt32(
|
|
|
- 2, this->plc_values(i), 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_msg)
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::uint8* Plc_msg::InternalSerializeWithCachedSizesToArray(
|
|
|
- bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
- (void)deterministic; // Unused
|
|
|
- // @@protoc_insertion_point(serialize_to_array_start:plc_module.Plc_msg)
|
|
|
- ::google::protobuf::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 = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
|
|
|
- 1, this->status(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // repeated int32 plc_values = 2;
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::
|
|
|
- WriteInt32ToArray(2, this->plc_values_, 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_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;
|
|
|
-
|
|
|
- if (_internal_metadata_.have_unknown_fields()) {
|
|
|
- total_size +=
|
|
|
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
- _internal_metadata_.unknown_fields());
|
|
|
- }
|
|
|
- // repeated int32 plc_values = 2;
|
|
|
- {
|
|
|
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
|
|
|
- Int32Size(this->plc_values_);
|
|
|
- total_size += 1 *
|
|
|
- ::google::protobuf::internal::FromIntSize(this->plc_values_size());
|
|
|
- total_size += data_size;
|
|
|
- }
|
|
|
-
|
|
|
- // optional .plc_module.PLC_STATUS status = 1;
|
|
|
- if (has_status()) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->status());
|
|
|
- }
|
|
|
-
|
|
|
- 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_msg::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_merge_from_start:plc_module.Plc_msg)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- const Plc_msg* source =
|
|
|
- ::google::protobuf::internal::DynamicCastToGenerated<const Plc_msg>(
|
|
|
- &from);
|
|
|
- if (source == NULL) {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:plc_module.Plc_msg)
|
|
|
- ::google::protobuf::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(from._internal_metadata_);
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- plc_values_.MergeFrom(from.plc_values_);
|
|
|
- if (from.has_status()) {
|
|
|
- set_status(from.status());
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void Plc_msg::CopyFrom(const ::google::protobuf::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::Swap(Plc_msg* other) {
|
|
|
- if (other == this) return;
|
|
|
- InternalSwap(other);
|
|
|
-}
|
|
|
-void Plc_msg::InternalSwap(Plc_msg* other) {
|
|
|
- using std::swap;
|
|
|
- plc_values_.InternalSwap(&other->plc_values_);
|
|
|
- swap(status_, other->status_);
|
|
|
- swap(_has_bits_[0], other->_has_bits_[0]);
|
|
|
- _internal_metadata_.Swap(&other->_internal_metadata_);
|
|
|
- swap(_cached_size_, other->_cached_size_);
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::Metadata Plc_msg::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)
|