1226 lines
46 KiB
C++
1226 lines
46 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: SystemStateUpdate.proto
|
|
|
|
#include "SystemStateUpdate.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"
|
|
#include "google/protobuf/generated_message_tctable_impl.h"
|
|
// @@protoc_insertion_point(includes)
|
|
|
|
// Must be included last.
|
|
#include "google/protobuf/port_def.inc"
|
|
PROTOBUF_PRAGMA_INIT_SEG
|
|
namespace _pb = ::google::protobuf;
|
|
namespace _pbi = ::google::protobuf::internal;
|
|
namespace _fl = ::google::protobuf::internal::field_layout;
|
|
namespace messages {
|
|
namespace data {
|
|
|
|
inline constexpr Sensor::Impl_::Impl_(
|
|
::_pbi::ConstantInitialized) noexcept
|
|
: _cached_size_{0},
|
|
name_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
id_{nullptr},
|
|
range_{0},
|
|
kind_{0u},
|
|
status_{0u} {}
|
|
|
|
template <typename>
|
|
PROTOBUF_CONSTEXPR Sensor::Sensor(::_pbi::ConstantInitialized)
|
|
: _impl_(::_pbi::ConstantInitialized()) {}
|
|
struct SensorDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR SensorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
|
|
~SensorDefaultTypeInternal() {}
|
|
union {
|
|
Sensor _instance;
|
|
};
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SensorDefaultTypeInternal _Sensor_default_instance_;
|
|
|
|
inline constexpr Effector::Impl_::Impl_(
|
|
::_pbi::ConstantInitialized) noexcept
|
|
: _cached_size_{0},
|
|
name_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
id_{nullptr},
|
|
range_{0},
|
|
ammunition_{0},
|
|
maxammunition_{0},
|
|
status_{0u} {}
|
|
|
|
template <typename>
|
|
PROTOBUF_CONSTEXPR Effector::Effector(::_pbi::ConstantInitialized)
|
|
: _impl_(::_pbi::ConstantInitialized()) {}
|
|
struct EffectorDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR EffectorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
|
|
~EffectorDefaultTypeInternal() {}
|
|
union {
|
|
Effector _instance;
|
|
};
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EffectorDefaultTypeInternal _Effector_default_instance_;
|
|
|
|
inline constexpr SystemStateUpdate::Impl_::Impl_(
|
|
::_pbi::ConstantInitialized) noexcept
|
|
: _cached_size_{0},
|
|
sensors_{},
|
|
effectors_{},
|
|
ownid_{nullptr} {}
|
|
|
|
template <typename>
|
|
PROTOBUF_CONSTEXPR SystemStateUpdate::SystemStateUpdate(::_pbi::ConstantInitialized)
|
|
: _impl_(::_pbi::ConstantInitialized()) {}
|
|
struct SystemStateUpdateDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR SystemStateUpdateDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
|
|
~SystemStateUpdateDefaultTypeInternal() {}
|
|
union {
|
|
SystemStateUpdate _instance;
|
|
};
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SystemStateUpdateDefaultTypeInternal _SystemStateUpdate_default_instance_;
|
|
} // namespace data
|
|
} // namespace messages
|
|
static ::_pb::Metadata file_level_metadata_SystemStateUpdate_2eproto[3];
|
|
static constexpr const ::_pb::EnumDescriptor**
|
|
file_level_enum_descriptors_SystemStateUpdate_2eproto = nullptr;
|
|
static constexpr const ::_pb::ServiceDescriptor**
|
|
file_level_service_descriptors_SystemStateUpdate_2eproto = nullptr;
|
|
const ::uint32_t
|
|
TableStruct_SystemStateUpdate_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
|
|
protodesc_cold) = {
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::SystemStateUpdate, _impl_._has_bits_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::SystemStateUpdate, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
~0u, // no _split_
|
|
~0u, // no sizeof(Split)
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::SystemStateUpdate, _impl_.ownid_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::SystemStateUpdate, _impl_.sensors_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::SystemStateUpdate, _impl_.effectors_),
|
|
0,
|
|
~0u,
|
|
~0u,
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Sensor, _impl_._has_bits_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Sensor, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
~0u, // no _split_
|
|
~0u, // no sizeof(Split)
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Sensor, _impl_.id_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Sensor, _impl_.name_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Sensor, _impl_.range_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Sensor, _impl_.kind_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Sensor, _impl_.status_),
|
|
0,
|
|
~0u,
|
|
~0u,
|
|
~0u,
|
|
~0u,
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Effector, _impl_._has_bits_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Effector, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
~0u, // no _split_
|
|
~0u, // no sizeof(Split)
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Effector, _impl_.id_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Effector, _impl_.name_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Effector, _impl_.range_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Effector, _impl_.ammunition_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Effector, _impl_.maxammunition_),
|
|
PROTOBUF_FIELD_OFFSET(::messages::data::Effector, _impl_.status_),
|
|
0,
|
|
~0u,
|
|
~0u,
|
|
~0u,
|
|
~0u,
|
|
~0u,
|
|
};
|
|
|
|
static const ::_pbi::MigrationSchema
|
|
schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
{0, 11, -1, sizeof(::messages::data::SystemStateUpdate)},
|
|
{14, 27, -1, sizeof(::messages::data::Sensor)},
|
|
{32, 46, -1, sizeof(::messages::data::Effector)},
|
|
};
|
|
|
|
static const ::_pb::Message* const file_default_instances[] = {
|
|
&::messages::data::_SystemStateUpdate_default_instance_._instance,
|
|
&::messages::data::_Sensor_default_instance_._instance,
|
|
&::messages::data::_Effector_default_instance_._instance,
|
|
};
|
|
const char descriptor_table_protodef_SystemStateUpdate_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
|
|
protodesc_cold) = {
|
|
"\n\027SystemStateUpdate.proto\022\rmessages.data"
|
|
"\032\020Identifier.proto\"\222\001\n\021SystemStateUpdate"
|
|
"\022)\n\005OwnID\030\001 \001(\0132\032.messages.track.Identif"
|
|
"ier\022&\n\007sensors\030\002 \003(\0132\025.messages.data.Sen"
|
|
"sor\022*\n\teffectors\030\003 \003(\0132\027.messages.data.E"
|
|
"ffector\"k\n\006Sensor\022&\n\002ID\030\001 \001(\0132\032.messages"
|
|
".track.Identifier\022\014\n\004name\030\002 \001(\t\022\r\n\005range"
|
|
"\030\003 \001(\001\022\014\n\004kind\030\004 \001(\r\022\016\n\006Status\030\005 \001(\r\"\212\001\n"
|
|
"\010Effector\022&\n\002ID\030\001 \001(\0132\032.messages.track.I"
|
|
"dentifier\022\014\n\004name\030\002 \001(\t\022\r\n\005range\030\003 \001(\001\022\022"
|
|
"\n\nammunition\030\004 \001(\005\022\025\n\rmaxammunition\030\006 \001("
|
|
"\005\022\016\n\006Status\030\007 \001(\rb\006proto3"
|
|
};
|
|
static const ::_pbi::DescriptorTable* const descriptor_table_SystemStateUpdate_2eproto_deps[1] =
|
|
{
|
|
&::descriptor_table_Identifier_2eproto,
|
|
};
|
|
static ::absl::once_flag descriptor_table_SystemStateUpdate_2eproto_once;
|
|
const ::_pbi::DescriptorTable descriptor_table_SystemStateUpdate_2eproto = {
|
|
false,
|
|
false,
|
|
465,
|
|
descriptor_table_protodef_SystemStateUpdate_2eproto,
|
|
"SystemStateUpdate.proto",
|
|
&descriptor_table_SystemStateUpdate_2eproto_once,
|
|
descriptor_table_SystemStateUpdate_2eproto_deps,
|
|
1,
|
|
3,
|
|
schemas,
|
|
file_default_instances,
|
|
TableStruct_SystemStateUpdate_2eproto::offsets,
|
|
file_level_metadata_SystemStateUpdate_2eproto,
|
|
file_level_enum_descriptors_SystemStateUpdate_2eproto,
|
|
file_level_service_descriptors_SystemStateUpdate_2eproto,
|
|
};
|
|
|
|
// This function exists to be marked as weak.
|
|
// It can significantly speed up compilation by breaking up LLVM's SCC
|
|
// in the .pb.cc translation units. Large translation units see a
|
|
// reduction of more than 35% of walltime for optimized builds. Without
|
|
// the weak attribute all the messages in the file, including all the
|
|
// vtables and everything they use become part of the same SCC through
|
|
// a cycle like:
|
|
// GetMetadata -> descriptor table -> default instances ->
|
|
// vtables -> GetMetadata
|
|
// By adding a weak function here we break the connection from the
|
|
// individual vtables back into the descriptor table.
|
|
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_SystemStateUpdate_2eproto_getter() {
|
|
return &descriptor_table_SystemStateUpdate_2eproto;
|
|
}
|
|
// Force running AddDescriptors() at dynamic initialization time.
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
|
|
static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_SystemStateUpdate_2eproto(&descriptor_table_SystemStateUpdate_2eproto);
|
|
namespace messages {
|
|
namespace data {
|
|
// ===================================================================
|
|
|
|
class SystemStateUpdate::_Internal {
|
|
public:
|
|
using HasBits = decltype(std::declval<SystemStateUpdate>()._impl_._has_bits_);
|
|
static constexpr ::int32_t kHasBitsOffset =
|
|
8 * PROTOBUF_FIELD_OFFSET(SystemStateUpdate, _impl_._has_bits_);
|
|
static const ::messages::track::Identifier& ownid(const SystemStateUpdate* msg);
|
|
static void set_has_ownid(HasBits* has_bits) {
|
|
(*has_bits)[0] |= 1u;
|
|
}
|
|
};
|
|
|
|
const ::messages::track::Identifier& SystemStateUpdate::_Internal::ownid(const SystemStateUpdate* msg) {
|
|
return *msg->_impl_.ownid_;
|
|
}
|
|
void SystemStateUpdate::clear_ownid() {
|
|
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
|
if (_impl_.ownid_ != nullptr) _impl_.ownid_->Clear();
|
|
_impl_._has_bits_[0] &= ~0x00000001u;
|
|
}
|
|
SystemStateUpdate::SystemStateUpdate(::google::protobuf::Arena* arena)
|
|
: ::google::protobuf::Message(arena) {
|
|
SharedCtor(arena);
|
|
// @@protoc_insertion_point(arena_constructor:messages.data.SystemStateUpdate)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE SystemStateUpdate::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
|
|
const Impl_& from)
|
|
: _has_bits_{from._has_bits_},
|
|
_cached_size_{0},
|
|
sensors_{visibility, arena, from.sensors_},
|
|
effectors_{visibility, arena, from.effectors_} {}
|
|
|
|
SystemStateUpdate::SystemStateUpdate(
|
|
::google::protobuf::Arena* arena,
|
|
const SystemStateUpdate& from)
|
|
: ::google::protobuf::Message(arena) {
|
|
SystemStateUpdate* const _this = this;
|
|
(void)_this;
|
|
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
|
|
from._internal_metadata_);
|
|
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
|
|
::uint32_t cached_has_bits = _impl_._has_bits_[0];
|
|
_impl_.ownid_ = (cached_has_bits & 0x00000001u)
|
|
? CreateMaybeMessage<::messages::track::Identifier>(arena, *from._impl_.ownid_)
|
|
: nullptr;
|
|
|
|
// @@protoc_insertion_point(copy_constructor:messages.data.SystemStateUpdate)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE SystemStateUpdate::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility,
|
|
::google::protobuf::Arena* arena)
|
|
: _cached_size_{0},
|
|
sensors_{visibility, arena},
|
|
effectors_{visibility, arena} {}
|
|
|
|
inline void SystemStateUpdate::SharedCtor(::_pb::Arena* arena) {
|
|
new (&_impl_) Impl_(internal_visibility(), arena);
|
|
_impl_.ownid_ = {};
|
|
}
|
|
SystemStateUpdate::~SystemStateUpdate() {
|
|
// @@protoc_insertion_point(destructor:messages.data.SystemStateUpdate)
|
|
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
|
|
SharedDtor();
|
|
}
|
|
inline void SystemStateUpdate::SharedDtor() {
|
|
ABSL_DCHECK(GetArena() == nullptr);
|
|
delete _impl_.ownid_;
|
|
_impl_.~Impl_();
|
|
}
|
|
|
|
const ::google::protobuf::MessageLite::ClassData*
|
|
SystemStateUpdate::GetClassData() const {
|
|
PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::ClassData
|
|
_data_ = {
|
|
SystemStateUpdate::MergeImpl,
|
|
nullptr, // OnDemandRegisterArenaDtor
|
|
&::google::protobuf::Message::kDescriptorMethods,
|
|
PROTOBUF_FIELD_OFFSET(SystemStateUpdate, _impl_._cached_size_),
|
|
};
|
|
return &_data_;
|
|
}
|
|
PROTOBUF_NOINLINE void SystemStateUpdate::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:messages.data.SystemStateUpdate)
|
|
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.sensors_.Clear();
|
|
_impl_.effectors_.Clear();
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
if (cached_has_bits & 0x00000001u) {
|
|
ABSL_DCHECK(_impl_.ownid_ != nullptr);
|
|
_impl_.ownid_->Clear();
|
|
}
|
|
_impl_._has_bits_.Clear();
|
|
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* SystemStateUpdate::_InternalParse(
|
|
const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
|
|
return ptr;
|
|
}
|
|
|
|
|
|
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::_pbi::TcParseTable<2, 3, 3, 0, 2> SystemStateUpdate::_table_ = {
|
|
{
|
|
PROTOBUF_FIELD_OFFSET(SystemStateUpdate, _impl_._has_bits_),
|
|
0, // no _extensions_
|
|
3, 24, // max_field_number, fast_idx_mask
|
|
offsetof(decltype(_table_), field_lookup_table),
|
|
4294967288, // skipmap
|
|
offsetof(decltype(_table_), field_entries),
|
|
3, // num_field_entries
|
|
3, // num_aux_entries
|
|
offsetof(decltype(_table_), aux_entries),
|
|
&_SystemStateUpdate_default_instance_._instance,
|
|
::_pbi::TcParser::GenericFallback, // fallback
|
|
}, {{
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
// .messages.track.Identifier OwnID = 1;
|
|
{::_pbi::TcParser::FastMtS1,
|
|
{10, 0, 0, PROTOBUF_FIELD_OFFSET(SystemStateUpdate, _impl_.ownid_)}},
|
|
// repeated .messages.data.Sensor sensors = 2;
|
|
{::_pbi::TcParser::FastMtR1,
|
|
{18, 63, 1, PROTOBUF_FIELD_OFFSET(SystemStateUpdate, _impl_.sensors_)}},
|
|
// repeated .messages.data.Effector effectors = 3;
|
|
{::_pbi::TcParser::FastMtR1,
|
|
{26, 63, 2, PROTOBUF_FIELD_OFFSET(SystemStateUpdate, _impl_.effectors_)}},
|
|
}}, {{
|
|
65535, 65535
|
|
}}, {{
|
|
// .messages.track.Identifier OwnID = 1;
|
|
{PROTOBUF_FIELD_OFFSET(SystemStateUpdate, _impl_.ownid_), _Internal::kHasBitsOffset + 0, 0,
|
|
(0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
|
|
// repeated .messages.data.Sensor sensors = 2;
|
|
{PROTOBUF_FIELD_OFFSET(SystemStateUpdate, _impl_.sensors_), -1, 1,
|
|
(0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
|
|
// repeated .messages.data.Effector effectors = 3;
|
|
{PROTOBUF_FIELD_OFFSET(SystemStateUpdate, _impl_.effectors_), -1, 2,
|
|
(0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
|
|
}}, {{
|
|
{::_pbi::TcParser::GetTable<::messages::track::Identifier>()},
|
|
{::_pbi::TcParser::GetTable<::messages::data::Sensor>()},
|
|
{::_pbi::TcParser::GetTable<::messages::data::Effector>()},
|
|
}}, {{
|
|
}},
|
|
};
|
|
|
|
::uint8_t* SystemStateUpdate::_InternalSerialize(
|
|
::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:messages.data.SystemStateUpdate)
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
// .messages.track.Identifier OwnID = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
|
|
1, _Internal::ownid(this),
|
|
_Internal::ownid(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// repeated .messages.data.Sensor sensors = 2;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_sensors_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_sensors().Get(i);
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// repeated .messages.data.Effector effectors = 3;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_effectors_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_effectors().Get(i);
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target =
|
|
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:messages.data.SystemStateUpdate)
|
|
return target;
|
|
}
|
|
|
|
::size_t SystemStateUpdate::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:messages.data.SystemStateUpdate)
|
|
::size_t total_size = 0;
|
|
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .messages.data.Sensor sensors = 2;
|
|
total_size += 1UL * this->_internal_sensors_size();
|
|
for (const auto& msg : this->_internal_sensors()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
// repeated .messages.data.Effector effectors = 3;
|
|
total_size += 1UL * this->_internal_effectors_size();
|
|
for (const auto& msg : this->_internal_effectors()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
// .messages.track.Identifier OwnID = 1;
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
if (cached_has_bits & 0x00000001u) {
|
|
total_size +=
|
|
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.ownid_);
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
|
|
void SystemStateUpdate::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
|
|
auto* const _this = static_cast<SystemStateUpdate*>(&to_msg);
|
|
auto& from = static_cast<const SystemStateUpdate&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:messages.data.SystemStateUpdate)
|
|
ABSL_DCHECK_NE(&from, _this);
|
|
::uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_internal_mutable_sensors()->MergeFrom(
|
|
from._internal_sensors());
|
|
_this->_internal_mutable_effectors()->MergeFrom(
|
|
from._internal_effectors());
|
|
if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
|
|
_this->_internal_mutable_ownid()->::messages::track::Identifier::MergeFrom(
|
|
from._internal_ownid());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void SystemStateUpdate::CopyFrom(const SystemStateUpdate& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:messages.data.SystemStateUpdate)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
PROTOBUF_NOINLINE bool SystemStateUpdate::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void SystemStateUpdate::InternalSwap(SystemStateUpdate* PROTOBUF_RESTRICT other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
|
|
_impl_.sensors_.InternalSwap(&other->_impl_.sensors_);
|
|
_impl_.effectors_.InternalSwap(&other->_impl_.effectors_);
|
|
swap(_impl_.ownid_, other->_impl_.ownid_);
|
|
}
|
|
|
|
::google::protobuf::Metadata SystemStateUpdate::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_SystemStateUpdate_2eproto_getter, &descriptor_table_SystemStateUpdate_2eproto_once,
|
|
file_level_metadata_SystemStateUpdate_2eproto[0]);
|
|
}
|
|
// ===================================================================
|
|
|
|
class Sensor::_Internal {
|
|
public:
|
|
using HasBits = decltype(std::declval<Sensor>()._impl_._has_bits_);
|
|
static constexpr ::int32_t kHasBitsOffset =
|
|
8 * PROTOBUF_FIELD_OFFSET(Sensor, _impl_._has_bits_);
|
|
static const ::messages::track::Identifier& id(const Sensor* msg);
|
|
static void set_has_id(HasBits* has_bits) {
|
|
(*has_bits)[0] |= 1u;
|
|
}
|
|
};
|
|
|
|
const ::messages::track::Identifier& Sensor::_Internal::id(const Sensor* msg) {
|
|
return *msg->_impl_.id_;
|
|
}
|
|
void Sensor::clear_id() {
|
|
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
|
if (_impl_.id_ != nullptr) _impl_.id_->Clear();
|
|
_impl_._has_bits_[0] &= ~0x00000001u;
|
|
}
|
|
Sensor::Sensor(::google::protobuf::Arena* arena)
|
|
: ::google::protobuf::Message(arena) {
|
|
SharedCtor(arena);
|
|
// @@protoc_insertion_point(arena_constructor:messages.data.Sensor)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE Sensor::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
|
|
const Impl_& from)
|
|
: _has_bits_{from._has_bits_},
|
|
_cached_size_{0},
|
|
name_(arena, from.name_) {}
|
|
|
|
Sensor::Sensor(
|
|
::google::protobuf::Arena* arena,
|
|
const Sensor& from)
|
|
: ::google::protobuf::Message(arena) {
|
|
Sensor* const _this = this;
|
|
(void)_this;
|
|
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
|
|
from._internal_metadata_);
|
|
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
|
|
::uint32_t cached_has_bits = _impl_._has_bits_[0];
|
|
_impl_.id_ = (cached_has_bits & 0x00000001u)
|
|
? CreateMaybeMessage<::messages::track::Identifier>(arena, *from._impl_.id_)
|
|
: nullptr;
|
|
::memcpy(reinterpret_cast<char *>(&_impl_) +
|
|
offsetof(Impl_, range_),
|
|
reinterpret_cast<const char *>(&from._impl_) +
|
|
offsetof(Impl_, range_),
|
|
offsetof(Impl_, status_) -
|
|
offsetof(Impl_, range_) +
|
|
sizeof(Impl_::status_));
|
|
|
|
// @@protoc_insertion_point(copy_constructor:messages.data.Sensor)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE Sensor::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility,
|
|
::google::protobuf::Arena* arena)
|
|
: _cached_size_{0},
|
|
name_(arena) {}
|
|
|
|
inline void Sensor::SharedCtor(::_pb::Arena* arena) {
|
|
new (&_impl_) Impl_(internal_visibility(), arena);
|
|
::memset(reinterpret_cast<char *>(&_impl_) +
|
|
offsetof(Impl_, id_),
|
|
0,
|
|
offsetof(Impl_, status_) -
|
|
offsetof(Impl_, id_) +
|
|
sizeof(Impl_::status_));
|
|
}
|
|
Sensor::~Sensor() {
|
|
// @@protoc_insertion_point(destructor:messages.data.Sensor)
|
|
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
|
|
SharedDtor();
|
|
}
|
|
inline void Sensor::SharedDtor() {
|
|
ABSL_DCHECK(GetArena() == nullptr);
|
|
_impl_.name_.Destroy();
|
|
delete _impl_.id_;
|
|
_impl_.~Impl_();
|
|
}
|
|
|
|
const ::google::protobuf::MessageLite::ClassData*
|
|
Sensor::GetClassData() const {
|
|
PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::ClassData
|
|
_data_ = {
|
|
Sensor::MergeImpl,
|
|
nullptr, // OnDemandRegisterArenaDtor
|
|
&::google::protobuf::Message::kDescriptorMethods,
|
|
PROTOBUF_FIELD_OFFSET(Sensor, _impl_._cached_size_),
|
|
};
|
|
return &_data_;
|
|
}
|
|
PROTOBUF_NOINLINE void Sensor::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:messages.data.Sensor)
|
|
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.name_.ClearToEmpty();
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
if (cached_has_bits & 0x00000001u) {
|
|
ABSL_DCHECK(_impl_.id_ != nullptr);
|
|
_impl_.id_->Clear();
|
|
}
|
|
::memset(&_impl_.range_, 0, static_cast<::size_t>(
|
|
reinterpret_cast<char*>(&_impl_.status_) -
|
|
reinterpret_cast<char*>(&_impl_.range_)) + sizeof(_impl_.status_));
|
|
_impl_._has_bits_.Clear();
|
|
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Sensor::_InternalParse(
|
|
const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
|
|
return ptr;
|
|
}
|
|
|
|
|
|
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::_pbi::TcParseTable<3, 5, 1, 33, 2> Sensor::_table_ = {
|
|
{
|
|
PROTOBUF_FIELD_OFFSET(Sensor, _impl_._has_bits_),
|
|
0, // no _extensions_
|
|
5, 56, // max_field_number, fast_idx_mask
|
|
offsetof(decltype(_table_), field_lookup_table),
|
|
4294967264, // skipmap
|
|
offsetof(decltype(_table_), field_entries),
|
|
5, // num_field_entries
|
|
1, // num_aux_entries
|
|
offsetof(decltype(_table_), aux_entries),
|
|
&_Sensor_default_instance_._instance,
|
|
::_pbi::TcParser::GenericFallback, // fallback
|
|
}, {{
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
// .messages.track.Identifier ID = 1;
|
|
{::_pbi::TcParser::FastMtS1,
|
|
{10, 0, 0, PROTOBUF_FIELD_OFFSET(Sensor, _impl_.id_)}},
|
|
// string name = 2;
|
|
{::_pbi::TcParser::FastUS1,
|
|
{18, 63, 0, PROTOBUF_FIELD_OFFSET(Sensor, _impl_.name_)}},
|
|
// double range = 3;
|
|
{::_pbi::TcParser::FastF64S1,
|
|
{25, 63, 0, PROTOBUF_FIELD_OFFSET(Sensor, _impl_.range_)}},
|
|
// uint32 kind = 4;
|
|
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Sensor, _impl_.kind_), 63>(),
|
|
{32, 63, 0, PROTOBUF_FIELD_OFFSET(Sensor, _impl_.kind_)}},
|
|
// uint32 Status = 5;
|
|
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Sensor, _impl_.status_), 63>(),
|
|
{40, 63, 0, PROTOBUF_FIELD_OFFSET(Sensor, _impl_.status_)}},
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
}}, {{
|
|
65535, 65535
|
|
}}, {{
|
|
// .messages.track.Identifier ID = 1;
|
|
{PROTOBUF_FIELD_OFFSET(Sensor, _impl_.id_), _Internal::kHasBitsOffset + 0, 0,
|
|
(0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
|
|
// string name = 2;
|
|
{PROTOBUF_FIELD_OFFSET(Sensor, _impl_.name_), -1, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
|
|
// double range = 3;
|
|
{PROTOBUF_FIELD_OFFSET(Sensor, _impl_.range_), -1, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kDouble)},
|
|
// uint32 kind = 4;
|
|
{PROTOBUF_FIELD_OFFSET(Sensor, _impl_.kind_), -1, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kUInt32)},
|
|
// uint32 Status = 5;
|
|
{PROTOBUF_FIELD_OFFSET(Sensor, _impl_.status_), -1, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kUInt32)},
|
|
}}, {{
|
|
{::_pbi::TcParser::GetTable<::messages::track::Identifier>()},
|
|
}}, {{
|
|
"\24\0\4\0\0\0\0\0"
|
|
"messages.data.Sensor"
|
|
"name"
|
|
}},
|
|
};
|
|
|
|
::uint8_t* Sensor::_InternalSerialize(
|
|
::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:messages.data.Sensor)
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
// .messages.track.Identifier ID = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
|
|
1, _Internal::id(this),
|
|
_Internal::id(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// string name = 2;
|
|
if (!this->_internal_name().empty()) {
|
|
const std::string& _s = this->_internal_name();
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "messages.data.Sensor.name");
|
|
target = stream->WriteStringMaybeAliased(2, _s, target);
|
|
}
|
|
|
|
// double range = 3;
|
|
static_assert(sizeof(::uint64_t) == sizeof(double),
|
|
"Code assumes ::uint64_t and double are the same size.");
|
|
double tmp_range = this->_internal_range();
|
|
::uint64_t raw_range;
|
|
memcpy(&raw_range, &tmp_range, sizeof(tmp_range));
|
|
if (raw_range != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteDoubleToArray(
|
|
3, this->_internal_range(), target);
|
|
}
|
|
|
|
// uint32 kind = 4;
|
|
if (this->_internal_kind() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
|
|
4, this->_internal_kind(), target);
|
|
}
|
|
|
|
// uint32 Status = 5;
|
|
if (this->_internal_status() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
|
|
5, this->_internal_status(), target);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target =
|
|
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:messages.data.Sensor)
|
|
return target;
|
|
}
|
|
|
|
::size_t Sensor::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:messages.data.Sensor)
|
|
::size_t total_size = 0;
|
|
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// string name = 2;
|
|
if (!this->_internal_name().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this->_internal_name());
|
|
}
|
|
|
|
// .messages.track.Identifier ID = 1;
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
if (cached_has_bits & 0x00000001u) {
|
|
total_size +=
|
|
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.id_);
|
|
}
|
|
|
|
// double range = 3;
|
|
static_assert(sizeof(::uint64_t) == sizeof(double),
|
|
"Code assumes ::uint64_t and double are the same size.");
|
|
double tmp_range = this->_internal_range();
|
|
::uint64_t raw_range;
|
|
memcpy(&raw_range, &tmp_range, sizeof(tmp_range));
|
|
if (raw_range != 0) {
|
|
total_size += 9;
|
|
}
|
|
|
|
// uint32 kind = 4;
|
|
if (this->_internal_kind() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
|
|
this->_internal_kind());
|
|
}
|
|
|
|
// uint32 Status = 5;
|
|
if (this->_internal_status() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
|
|
this->_internal_status());
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
|
|
void Sensor::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
|
|
auto* const _this = static_cast<Sensor*>(&to_msg);
|
|
auto& from = static_cast<const Sensor&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:messages.data.Sensor)
|
|
ABSL_DCHECK_NE(&from, _this);
|
|
::uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_name().empty()) {
|
|
_this->_internal_set_name(from._internal_name());
|
|
}
|
|
if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
|
|
_this->_internal_mutable_id()->::messages::track::Identifier::MergeFrom(
|
|
from._internal_id());
|
|
}
|
|
static_assert(sizeof(::uint64_t) == sizeof(double),
|
|
"Code assumes ::uint64_t and double are the same size.");
|
|
double tmp_range = from._internal_range();
|
|
::uint64_t raw_range;
|
|
memcpy(&raw_range, &tmp_range, sizeof(tmp_range));
|
|
if (raw_range != 0) {
|
|
_this->_internal_set_range(from._internal_range());
|
|
}
|
|
if (from._internal_kind() != 0) {
|
|
_this->_internal_set_kind(from._internal_kind());
|
|
}
|
|
if (from._internal_status() != 0) {
|
|
_this->_internal_set_status(from._internal_status());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Sensor::CopyFrom(const Sensor& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:messages.data.Sensor)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
PROTOBUF_NOINLINE bool Sensor::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Sensor::InternalSwap(Sensor* PROTOBUF_RESTRICT other) {
|
|
using std::swap;
|
|
auto* arena = GetArena();
|
|
ABSL_DCHECK_EQ(arena, other->GetArena());
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
|
|
::google::protobuf::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(Sensor, _impl_.status_)
|
|
+ sizeof(Sensor::_impl_.status_)
|
|
- PROTOBUF_FIELD_OFFSET(Sensor, _impl_.id_)>(
|
|
reinterpret_cast<char*>(&_impl_.id_),
|
|
reinterpret_cast<char*>(&other->_impl_.id_));
|
|
}
|
|
|
|
::google::protobuf::Metadata Sensor::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_SystemStateUpdate_2eproto_getter, &descriptor_table_SystemStateUpdate_2eproto_once,
|
|
file_level_metadata_SystemStateUpdate_2eproto[1]);
|
|
}
|
|
// ===================================================================
|
|
|
|
class Effector::_Internal {
|
|
public:
|
|
using HasBits = decltype(std::declval<Effector>()._impl_._has_bits_);
|
|
static constexpr ::int32_t kHasBitsOffset =
|
|
8 * PROTOBUF_FIELD_OFFSET(Effector, _impl_._has_bits_);
|
|
static const ::messages::track::Identifier& id(const Effector* msg);
|
|
static void set_has_id(HasBits* has_bits) {
|
|
(*has_bits)[0] |= 1u;
|
|
}
|
|
};
|
|
|
|
const ::messages::track::Identifier& Effector::_Internal::id(const Effector* msg) {
|
|
return *msg->_impl_.id_;
|
|
}
|
|
void Effector::clear_id() {
|
|
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
|
if (_impl_.id_ != nullptr) _impl_.id_->Clear();
|
|
_impl_._has_bits_[0] &= ~0x00000001u;
|
|
}
|
|
Effector::Effector(::google::protobuf::Arena* arena)
|
|
: ::google::protobuf::Message(arena) {
|
|
SharedCtor(arena);
|
|
// @@protoc_insertion_point(arena_constructor:messages.data.Effector)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE Effector::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
|
|
const Impl_& from)
|
|
: _has_bits_{from._has_bits_},
|
|
_cached_size_{0},
|
|
name_(arena, from.name_) {}
|
|
|
|
Effector::Effector(
|
|
::google::protobuf::Arena* arena,
|
|
const Effector& from)
|
|
: ::google::protobuf::Message(arena) {
|
|
Effector* const _this = this;
|
|
(void)_this;
|
|
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
|
|
from._internal_metadata_);
|
|
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
|
|
::uint32_t cached_has_bits = _impl_._has_bits_[0];
|
|
_impl_.id_ = (cached_has_bits & 0x00000001u)
|
|
? CreateMaybeMessage<::messages::track::Identifier>(arena, *from._impl_.id_)
|
|
: nullptr;
|
|
::memcpy(reinterpret_cast<char *>(&_impl_) +
|
|
offsetof(Impl_, range_),
|
|
reinterpret_cast<const char *>(&from._impl_) +
|
|
offsetof(Impl_, range_),
|
|
offsetof(Impl_, status_) -
|
|
offsetof(Impl_, range_) +
|
|
sizeof(Impl_::status_));
|
|
|
|
// @@protoc_insertion_point(copy_constructor:messages.data.Effector)
|
|
}
|
|
inline PROTOBUF_NDEBUG_INLINE Effector::Impl_::Impl_(
|
|
::google::protobuf::internal::InternalVisibility visibility,
|
|
::google::protobuf::Arena* arena)
|
|
: _cached_size_{0},
|
|
name_(arena) {}
|
|
|
|
inline void Effector::SharedCtor(::_pb::Arena* arena) {
|
|
new (&_impl_) Impl_(internal_visibility(), arena);
|
|
::memset(reinterpret_cast<char *>(&_impl_) +
|
|
offsetof(Impl_, id_),
|
|
0,
|
|
offsetof(Impl_, status_) -
|
|
offsetof(Impl_, id_) +
|
|
sizeof(Impl_::status_));
|
|
}
|
|
Effector::~Effector() {
|
|
// @@protoc_insertion_point(destructor:messages.data.Effector)
|
|
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
|
|
SharedDtor();
|
|
}
|
|
inline void Effector::SharedDtor() {
|
|
ABSL_DCHECK(GetArena() == nullptr);
|
|
_impl_.name_.Destroy();
|
|
delete _impl_.id_;
|
|
_impl_.~Impl_();
|
|
}
|
|
|
|
const ::google::protobuf::MessageLite::ClassData*
|
|
Effector::GetClassData() const {
|
|
PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::ClassData
|
|
_data_ = {
|
|
Effector::MergeImpl,
|
|
nullptr, // OnDemandRegisterArenaDtor
|
|
&::google::protobuf::Message::kDescriptorMethods,
|
|
PROTOBUF_FIELD_OFFSET(Effector, _impl_._cached_size_),
|
|
};
|
|
return &_data_;
|
|
}
|
|
PROTOBUF_NOINLINE void Effector::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:messages.data.Effector)
|
|
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.name_.ClearToEmpty();
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
if (cached_has_bits & 0x00000001u) {
|
|
ABSL_DCHECK(_impl_.id_ != nullptr);
|
|
_impl_.id_->Clear();
|
|
}
|
|
::memset(&_impl_.range_, 0, static_cast<::size_t>(
|
|
reinterpret_cast<char*>(&_impl_.status_) -
|
|
reinterpret_cast<char*>(&_impl_.range_)) + sizeof(_impl_.status_));
|
|
_impl_._has_bits_.Clear();
|
|
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Effector::_InternalParse(
|
|
const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
|
|
return ptr;
|
|
}
|
|
|
|
|
|
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::_pbi::TcParseTable<3, 6, 1, 35, 2> Effector::_table_ = {
|
|
{
|
|
PROTOBUF_FIELD_OFFSET(Effector, _impl_._has_bits_),
|
|
0, // no _extensions_
|
|
7, 56, // max_field_number, fast_idx_mask
|
|
offsetof(decltype(_table_), field_lookup_table),
|
|
4294967184, // skipmap
|
|
offsetof(decltype(_table_), field_entries),
|
|
6, // num_field_entries
|
|
1, // num_aux_entries
|
|
offsetof(decltype(_table_), aux_entries),
|
|
&_Effector_default_instance_._instance,
|
|
::_pbi::TcParser::GenericFallback, // fallback
|
|
}, {{
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
// .messages.track.Identifier ID = 1;
|
|
{::_pbi::TcParser::FastMtS1,
|
|
{10, 0, 0, PROTOBUF_FIELD_OFFSET(Effector, _impl_.id_)}},
|
|
// string name = 2;
|
|
{::_pbi::TcParser::FastUS1,
|
|
{18, 63, 0, PROTOBUF_FIELD_OFFSET(Effector, _impl_.name_)}},
|
|
// double range = 3;
|
|
{::_pbi::TcParser::FastF64S1,
|
|
{25, 63, 0, PROTOBUF_FIELD_OFFSET(Effector, _impl_.range_)}},
|
|
// int32 ammunition = 4;
|
|
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Effector, _impl_.ammunition_), 63>(),
|
|
{32, 63, 0, PROTOBUF_FIELD_OFFSET(Effector, _impl_.ammunition_)}},
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
// int32 maxammunition = 6;
|
|
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Effector, _impl_.maxammunition_), 63>(),
|
|
{48, 63, 0, PROTOBUF_FIELD_OFFSET(Effector, _impl_.maxammunition_)}},
|
|
// uint32 Status = 7;
|
|
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Effector, _impl_.status_), 63>(),
|
|
{56, 63, 0, PROTOBUF_FIELD_OFFSET(Effector, _impl_.status_)}},
|
|
}}, {{
|
|
65535, 65535
|
|
}}, {{
|
|
// .messages.track.Identifier ID = 1;
|
|
{PROTOBUF_FIELD_OFFSET(Effector, _impl_.id_), _Internal::kHasBitsOffset + 0, 0,
|
|
(0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
|
|
// string name = 2;
|
|
{PROTOBUF_FIELD_OFFSET(Effector, _impl_.name_), -1, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
|
|
// double range = 3;
|
|
{PROTOBUF_FIELD_OFFSET(Effector, _impl_.range_), -1, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kDouble)},
|
|
// int32 ammunition = 4;
|
|
{PROTOBUF_FIELD_OFFSET(Effector, _impl_.ammunition_), -1, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kInt32)},
|
|
// int32 maxammunition = 6;
|
|
{PROTOBUF_FIELD_OFFSET(Effector, _impl_.maxammunition_), -1, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kInt32)},
|
|
// uint32 Status = 7;
|
|
{PROTOBUF_FIELD_OFFSET(Effector, _impl_.status_), -1, 0,
|
|
(0 | ::_fl::kFcSingular | ::_fl::kUInt32)},
|
|
}}, {{
|
|
{::_pbi::TcParser::GetTable<::messages::track::Identifier>()},
|
|
}}, {{
|
|
"\26\0\4\0\0\0\0\0"
|
|
"messages.data.Effector"
|
|
"name"
|
|
}},
|
|
};
|
|
|
|
::uint8_t* Effector::_InternalSerialize(
|
|
::uint8_t* target,
|
|
::google::protobuf::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:messages.data.Effector)
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
// .messages.track.Identifier ID = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
|
|
1, _Internal::id(this),
|
|
_Internal::id(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// string name = 2;
|
|
if (!this->_internal_name().empty()) {
|
|
const std::string& _s = this->_internal_name();
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "messages.data.Effector.name");
|
|
target = stream->WriteStringMaybeAliased(2, _s, target);
|
|
}
|
|
|
|
// double range = 3;
|
|
static_assert(sizeof(::uint64_t) == sizeof(double),
|
|
"Code assumes ::uint64_t and double are the same size.");
|
|
double tmp_range = this->_internal_range();
|
|
::uint64_t raw_range;
|
|
memcpy(&raw_range, &tmp_range, sizeof(tmp_range));
|
|
if (raw_range != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteDoubleToArray(
|
|
3, this->_internal_range(), target);
|
|
}
|
|
|
|
// int32 ammunition = 4;
|
|
if (this->_internal_ammunition() != 0) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteInt32ToArrayWithField<4>(
|
|
stream, this->_internal_ammunition(), target);
|
|
}
|
|
|
|
// int32 maxammunition = 6;
|
|
if (this->_internal_maxammunition() != 0) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteInt32ToArrayWithField<6>(
|
|
stream, this->_internal_maxammunition(), target);
|
|
}
|
|
|
|
// uint32 Status = 7;
|
|
if (this->_internal_status() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
|
|
7, this->_internal_status(), target);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target =
|
|
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:messages.data.Effector)
|
|
return target;
|
|
}
|
|
|
|
::size_t Effector::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:messages.data.Effector)
|
|
::size_t total_size = 0;
|
|
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// string name = 2;
|
|
if (!this->_internal_name().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this->_internal_name());
|
|
}
|
|
|
|
// .messages.track.Identifier ID = 1;
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
if (cached_has_bits & 0x00000001u) {
|
|
total_size +=
|
|
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.id_);
|
|
}
|
|
|
|
// double range = 3;
|
|
static_assert(sizeof(::uint64_t) == sizeof(double),
|
|
"Code assumes ::uint64_t and double are the same size.");
|
|
double tmp_range = this->_internal_range();
|
|
::uint64_t raw_range;
|
|
memcpy(&raw_range, &tmp_range, sizeof(tmp_range));
|
|
if (raw_range != 0) {
|
|
total_size += 9;
|
|
}
|
|
|
|
// int32 ammunition = 4;
|
|
if (this->_internal_ammunition() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
|
|
this->_internal_ammunition());
|
|
}
|
|
|
|
// int32 maxammunition = 6;
|
|
if (this->_internal_maxammunition() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
|
|
this->_internal_maxammunition());
|
|
}
|
|
|
|
// uint32 Status = 7;
|
|
if (this->_internal_status() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
|
|
this->_internal_status());
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
|
|
void Effector::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
|
|
auto* const _this = static_cast<Effector*>(&to_msg);
|
|
auto& from = static_cast<const Effector&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:messages.data.Effector)
|
|
ABSL_DCHECK_NE(&from, _this);
|
|
::uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_name().empty()) {
|
|
_this->_internal_set_name(from._internal_name());
|
|
}
|
|
if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
|
|
_this->_internal_mutable_id()->::messages::track::Identifier::MergeFrom(
|
|
from._internal_id());
|
|
}
|
|
static_assert(sizeof(::uint64_t) == sizeof(double),
|
|
"Code assumes ::uint64_t and double are the same size.");
|
|
double tmp_range = from._internal_range();
|
|
::uint64_t raw_range;
|
|
memcpy(&raw_range, &tmp_range, sizeof(tmp_range));
|
|
if (raw_range != 0) {
|
|
_this->_internal_set_range(from._internal_range());
|
|
}
|
|
if (from._internal_ammunition() != 0) {
|
|
_this->_internal_set_ammunition(from._internal_ammunition());
|
|
}
|
|
if (from._internal_maxammunition() != 0) {
|
|
_this->_internal_set_maxammunition(from._internal_maxammunition());
|
|
}
|
|
if (from._internal_status() != 0) {
|
|
_this->_internal_set_status(from._internal_status());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Effector::CopyFrom(const Effector& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:messages.data.Effector)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
PROTOBUF_NOINLINE bool Effector::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Effector::InternalSwap(Effector* PROTOBUF_RESTRICT other) {
|
|
using std::swap;
|
|
auto* arena = GetArena();
|
|
ABSL_DCHECK_EQ(arena, other->GetArena());
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
|
|
::google::protobuf::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(Effector, _impl_.status_)
|
|
+ sizeof(Effector::_impl_.status_)
|
|
- PROTOBUF_FIELD_OFFSET(Effector, _impl_.id_)>(
|
|
reinterpret_cast<char*>(&_impl_.id_),
|
|
reinterpret_cast<char*>(&other->_impl_.id_));
|
|
}
|
|
|
|
::google::protobuf::Metadata Effector::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_SystemStateUpdate_2eproto_getter, &descriptor_table_SystemStateUpdate_2eproto_once,
|
|
file_level_metadata_SystemStateUpdate_2eproto[2]);
|
|
}
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
} // namespace data
|
|
} // namespace messages
|
|
namespace google {
|
|
namespace protobuf {
|
|
} // namespace protobuf
|
|
} // namespace google
|
|
// @@protoc_insertion_point(global_scope)
|
|
#include "google/protobuf/port_undef.inc"
|