123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: laser_message.proto
- #include "laser_message.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 laser_message {
- class laserMsgDefaultTypeInternal {
- public:
- ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<laserMsg> _instance;
- } _laserMsg_default_instance_;
- } // namespace laser_message
- static void InitDefaultsscc_info_laserMsg_laser_5fmessage_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::laser_message::_laserMsg_default_instance_;
- new (ptr) ::laser_message::laserMsg();
- ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
- }
- ::laser_message::laserMsg::InitAsDefaultInstance();
- }
- ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_laserMsg_laser_5fmessage_2eproto =
- {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_laserMsg_laser_5fmessage_2eproto}, {}};
- static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_laser_5fmessage_2eproto[1];
- static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_laser_5fmessage_2eproto[1];
- static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_laser_5fmessage_2eproto = nullptr;
- const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_laser_5fmessage_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, laser_status_),
- PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, queue_data_count_),
- PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, cloud_count_),
- PROTOBUF_FIELD_OFFSET(::laser_message::laserMsg, id_),
- 0,
- 1,
- 2,
- 3,
- };
- static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- { 0, 9, sizeof(::laser_message::laserMsg)},
- };
- static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::laser_message::_laserMsg_default_instance_),
- };
- const char descriptor_table_protodef_laser_5fmessage_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
- "\n\023laser_message.proto\022\rlaser_message\"w\n\010"
- "laserMsg\0220\n\014laser_status\030\001 \001(\0162\032.laser_m"
- "essage.laserStatus\022\030\n\020queue_data_count\030\002"
- " \001(\005\022\023\n\013cloud_count\030\003 \001(\005\022\n\n\002id\030\004 \002(\005*]\n"
- "\013laserStatus\022\023\n\017eLaserConnected\020\000\022\026\n\022eLa"
- "serDisconnected\020\001\022\016\n\neLaserBusy\020\002\022\021\n\reLa"
- "serUnknown\020\003"
- ;
- static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_laser_5fmessage_2eproto_deps[1] = {
- };
- static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_laser_5fmessage_2eproto_sccs[1] = {
- &scc_info_laserMsg_laser_5fmessage_2eproto.base,
- };
- static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_laser_5fmessage_2eproto_once;
- const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_laser_5fmessage_2eproto = {
- false, false, descriptor_table_protodef_laser_5fmessage_2eproto, "laser_message.proto", 252,
- &descriptor_table_laser_5fmessage_2eproto_once, descriptor_table_laser_5fmessage_2eproto_sccs, descriptor_table_laser_5fmessage_2eproto_deps, 1, 0,
- schemas, file_default_instances, TableStruct_laser_5fmessage_2eproto::offsets,
- file_level_metadata_laser_5fmessage_2eproto, 1, file_level_enum_descriptors_laser_5fmessage_2eproto, file_level_service_descriptors_laser_5fmessage_2eproto,
- };
- // Force running AddDescriptors() at dynamic initialization time.
- static bool dynamic_init_dummy_laser_5fmessage_2eproto = (static_cast<void>(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_laser_5fmessage_2eproto)), true);
- namespace laser_message {
- const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* laserStatus_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_laser_5fmessage_2eproto);
- return file_level_enum_descriptors_laser_5fmessage_2eproto[0];
- }
- bool laserStatus_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- case 3:
- return true;
- default:
- return false;
- }
- }
- // ===================================================================
- void laserMsg::InitAsDefaultInstance() {
- }
- class laserMsg::_Internal {
- public:
- using HasBits = decltype(std::declval<laserMsg>()._has_bits_);
- static void set_has_laser_status(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_queue_data_count(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- static void set_has_cloud_count(HasBits* has_bits) {
- (*has_bits)[0] |= 4u;
- }
- static void set_has_id(HasBits* has_bits) {
- (*has_bits)[0] |= 8u;
- }
- static bool MissingRequiredFields(const HasBits& has_bits) {
- return ((has_bits[0] & 0x00000008) ^ 0x00000008) != 0;
- }
- };
- laserMsg::laserMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:laser_message.laserMsg)
- }
- laserMsg::laserMsg(const laserMsg& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&laser_status_, &from.laser_status_,
- static_cast<size_t>(reinterpret_cast<char*>(&id_) -
- reinterpret_cast<char*>(&laser_status_)) + sizeof(id_));
- // @@protoc_insertion_point(copy_constructor:laser_message.laserMsg)
- }
- void laserMsg::SharedCtor() {
- ::memset(&laser_status_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&id_) -
- reinterpret_cast<char*>(&laser_status_)) + sizeof(id_));
- }
- laserMsg::~laserMsg() {
- // @@protoc_insertion_point(destructor:laser_message.laserMsg)
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- void laserMsg::SharedDtor() {
- GOOGLE_DCHECK(GetArena() == nullptr);
- }
- void laserMsg::ArenaDtor(void* object) {
- laserMsg* _this = reinterpret_cast< laserMsg* >(object);
- (void)_this;
- }
- void laserMsg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void laserMsg::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const laserMsg& laserMsg::default_instance() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_laserMsg_laser_5fmessage_2eproto.base);
- return *internal_default_instance();
- }
- void laserMsg::Clear() {
- // @@protoc_insertion_point(message_clear_start:laser_message.laserMsg)
- ::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 & 0x0000000fu) {
- ::memset(&laser_status_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&id_) -
- reinterpret_cast<char*>(&laser_status_)) + sizeof(id_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* laserMsg::_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 .laser_message.laserStatus laser_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(::laser_message::laserStatus_IsValid(val))) {
- _internal_set_laser_status(static_cast<::laser_message::laserStatus>(val));
- } else {
- ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
- }
- } else goto handle_unusual;
- continue;
- // optional int32 queue_data_count = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
- _Internal::set_has_queue_data_count(&has_bits);
- queue_data_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // optional int32 cloud_count = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
- _Internal::set_has_cloud_count(&has_bits);
- cloud_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // required int32 id = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
- _Internal::set_has_id(&has_bits);
- 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* laserMsg::_InternalSerialize(
- ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:laser_message.laserMsg)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional .laser_message.laserStatus laser_status = 1;
- if (cached_has_bits & 0x00000001u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
- 1, this->_internal_laser_status(), target);
- }
- // optional int32 queue_data_count = 2;
- if (cached_has_bits & 0x00000002u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_queue_data_count(), target);
- }
- // optional int32 cloud_count = 3;
- if (cached_has_bits & 0x00000004u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_cloud_count(), target);
- }
- // required int32 id = 4;
- if (cached_has_bits & 0x00000008u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_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:laser_message.laserMsg)
- return target;
- }
- size_t laserMsg::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:laser_message.laserMsg)
- size_t total_size = 0;
- // required int32 id = 4;
- if (_internal_has_id()) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_id());
- }
- ::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 & 0x00000007u) {
- // optional .laser_message.laserStatus laser_status = 1;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_laser_status());
- }
- // optional int32 queue_data_count = 2;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_queue_data_count());
- }
- // optional int32 cloud_count = 3;
- if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_cloud_count());
- }
- }
- 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 laserMsg::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:laser_message.laserMsg)
- GOOGLE_DCHECK_NE(&from, this);
- const laserMsg* source =
- ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<laserMsg>(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:laser_message.laserMsg)
- ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:laser_message.laserMsg)
- MergeFrom(*source);
- }
- }
- void laserMsg::MergeFrom(const laserMsg& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:laser_message.laserMsg)
- 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 & 0x0000000fu) {
- if (cached_has_bits & 0x00000001u) {
- laser_status_ = from.laser_status_;
- }
- if (cached_has_bits & 0x00000002u) {
- queue_data_count_ = from.queue_data_count_;
- }
- if (cached_has_bits & 0x00000004u) {
- cloud_count_ = from.cloud_count_;
- }
- if (cached_has_bits & 0x00000008u) {
- id_ = from.id_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- }
- void laserMsg::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:laser_message.laserMsg)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void laserMsg::CopyFrom(const laserMsg& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:laser_message.laserMsg)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool laserMsg::IsInitialized() const {
- if (_Internal::MissingRequiredFields(_has_bits_)) return false;
- return true;
- }
- void laserMsg::InternalSwap(laserMsg* other) {
- using std::swap;
- _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(laserMsg, id_)
- + sizeof(laserMsg::id_)
- - PROTOBUF_FIELD_OFFSET(laserMsg, laser_status_)>(
- reinterpret_cast<char*>(&laser_status_),
- reinterpret_cast<char*>(&other->laser_status_));
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata laserMsg::GetMetadata() const {
- return GetMetadataStatic();
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace laser_message
- PROTOBUF_NAMESPACE_OPEN
- template<> PROTOBUF_NOINLINE ::laser_message::laserMsg* Arena::CreateMaybeMessage< ::laser_message::laserMsg >(Arena* arena) {
- return Arena::CreateMessageInternal< ::laser_message::laserMsg >(arena);
- }
- PROTOBUF_NAMESPACE_CLOSE
- // @@protoc_insertion_point(global_scope)
- #include <google/protobuf/port_undef.inc>
|