// Generated by the protocol buffer compiler. DO NOT EDIT! // source: laser_message.proto #include "laser_message.pb.h" #include #include #include #include #include #include #include #include #include #include // This is a temporary google only hack #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) namespace laser_message { class laserMsgDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _laserMsg_default_instance_; } // namespace laser_message namespace protobuf_laser_5fmessage_2eproto { void InitDefaultslaserMsgImpl() { 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 = &::laser_message::_laserMsg_default_instance_; new (ptr) ::laser_message::laserMsg(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::laser_message::laserMsg::InitAsDefaultInstance(); } void InitDefaultslaserMsg() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &InitDefaultslaserMsgImpl); } ::google::protobuf::Metadata file_level_metadata[1]; 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(::laser_message::laserMsg, _has_bits_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::laser_message::laserMsg, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::laser_message::laserMsg, laser_status_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::laser_message::laserMsg, queue_data_count_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::laser_message::laserMsg, cloud_count_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::laser_message::laserMsg, id_), 0, 1, 2, 3, }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, 9, sizeof(::laser_message::laserMsg)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::laser_message::_laserMsg_default_instance_), }; void protobuf_AssignDescriptors() { AddDescriptors(); ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( "laser_message.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, 1); } void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_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" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( descriptor, 252); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "laser_message.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_laser_5fmessage_2eproto namespace laser_message { const ::google::protobuf::EnumDescriptor* laserStatus_descriptor() { protobuf_laser_5fmessage_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_laser_5fmessage_2eproto::file_level_enum_descriptors[0]; } bool laserStatus_IsValid(int value) { switch (value) { case 0: case 1: case 2: case 3: return true; default: return false; } } // =================================================================== void laserMsg::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int laserMsg::kLaserStatusFieldNumber; const int laserMsg::kQueueDataCountFieldNumber; const int laserMsg::kCloudCountFieldNumber; const int laserMsg::kIdFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 laserMsg::laserMsg() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { ::protobuf_laser_5fmessage_2eproto::InitDefaultslaserMsg(); } SharedCtor(); // @@protoc_insertion_point(constructor:laser_message.laserMsg) } laserMsg::laserMsg(const laserMsg& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&laser_status_, &from.laser_status_, static_cast(reinterpret_cast(&id_) - reinterpret_cast(&laser_status_)) + sizeof(id_)); // @@protoc_insertion_point(copy_constructor:laser_message.laserMsg) } void laserMsg::SharedCtor() { _cached_size_ = 0; ::memset(&laser_status_, 0, static_cast( reinterpret_cast(&id_) - reinterpret_cast(&laser_status_)) + sizeof(id_)); } laserMsg::~laserMsg() { // @@protoc_insertion_point(destructor:laser_message.laserMsg) SharedDtor(); } void laserMsg::SharedDtor() { } void laserMsg::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* laserMsg::descriptor() { ::protobuf_laser_5fmessage_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_laser_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const laserMsg& laserMsg::default_instance() { ::protobuf_laser_5fmessage_2eproto::InitDefaultslaserMsg(); return *internal_default_instance(); } laserMsg* laserMsg::New(::google::protobuf::Arena* arena) const { laserMsg* n = new laserMsg; if (arena != NULL) { arena->Own(n); } return n; } void laserMsg::Clear() { // @@protoc_insertion_point(message_clear_start:laser_message.laserMsg) ::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 & 15u) { ::memset(&laser_status_, 0, static_cast( reinterpret_cast(&id_) - reinterpret_cast(&laser_status_)) + sizeof(id_)); } _has_bits_.Clear(); _internal_metadata_.Clear(); } bool laserMsg::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:laser_message.laserMsg) 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 .laser_message.laserStatus laser_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 (::laser_message::laserStatus_IsValid(value)) { set_laser_status(static_cast< ::laser_message::laserStatus >(value)); } else { mutable_unknown_fields()->AddVarint( 1, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; } break; } // optional int32 queue_data_count = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_queue_data_count(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &queue_data_count_))); } else { goto handle_unusual; } break; } // optional int32 cloud_count = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { set_has_cloud_count(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &cloud_count_))); } else { goto handle_unusual; } break; } // required int32 id = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { set_has_id(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &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:laser_message.laserMsg) return true; failure: // @@protoc_insertion_point(parse_failure:laser_message.laserMsg) return false; #undef DO_ } void laserMsg::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:laser_message.laserMsg) ::google::protobuf::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) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 1, this->laser_status(), output); } // optional int32 queue_data_count = 2; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->queue_data_count(), output); } // optional int32 cloud_count = 3; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->cloud_count(), output); } // required int32 id = 4; if (cached_has_bits & 0x00000008u) { ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->id(), output); } if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:laser_message.laserMsg) } ::google::protobuf::uint8* laserMsg::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:laser_message.laserMsg) ::google::protobuf::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 = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 1, this->laser_status(), target); } // optional int32 queue_data_count = 2; if (cached_has_bits & 0x00000002u) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->queue_data_count(), target); } // optional int32 cloud_count = 3; if (cached_has_bits & 0x00000004u) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->cloud_count(), target); } // required int32 id = 4; if (cached_has_bits & 0x00000008u) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->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: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; if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } // required int32 id = 4; if (has_id()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->id()); } if (_has_bits_[0 / 32] & 7u) { // optional .laser_message.laserStatus laser_status = 1; if (has_laser_status()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->laser_status()); } // optional int32 queue_data_count = 2; if (has_queue_data_count()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->queue_data_count()); } // optional int32 cloud_count = 3; if (has_cloud_count()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->cloud_count()); } } 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 laserMsg::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:laser_message.laserMsg) GOOGLE_DCHECK_NE(&from, this); const laserMsg* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:laser_message.laserMsg) ::google::protobuf::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(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 & 15u) { 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 ::google::protobuf::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 ((_has_bits_[0] & 0x00000008) != 0x00000008) return false; return true; } void laserMsg::Swap(laserMsg* other) { if (other == this) return; InternalSwap(other); } void laserMsg::InternalSwap(laserMsg* other) { using std::swap; swap(laser_status_, other->laser_status_); swap(queue_data_count_, other->queue_data_count_); swap(cloud_count_, other->cloud_count_); swap(id_, other->id_); swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata laserMsg::GetMetadata() const { protobuf_laser_5fmessage_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_laser_5fmessage_2eproto::file_level_metadata[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) } // namespace laser_message // @@protoc_insertion_point(global_scope)