You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Weight/lib/SystemTypeObjectSupport.cxx

593 lines
43 KiB
C++

// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*!
* @file SystemTypeObjectSupport.cxx
* Source file containing the implementation to register the TypeObject representation of the described types in the IDL file
*
* This file was generated by the tool fastddsgen.
*/
#include "SystemTypeObjectSupport.hpp"
#include <mutex>
#include <string>
#include <fastcdr/xcdr/external.hpp>
#include <fastcdr/xcdr/optional.hpp>
#include <fastdds/dds/domain/DomainParticipantFactory.hpp>
#include <fastdds/dds/log/Log.hpp>
#include <fastdds/dds/xtypes/common.hpp>
#include <fastdds/dds/xtypes/type_representation/ITypeObjectRegistry.hpp>
#include <fastdds/dds/xtypes/type_representation/TypeObject.hpp>
#include <fastdds/dds/xtypes/type_representation/TypeObjectUtils.hpp>
#include "System.hpp"
using namespace eprosima::fastdds::dds::xtypes;
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_PrintReq_type_identifier(
TypeIdentifierPair& type_ids_PrintReq)
{
ReturnCode_t return_code_PrintReq {eprosima::fastdds::dds::RETCODE_OK};
return_code_PrintReq =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"PrintReq", type_ids_PrintReq);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_PrintReq)
{
StructTypeFlag struct_flags_PrintReq = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_PrintReq = "PrintReq";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_PrintReq;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_PrintReq;
AppliedAnnotationSeq tmp_ann_custom_PrintReq;
eprosima::fastcdr::optional<AppliedVerbatimAnnotation> verbatim_PrintReq;
if (!tmp_ann_custom_PrintReq.empty())
{
ann_custom_PrintReq = tmp_ann_custom_PrintReq;
}
CompleteTypeDetail detail_PrintReq = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_PrintReq, ann_custom_PrintReq, type_name_PrintReq.to_string());
CompleteStructHeader header_PrintReq;
header_PrintReq = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_PrintReq);
CompleteStructMemberSeq member_seq_PrintReq;
{
TypeIdentifierPair type_ids_index;
ReturnCode_t return_code_index {eprosima::fastdds::dds::RETCODE_OK};
return_code_index =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"_uint32_t", type_ids_index);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_index)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"index Structure member TypeIdentifier unknown to TypeObjectRegistry.");
return;
}
StructMemberFlag member_flags_index = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
false, false, false, false);
MemberId member_id_index = 0x00000000;
bool common_index_ec {false};
CommonStructMember common_index {TypeObjectUtils::build_common_struct_member(member_id_index, member_flags_index, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_index, common_index_ec))};
if (!common_index_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure index member TypeIdentifier inconsistent.");
return;
}
MemberName name_index = "index";
eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_index;
ann_custom_PrintReq.reset();
CompleteMemberDetail detail_index = TypeObjectUtils::build_complete_member_detail(name_index, member_ann_builtin_index, ann_custom_PrintReq);
CompleteStructMember member_index = TypeObjectUtils::build_complete_struct_member(common_index, detail_index);
TypeObjectUtils::add_complete_struct_member(member_seq_PrintReq, member_index);
}
{
TypeIdentifierPair type_ids_msg;
ReturnCode_t return_code_msg {eprosima::fastdds::dds::RETCODE_OK};
return_code_msg =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded", type_ids_msg);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_msg)
{
return_code_msg =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_string_unbounded", type_ids_msg);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_msg)
{
{
SBound bound = 0;
StringSTypeDefn string_sdefn = TypeObjectUtils::build_string_s_type_defn(bound);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_s_string_type_identifier(string_sdefn,
"anonymous_string_unbounded", type_ids_msg))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
}
bool element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec {false};
TypeIdentifier* element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded {new TypeIdentifier(TypeObjectUtils::retrieve_complete_type_identifier(type_ids_msg, element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec))};
if (!element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded inconsistent element TypeIdentifier.");
return;
}
return_code_msg =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_string_unbounded", type_ids_msg);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_msg)
{
{
SBound bound = 0;
StringSTypeDefn string_sdefn = TypeObjectUtils::build_string_s_type_defn(bound);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_s_string_type_identifier(string_sdefn,
"anonymous_string_unbounded", type_ids_msg))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
}
bool key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec {false};
TypeIdentifier* key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded {new TypeIdentifier(TypeObjectUtils::retrieve_complete_type_identifier(type_ids_msg, key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec))};
if (!key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded inconsistent key TypeIdentifier.");
return;
}
EquivalenceKind equiv_kind_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded = EK_BOTH;
if ((EK_COMPLETE == key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() || EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d()) ||
(TI_PLAIN_SEQUENCE_SMALL == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->seq_sdefn().header().equiv_kind()) ||
(TI_PLAIN_SEQUENCE_LARGE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->seq_ldefn().header().equiv_kind()) ||
(TI_PLAIN_ARRAY_SMALL == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->array_sdefn().header().equiv_kind()) ||
(TI_PLAIN_ARRAY_LARGE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->array_ldefn().header().equiv_kind()) ||
(TI_PLAIN_MAP_SMALL == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && (EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->map_sdefn().key_identifier()->_d() || EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->map_sdefn().header().equiv_kind())) ||
(TI_PLAIN_MAP_LARGE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && (EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->map_ldefn().key_identifier()->_d() || EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->map_ldefn().header().equiv_kind())))
{
equiv_kind_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded = EK_COMPLETE;
}
CollectionElementFlag element_flags_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded = 0;
CollectionElementFlag key_flags_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded = 0;
PlainCollectionHeader header_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded = TypeObjectUtils::build_plain_collection_header(equiv_kind_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded, element_flags_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded);
{
SBound bound = 0;
PlainMapSTypeDefn map_sdefn = TypeObjectUtils::build_plain_map_s_type_defn(header_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded, bound,
eprosima::fastcdr::external<TypeIdentifier>(element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded), key_flags_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded,
eprosima::fastcdr::external<TypeIdentifier>(key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded));
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_s_map_type_identifier(map_sdefn, "anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded", type_ids_msg))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
}
StructMemberFlag member_flags_msg = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
false, false, false, false);
MemberId member_id_msg = 0x00000001;
bool common_msg_ec {false};
CommonStructMember common_msg {TypeObjectUtils::build_common_struct_member(member_id_msg, member_flags_msg, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_msg, common_msg_ec))};
if (!common_msg_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure msg member TypeIdentifier inconsistent.");
return;
}
MemberName name_msg = "msg";
eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_msg;
ann_custom_PrintReq.reset();
CompleteMemberDetail detail_msg = TypeObjectUtils::build_complete_member_detail(name_msg, member_ann_builtin_msg, ann_custom_PrintReq);
CompleteStructMember member_msg = TypeObjectUtils::build_complete_struct_member(common_msg, detail_msg);
TypeObjectUtils::add_complete_struct_member(member_seq_PrintReq, member_msg);
}
CompleteStructType struct_type_PrintReq = TypeObjectUtils::build_complete_struct_type(struct_flags_PrintReq, header_PrintReq, member_seq_PrintReq);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_struct_type_object(struct_type_PrintReq, type_name_PrintReq.to_string(), type_ids_PrintReq))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"PrintReq already registered in TypeObjectRegistry for a different type.");
}
}
}
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_PrintRsp_type_identifier(
TypeIdentifierPair& type_ids_PrintRsp)
{
ReturnCode_t return_code_PrintRsp {eprosima::fastdds::dds::RETCODE_OK};
return_code_PrintRsp =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"PrintRsp", type_ids_PrintRsp);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_PrintRsp)
{
StructTypeFlag struct_flags_PrintRsp = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_PrintRsp = "PrintRsp";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_PrintRsp;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_PrintRsp;
CompleteTypeDetail detail_PrintRsp = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_PrintRsp, ann_custom_PrintRsp, type_name_PrintRsp.to_string());
CompleteStructHeader header_PrintRsp;
header_PrintRsp = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_PrintRsp);
CompleteStructMemberSeq member_seq_PrintRsp;
{
TypeIdentifierPair type_ids_index;
ReturnCode_t return_code_index {eprosima::fastdds::dds::RETCODE_OK};
return_code_index =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"_uint32_t", type_ids_index);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_index)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"index Structure member TypeIdentifier unknown to TypeObjectRegistry.");
return;
}
StructMemberFlag member_flags_index = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
false, false, false, false);
MemberId member_id_index = 0x00000000;
bool common_index_ec {false};
CommonStructMember common_index {TypeObjectUtils::build_common_struct_member(member_id_index, member_flags_index, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_index, common_index_ec))};
if (!common_index_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure index member TypeIdentifier inconsistent.");
return;
}
MemberName name_index = "index";
eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_index;
ann_custom_PrintRsp.reset();
CompleteMemberDetail detail_index = TypeObjectUtils::build_complete_member_detail(name_index, member_ann_builtin_index, ann_custom_PrintRsp);
CompleteStructMember member_index = TypeObjectUtils::build_complete_struct_member(common_index, detail_index);
TypeObjectUtils::add_complete_struct_member(member_seq_PrintRsp, member_index);
}
{
TypeIdentifierPair type_ids_msg;
ReturnCode_t return_code_msg {eprosima::fastdds::dds::RETCODE_OK};
return_code_msg =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_string_unbounded", type_ids_msg);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_msg)
{
{
SBound bound = 0;
StringSTypeDefn string_sdefn = TypeObjectUtils::build_string_s_type_defn(bound);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_s_string_type_identifier(string_sdefn,
"anonymous_string_unbounded", type_ids_msg))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
}
StructMemberFlag member_flags_msg = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
false, false, false, false);
MemberId member_id_msg = 0x00000001;
bool common_msg_ec {false};
CommonStructMember common_msg {TypeObjectUtils::build_common_struct_member(member_id_msg, member_flags_msg, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_msg, common_msg_ec))};
if (!common_msg_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure msg member TypeIdentifier inconsistent.");
return;
}
MemberName name_msg = "msg";
eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_msg;
ann_custom_PrintRsp.reset();
CompleteMemberDetail detail_msg = TypeObjectUtils::build_complete_member_detail(name_msg, member_ann_builtin_msg, ann_custom_PrintRsp);
CompleteStructMember member_msg = TypeObjectUtils::build_complete_struct_member(common_msg, detail_msg);
TypeObjectUtils::add_complete_struct_member(member_seq_PrintRsp, member_msg);
}
CompleteStructType struct_type_PrintRsp = TypeObjectUtils::build_complete_struct_type(struct_flags_PrintRsp, header_PrintRsp, member_seq_PrintRsp);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_struct_type_object(struct_type_PrintRsp, type_name_PrintRsp.to_string(), type_ids_PrintRsp))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"PrintRsp already registered in TypeObjectRegistry for a different type.");
}
}
}
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_WeighReq_type_identifier(
TypeIdentifierPair& type_ids_WeighReq)
{
ReturnCode_t return_code_WeighReq {eprosima::fastdds::dds::RETCODE_OK};
return_code_WeighReq =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"WeighReq", type_ids_WeighReq);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_WeighReq)
{
StructTypeFlag struct_flags_WeighReq = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_WeighReq = "WeighReq";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_WeighReq;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_WeighReq;
CompleteTypeDetail detail_WeighReq = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_WeighReq, ann_custom_WeighReq, type_name_WeighReq.to_string());
CompleteStructHeader header_WeighReq;
header_WeighReq = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_WeighReq);
CompleteStructMemberSeq member_seq_WeighReq;
{
TypeIdentifierPair type_ids_index;
ReturnCode_t return_code_index {eprosima::fastdds::dds::RETCODE_OK};
return_code_index =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"_uint32_t", type_ids_index);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_index)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"index Structure member TypeIdentifier unknown to TypeObjectRegistry.");
return;
}
StructMemberFlag member_flags_index = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
false, false, false, false);
MemberId member_id_index = 0x00000000;
bool common_index_ec {false};
CommonStructMember common_index {TypeObjectUtils::build_common_struct_member(member_id_index, member_flags_index, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_index, common_index_ec))};
if (!common_index_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure index member TypeIdentifier inconsistent.");
return;
}
MemberName name_index = "index";
eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_index;
ann_custom_WeighReq.reset();
CompleteMemberDetail detail_index = TypeObjectUtils::build_complete_member_detail(name_index, member_ann_builtin_index, ann_custom_WeighReq);
CompleteStructMember member_index = TypeObjectUtils::build_complete_struct_member(common_index, detail_index);
TypeObjectUtils::add_complete_struct_member(member_seq_WeighReq, member_index);
}
{
TypeIdentifierPair type_ids_msg;
ReturnCode_t return_code_msg {eprosima::fastdds::dds::RETCODE_OK};
return_code_msg =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded", type_ids_msg);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_msg)
{
return_code_msg =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_string_unbounded", type_ids_msg);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_msg)
{
{
SBound bound = 0;
StringSTypeDefn string_sdefn = TypeObjectUtils::build_string_s_type_defn(bound);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_s_string_type_identifier(string_sdefn,
"anonymous_string_unbounded", type_ids_msg))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
}
bool element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec {false};
TypeIdentifier* element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded {new TypeIdentifier(TypeObjectUtils::retrieve_complete_type_identifier(type_ids_msg, element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec))};
if (!element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded inconsistent element TypeIdentifier.");
return;
}
return_code_msg =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_string_unbounded", type_ids_msg);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_msg)
{
{
SBound bound = 0;
StringSTypeDefn string_sdefn = TypeObjectUtils::build_string_s_type_defn(bound);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_s_string_type_identifier(string_sdefn,
"anonymous_string_unbounded", type_ids_msg))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
}
bool key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec {false};
TypeIdentifier* key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded {new TypeIdentifier(TypeObjectUtils::retrieve_complete_type_identifier(type_ids_msg, key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec))};
if (!key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded inconsistent key TypeIdentifier.");
return;
}
EquivalenceKind equiv_kind_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded = EK_BOTH;
if ((EK_COMPLETE == key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() || EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d()) ||
(TI_PLAIN_SEQUENCE_SMALL == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->seq_sdefn().header().equiv_kind()) ||
(TI_PLAIN_SEQUENCE_LARGE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->seq_ldefn().header().equiv_kind()) ||
(TI_PLAIN_ARRAY_SMALL == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->array_sdefn().header().equiv_kind()) ||
(TI_PLAIN_ARRAY_LARGE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->array_ldefn().header().equiv_kind()) ||
(TI_PLAIN_MAP_SMALL == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && (EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->map_sdefn().key_identifier()->_d() || EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->map_sdefn().header().equiv_kind())) ||
(TI_PLAIN_MAP_LARGE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->_d() && (EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->map_ldefn().key_identifier()->_d() || EK_COMPLETE == element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded->map_ldefn().header().equiv_kind())))
{
equiv_kind_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded = EK_COMPLETE;
}
CollectionElementFlag element_flags_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded = 0;
CollectionElementFlag key_flags_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded = 0;
PlainCollectionHeader header_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded = TypeObjectUtils::build_plain_collection_header(equiv_kind_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded, element_flags_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded);
{
SBound bound = 0;
PlainMapSTypeDefn map_sdefn = TypeObjectUtils::build_plain_map_s_type_defn(header_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded, bound,
eprosima::fastcdr::external<TypeIdentifier>(element_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded), key_flags_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded,
eprosima::fastcdr::external<TypeIdentifier>(key_identifier_anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded));
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_s_map_type_identifier(map_sdefn, "anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded", type_ids_msg))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_map_anonymous_string_unbounded_anonymous_string_unbounded_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
}
StructMemberFlag member_flags_msg = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
false, false, false, false);
MemberId member_id_msg = 0x00000001;
bool common_msg_ec {false};
CommonStructMember common_msg {TypeObjectUtils::build_common_struct_member(member_id_msg, member_flags_msg, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_msg, common_msg_ec))};
if (!common_msg_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure msg member TypeIdentifier inconsistent.");
return;
}
MemberName name_msg = "msg";
eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_msg;
ann_custom_WeighReq.reset();
CompleteMemberDetail detail_msg = TypeObjectUtils::build_complete_member_detail(name_msg, member_ann_builtin_msg, ann_custom_WeighReq);
CompleteStructMember member_msg = TypeObjectUtils::build_complete_struct_member(common_msg, detail_msg);
TypeObjectUtils::add_complete_struct_member(member_seq_WeighReq, member_msg);
}
CompleteStructType struct_type_WeighReq = TypeObjectUtils::build_complete_struct_type(struct_flags_WeighReq, header_WeighReq, member_seq_WeighReq);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_struct_type_object(struct_type_WeighReq, type_name_WeighReq.to_string(), type_ids_WeighReq))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"WeighReq already registered in TypeObjectRegistry for a different type.");
}
}
}
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_WeighRsp_type_identifier(
TypeIdentifierPair& type_ids_WeighRsp)
{
ReturnCode_t return_code_WeighRsp {eprosima::fastdds::dds::RETCODE_OK};
return_code_WeighRsp =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"WeighRsp", type_ids_WeighRsp);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_WeighRsp)
{
StructTypeFlag struct_flags_WeighRsp = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_WeighRsp = "WeighRsp";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_WeighRsp;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_WeighRsp;
CompleteTypeDetail detail_WeighRsp = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_WeighRsp, ann_custom_WeighRsp, type_name_WeighRsp.to_string());
CompleteStructHeader header_WeighRsp;
header_WeighRsp = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_WeighRsp);
CompleteStructMemberSeq member_seq_WeighRsp;
{
TypeIdentifierPair type_ids_index;
ReturnCode_t return_code_index {eprosima::fastdds::dds::RETCODE_OK};
return_code_index =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"_uint32_t", type_ids_index);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_index)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"index Structure member TypeIdentifier unknown to TypeObjectRegistry.");
return;
}
StructMemberFlag member_flags_index = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
false, false, false, false);
MemberId member_id_index = 0x00000000;
bool common_index_ec {false};
CommonStructMember common_index {TypeObjectUtils::build_common_struct_member(member_id_index, member_flags_index, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_index, common_index_ec))};
if (!common_index_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure index member TypeIdentifier inconsistent.");
return;
}
MemberName name_index = "index";
eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_index;
ann_custom_WeighRsp.reset();
CompleteMemberDetail detail_index = TypeObjectUtils::build_complete_member_detail(name_index, member_ann_builtin_index, ann_custom_WeighRsp);
CompleteStructMember member_index = TypeObjectUtils::build_complete_struct_member(common_index, detail_index);
TypeObjectUtils::add_complete_struct_member(member_seq_WeighRsp, member_index);
}
{
TypeIdentifierPair type_ids_stable_weight;
ReturnCode_t return_code_stable_weight {eprosima::fastdds::dds::RETCODE_OK};
return_code_stable_weight =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"_float", type_ids_stable_weight);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_stable_weight)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"stable_weight Structure member TypeIdentifier unknown to TypeObjectRegistry.");
return;
}
StructMemberFlag member_flags_stable_weight = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
false, false, false, false);
MemberId member_id_stable_weight = 0x00000001;
bool common_stable_weight_ec {false};
CommonStructMember common_stable_weight {TypeObjectUtils::build_common_struct_member(member_id_stable_weight, member_flags_stable_weight, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_stable_weight, common_stable_weight_ec))};
if (!common_stable_weight_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure stable_weight member TypeIdentifier inconsistent.");
return;
}
MemberName name_stable_weight = "stable_weight";
eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_stable_weight;
ann_custom_WeighRsp.reset();
CompleteMemberDetail detail_stable_weight = TypeObjectUtils::build_complete_member_detail(name_stable_weight, member_ann_builtin_stable_weight, ann_custom_WeighRsp);
CompleteStructMember member_stable_weight = TypeObjectUtils::build_complete_struct_member(common_stable_weight, detail_stable_weight);
TypeObjectUtils::add_complete_struct_member(member_seq_WeighRsp, member_stable_weight);
}
{
TypeIdentifierPair type_ids_instantaneous_weight;
ReturnCode_t return_code_instantaneous_weight {eprosima::fastdds::dds::RETCODE_OK};
return_code_instantaneous_weight =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"_float", type_ids_instantaneous_weight);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_instantaneous_weight)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"instantaneous_weight Structure member TypeIdentifier unknown to TypeObjectRegistry.");
return;
}
StructMemberFlag member_flags_instantaneous_weight = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
false, false, false, false);
MemberId member_id_instantaneous_weight = 0x00000002;
bool common_instantaneous_weight_ec {false};
CommonStructMember common_instantaneous_weight {TypeObjectUtils::build_common_struct_member(member_id_instantaneous_weight, member_flags_instantaneous_weight, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_instantaneous_weight, common_instantaneous_weight_ec))};
if (!common_instantaneous_weight_ec)
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure instantaneous_weight member TypeIdentifier inconsistent.");
return;
}
MemberName name_instantaneous_weight = "instantaneous_weight";
eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_instantaneous_weight;
ann_custom_WeighRsp.reset();
CompleteMemberDetail detail_instantaneous_weight = TypeObjectUtils::build_complete_member_detail(name_instantaneous_weight, member_ann_builtin_instantaneous_weight, ann_custom_WeighRsp);
CompleteStructMember member_instantaneous_weight = TypeObjectUtils::build_complete_struct_member(common_instantaneous_weight, detail_instantaneous_weight);
TypeObjectUtils::add_complete_struct_member(member_seq_WeighRsp, member_instantaneous_weight);
}
CompleteStructType struct_type_WeighRsp = TypeObjectUtils::build_complete_struct_type(struct_flags_WeighRsp, header_WeighRsp, member_seq_WeighRsp);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_struct_type_object(struct_type_WeighRsp, type_name_WeighRsp.to_string(), type_ids_WeighRsp))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"WeighRsp already registered in TypeObjectRegistry for a different type.");
}
}
}