diff --git a/ddspipe_core/include/ddspipe_core/types/dds/Guid.hpp b/ddspipe_core/include/ddspipe_core/types/dds/Guid.hpp index 053adf6c..a960ee8d 100644 --- a/ddspipe_core/include/ddspipe_core/types/dds/Guid.hpp +++ b/ddspipe_core/include/ddspipe_core/types/dds/Guid.hpp @@ -14,7 +14,7 @@ #pragma once -#include +#include #include #include diff --git a/ddspipe_core/include/ddspipe_core/types/topic/dds/DdsTopic.hpp b/ddspipe_core/include/ddspipe_core/types/topic/dds/DdsTopic.hpp index b86c3a0d..f4a3485d 100644 --- a/ddspipe_core/include/ddspipe_core/types/topic/dds/DdsTopic.hpp +++ b/ddspipe_core/include/ddspipe_core/types/topic/dds/DdsTopic.hpp @@ -81,6 +81,9 @@ struct DdsTopic : public DistributedTopic const std::string& type_name, utils::Formatter& error_msg) noexcept; + void set_type_ids( + const fastdds::dds::xtypes::TypeIdentifierPair& _type_ids) noexcept; + ///////////////////////// // VARIABLES ///////////////////////// diff --git a/ddspipe_core/src/cpp/types/logging/LogEntryPubSubTypes.cxx b/ddspipe_core/src/cpp/types/logging/LogEntryPubSubTypes.cxx index a769a800..b1a5c9d5 100644 --- a/ddspipe_core/src/cpp/types/logging/LogEntryPubSubTypes.cxx +++ b/ddspipe_core/src/cpp/types/logging/LogEntryPubSubTypes.cxx @@ -221,8 +221,7 @@ bool LogEntryPubSubType::getKey( void LogEntryPubSubType::register_type_object_representation() { - eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids; - register_LogEntry_type_identifier(type_ids); + register_LogEntry_type_identifier(type_identifiers_); } diff --git a/ddspipe_core/src/cpp/types/logging/LogEntryTypeObjectSupport.cxx b/ddspipe_core/src/cpp/types/logging/LogEntryTypeObjectSupport.cxx index d0527c95..868bc39e 100644 --- a/ddspipe_core/src/cpp/types/logging/LogEntryTypeObjectSupport.cxx +++ b/ddspipe_core/src/cpp/types/logging/LogEntryTypeObjectSupport.cxx @@ -41,52 +41,59 @@ using namespace eprosima::fastdds::dds::xtypes; void register_Kind_type_identifier( TypeIdentifierPair& type_ids_Kind) { - EnumTypeFlag enum_flags_Kind = 0; - BitBound bit_bound_Kind = 32; - CommonEnumeratedHeader common_Kind = TypeObjectUtils::build_common_enumerated_header(bit_bound_Kind); - QualifiedTypeName type_name_Kind = "Kind"; - eprosima::fastcdr::optional type_ann_builtin_Kind; - eprosima::fastcdr::optional ann_custom_Kind; - CompleteTypeDetail detail_Kind = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Kind, ann_custom_Kind, type_name_Kind.to_string()); - CompleteEnumeratedHeader header_Kind = TypeObjectUtils::build_complete_enumerated_header(common_Kind, detail_Kind); - CompleteEnumeratedLiteralSeq literal_seq_Kind; - { - EnumeratedLiteralFlag flags_Info = TypeObjectUtils::build_enumerated_literal_flag(false); - CommonEnumeratedLiteral common_Info = TypeObjectUtils::build_common_enumerated_literal(0, flags_Info); - eprosima::fastcdr::optional member_ann_builtin_Info; - ann_custom_Kind.reset(); - MemberName name_Info = "Info"; - CompleteMemberDetail detail_Info = TypeObjectUtils::build_complete_member_detail(name_Info, member_ann_builtin_Info, ann_custom_Kind); - CompleteEnumeratedLiteral literal_Info = TypeObjectUtils::build_complete_enumerated_literal(common_Info, detail_Info); - TypeObjectUtils::add_complete_enumerated_literal(literal_seq_Kind, literal_Info); - } - { - EnumeratedLiteralFlag flags_Warning = TypeObjectUtils::build_enumerated_literal_flag(false); - CommonEnumeratedLiteral common_Warning = TypeObjectUtils::build_common_enumerated_literal(1, flags_Warning); - eprosima::fastcdr::optional member_ann_builtin_Warning; - ann_custom_Kind.reset(); - MemberName name_Warning = "Warning"; - CompleteMemberDetail detail_Warning = TypeObjectUtils::build_complete_member_detail(name_Warning, member_ann_builtin_Warning, ann_custom_Kind); - CompleteEnumeratedLiteral literal_Warning = TypeObjectUtils::build_complete_enumerated_literal(common_Warning, detail_Warning); - TypeObjectUtils::add_complete_enumerated_literal(literal_seq_Kind, literal_Warning); - } - { - EnumeratedLiteralFlag flags_Error = TypeObjectUtils::build_enumerated_literal_flag(false); - CommonEnumeratedLiteral common_Error = TypeObjectUtils::build_common_enumerated_literal(2, flags_Error); - eprosima::fastcdr::optional member_ann_builtin_Error; - ann_custom_Kind.reset(); - MemberName name_Error = "Error"; - CompleteMemberDetail detail_Error = TypeObjectUtils::build_complete_member_detail(name_Error, member_ann_builtin_Error, ann_custom_Kind); - CompleteEnumeratedLiteral literal_Error = TypeObjectUtils::build_complete_enumerated_literal(common_Error, detail_Error); - TypeObjectUtils::add_complete_enumerated_literal(literal_seq_Kind, literal_Error); - } - CompleteEnumeratedType enumerated_type_Kind = TypeObjectUtils::build_complete_enumerated_type(enum_flags_Kind, header_Kind, - literal_seq_Kind); - if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER == - TypeObjectUtils::build_and_register_enumerated_type_object(enumerated_type_Kind, type_name_Kind.to_string(), type_ids_Kind)) + ReturnCode_t return_code_Kind {eprosima::fastdds::dds::RETCODE_OK}; + return_code_Kind = + eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers( + "Kind", type_ids_Kind); + if (eprosima::fastdds::dds::RETCODE_OK != return_code_Kind) { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Kind already registered in TypeObjectRegistry for a different type."); + EnumTypeFlag enum_flags_Kind = 0; + BitBound bit_bound_Kind = 32; + CommonEnumeratedHeader common_Kind = TypeObjectUtils::build_common_enumerated_header(bit_bound_Kind); + QualifiedTypeName type_name_Kind = "Kind"; + eprosima::fastcdr::optional type_ann_builtin_Kind; + eprosima::fastcdr::optional ann_custom_Kind; + CompleteTypeDetail detail_Kind = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Kind, ann_custom_Kind, type_name_Kind.to_string()); + CompleteEnumeratedHeader header_Kind = TypeObjectUtils::build_complete_enumerated_header(common_Kind, detail_Kind); + CompleteEnumeratedLiteralSeq literal_seq_Kind; + { + EnumeratedLiteralFlag flags_Info = TypeObjectUtils::build_enumerated_literal_flag(false); + CommonEnumeratedLiteral common_Info = TypeObjectUtils::build_common_enumerated_literal(0, flags_Info); + eprosima::fastcdr::optional member_ann_builtin_Info; + ann_custom_Kind.reset(); + MemberName name_Info = "Info"; + CompleteMemberDetail detail_Info = TypeObjectUtils::build_complete_member_detail(name_Info, member_ann_builtin_Info, ann_custom_Kind); + CompleteEnumeratedLiteral literal_Info = TypeObjectUtils::build_complete_enumerated_literal(common_Info, detail_Info); + TypeObjectUtils::add_complete_enumerated_literal(literal_seq_Kind, literal_Info); + } + { + EnumeratedLiteralFlag flags_Warning = TypeObjectUtils::build_enumerated_literal_flag(false); + CommonEnumeratedLiteral common_Warning = TypeObjectUtils::build_common_enumerated_literal(1, flags_Warning); + eprosima::fastcdr::optional member_ann_builtin_Warning; + ann_custom_Kind.reset(); + MemberName name_Warning = "Warning"; + CompleteMemberDetail detail_Warning = TypeObjectUtils::build_complete_member_detail(name_Warning, member_ann_builtin_Warning, ann_custom_Kind); + CompleteEnumeratedLiteral literal_Warning = TypeObjectUtils::build_complete_enumerated_literal(common_Warning, detail_Warning); + TypeObjectUtils::add_complete_enumerated_literal(literal_seq_Kind, literal_Warning); + } + { + EnumeratedLiteralFlag flags_Error = TypeObjectUtils::build_enumerated_literal_flag(false); + CommonEnumeratedLiteral common_Error = TypeObjectUtils::build_common_enumerated_literal(2, flags_Error); + eprosima::fastcdr::optional member_ann_builtin_Error; + ann_custom_Kind.reset(); + MemberName name_Error = "Error"; + CompleteMemberDetail detail_Error = TypeObjectUtils::build_complete_member_detail(name_Error, member_ann_builtin_Error, ann_custom_Kind); + CompleteEnumeratedLiteral literal_Error = TypeObjectUtils::build_complete_enumerated_literal(common_Error, detail_Error); + TypeObjectUtils::add_complete_enumerated_literal(literal_seq_Kind, literal_Error); + } + CompleteEnumeratedType enumerated_type_Kind = TypeObjectUtils::build_complete_enumerated_type(enum_flags_Kind, header_Kind, + literal_seq_Kind); + if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER == + TypeObjectUtils::build_and_register_enumerated_type_object(enumerated_type_Kind, type_name_Kind.to_string(), type_ids_Kind)) + { + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, + "Kind already registered in TypeObjectRegistry for a different type."); + } } }// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method void register_LogEntry_type_identifier( @@ -124,50 +131,12 @@ void register_LogEntry_type_identifier( } StructMemberFlag member_flags_event = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, true, false); - CommonStructMember common_event; MemberId member_id_event = 0x00000000; - if (EK_COMPLETE == type_ids_event.type_identifier1()._d() || TK_NONE == type_ids_event.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_event.type_identifier1()._d() && - EK_COMPLETE == type_ids_event.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_event.type_identifier1()._d() && - EK_COMPLETE == type_ids_event.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_event.type_identifier1()._d() && - EK_COMPLETE == type_ids_event.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_event.type_identifier1()._d() && - EK_COMPLETE == type_ids_event.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_event.type_identifier1()._d() && - (EK_COMPLETE == type_ids_event.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_event.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_event.type_identifier1()._d() && - (EK_COMPLETE == type_ids_event.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_event.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - common_event = TypeObjectUtils::build_common_struct_member(member_id_event, - member_flags_event, type_ids_event.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_event.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_event.type_identifier2()._d() && - EK_COMPLETE == type_ids_event.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_event.type_identifier2()._d() && - EK_COMPLETE == type_ids_event.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_event.type_identifier2()._d() && - EK_COMPLETE == type_ids_event.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_event.type_identifier2()._d() && - EK_COMPLETE == type_ids_event.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_event.type_identifier2()._d() && - (EK_COMPLETE == type_ids_event.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_event.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_event.type_identifier2()._d() && - (EK_COMPLETE == type_ids_event.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_event.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_event = TypeObjectUtils::build_common_struct_member(member_id_event, - member_flags_event, type_ids_event.type_identifier2()); - } - else + bool common_event_ec {false}; + CommonStructMember common_event {TypeObjectUtils::build_common_struct_member(member_id_event, member_flags_event, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_event, common_event_ec))}; + if (!common_event_ec) { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure event member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure event member TypeIdentifier inconsistent."); return; } MemberName name_event = "event"; @@ -203,50 +172,12 @@ void register_LogEntry_type_identifier( } StructMemberFlag member_flags_kind = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_kind; MemberId member_id_kind = 0x00000001; - if (EK_COMPLETE == type_ids_kind.type_identifier1()._d() || TK_NONE == type_ids_kind.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_kind.type_identifier1()._d() && - EK_COMPLETE == type_ids_kind.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_kind.type_identifier1()._d() && - EK_COMPLETE == type_ids_kind.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_kind.type_identifier1()._d() && - EK_COMPLETE == type_ids_kind.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_kind.type_identifier1()._d() && - EK_COMPLETE == type_ids_kind.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_kind.type_identifier1()._d() && - (EK_COMPLETE == type_ids_kind.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_kind.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_kind.type_identifier1()._d() && - (EK_COMPLETE == type_ids_kind.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_kind.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - common_kind = TypeObjectUtils::build_common_struct_member(member_id_kind, - member_flags_kind, type_ids_kind.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_kind.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_kind.type_identifier2()._d() && - EK_COMPLETE == type_ids_kind.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_kind.type_identifier2()._d() && - EK_COMPLETE == type_ids_kind.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_kind.type_identifier2()._d() && - EK_COMPLETE == type_ids_kind.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_kind.type_identifier2()._d() && - EK_COMPLETE == type_ids_kind.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_kind.type_identifier2()._d() && - (EK_COMPLETE == type_ids_kind.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_kind.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_kind.type_identifier2()._d() && - (EK_COMPLETE == type_ids_kind.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_kind.type_identifier2().map_ldefn().key_identifier()->_d()))) + bool common_kind_ec {false}; + CommonStructMember common_kind {TypeObjectUtils::build_common_struct_member(member_id_kind, member_flags_kind, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_kind, common_kind_ec))}; + if (!common_kind_ec) { - common_kind = TypeObjectUtils::build_common_struct_member(member_id_kind, - member_flags_kind, type_ids_kind.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure kind member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure kind member TypeIdentifier inconsistent."); return; } MemberName name_kind = "kind"; @@ -279,50 +210,12 @@ void register_LogEntry_type_identifier( } StructMemberFlag member_flags_category = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_category; MemberId member_id_category = 0x00000002; - if (EK_COMPLETE == type_ids_category.type_identifier1()._d() || TK_NONE == type_ids_category.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_category.type_identifier1()._d() && - EK_COMPLETE == type_ids_category.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_category.type_identifier1()._d() && - EK_COMPLETE == type_ids_category.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_category.type_identifier1()._d() && - EK_COMPLETE == type_ids_category.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_category.type_identifier1()._d() && - EK_COMPLETE == type_ids_category.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_category.type_identifier1()._d() && - (EK_COMPLETE == type_ids_category.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_category.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_category.type_identifier1()._d() && - (EK_COMPLETE == type_ids_category.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_category.type_identifier1().map_ldefn().key_identifier()->_d()))) + bool common_category_ec {false}; + CommonStructMember common_category {TypeObjectUtils::build_common_struct_member(member_id_category, member_flags_category, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_category, common_category_ec))}; + if (!common_category_ec) { - common_category = TypeObjectUtils::build_common_struct_member(member_id_category, - member_flags_category, type_ids_category.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_category.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_category.type_identifier2()._d() && - EK_COMPLETE == type_ids_category.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_category.type_identifier2()._d() && - EK_COMPLETE == type_ids_category.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_category.type_identifier2()._d() && - EK_COMPLETE == type_ids_category.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_category.type_identifier2()._d() && - EK_COMPLETE == type_ids_category.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_category.type_identifier2()._d() && - (EK_COMPLETE == type_ids_category.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_category.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_category.type_identifier2()._d() && - (EK_COMPLETE == type_ids_category.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_category.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_category = TypeObjectUtils::build_common_struct_member(member_id_category, - member_flags_category, type_ids_category.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure category member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure category member TypeIdentifier inconsistent."); return; } MemberName name_category = "category"; @@ -355,50 +248,12 @@ void register_LogEntry_type_identifier( } StructMemberFlag member_flags_message = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_message; MemberId member_id_message = 0x00000003; - if (EK_COMPLETE == type_ids_message.type_identifier1()._d() || TK_NONE == type_ids_message.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_message.type_identifier1()._d() && - EK_COMPLETE == type_ids_message.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_message.type_identifier1()._d() && - EK_COMPLETE == type_ids_message.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_message.type_identifier1()._d() && - EK_COMPLETE == type_ids_message.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_message.type_identifier1()._d() && - EK_COMPLETE == type_ids_message.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_message.type_identifier1()._d() && - (EK_COMPLETE == type_ids_message.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_message.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_message.type_identifier1()._d() && - (EK_COMPLETE == type_ids_message.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_message.type_identifier1().map_ldefn().key_identifier()->_d()))) + bool common_message_ec {false}; + CommonStructMember common_message {TypeObjectUtils::build_common_struct_member(member_id_message, member_flags_message, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_message, common_message_ec))}; + if (!common_message_ec) { - common_message = TypeObjectUtils::build_common_struct_member(member_id_message, - member_flags_message, type_ids_message.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_message.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_message.type_identifier2()._d() && - EK_COMPLETE == type_ids_message.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_message.type_identifier2()._d() && - EK_COMPLETE == type_ids_message.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_message.type_identifier2()._d() && - EK_COMPLETE == type_ids_message.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_message.type_identifier2()._d() && - EK_COMPLETE == type_ids_message.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_message.type_identifier2()._d() && - (EK_COMPLETE == type_ids_message.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_message.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_message.type_identifier2()._d() && - (EK_COMPLETE == type_ids_message.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_message.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_message = TypeObjectUtils::build_common_struct_member(member_id_message, - member_flags_message, type_ids_message.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure message member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure message member TypeIdentifier inconsistent."); return; } MemberName name_message = "message"; @@ -431,50 +286,12 @@ void register_LogEntry_type_identifier( } StructMemberFlag member_flags_timestamp = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_timestamp; MemberId member_id_timestamp = 0x00000004; - if (EK_COMPLETE == type_ids_timestamp.type_identifier1()._d() || TK_NONE == type_ids_timestamp.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_timestamp.type_identifier1()._d() && - EK_COMPLETE == type_ids_timestamp.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_timestamp.type_identifier1()._d() && - EK_COMPLETE == type_ids_timestamp.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_timestamp.type_identifier1()._d() && - EK_COMPLETE == type_ids_timestamp.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_timestamp.type_identifier1()._d() && - EK_COMPLETE == type_ids_timestamp.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_timestamp.type_identifier1()._d() && - (EK_COMPLETE == type_ids_timestamp.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_timestamp.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_timestamp.type_identifier1()._d() && - (EK_COMPLETE == type_ids_timestamp.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_timestamp.type_identifier1().map_ldefn().key_identifier()->_d()))) + bool common_timestamp_ec {false}; + CommonStructMember common_timestamp {TypeObjectUtils::build_common_struct_member(member_id_timestamp, member_flags_timestamp, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_timestamp, common_timestamp_ec))}; + if (!common_timestamp_ec) { - common_timestamp = TypeObjectUtils::build_common_struct_member(member_id_timestamp, - member_flags_timestamp, type_ids_timestamp.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_timestamp.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_timestamp.type_identifier2()._d() && - EK_COMPLETE == type_ids_timestamp.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_timestamp.type_identifier2()._d() && - EK_COMPLETE == type_ids_timestamp.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_timestamp.type_identifier2()._d() && - EK_COMPLETE == type_ids_timestamp.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_timestamp.type_identifier2()._d() && - EK_COMPLETE == type_ids_timestamp.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_timestamp.type_identifier2()._d() && - (EK_COMPLETE == type_ids_timestamp.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_timestamp.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_timestamp.type_identifier2()._d() && - (EK_COMPLETE == type_ids_timestamp.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_timestamp.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_timestamp = TypeObjectUtils::build_common_struct_member(member_id_timestamp, - member_flags_timestamp, type_ids_timestamp.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure timestamp member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure timestamp member TypeIdentifier inconsistent."); return; } MemberName name_timestamp = "timestamp"; diff --git a/ddspipe_core/src/cpp/types/monitoring/status/MonitoringStatusPubSubTypes.cxx b/ddspipe_core/src/cpp/types/monitoring/status/MonitoringStatusPubSubTypes.cxx index d6568bf0..608e0dde 100644 --- a/ddspipe_core/src/cpp/types/monitoring/status/MonitoringStatusPubSubTypes.cxx +++ b/ddspipe_core/src/cpp/types/monitoring/status/MonitoringStatusPubSubTypes.cxx @@ -221,8 +221,7 @@ bool MonitoringErrorStatusPubSubType::getKey( void MonitoringErrorStatusPubSubType::register_type_object_representation() { - eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids; - register_MonitoringErrorStatus_type_identifier(type_ids); + register_MonitoringErrorStatus_type_identifier(type_identifiers_); } MonitoringStatusPubSubType::MonitoringStatusPubSubType() @@ -415,8 +414,7 @@ bool MonitoringStatusPubSubType::getKey( void MonitoringStatusPubSubType::register_type_object_representation() { - eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids; - register_MonitoringStatus_type_identifier(type_ids); + register_MonitoringStatus_type_identifier(type_identifiers_); } diff --git a/ddspipe_core/src/cpp/types/monitoring/status/MonitoringStatusTypeObjectSupport.cxx b/ddspipe_core/src/cpp/types/monitoring/status/MonitoringStatusTypeObjectSupport.cxx index f99fba42..f6452e94 100644 --- a/ddspipe_core/src/cpp/types/monitoring/status/MonitoringStatusTypeObjectSupport.cxx +++ b/ddspipe_core/src/cpp/types/monitoring/status/MonitoringStatusTypeObjectSupport.cxx @@ -74,50 +74,12 @@ void register_MonitoringErrorStatus_type_identifier( } StructMemberFlag member_flags_type_mismatch = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_type_mismatch; MemberId member_id_type_mismatch = 0x00000000; - if (EK_COMPLETE == type_ids_type_mismatch.type_identifier1()._d() || TK_NONE == type_ids_type_mismatch.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_type_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_type_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_type_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_type_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_type_mismatch.type_identifier1()._d() && - (EK_COMPLETE == type_ids_type_mismatch.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_type_mismatch.type_identifier1()._d() && - (EK_COMPLETE == type_ids_type_mismatch.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().map_ldefn().key_identifier()->_d()))) + bool common_type_mismatch_ec {false}; + CommonStructMember common_type_mismatch {TypeObjectUtils::build_common_struct_member(member_id_type_mismatch, member_flags_type_mismatch, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_type_mismatch, common_type_mismatch_ec))}; + if (!common_type_mismatch_ec) { - common_type_mismatch = TypeObjectUtils::build_common_struct_member(member_id_type_mismatch, - member_flags_type_mismatch, type_ids_type_mismatch.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_type_mismatch.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_type_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_type_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_type_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_type_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_type_mismatch.type_identifier2()._d() && - (EK_COMPLETE == type_ids_type_mismatch.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_type_mismatch.type_identifier2()._d() && - (EK_COMPLETE == type_ids_type_mismatch.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_type_mismatch = TypeObjectUtils::build_common_struct_member(member_id_type_mismatch, - member_flags_type_mismatch, type_ids_type_mismatch.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure type_mismatch member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure type_mismatch member TypeIdentifier inconsistent."); return; } MemberName name_type_mismatch = "type_mismatch"; @@ -142,50 +104,12 @@ void register_MonitoringErrorStatus_type_identifier( } StructMemberFlag member_flags_qos_mismatch = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_qos_mismatch; MemberId member_id_qos_mismatch = 0x00000001; - if (EK_COMPLETE == type_ids_qos_mismatch.type_identifier1()._d() || TK_NONE == type_ids_qos_mismatch.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_qos_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_qos_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_qos_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_qos_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_qos_mismatch.type_identifier1()._d() && - (EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_qos_mismatch.type_identifier1()._d() && - (EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().map_ldefn().key_identifier()->_d()))) + bool common_qos_mismatch_ec {false}; + CommonStructMember common_qos_mismatch {TypeObjectUtils::build_common_struct_member(member_id_qos_mismatch, member_flags_qos_mismatch, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_qos_mismatch, common_qos_mismatch_ec))}; + if (!common_qos_mismatch_ec) { - common_qos_mismatch = TypeObjectUtils::build_common_struct_member(member_id_qos_mismatch, - member_flags_qos_mismatch, type_ids_qos_mismatch.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_qos_mismatch.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_qos_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_qos_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_qos_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_qos_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_qos_mismatch.type_identifier2()._d() && - (EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_qos_mismatch.type_identifier2()._d() && - (EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_qos_mismatch = TypeObjectUtils::build_common_struct_member(member_id_qos_mismatch, - member_flags_qos_mismatch, type_ids_qos_mismatch.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure qos_mismatch member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure qos_mismatch member TypeIdentifier inconsistent."); return; } MemberName name_qos_mismatch = "qos_mismatch"; @@ -238,50 +162,12 @@ void register_MonitoringStatus_type_identifier( } StructMemberFlag member_flags_error_status = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_error_status; MemberId member_id_error_status = 0x00000000; - if (EK_COMPLETE == type_ids_error_status.type_identifier1()._d() || TK_NONE == type_ids_error_status.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_error_status.type_identifier1()._d() && - EK_COMPLETE == type_ids_error_status.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_error_status.type_identifier1()._d() && - EK_COMPLETE == type_ids_error_status.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_error_status.type_identifier1()._d() && - EK_COMPLETE == type_ids_error_status.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_error_status.type_identifier1()._d() && - EK_COMPLETE == type_ids_error_status.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_error_status.type_identifier1()._d() && - (EK_COMPLETE == type_ids_error_status.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_error_status.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_error_status.type_identifier1()._d() && - (EK_COMPLETE == type_ids_error_status.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_error_status.type_identifier1().map_ldefn().key_identifier()->_d()))) + bool common_error_status_ec {false}; + CommonStructMember common_error_status {TypeObjectUtils::build_common_struct_member(member_id_error_status, member_flags_error_status, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_error_status, common_error_status_ec))}; + if (!common_error_status_ec) { - common_error_status = TypeObjectUtils::build_common_struct_member(member_id_error_status, - member_flags_error_status, type_ids_error_status.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_error_status.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_error_status.type_identifier2()._d() && - EK_COMPLETE == type_ids_error_status.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_error_status.type_identifier2()._d() && - EK_COMPLETE == type_ids_error_status.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_error_status.type_identifier2()._d() && - EK_COMPLETE == type_ids_error_status.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_error_status.type_identifier2()._d() && - EK_COMPLETE == type_ids_error_status.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_error_status.type_identifier2()._d() && - (EK_COMPLETE == type_ids_error_status.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_error_status.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_error_status.type_identifier2()._d() && - (EK_COMPLETE == type_ids_error_status.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_error_status.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_error_status = TypeObjectUtils::build_common_struct_member(member_id_error_status, - member_flags_error_status, type_ids_error_status.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure error_status member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure error_status member TypeIdentifier inconsistent."); return; } MemberName name_error_status = "error_status"; @@ -306,50 +192,12 @@ void register_MonitoringStatus_type_identifier( } StructMemberFlag member_flags_has_errors = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_has_errors; MemberId member_id_has_errors = 0x00000001; - if (EK_COMPLETE == type_ids_has_errors.type_identifier1()._d() || TK_NONE == type_ids_has_errors.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_has_errors.type_identifier1()._d() && - EK_COMPLETE == type_ids_has_errors.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_has_errors.type_identifier1()._d() && - EK_COMPLETE == type_ids_has_errors.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_has_errors.type_identifier1()._d() && - EK_COMPLETE == type_ids_has_errors.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_has_errors.type_identifier1()._d() && - EK_COMPLETE == type_ids_has_errors.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_has_errors.type_identifier1()._d() && - (EK_COMPLETE == type_ids_has_errors.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_has_errors.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_has_errors.type_identifier1()._d() && - (EK_COMPLETE == type_ids_has_errors.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_has_errors.type_identifier1().map_ldefn().key_identifier()->_d()))) + bool common_has_errors_ec {false}; + CommonStructMember common_has_errors {TypeObjectUtils::build_common_struct_member(member_id_has_errors, member_flags_has_errors, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_has_errors, common_has_errors_ec))}; + if (!common_has_errors_ec) { - common_has_errors = TypeObjectUtils::build_common_struct_member(member_id_has_errors, - member_flags_has_errors, type_ids_has_errors.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_has_errors.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_has_errors.type_identifier2()._d() && - EK_COMPLETE == type_ids_has_errors.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_has_errors.type_identifier2()._d() && - EK_COMPLETE == type_ids_has_errors.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_has_errors.type_identifier2()._d() && - EK_COMPLETE == type_ids_has_errors.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_has_errors.type_identifier2()._d() && - EK_COMPLETE == type_ids_has_errors.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_has_errors.type_identifier2()._d() && - (EK_COMPLETE == type_ids_has_errors.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_has_errors.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_has_errors.type_identifier2()._d() && - (EK_COMPLETE == type_ids_has_errors.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_has_errors.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_has_errors = TypeObjectUtils::build_common_struct_member(member_id_has_errors, - member_flags_has_errors, type_ids_has_errors.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure has_errors member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure has_errors member TypeIdentifier inconsistent."); return; } MemberName name_has_errors = "has_errors"; diff --git a/ddspipe_core/src/cpp/types/monitoring/topics/MonitoringTopicsPubSubTypes.cxx b/ddspipe_core/src/cpp/types/monitoring/topics/MonitoringTopicsPubSubTypes.cxx index a1198206..d545020d 100644 --- a/ddspipe_core/src/cpp/types/monitoring/topics/MonitoringTopicsPubSubTypes.cxx +++ b/ddspipe_core/src/cpp/types/monitoring/topics/MonitoringTopicsPubSubTypes.cxx @@ -221,8 +221,7 @@ bool DdsTopicDataPubSubType::getKey( void DdsTopicDataPubSubType::register_type_object_representation() { - eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids; - register_DdsTopicData_type_identifier(type_ids); + register_DdsTopicData_type_identifier(type_identifiers_); } DdsTopicPubSubType::DdsTopicPubSubType() @@ -415,8 +414,7 @@ bool DdsTopicPubSubType::getKey( void DdsTopicPubSubType::register_type_object_representation() { - eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids; - register_DdsTopic_type_identifier(type_ids); + register_DdsTopic_type_identifier(type_identifiers_); } MonitoringTopicsPubSubType::MonitoringTopicsPubSubType() @@ -609,8 +607,7 @@ bool MonitoringTopicsPubSubType::getKey( void MonitoringTopicsPubSubType::register_type_object_representation() { - eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids; - register_MonitoringTopics_type_identifier(type_ids); + register_MonitoringTopics_type_identifier(type_identifiers_); } diff --git a/ddspipe_core/src/cpp/types/monitoring/topics/MonitoringTopicsTypeObjectSupport.cxx b/ddspipe_core/src/cpp/types/monitoring/topics/MonitoringTopicsTypeObjectSupport.cxx index 0e57c309..7ff982ae 100644 --- a/ddspipe_core/src/cpp/types/monitoring/topics/MonitoringTopicsTypeObjectSupport.cxx +++ b/ddspipe_core/src/cpp/types/monitoring/topics/MonitoringTopicsTypeObjectSupport.cxx @@ -82,50 +82,12 @@ void register_DdsTopicData_type_identifier( } StructMemberFlag member_flags_participant_id = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_participant_id; MemberId member_id_participant_id = 0x00000000; - if (EK_COMPLETE == type_ids_participant_id.type_identifier1()._d() || TK_NONE == type_ids_participant_id.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_participant_id.type_identifier1()._d() && - EK_COMPLETE == type_ids_participant_id.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_participant_id.type_identifier1()._d() && - EK_COMPLETE == type_ids_participant_id.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_participant_id.type_identifier1()._d() && - EK_COMPLETE == type_ids_participant_id.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_participant_id.type_identifier1()._d() && - EK_COMPLETE == type_ids_participant_id.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_participant_id.type_identifier1()._d() && - (EK_COMPLETE == type_ids_participant_id.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_participant_id.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_participant_id.type_identifier1()._d() && - (EK_COMPLETE == type_ids_participant_id.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_participant_id.type_identifier1().map_ldefn().key_identifier()->_d()))) + bool common_participant_id_ec {false}; + CommonStructMember common_participant_id {TypeObjectUtils::build_common_struct_member(member_id_participant_id, member_flags_participant_id, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_participant_id, common_participant_id_ec))}; + if (!common_participant_id_ec) { - common_participant_id = TypeObjectUtils::build_common_struct_member(member_id_participant_id, - member_flags_participant_id, type_ids_participant_id.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_participant_id.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_participant_id.type_identifier2()._d() && - EK_COMPLETE == type_ids_participant_id.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_participant_id.type_identifier2()._d() && - EK_COMPLETE == type_ids_participant_id.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_participant_id.type_identifier2()._d() && - EK_COMPLETE == type_ids_participant_id.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_participant_id.type_identifier2()._d() && - EK_COMPLETE == type_ids_participant_id.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_participant_id.type_identifier2()._d() && - (EK_COMPLETE == type_ids_participant_id.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_participant_id.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_participant_id.type_identifier2()._d() && - (EK_COMPLETE == type_ids_participant_id.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_participant_id.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_participant_id = TypeObjectUtils::build_common_struct_member(member_id_participant_id, - member_flags_participant_id, type_ids_participant_id.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure participant_id member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure participant_id member TypeIdentifier inconsistent."); return; } MemberName name_participant_id = "participant_id"; @@ -150,50 +112,12 @@ void register_DdsTopicData_type_identifier( } StructMemberFlag member_flags_msgs_lost = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_msgs_lost; MemberId member_id_msgs_lost = 0x00000001; - if (EK_COMPLETE == type_ids_msgs_lost.type_identifier1()._d() || TK_NONE == type_ids_msgs_lost.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_msgs_lost.type_identifier1()._d() && - EK_COMPLETE == type_ids_msgs_lost.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_msgs_lost.type_identifier1()._d() && - EK_COMPLETE == type_ids_msgs_lost.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_msgs_lost.type_identifier1()._d() && - EK_COMPLETE == type_ids_msgs_lost.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_msgs_lost.type_identifier1()._d() && - EK_COMPLETE == type_ids_msgs_lost.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_msgs_lost.type_identifier1()._d() && - (EK_COMPLETE == type_ids_msgs_lost.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msgs_lost.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_msgs_lost.type_identifier1()._d() && - (EK_COMPLETE == type_ids_msgs_lost.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msgs_lost.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - common_msgs_lost = TypeObjectUtils::build_common_struct_member(member_id_msgs_lost, - member_flags_msgs_lost, type_ids_msgs_lost.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_msgs_lost.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_msgs_lost.type_identifier2()._d() && - EK_COMPLETE == type_ids_msgs_lost.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_msgs_lost.type_identifier2()._d() && - EK_COMPLETE == type_ids_msgs_lost.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_msgs_lost.type_identifier2()._d() && - EK_COMPLETE == type_ids_msgs_lost.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_msgs_lost.type_identifier2()._d() && - EK_COMPLETE == type_ids_msgs_lost.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_msgs_lost.type_identifier2()._d() && - (EK_COMPLETE == type_ids_msgs_lost.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msgs_lost.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_msgs_lost.type_identifier2()._d() && - (EK_COMPLETE == type_ids_msgs_lost.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msgs_lost.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_msgs_lost = TypeObjectUtils::build_common_struct_member(member_id_msgs_lost, - member_flags_msgs_lost, type_ids_msgs_lost.type_identifier2()); - } - else + bool common_msgs_lost_ec {false}; + CommonStructMember common_msgs_lost {TypeObjectUtils::build_common_struct_member(member_id_msgs_lost, member_flags_msgs_lost, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_msgs_lost, common_msgs_lost_ec))}; + if (!common_msgs_lost_ec) { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure msgs_lost member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure msgs_lost member TypeIdentifier inconsistent."); return; } MemberName name_msgs_lost = "msgs_lost"; @@ -218,50 +142,12 @@ void register_DdsTopicData_type_identifier( } StructMemberFlag member_flags_msgs_received = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_msgs_received; MemberId member_id_msgs_received = 0x00000002; - if (EK_COMPLETE == type_ids_msgs_received.type_identifier1()._d() || TK_NONE == type_ids_msgs_received.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_msgs_received.type_identifier1()._d() && - EK_COMPLETE == type_ids_msgs_received.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_msgs_received.type_identifier1()._d() && - EK_COMPLETE == type_ids_msgs_received.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_msgs_received.type_identifier1()._d() && - EK_COMPLETE == type_ids_msgs_received.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_msgs_received.type_identifier1()._d() && - EK_COMPLETE == type_ids_msgs_received.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_msgs_received.type_identifier1()._d() && - (EK_COMPLETE == type_ids_msgs_received.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msgs_received.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_msgs_received.type_identifier1()._d() && - (EK_COMPLETE == type_ids_msgs_received.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msgs_received.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - common_msgs_received = TypeObjectUtils::build_common_struct_member(member_id_msgs_received, - member_flags_msgs_received, type_ids_msgs_received.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_msgs_received.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_msgs_received.type_identifier2()._d() && - EK_COMPLETE == type_ids_msgs_received.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_msgs_received.type_identifier2()._d() && - EK_COMPLETE == type_ids_msgs_received.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_msgs_received.type_identifier2()._d() && - EK_COMPLETE == type_ids_msgs_received.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_msgs_received.type_identifier2()._d() && - EK_COMPLETE == type_ids_msgs_received.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_msgs_received.type_identifier2()._d() && - (EK_COMPLETE == type_ids_msgs_received.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msgs_received.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_msgs_received.type_identifier2()._d() && - (EK_COMPLETE == type_ids_msgs_received.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msgs_received.type_identifier2().map_ldefn().key_identifier()->_d()))) + bool common_msgs_received_ec {false}; + CommonStructMember common_msgs_received {TypeObjectUtils::build_common_struct_member(member_id_msgs_received, member_flags_msgs_received, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_msgs_received, common_msgs_received_ec))}; + if (!common_msgs_received_ec) { - common_msgs_received = TypeObjectUtils::build_common_struct_member(member_id_msgs_received, - member_flags_msgs_received, type_ids_msgs_received.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure msgs_received member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure msgs_received member TypeIdentifier inconsistent."); return; } MemberName name_msgs_received = "msgs_received"; @@ -286,50 +172,12 @@ void register_DdsTopicData_type_identifier( } StructMemberFlag member_flags_msg_rx_rate = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_msg_rx_rate; MemberId member_id_msg_rx_rate = 0x00000003; - if (EK_COMPLETE == type_ids_msg_rx_rate.type_identifier1()._d() || TK_NONE == type_ids_msg_rx_rate.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_msg_rx_rate.type_identifier1()._d() && - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_msg_rx_rate.type_identifier1()._d() && - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_msg_rx_rate.type_identifier1()._d() && - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_msg_rx_rate.type_identifier1()._d() && - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_msg_rx_rate.type_identifier1()._d() && - (EK_COMPLETE == type_ids_msg_rx_rate.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_msg_rx_rate.type_identifier1()._d() && - (EK_COMPLETE == type_ids_msg_rx_rate.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - common_msg_rx_rate = TypeObjectUtils::build_common_struct_member(member_id_msg_rx_rate, - member_flags_msg_rx_rate, type_ids_msg_rx_rate.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_msg_rx_rate.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_msg_rx_rate.type_identifier2()._d() && - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_msg_rx_rate.type_identifier2()._d() && - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_msg_rx_rate.type_identifier2()._d() && - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_msg_rx_rate.type_identifier2()._d() && - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_msg_rx_rate.type_identifier2()._d() && - (EK_COMPLETE == type_ids_msg_rx_rate.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_msg_rx_rate.type_identifier2()._d() && - (EK_COMPLETE == type_ids_msg_rx_rate.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_msg_rx_rate.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_msg_rx_rate = TypeObjectUtils::build_common_struct_member(member_id_msg_rx_rate, - member_flags_msg_rx_rate, type_ids_msg_rx_rate.type_identifier2()); - } - else + bool common_msg_rx_rate_ec {false}; + CommonStructMember common_msg_rx_rate {TypeObjectUtils::build_common_struct_member(member_id_msg_rx_rate, member_flags_msg_rx_rate, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_msg_rx_rate, common_msg_rx_rate_ec))}; + if (!common_msg_rx_rate_ec) { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure msg_rx_rate member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure msg_rx_rate member TypeIdentifier inconsistent."); return; } MemberName name_msg_rx_rate = "msg_rx_rate"; @@ -392,50 +240,12 @@ void register_DdsTopic_type_identifier( } StructMemberFlag member_flags_name = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_name; MemberId member_id_name = 0x00000000; - if (EK_COMPLETE == type_ids_name.type_identifier1()._d() || TK_NONE == type_ids_name.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_name.type_identifier1()._d() && - EK_COMPLETE == type_ids_name.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_name.type_identifier1()._d() && - EK_COMPLETE == type_ids_name.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_name.type_identifier1()._d() && - EK_COMPLETE == type_ids_name.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_name.type_identifier1()._d() && - EK_COMPLETE == type_ids_name.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_name.type_identifier1()._d() && - (EK_COMPLETE == type_ids_name.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_name.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_name.type_identifier1()._d() && - (EK_COMPLETE == type_ids_name.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_name.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - common_name = TypeObjectUtils::build_common_struct_member(member_id_name, - member_flags_name, type_ids_name.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_name.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_name.type_identifier2()._d() && - EK_COMPLETE == type_ids_name.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_name.type_identifier2()._d() && - EK_COMPLETE == type_ids_name.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_name.type_identifier2()._d() && - EK_COMPLETE == type_ids_name.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_name.type_identifier2()._d() && - EK_COMPLETE == type_ids_name.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_name.type_identifier2()._d() && - (EK_COMPLETE == type_ids_name.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_name.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_name.type_identifier2()._d() && - (EK_COMPLETE == type_ids_name.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_name.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_name = TypeObjectUtils::build_common_struct_member(member_id_name, - member_flags_name, type_ids_name.type_identifier2()); - } - else + bool common_name_ec {false}; + CommonStructMember common_name {TypeObjectUtils::build_common_struct_member(member_id_name, member_flags_name, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_name, common_name_ec))}; + if (!common_name_ec) { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure name member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure name member TypeIdentifier inconsistent."); return; } MemberName name_name = "name"; @@ -468,50 +278,12 @@ void register_DdsTopic_type_identifier( } StructMemberFlag member_flags_type_name = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_type_name; MemberId member_id_type_name = 0x00000001; - if (EK_COMPLETE == type_ids_type_name.type_identifier1()._d() || TK_NONE == type_ids_type_name.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_type_name.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_name.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_type_name.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_name.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_type_name.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_name.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_type_name.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_name.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_type_name.type_identifier1()._d() && - (EK_COMPLETE == type_ids_type_name.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_name.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_type_name.type_identifier1()._d() && - (EK_COMPLETE == type_ids_type_name.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_name.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - common_type_name = TypeObjectUtils::build_common_struct_member(member_id_type_name, - member_flags_type_name, type_ids_type_name.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_type_name.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_type_name.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_name.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_type_name.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_name.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_type_name.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_name.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_type_name.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_name.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_type_name.type_identifier2()._d() && - (EK_COMPLETE == type_ids_type_name.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_name.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_type_name.type_identifier2()._d() && - (EK_COMPLETE == type_ids_type_name.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_name.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_type_name = TypeObjectUtils::build_common_struct_member(member_id_type_name, - member_flags_type_name, type_ids_type_name.type_identifier2()); - } - else + bool common_type_name_ec {false}; + CommonStructMember common_type_name {TypeObjectUtils::build_common_struct_member(member_id_type_name, member_flags_type_name, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_type_name, common_type_name_ec))}; + if (!common_type_name_ec) { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure type_name member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure type_name member TypeIdentifier inconsistent."); return; } MemberName name_type_name = "type_name"; @@ -536,50 +308,12 @@ void register_DdsTopic_type_identifier( } StructMemberFlag member_flags_type_discovered = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_type_discovered; MemberId member_id_type_discovered = 0x00000002; - if (EK_COMPLETE == type_ids_type_discovered.type_identifier1()._d() || TK_NONE == type_ids_type_discovered.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_type_discovered.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_discovered.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_type_discovered.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_discovered.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_type_discovered.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_discovered.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_type_discovered.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_discovered.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_type_discovered.type_identifier1()._d() && - (EK_COMPLETE == type_ids_type_discovered.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_discovered.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_type_discovered.type_identifier1()._d() && - (EK_COMPLETE == type_ids_type_discovered.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_discovered.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - common_type_discovered = TypeObjectUtils::build_common_struct_member(member_id_type_discovered, - member_flags_type_discovered, type_ids_type_discovered.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_type_discovered.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_type_discovered.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_discovered.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_type_discovered.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_discovered.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_type_discovered.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_discovered.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_type_discovered.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_discovered.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_type_discovered.type_identifier2()._d() && - (EK_COMPLETE == type_ids_type_discovered.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_discovered.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_type_discovered.type_identifier2()._d() && - (EK_COMPLETE == type_ids_type_discovered.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_discovered.type_identifier2().map_ldefn().key_identifier()->_d()))) + bool common_type_discovered_ec {false}; + CommonStructMember common_type_discovered {TypeObjectUtils::build_common_struct_member(member_id_type_discovered, member_flags_type_discovered, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_type_discovered, common_type_discovered_ec))}; + if (!common_type_discovered_ec) { - common_type_discovered = TypeObjectUtils::build_common_struct_member(member_id_type_discovered, - member_flags_type_discovered, type_ids_type_discovered.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure type_discovered member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure type_discovered member TypeIdentifier inconsistent."); return; } MemberName name_type_discovered = "type_discovered"; @@ -604,50 +338,12 @@ void register_DdsTopic_type_identifier( } StructMemberFlag member_flags_type_mismatch = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_type_mismatch; MemberId member_id_type_mismatch = 0x00000003; - if (EK_COMPLETE == type_ids_type_mismatch.type_identifier1()._d() || TK_NONE == type_ids_type_mismatch.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_type_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_type_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_type_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_type_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_type_mismatch.type_identifier1()._d() && - (EK_COMPLETE == type_ids_type_mismatch.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_type_mismatch.type_identifier1()._d() && - (EK_COMPLETE == type_ids_type_mismatch.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_mismatch.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - common_type_mismatch = TypeObjectUtils::build_common_struct_member(member_id_type_mismatch, - member_flags_type_mismatch, type_ids_type_mismatch.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_type_mismatch.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_type_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_type_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_type_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_type_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_type_mismatch.type_identifier2()._d() && - (EK_COMPLETE == type_ids_type_mismatch.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_type_mismatch.type_identifier2()._d() && - (EK_COMPLETE == type_ids_type_mismatch.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_type_mismatch.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_type_mismatch = TypeObjectUtils::build_common_struct_member(member_id_type_mismatch, - member_flags_type_mismatch, type_ids_type_mismatch.type_identifier2()); - } - else + bool common_type_mismatch_ec {false}; + CommonStructMember common_type_mismatch {TypeObjectUtils::build_common_struct_member(member_id_type_mismatch, member_flags_type_mismatch, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_type_mismatch, common_type_mismatch_ec))}; + if (!common_type_mismatch_ec) { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure type_mismatch member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure type_mismatch member TypeIdentifier inconsistent."); return; } MemberName name_type_mismatch = "type_mismatch"; @@ -672,50 +368,12 @@ void register_DdsTopic_type_identifier( } StructMemberFlag member_flags_qos_mismatch = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_qos_mismatch; MemberId member_id_qos_mismatch = 0x00000004; - if (EK_COMPLETE == type_ids_qos_mismatch.type_identifier1()._d() || TK_NONE == type_ids_qos_mismatch.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_qos_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_qos_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_qos_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_qos_mismatch.type_identifier1()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_qos_mismatch.type_identifier1()._d() && - (EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_qos_mismatch.type_identifier1()._d() && - (EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_qos_mismatch.type_identifier1().map_ldefn().key_identifier()->_d()))) + bool common_qos_mismatch_ec {false}; + CommonStructMember common_qos_mismatch {TypeObjectUtils::build_common_struct_member(member_id_qos_mismatch, member_flags_qos_mismatch, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_qos_mismatch, common_qos_mismatch_ec))}; + if (!common_qos_mismatch_ec) { - common_qos_mismatch = TypeObjectUtils::build_common_struct_member(member_id_qos_mismatch, - member_flags_qos_mismatch, type_ids_qos_mismatch.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_qos_mismatch.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_qos_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_qos_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_qos_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_qos_mismatch.type_identifier2()._d() && - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_qos_mismatch.type_identifier2()._d() && - (EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_qos_mismatch.type_identifier2()._d() && - (EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_qos_mismatch.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_qos_mismatch = TypeObjectUtils::build_common_struct_member(member_id_qos_mismatch, - member_flags_qos_mismatch, type_ids_qos_mismatch.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure qos_mismatch member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure qos_mismatch member TypeIdentifier inconsistent."); return; } MemberName name_qos_mismatch = "qos_mismatch"; @@ -742,47 +400,11 @@ void register_DdsTopic_type_identifier( { ::register_DdsTopicData_type_identifier(type_ids_data); } - TypeIdentifier* element_identifier_anonymous_sequence_DdsTopicData_unbounded {nullptr}; - if (EK_COMPLETE == type_ids_data.type_identifier1()._d() || TK_NONE == type_ids_data.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_data.type_identifier1()._d() && - EK_COMPLETE == type_ids_data.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_data.type_identifier1()._d() && - EK_COMPLETE == type_ids_data.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_data.type_identifier1()._d() && - EK_COMPLETE == type_ids_data.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_data.type_identifier1()._d() && - EK_COMPLETE == type_ids_data.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_data.type_identifier1()._d() && - (EK_COMPLETE == type_ids_data.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_data.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_data.type_identifier1()._d() && - (EK_COMPLETE == type_ids_data.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_data.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - element_identifier_anonymous_sequence_DdsTopicData_unbounded = new TypeIdentifier(type_ids_data.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_data.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_data.type_identifier2()._d() && - EK_COMPLETE == type_ids_data.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_data.type_identifier2()._d() && - EK_COMPLETE == type_ids_data.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_data.type_identifier2()._d() && - EK_COMPLETE == type_ids_data.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_data.type_identifier2()._d() && - EK_COMPLETE == type_ids_data.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_data.type_identifier2()._d() && - (EK_COMPLETE == type_ids_data.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_data.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_data.type_identifier2()._d() && - (EK_COMPLETE == type_ids_data.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_data.type_identifier2().map_ldefn().key_identifier()->_d()))) + bool element_identifier_anonymous_sequence_DdsTopicData_unbounded_ec {false}; + TypeIdentifier* element_identifier_anonymous_sequence_DdsTopicData_unbounded {new TypeIdentifier(TypeObjectUtils::retrieve_complete_type_identifier(type_ids_data, element_identifier_anonymous_sequence_DdsTopicData_unbounded_ec))}; + if (!element_identifier_anonymous_sequence_DdsTopicData_unbounded_ec) { - element_identifier_anonymous_sequence_DdsTopicData_unbounded = new TypeIdentifier(type_ids_data.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Sequence element TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Sequence element TypeIdentifier inconsistent."); return; } EquivalenceKind equiv_kind_anonymous_sequence_DdsTopicData_unbounded = EK_COMPLETE; @@ -806,50 +428,12 @@ void register_DdsTopic_type_identifier( } StructMemberFlag member_flags_data = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_data; MemberId member_id_data = 0x00000005; - if (EK_COMPLETE == type_ids_data.type_identifier1()._d() || TK_NONE == type_ids_data.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_data.type_identifier1()._d() && - EK_COMPLETE == type_ids_data.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_data.type_identifier1()._d() && - EK_COMPLETE == type_ids_data.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_data.type_identifier1()._d() && - EK_COMPLETE == type_ids_data.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_data.type_identifier1()._d() && - EK_COMPLETE == type_ids_data.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_data.type_identifier1()._d() && - (EK_COMPLETE == type_ids_data.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_data.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_data.type_identifier1()._d() && - (EK_COMPLETE == type_ids_data.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_data.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - common_data = TypeObjectUtils::build_common_struct_member(member_id_data, - member_flags_data, type_ids_data.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_data.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_data.type_identifier2()._d() && - EK_COMPLETE == type_ids_data.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_data.type_identifier2()._d() && - EK_COMPLETE == type_ids_data.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_data.type_identifier2()._d() && - EK_COMPLETE == type_ids_data.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_data.type_identifier2()._d() && - EK_COMPLETE == type_ids_data.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_data.type_identifier2()._d() && - (EK_COMPLETE == type_ids_data.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_data.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_data.type_identifier2()._d() && - (EK_COMPLETE == type_ids_data.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_data.type_identifier2().map_ldefn().key_identifier()->_d()))) - { - common_data = TypeObjectUtils::build_common_struct_member(member_id_data, - member_flags_data, type_ids_data.type_identifier2()); - } - else + bool common_data_ec {false}; + CommonStructMember common_data {TypeObjectUtils::build_common_struct_member(member_id_data, member_flags_data, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_data, common_data_ec))}; + if (!common_data_ec) { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure data member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure data member TypeIdentifier inconsistent."); return; } MemberName name_data = "data"; @@ -906,47 +490,11 @@ void register_MonitoringTopics_type_identifier( { ::register_DdsTopic_type_identifier(type_ids_topics); } - TypeIdentifier* element_identifier_anonymous_sequence_DdsTopic_unbounded {nullptr}; - if (EK_COMPLETE == type_ids_topics.type_identifier1()._d() || TK_NONE == type_ids_topics.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_topics.type_identifier1()._d() && - EK_COMPLETE == type_ids_topics.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_topics.type_identifier1()._d() && - EK_COMPLETE == type_ids_topics.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_topics.type_identifier1()._d() && - EK_COMPLETE == type_ids_topics.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_topics.type_identifier1()._d() && - EK_COMPLETE == type_ids_topics.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_topics.type_identifier1()._d() && - (EK_COMPLETE == type_ids_topics.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_topics.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_topics.type_identifier1()._d() && - (EK_COMPLETE == type_ids_topics.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_topics.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - element_identifier_anonymous_sequence_DdsTopic_unbounded = new TypeIdentifier(type_ids_topics.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_topics.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_topics.type_identifier2()._d() && - EK_COMPLETE == type_ids_topics.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_topics.type_identifier2()._d() && - EK_COMPLETE == type_ids_topics.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_topics.type_identifier2()._d() && - EK_COMPLETE == type_ids_topics.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_topics.type_identifier2()._d() && - EK_COMPLETE == type_ids_topics.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_topics.type_identifier2()._d() && - (EK_COMPLETE == type_ids_topics.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_topics.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_topics.type_identifier2()._d() && - (EK_COMPLETE == type_ids_topics.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_topics.type_identifier2().map_ldefn().key_identifier()->_d()))) + bool element_identifier_anonymous_sequence_DdsTopic_unbounded_ec {false}; + TypeIdentifier* element_identifier_anonymous_sequence_DdsTopic_unbounded {new TypeIdentifier(TypeObjectUtils::retrieve_complete_type_identifier(type_ids_topics, element_identifier_anonymous_sequence_DdsTopic_unbounded_ec))}; + if (!element_identifier_anonymous_sequence_DdsTopic_unbounded_ec) { - element_identifier_anonymous_sequence_DdsTopic_unbounded = new TypeIdentifier(type_ids_topics.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Sequence element TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Sequence element TypeIdentifier inconsistent."); return; } EquivalenceKind equiv_kind_anonymous_sequence_DdsTopic_unbounded = EK_COMPLETE; @@ -970,50 +518,12 @@ void register_MonitoringTopics_type_identifier( } StructMemberFlag member_flags_topics = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED, false, false, false, false); - CommonStructMember common_topics; MemberId member_id_topics = 0x00000000; - if (EK_COMPLETE == type_ids_topics.type_identifier1()._d() || TK_NONE == type_ids_topics.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_topics.type_identifier1()._d() && - EK_COMPLETE == type_ids_topics.type_identifier1().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_topics.type_identifier1()._d() && - EK_COMPLETE == type_ids_topics.type_identifier1().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_topics.type_identifier1()._d() && - EK_COMPLETE == type_ids_topics.type_identifier1().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_topics.type_identifier1()._d() && - EK_COMPLETE == type_ids_topics.type_identifier1().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_topics.type_identifier1()._d() && - (EK_COMPLETE == type_ids_topics.type_identifier1().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_topics.type_identifier1().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_topics.type_identifier1()._d() && - (EK_COMPLETE == type_ids_topics.type_identifier1().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_topics.type_identifier1().map_ldefn().key_identifier()->_d()))) - { - common_topics = TypeObjectUtils::build_common_struct_member(member_id_topics, - member_flags_topics, type_ids_topics.type_identifier1()); - } - else if (EK_COMPLETE == type_ids_topics.type_identifier2()._d() || - (TI_PLAIN_SEQUENCE_SMALL == type_ids_topics.type_identifier2()._d() && - EK_COMPLETE == type_ids_topics.type_identifier2().seq_sdefn().header().equiv_kind()) || - (TI_PLAIN_SEQUENCE_LARGE == type_ids_topics.type_identifier2()._d() && - EK_COMPLETE == type_ids_topics.type_identifier2().seq_ldefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_SMALL == type_ids_topics.type_identifier2()._d() && - EK_COMPLETE == type_ids_topics.type_identifier2().array_sdefn().header().equiv_kind()) || - (TI_PLAIN_ARRAY_LARGE == type_ids_topics.type_identifier2()._d() && - EK_COMPLETE == type_ids_topics.type_identifier2().array_ldefn().header().equiv_kind()) || - (TI_PLAIN_MAP_SMALL == type_ids_topics.type_identifier2()._d() && - (EK_COMPLETE == type_ids_topics.type_identifier2().map_sdefn().header().equiv_kind() || - EK_COMPLETE == type_ids_topics.type_identifier2().map_sdefn().key_identifier()->_d())) || - (TI_PLAIN_MAP_LARGE == type_ids_topics.type_identifier2()._d() && - (EK_COMPLETE == type_ids_topics.type_identifier2().map_ldefn().header().equiv_kind() || - EK_COMPLETE == type_ids_topics.type_identifier2().map_ldefn().key_identifier()->_d()))) + bool common_topics_ec {false}; + CommonStructMember common_topics {TypeObjectUtils::build_common_struct_member(member_id_topics, member_flags_topics, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_topics, common_topics_ec))}; + if (!common_topics_ec) { - common_topics = TypeObjectUtils::build_common_struct_member(member_id_topics, - member_flags_topics, type_ids_topics.type_identifier2()); - } - else - { - EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, - "Structure topics member TypeIdentifier inconsistent."); + EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure topics member TypeIdentifier inconsistent."); return; } MemberName name_topics = "topics"; diff --git a/ddspipe_core/src/cpp/types/topic/dds/DdsTopic.cpp b/ddspipe_core/src/cpp/types/topic/dds/DdsTopic.cpp index 346e4d18..42741d1c 100644 --- a/ddspipe_core/src/cpp/types/topic/dds/DdsTopic.cpp +++ b/ddspipe_core/src/cpp/types/topic/dds/DdsTopic.cpp @@ -111,6 +111,12 @@ bool DdsTopic::is_valid_dds_topic( return true; } +void DdsTopic::set_type_ids( + const fastdds::dds::xtypes::TypeIdentifierPair& _type_ids) noexcept +{ + type_ids = _type_ids; +} + ///////////////////////// // OPERATORS ///////////////////////// diff --git a/ddspipe_core/test/unittest/types/endpoint/GuidTest.cpp b/ddspipe_core/test/unittest/types/endpoint/GuidTest.cpp index 09b91d5f..28bf7a2f 100644 --- a/ddspipe_core/test/unittest/types/endpoint/GuidTest.cpp +++ b/ddspipe_core/test/unittest/types/endpoint/GuidTest.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include diff --git a/ddspipe_participants/include/ddspipe_participants/participant/rtps/CommonParticipant.hpp b/ddspipe_participants/include/ddspipe_participants/participant/rtps/CommonParticipant.hpp index f39d0332..27829bd9 100644 --- a/ddspipe_participants/include/ddspipe_participants/participant/rtps/CommonParticipant.hpp +++ b/ddspipe_participants/include/ddspipe_participants/participant/rtps/CommonParticipant.hpp @@ -20,9 +20,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/ddspipe_participants/include/ddspipe_participants/reader/rtps/CommonReader.hpp b/ddspipe_participants/include/ddspipe_participants/reader/rtps/CommonReader.hpp index f2ffd66d..87192d2d 100644 --- a/ddspipe_participants/include/ddspipe_participants/reader/rtps/CommonReader.hpp +++ b/ddspipe_participants/include/ddspipe_participants/reader/rtps/CommonReader.hpp @@ -20,13 +20,13 @@ #include #include -#include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -198,7 +198,7 @@ class CommonReader : public BaseReader, public fastrtps::rtps::ReaderListener const fastrtps::rtps::HistoryAttributes& history_attributes, const fastrtps::rtps::ReaderAttributes& reader_attributes, const fastrtps::TopicAttributes& topic_attributes, - const fastrtps::ReaderQos& reader_qos); + const fastdds::dds::ReaderQos& reader_qos); // Specific enable/disable do not need to be implemented @@ -210,7 +210,7 @@ class CommonReader : public BaseReader, public fastrtps::rtps::ReaderListener const fastrtps::rtps::HistoryAttributes& history_attributes, const fastrtps::rtps::ReaderAttributes& reader_attributes, const fastrtps::TopicAttributes& topic_attributes, - const fastrtps::ReaderQos& reader_qos); + const fastdds::dds::ReaderQos& reader_qos); /** * @brief Return an allocated object @@ -275,7 +275,7 @@ class CommonReader : public BaseReader, public fastrtps::rtps::ReaderListener const core::types::DdsTopic& topic) noexcept; //! Reader QoS to create RTPS Reader - static fastrtps::ReaderQos reckon_reader_qos_( + static fastdds::dds::ReaderQos reckon_reader_qos_( const core::types::DdsTopic& topic) noexcept; ///// @@ -326,7 +326,7 @@ class CommonReader : public BaseReader, public fastrtps::rtps::ReaderListener fastrtps::TopicAttributes topic_attributes_; //! Reader QoS to create the internal RTPS Reader. - fastrtps::ReaderQos reader_qos_; + fastdds::dds::ReaderQos reader_qos_; }; } /* namespace rtps */ diff --git a/ddspipe_participants/include/ddspipe_participants/types/dds/TopicDataType.hpp b/ddspipe_participants/include/ddspipe_participants/types/dds/TopicDataType.hpp index 92515f96..553112fe 100644 --- a/ddspipe_participants/include/ddspipe_participants/types/dds/TopicDataType.hpp +++ b/ddspipe_participants/include/ddspipe_participants/types/dds/TopicDataType.hpp @@ -15,6 +15,8 @@ #pragma once #include +#include +#include #include #include @@ -38,7 +40,8 @@ class TopicDataType : public eprosima::fastdds::dds::TopicDataType TopicDataType( const std::string& type_name, const bool keyed, - const std::shared_ptr& payload_pool); + const std::shared_ptr& payload_pool, + const fastdds::dds::xtypes::TypeIdentifierPair& type_ids); //! Default destructor DDSPIPE_PARTICIPANTS_DllAPI diff --git a/ddspipe_participants/include/ddspipe_participants/utils/utils.hpp b/ddspipe_participants/include/ddspipe_participants/utils/utils.hpp index 83242e28..b33fd5d4 100644 --- a/ddspipe_participants/include/ddspipe_participants/utils/utils.hpp +++ b/ddspipe_participants/include/ddspipe_participants/utils/utils.hpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff --git a/ddspipe_participants/include/ddspipe_participants/writer/rpc/SimpleWriter.hpp b/ddspipe_participants/include/ddspipe_participants/writer/rpc/SimpleWriter.hpp index 12d607d3..c701021b 100644 --- a/ddspipe_participants/include/ddspipe_participants/writer/rpc/SimpleWriter.hpp +++ b/ddspipe_participants/include/ddspipe_participants/writer/rpc/SimpleWriter.hpp @@ -15,12 +15,12 @@ #pragma once #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/ddspipe_participants/include/ddspipe_participants/writer/rtps/CommonWriter.hpp b/ddspipe_participants/include/ddspipe_participants/writer/rtps/CommonWriter.hpp index 7f1cd625..a0bc1a46 100644 --- a/ddspipe_participants/include/ddspipe_participants/writer/rtps/CommonWriter.hpp +++ b/ddspipe_participants/include/ddspipe_participants/writer/rtps/CommonWriter.hpp @@ -19,11 +19,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -161,7 +161,7 @@ class CommonWriter : public BaseWriter, public fastrtps::rtps::WriterListener const fastrtps::rtps::HistoryAttributes& history_attributes, const fastrtps::rtps::WriterAttributes& writer_attributes, const fastrtps::TopicAttributes& topic_attributes, - const fastrtps::WriterQos& writer_qos, + const fastdds::dds::WriterQos& writer_qos, const utils::PoolConfiguration& pool_configuration); // Specific enable/disable do not need to be implemented @@ -224,7 +224,7 @@ class CommonWriter : public BaseWriter, public fastrtps::rtps::WriterListener const fastrtps::rtps::HistoryAttributes& history_attributes, const fastrtps::rtps::WriterAttributes& writer_attributes, const fastrtps::TopicAttributes& topic_attributes, - const fastrtps::WriterQos& writer_qos, + const fastdds::dds::WriterQos& writer_qos, const utils::PoolConfiguration& pool_configuration); /** @@ -244,7 +244,7 @@ class CommonWriter : public BaseWriter, public fastrtps::rtps::WriterListener const core::types::DdsTopic& topic) noexcept; //! QoS for RTPS Writer - static fastrtps::WriterQos reckon_writer_qos_( + static fastdds::dds::WriterQos reckon_writer_qos_( const core::types::DdsTopic& topic) noexcept; //! Cache Change Pool Configuration @@ -290,7 +290,7 @@ class CommonWriter : public BaseWriter, public fastrtps::rtps::WriterListener fastrtps::TopicAttributes topic_attributes_; //! Writer QoS to create the internal RTPS Writer. - fastrtps::WriterQos writer_qos_; + fastdds::dds::WriterQos writer_qos_; //! Pool Configuration to create the internal History. utils::PoolConfiguration pool_configuration_; diff --git a/ddspipe_participants/include/ddspipe_participants/writer/rtps/QoSSpecificWriter.hpp b/ddspipe_participants/include/ddspipe_participants/writer/rtps/QoSSpecificWriter.hpp index ea74d4eb..7befb817 100644 --- a/ddspipe_participants/include/ddspipe_participants/writer/rtps/QoSSpecificWriter.hpp +++ b/ddspipe_participants/include/ddspipe_participants/writer/rtps/QoSSpecificWriter.hpp @@ -55,7 +55,7 @@ class QoSSpecificWriter : public CommonWriter protected: //! Specific writer QoS to override (more or less) the CommonWriter qos - static fastrtps::WriterQos reckon_writer_qos_( + static fastdds::dds::WriterQos reckon_writer_qos_( const core::types::SpecificEndpointQoS& specific_qos, const core::types::DdsTopic& topic) noexcept; diff --git a/ddspipe_participants/include/ddspipe_participants/writer/rtps/SimpleWriter.hpp b/ddspipe_participants/include/ddspipe_participants/writer/rtps/SimpleWriter.hpp index 3d7997a6..b23741d2 100644 --- a/ddspipe_participants/include/ddspipe_participants/writer/rtps/SimpleWriter.hpp +++ b/ddspipe_participants/include/ddspipe_participants/writer/rtps/SimpleWriter.hpp @@ -15,12 +15,12 @@ #pragma once #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/ddspipe_participants/src/cpp/participant/dds/CommonParticipant.cpp b/ddspipe_participants/src/cpp/participant/dds/CommonParticipant.cpp index 261c6484..e941ca29 100644 --- a/ddspipe_participants/src/cpp/participant/dds/CommonParticipant.cpp +++ b/ddspipe_participants/src/cpp/participant/dds/CommonParticipant.cpp @@ -409,7 +409,8 @@ fastdds::dds::Topic* CommonParticipant::topic_related_( new TopicDataType( topic.type_name, topic.topic_qos.keyed, - payload_pool_)) + payload_pool_, + topic.type_ids)) ); } diff --git a/ddspipe_participants/src/cpp/participant/dds/XmlParticipant.cpp b/ddspipe_participants/src/cpp/participant/dds/XmlParticipant.cpp index 02bb20c0..c5547c1c 100644 --- a/ddspipe_participants/src/cpp/participant/dds/XmlParticipant.cpp +++ b/ddspipe_participants/src/cpp/participant/dds/XmlParticipant.cpp @@ -41,16 +41,16 @@ XmlParticipant::XmlParticipant( : CommonParticipant(participant_configuration, payload_pool, discovery_database) , xml_specific_configuration_(*reinterpret_cast(configuration_.get())) { - // if (xml_specific_configuration_.participant_profile.is_set()) - // { - // fastdds::dds::DomainParticipantExtendedQos extended_qos; - // if (fastdds::dds::RETCODE_OK == fastdds::dds::DomainParticipantFactory::get_instance()->get_participant_extended_qos_from_profile( - // xml_specific_configuration_.participant_profile.get_value(), - // extended_qos)) - // { - // configuration_->domain = extended_qos.domainId(); - // } - // } + if (xml_specific_configuration_.participant_profile.is_set()) + { + fastdds::dds::DomainParticipantExtendedQos extended_qos; + if (fastdds::dds::RETCODE_OK == fastdds::dds::DomainParticipantFactory::get_instance()->get_participant_extended_qos_from_profile( + xml_specific_configuration_.participant_profile.get_value(), + extended_qos)) + { + configuration_->domain = extended_qos.domainId(); + } + } } std::shared_ptr XmlParticipant::create_writer( diff --git a/ddspipe_participants/src/cpp/participant/dynamic_types/DynTypesParticipant.cpp b/ddspipe_participants/src/cpp/participant/dynamic_types/DynTypesParticipant.cpp index 43ed329f..1e4d3bcc 100644 --- a/ddspipe_participants/src/cpp/participant/dynamic_types/DynTypesParticipant.cpp +++ b/ddspipe_participants/src/cpp/participant/dynamic_types/DynTypesParticipant.cpp @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/participant/rtps/CommonParticipant.cpp b/ddspipe_participants/src/cpp/participant/rtps/CommonParticipant.cpp index 46adae8f..13ee2425 100644 --- a/ddspipe_participants/src/cpp/participant/rtps/CommonParticipant.cpp +++ b/ddspipe_participants/src/cpp/participant/rtps/CommonParticipant.cpp @@ -19,8 +19,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/participant/rtps/SimpleParticipant.cpp b/ddspipe_participants/src/cpp/participant/rtps/SimpleParticipant.cpp index 12c42db1..d13e56aa 100644 --- a/ddspipe_participants/src/cpp/participant/rtps/SimpleParticipant.cpp +++ b/ddspipe_participants/src/cpp/participant/rtps/SimpleParticipant.cpp @@ -14,8 +14,8 @@ #include -#include -#include +#include +#include #include #include #include diff --git a/ddspipe_participants/src/cpp/reader/dds/CommonReader.cpp b/ddspipe_participants/src/cpp/reader/dds/CommonReader.cpp index ab0b394b..fb7d6b54 100644 --- a/ddspipe_participants/src/cpp/reader/dds/CommonReader.cpp +++ b/ddspipe_participants/src/cpp/reader/dds/CommonReader.cpp @@ -181,9 +181,10 @@ utils::ReturnCode CommonReader::take_nts_( // If the payload owner is not set, rtps_data won't release the payload on destruction rtps_data->payload_owner = payload_pool_.get(); - if (!ret) + if (ret != fastdds::dds::RETCODE_OK) { // There has been an error taking the data. Exit. + data.reset(rtps_data.release()); return ret; } } while (!should_accept_sample_(info)); diff --git a/ddspipe_participants/src/cpp/reader/dds/SimpleReader.cpp b/ddspipe_participants/src/cpp/reader/dds/SimpleReader.cpp index 6d3327af..942297aa 100644 --- a/ddspipe_participants/src/cpp/reader/dds/SimpleReader.cpp +++ b/ddspipe_participants/src/cpp/reader/dds/SimpleReader.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/reader/dds/SpecificQoSReader.cpp b/ddspipe_participants/src/cpp/reader/dds/SpecificQoSReader.cpp index 85aafba1..0257aba9 100644 --- a/ddspipe_participants/src/cpp/reader/dds/SpecificQoSReader.cpp +++ b/ddspipe_participants/src/cpp/reader/dds/SpecificQoSReader.cpp @@ -13,8 +13,8 @@ // limitations under the License. -#include -#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/reader/rpc/SimpleReader.cpp b/ddspipe_participants/src/cpp/reader/rpc/SimpleReader.cpp index 77243822..6d9423bd 100644 --- a/ddspipe_participants/src/cpp/reader/rpc/SimpleReader.cpp +++ b/ddspipe_participants/src/cpp/reader/rpc/SimpleReader.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/reader/rtps/CommonReader.cpp b/ddspipe_participants/src/cpp/reader/rtps/CommonReader.cpp index c3c59dc4..c553e5ee 100644 --- a/ddspipe_participants/src/cpp/reader/rtps/CommonReader.cpp +++ b/ddspipe_participants/src/cpp/reader/rtps/CommonReader.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include +#include +#include #include @@ -43,7 +43,7 @@ CommonReader::CommonReader( const fastrtps::rtps::HistoryAttributes& history_attributes, const fastrtps::rtps::ReaderAttributes& reader_attributes, const fastrtps::TopicAttributes& topic_attributes, - const fastrtps::ReaderQos& reader_qos) + const fastdds::dds::ReaderQos& reader_qos) : BaseReader(participant_id, topic.topic_qos.max_rx_rate, topic.topic_qos.downsampling) , rtps_participant_(rtps_participant) , payload_pool_(payload_pool) @@ -94,7 +94,7 @@ void CommonReader::internal_entities_creation_( const fastrtps::rtps::HistoryAttributes& history_attributes, const fastrtps::rtps::ReaderAttributes& reader_attributes, const fastrtps::TopicAttributes& topic_attributes, - const fastrtps::ReaderQos& reader_qos) + const fastdds::dds::ReaderQos& reader_qos) { // Copy reader attributes because fast needs it non const (do not ask why) fastrtps::rtps::ReaderAttributes non_const_reader_attributes = reader_attributes; @@ -362,10 +362,10 @@ fastrtps::TopicAttributes CommonReader::reckon_topic_attributes_( return att; } -fastrtps::ReaderQos CommonReader::reckon_reader_qos_( +fastdds::dds::ReaderQos CommonReader::reckon_reader_qos_( const core::types::DdsTopic& topic) noexcept { - fastrtps::ReaderQos properties; + fastdds::dds::ReaderQos properties; // Set Durability properties.m_durability.kind = diff --git a/ddspipe_participants/src/cpp/reader/rtps/SimpleReader.cpp b/ddspipe_participants/src/cpp/reader/rtps/SimpleReader.cpp index 5f80bdaa..d7318455 100644 --- a/ddspipe_participants/src/cpp/reader/rtps/SimpleReader.cpp +++ b/ddspipe_participants/src/cpp/reader/rtps/SimpleReader.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/reader/rtps/SpecificQoSReader.cpp b/ddspipe_participants/src/cpp/reader/rtps/SpecificQoSReader.cpp index da05dbb3..a7cd3b4f 100644 --- a/ddspipe_participants/src/cpp/reader/rtps/SpecificQoSReader.cpp +++ b/ddspipe_participants/src/cpp/reader/rtps/SpecificQoSReader.cpp @@ -13,8 +13,8 @@ // limitations under the License. -#include -#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/types/dds/TopicDataType.cpp b/ddspipe_participants/src/cpp/types/dds/TopicDataType.cpp index 81385727..16fc101d 100644 --- a/ddspipe_participants/src/cpp/types/dds/TopicDataType.cpp +++ b/ddspipe_participants/src/cpp/types/dds/TopicDataType.cpp @@ -29,7 +29,8 @@ using eprosima::ddspipe::core::types::operator <<; TopicDataType::TopicDataType( const std::string& type_name, const bool keyed, - const std::shared_ptr& payload_pool) + const std::shared_ptr& payload_pool, + const fastdds::dds::xtypes::TypeIdentifierPair& type_ids) : type_name_(type_name) , keyed_(keyed) , payload_pool_(payload_pool) @@ -37,10 +38,12 @@ TopicDataType::TopicDataType( // Set topic data m_typeSize = 4; m_isGetKeyDefined = keyed_; - auto_fill_type_information(false); // Set name setName(type_name_.c_str()); + + // Set Type Identifiers + type_identifiers_ = type_ids; } TopicDataType::~TopicDataType() diff --git a/ddspipe_participants/src/cpp/writer/dds/CommonWriter.cpp b/ddspipe_participants/src/cpp/writer/dds/CommonWriter.cpp index 14546666..37c3b481 100644 --- a/ddspipe_participants/src/cpp/writer/dds/CommonWriter.cpp +++ b/ddspipe_participants/src/cpp/writer/dds/CommonWriter.cpp @@ -13,9 +13,9 @@ // limitations under the License. -#include -#include -#include +#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/writer/dds/MultiWriter.cpp b/ddspipe_participants/src/cpp/writer/dds/MultiWriter.cpp index 497119bd..cfd0f910 100644 --- a/ddspipe_participants/src/cpp/writer/dds/MultiWriter.cpp +++ b/ddspipe_participants/src/cpp/writer/dds/MultiWriter.cpp @@ -13,9 +13,9 @@ // limitations under the License. -#include -#include -#include +#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/writer/dds/SimpleWriter.cpp b/ddspipe_participants/src/cpp/writer/dds/SimpleWriter.cpp index 59dd746a..014aca6d 100644 --- a/ddspipe_participants/src/cpp/writer/dds/SimpleWriter.cpp +++ b/ddspipe_participants/src/cpp/writer/dds/SimpleWriter.cpp @@ -13,9 +13,9 @@ // limitations under the License. -#include -#include -#include +#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/writer/rpc/SimpleWriter.cpp b/ddspipe_participants/src/cpp/writer/rpc/SimpleWriter.cpp index 4ad6c949..cfaca2f1 100644 --- a/ddspipe_participants/src/cpp/writer/rpc/SimpleWriter.cpp +++ b/ddspipe_participants/src/cpp/writer/rpc/SimpleWriter.cpp @@ -13,9 +13,9 @@ // limitations under the License. -#include -#include -#include +#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/writer/rtps/CommonWriter.cpp b/ddspipe_participants/src/cpp/writer/rtps/CommonWriter.cpp index 48c13351..d65a94e0 100644 --- a/ddspipe_participants/src/cpp/writer/rtps/CommonWriter.cpp +++ b/ddspipe_participants/src/cpp/writer/rtps/CommonWriter.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include -#include +#include +#include +#include #include @@ -47,7 +47,7 @@ CommonWriter::CommonWriter( const fastrtps::rtps::HistoryAttributes& history_attributes, const fastrtps::rtps::WriterAttributes& writer_attributes, const fastrtps::TopicAttributes& topic_attributes, - const fastrtps::WriterQos& writer_qos, + const fastdds::dds::WriterQos& writer_qos, const utils::PoolConfiguration& pool_configuration) : BaseWriter(participant_id, topic.topic_qos.max_tx_rate) , rtps_participant_(rtps_participant) @@ -262,7 +262,7 @@ void CommonWriter::internal_entities_creation_( const fastrtps::rtps::HistoryAttributes& history_attributes, const fastrtps::rtps::WriterAttributes& writer_attributes, const fastrtps::TopicAttributes& topic_attributes, - const fastrtps::WriterQos& writer_qos, + const fastdds::dds::WriterQos& writer_qos, const utils::PoolConfiguration& pool_configuration) { // Copy writer attributes because fast needs it non const (do not ask why) @@ -411,10 +411,10 @@ fastrtps::TopicAttributes CommonWriter::reckon_topic_attributes_( return att; } -fastrtps::WriterQos CommonWriter::reckon_writer_qos_( +fastdds::dds::WriterQos CommonWriter::reckon_writer_qos_( const core::types::DdsTopic& topic) noexcept { - fastrtps::WriterQos qos; + fastdds::dds::WriterQos qos; // Set Durability qos.m_durability.kind = diff --git a/ddspipe_participants/src/cpp/writer/rtps/MultiWriter.cpp b/ddspipe_participants/src/cpp/writer/rtps/MultiWriter.cpp index 0a369a4f..e3226924 100644 --- a/ddspipe_participants/src/cpp/writer/rtps/MultiWriter.cpp +++ b/ddspipe_participants/src/cpp/writer/rtps/MultiWriter.cpp @@ -13,9 +13,9 @@ // limitations under the License. -#include -#include -#include +#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/writer/rtps/QoSSpecificWriter.cpp b/ddspipe_participants/src/cpp/writer/rtps/QoSSpecificWriter.cpp index 7bfd9431..de959650 100644 --- a/ddspipe_participants/src/cpp/writer/rtps/QoSSpecificWriter.cpp +++ b/ddspipe_participants/src/cpp/writer/rtps/QoSSpecificWriter.cpp @@ -40,12 +40,12 @@ QoSSpecificWriter::QoSSpecificWriter( { } -fastrtps::WriterQos QoSSpecificWriter::reckon_writer_qos_( +fastdds::dds::WriterQos QoSSpecificWriter::reckon_writer_qos_( const SpecificEndpointQoS& specific_qos, const DdsTopic& topic) noexcept { // Get QoS from parent class - fastrtps::WriterQos qos = CommonWriter::reckon_writer_qos_(topic); + fastdds::dds::WriterQos qos = CommonWriter::reckon_writer_qos_(topic); // Set Partitions if (topic.topic_qos.has_partitions()) diff --git a/ddspipe_participants/src/cpp/writer/rtps/SimpleWriter.cpp b/ddspipe_participants/src/cpp/writer/rtps/SimpleWriter.cpp index e4953953..8cf99c39 100644 --- a/ddspipe_participants/src/cpp/writer/rtps/SimpleWriter.cpp +++ b/ddspipe_participants/src/cpp/writer/rtps/SimpleWriter.cpp @@ -13,9 +13,9 @@ // limitations under the License. -#include -#include -#include +#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/writer/rtps/filter/RepeaterDataFilter.cpp b/ddspipe_participants/src/cpp/writer/rtps/filter/RepeaterDataFilter.cpp index d95c00ff..0428db44 100644 --- a/ddspipe_participants/src/cpp/writer/rtps/filter/RepeaterDataFilter.cpp +++ b/ddspipe_participants/src/cpp/writer/rtps/filter/RepeaterDataFilter.cpp @@ -13,8 +13,8 @@ // limitations under the License. -#include -#include +#include +#include #include #include diff --git a/ddspipe_participants/src/cpp/writer/rtps/filter/SelfDataFilter.cpp b/ddspipe_participants/src/cpp/writer/rtps/filter/SelfDataFilter.cpp index 03876cc4..004e3ba3 100644 --- a/ddspipe_participants/src/cpp/writer/rtps/filter/SelfDataFilter.cpp +++ b/ddspipe_participants/src/cpp/writer/rtps/filter/SelfDataFilter.cpp @@ -13,8 +13,8 @@ // limitations under the License. -#include -#include +#include +#include #include #include