// Generated by the protocol buffer compiler. DO NOT EDIT! // source: message_base.proto #include "message_base.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 message { class Command_messageDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _Command_message_default_instance_; } // namespace message namespace protobuf_message_5fbase_2eproto { void InitDefaultsCommand_messageImpl() { 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 = &::message::_Command_message_default_instance_; new (ptr) ::message::Command_message(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::message::Command_message::InitAsDefaultInstance(); } void InitDefaultsCommand_message() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCommand_messageImpl); } ::google::protobuf::Metadata file_level_metadata[1]; const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2]; const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_message, _has_bits_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_message, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_message, msg_type_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_message, command_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_message, act_type_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_message, from_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::message::Command_message, destination_id_), 4, 0, 1, 2, 3, }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, 10, sizeof(::message::Command_message)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::message::_Command_message_default_instance_), }; void protobuf_AssignDescriptors() { AddDescriptors(); ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( "message_base.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\022message_base.proto\022\007message\"\237\001\n\017Comman" "d_message\022\'\n\010msg_type\030\001 \002(\0162\025.message.Me" "ssage_type\022\022\n\ncommand_id\030\002 \002(\005\022&\n\010act_ty" "pe\030\003 \002(\0162\024.message.Action_type\022\017\n\007from_i" "d\030\004 \002(\005\022\026\n\016destination_id\030\005 \002(\005*\270\001\n\014Mess" "age_type\022\020\n\014eCommand_msg\020\001\022\026\n\022eLocate_st" "atus_msg\020\021\022\027\n\023eLocate_request_msg\020\022\022\030\n\024e" "Locate_response_msg\020\023\022\026\n\022eHarware_statu_" "msg\020!\022\030\n\024eExecute_request_msg\020\"\022\031\n\025eExec" "ute_response_msg\020#*#\n\013Action_type\022\t\n\005ePa" "rk\020\000\022\t\n\005ePick\020\001" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( descriptor, 415); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "message_base.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_message_5fbase_2eproto namespace message { const ::google::protobuf::EnumDescriptor* Message_type_descriptor() { protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_message_5fbase_2eproto::file_level_enum_descriptors[0]; } bool Message_type_IsValid(int value) { switch (value) { case 1: case 17: case 18: case 19: case 33: case 34: case 35: return true; default: return false; } } const ::google::protobuf::EnumDescriptor* Action_type_descriptor() { protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_message_5fbase_2eproto::file_level_enum_descriptors[1]; } bool Action_type_IsValid(int value) { switch (value) { case 0: case 1: return true; default: return false; } } // =================================================================== void Command_message::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Command_message::kMsgTypeFieldNumber; const int Command_message::kCommandIdFieldNumber; const int Command_message::kActTypeFieldNumber; const int Command_message::kFromIdFieldNumber; const int Command_message::kDestinationIdFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Command_message::Command_message() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { ::protobuf_message_5fbase_2eproto::InitDefaultsCommand_message(); } SharedCtor(); // @@protoc_insertion_point(constructor:message.Command_message) } Command_message::Command_message(const Command_message& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&command_id_, &from.command_id_, static_cast(reinterpret_cast(&msg_type_) - reinterpret_cast(&command_id_)) + sizeof(msg_type_)); // @@protoc_insertion_point(copy_constructor:message.Command_message) } void Command_message::SharedCtor() { _cached_size_ = 0; ::memset(&command_id_, 0, static_cast( reinterpret_cast(&destination_id_) - reinterpret_cast(&command_id_)) + sizeof(destination_id_)); msg_type_ = 1; } Command_message::~Command_message() { // @@protoc_insertion_point(destructor:message.Command_message) SharedDtor(); } void Command_message::SharedDtor() { } void Command_message::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* Command_message::descriptor() { ::protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_message_5fbase_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Command_message& Command_message::default_instance() { ::protobuf_message_5fbase_2eproto::InitDefaultsCommand_message(); return *internal_default_instance(); } Command_message* Command_message::New(::google::protobuf::Arena* arena) const { Command_message* n = new Command_message; if (arena != NULL) { arena->Own(n); } return n; } void Command_message::Clear() { // @@protoc_insertion_point(message_clear_start:message.Command_message) ::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 & 31u) { ::memset(&command_id_, 0, static_cast( reinterpret_cast(&destination_id_) - reinterpret_cast(&command_id_)) + sizeof(destination_id_)); msg_type_ = 1; } _has_bits_.Clear(); _internal_metadata_.Clear(); } bool Command_message::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:message.Command_message) 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 .message.Message_type msg_type = 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 (::message::Message_type_IsValid(value)) { set_msg_type(static_cast< ::message::Message_type >(value)); } else { mutable_unknown_fields()->AddVarint( 1, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; } break; } // required int32 command_id = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { set_has_command_id(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &command_id_))); } else { goto handle_unusual; } break; } // required .message.Action_type act_type = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); if (::message::Action_type_IsValid(value)) { set_act_type(static_cast< ::message::Action_type >(value)); } else { mutable_unknown_fields()->AddVarint( 3, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; } break; } // required int32 from_id = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { set_has_from_id(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &from_id_))); } else { goto handle_unusual; } break; } // required int32 destination_id = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { set_has_destination_id(); DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &destination_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:message.Command_message) return true; failure: // @@protoc_insertion_point(parse_failure:message.Command_message) return false; #undef DO_ } void Command_message::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:message.Command_message) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // required .message.Message_type msg_type = 1; if (cached_has_bits & 0x00000010u) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 1, this->msg_type(), output); } // required int32 command_id = 2; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->command_id(), output); } // required .message.Action_type act_type = 3; if (cached_has_bits & 0x00000002u) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 3, this->act_type(), output); } // required int32 from_id = 4; if (cached_has_bits & 0x00000004u) { ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->from_id(), output); } // required int32 destination_id = 5; if (cached_has_bits & 0x00000008u) { ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->destination_id(), output); } if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:message.Command_message) } ::google::protobuf::uint8* Command_message::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:message.Command_message) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // required .message.Message_type msg_type = 1; if (cached_has_bits & 0x00000010u) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 1, this->msg_type(), target); } // required int32 command_id = 2; if (cached_has_bits & 0x00000001u) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->command_id(), target); } // required .message.Action_type act_type = 3; if (cached_has_bits & 0x00000002u) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 3, this->act_type(), target); } // required int32 from_id = 4; if (cached_has_bits & 0x00000004u) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->from_id(), target); } // required int32 destination_id = 5; if (cached_has_bits & 0x00000008u) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->destination_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:message.Command_message) return target; } size_t Command_message::RequiredFieldsByteSizeFallback() const { // @@protoc_insertion_point(required_fields_byte_size_fallback_start:message.Command_message) size_t total_size = 0; if (has_command_id()) { // required int32 command_id = 2; total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->command_id()); } if (has_act_type()) { // required .message.Action_type act_type = 3; total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->act_type()); } if (has_from_id()) { // required int32 from_id = 4; total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->from_id()); } if (has_destination_id()) { // required int32 destination_id = 5; total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->destination_id()); } if (has_msg_type()) { // required .message.Message_type msg_type = 1; total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type()); } return total_size; } size_t Command_message::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:message.Command_message) 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] & 0x0000001f) ^ 0x0000001f) == 0) { // All required fields are present. // required int32 command_id = 2; total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->command_id()); // required .message.Action_type act_type = 3; total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->act_type()); // required int32 from_id = 4; total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->from_id()); // required int32 destination_id = 5; total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->destination_id()); // required .message.Message_type msg_type = 1; total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type()); } 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 Command_message::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:message.Command_message) GOOGLE_DCHECK_NE(&from, this); const Command_message* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:message.Command_message) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:message.Command_message) MergeFrom(*source); } } void Command_message::MergeFrom(const Command_message& from) { // @@protoc_insertion_point(class_specific_merge_from_start:message.Command_message) 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 & 31u) { if (cached_has_bits & 0x00000001u) { command_id_ = from.command_id_; } if (cached_has_bits & 0x00000002u) { act_type_ = from.act_type_; } if (cached_has_bits & 0x00000004u) { from_id_ = from.from_id_; } if (cached_has_bits & 0x00000008u) { destination_id_ = from.destination_id_; } if (cached_has_bits & 0x00000010u) { msg_type_ = from.msg_type_; } _has_bits_[0] |= cached_has_bits; } } void Command_message::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:message.Command_message) if (&from == this) return; Clear(); MergeFrom(from); } void Command_message::CopyFrom(const Command_message& from) { // @@protoc_insertion_point(class_specific_copy_from_start:message.Command_message) if (&from == this) return; Clear(); MergeFrom(from); } bool Command_message::IsInitialized() const { if ((_has_bits_[0] & 0x0000001f) != 0x0000001f) return false; return true; } void Command_message::Swap(Command_message* other) { if (other == this) return; InternalSwap(other); } void Command_message::InternalSwap(Command_message* other) { using std::swap; swap(command_id_, other->command_id_); swap(act_type_, other->act_type_); swap(from_id_, other->from_id_); swap(destination_id_, other->destination_id_); swap(msg_type_, other->msg_type_); swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Command_message::GetMetadata() const { protobuf_message_5fbase_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_message_5fbase_2eproto::file_level_metadata[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) } // namespace message // @@protoc_insertion_point(global_scope)