From 39f47ba1e0396573bda371fddb520f6fba862356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Poderoso?= <120394830+JesusPoderoso@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:18:22 +0100 Subject: [PATCH] Regenerate Fast DDS types due to Gen release v3.2.1 (#4229) * Refs #20176: Regenerate types using script Signed-off-by: JesusPoderoso * Refs #20176: Fix Win141 initialization Signed-off-by: JesusPoderoso --------- Signed-off-by: JesusPoderoso --- .../types/monitorservice_typesCdrAux.ipp | 36 ++++++++--------- src/cpp/statistics/types/typesCdrAux.ipp | 32 +++++++-------- test/blackbox/types/HelloWorldPubSubTypes.cxx | 14 +++---- test/blackbox/types/HelloWorldTypeObject.cxx | 35 ++++++++-------- test/blackbox/types/HelloWorldv1.cxx | 2 +- .../blackbox/types/statistics/typesCdrAux.ipp | 32 +++++++-------- .../dynamic_types/idl/BasicCdrAux.ipp | 24 +++++------ .../unittest/dynamic_types/idl/TestCdrAux.ipp | 20 +++++----- .../idl/new_features_4_2CdrAux.ipp | 24 +++++------ test/unittest/xtypes/idl/TypesCdrAux.ipp | 40 +++++++++---------- test/unittest/xtypes/idl/WideEnumCdrAux.ipp | 12 +++--- test/xtypes/idl/TypesCdrAux.ipp | 40 +++++++++---------- 12 files changed, 154 insertions(+), 157 deletions(-) diff --git a/src/cpp/statistics/types/monitorservice_typesCdrAux.ipp b/src/cpp/statistics/types/monitorservice_typesCdrAux.ipp index e62bf9d9cee..1a0877a6868 100644 --- a/src/cpp/statistics/types/monitorservice_typesCdrAux.ipp +++ b/src/cpp/statistics/types/monitorservice_typesCdrAux.ipp @@ -660,47 +660,47 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case eprosima::fastdds::statistics::PROXY: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.entity_proxy(), current_alignment); break; case eprosima::fastdds::statistics::CONNECTION_LIST: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.connection_list(), current_alignment); break; case eprosima::fastdds::statistics::INCOMPATIBLE_QOS: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), data.incompatible_qos_status(), current_alignment); break; case eprosima::fastdds::statistics::INCONSISTENT_TOPIC: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), data.inconsistent_topic_status(), current_alignment); break; case eprosima::fastdds::statistics::LIVELINESS_LOST: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), data.liveliness_lost_status(), current_alignment); break; case eprosima::fastdds::statistics::LIVELINESS_CHANGED: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), data.liveliness_changed_status(), current_alignment); break; case eprosima::fastdds::statistics::DEADLINE_MISSED: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), data.deadline_missed_status(), current_alignment); break; case eprosima::fastdds::statistics::SAMPLE_LOST: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(8), data.sample_lost_status(), current_alignment); break; case eprosima::fastdds::statistics::STATUSES_SIZE: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(8), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(9), data.statuses_size(), current_alignment); break; @@ -732,39 +732,39 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case eprosima::fastdds::statistics::PROXY: - scdr << eprosima::fastcdr::MemberId(0) << data.entity_proxy(); + scdr << eprosima::fastcdr::MemberId(1) << data.entity_proxy(); break; case eprosima::fastdds::statistics::CONNECTION_LIST: - scdr << eprosima::fastcdr::MemberId(1) << data.connection_list(); + scdr << eprosima::fastcdr::MemberId(2) << data.connection_list(); break; case eprosima::fastdds::statistics::INCOMPATIBLE_QOS: - scdr << eprosima::fastcdr::MemberId(2) << data.incompatible_qos_status(); + scdr << eprosima::fastcdr::MemberId(3) << data.incompatible_qos_status(); break; case eprosima::fastdds::statistics::INCONSISTENT_TOPIC: - scdr << eprosima::fastcdr::MemberId(3) << data.inconsistent_topic_status(); + scdr << eprosima::fastcdr::MemberId(4) << data.inconsistent_topic_status(); break; case eprosima::fastdds::statistics::LIVELINESS_LOST: - scdr << eprosima::fastcdr::MemberId(4) << data.liveliness_lost_status(); + scdr << eprosima::fastcdr::MemberId(5) << data.liveliness_lost_status(); break; case eprosima::fastdds::statistics::LIVELINESS_CHANGED: - scdr << eprosima::fastcdr::MemberId(5) << data.liveliness_changed_status(); + scdr << eprosima::fastcdr::MemberId(6) << data.liveliness_changed_status(); break; case eprosima::fastdds::statistics::DEADLINE_MISSED: - scdr << eprosima::fastcdr::MemberId(6) << data.deadline_missed_status(); + scdr << eprosima::fastcdr::MemberId(7) << data.deadline_missed_status(); break; case eprosima::fastdds::statistics::SAMPLE_LOST: - scdr << eprosima::fastcdr::MemberId(7) << data.sample_lost_status(); + scdr << eprosima::fastcdr::MemberId(8) << data.sample_lost_status(); break; case eprosima::fastdds::statistics::STATUSES_SIZE: - scdr << eprosima::fastcdr::MemberId(8) << data.statuses_size(); + scdr << eprosima::fastcdr::MemberId(9) << data.statuses_size(); break; default: diff --git a/src/cpp/statistics/types/typesCdrAux.ipp b/src/cpp/statistics/types/typesCdrAux.ipp index feec2a39a65..28b168d672d 100644 --- a/src/cpp/statistics/types/typesCdrAux.ipp +++ b/src/cpp/statistics/types/typesCdrAux.ipp @@ -1496,24 +1496,24 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.writer_reader_data(), current_alignment); break; case eprosima::fastdds::statistics::NETWORK_LATENCY: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.locator2locator_data(), current_alignment); break; case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), data.entity_data(), current_alignment); break; case eprosima::fastdds::statistics::RTPS_SENT: case eprosima::fastdds::statistics::RTPS_LOST: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), data.entity2locator_traffic(), current_alignment); break; @@ -1525,22 +1525,22 @@ eProsima_user_DllExport size_t calculate_serialized_size( case eprosima::fastdds::statistics::DATA_COUNT: case eprosima::fastdds::statistics::PDP_PACKETS: case eprosima::fastdds::statistics::EDP_PACKETS: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), data.entity_count(), current_alignment); break; case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), data.discovery_time(), current_alignment); break; case eprosima::fastdds::statistics::SAMPLE_DATAS: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), data.sample_identity_count(), current_alignment); break; case eprosima::fastdds::statistics::PHYSICAL_DATA: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(8), data.physical_data(), current_alignment); break; @@ -1572,21 +1572,21 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - scdr << eprosima::fastcdr::MemberId(0) << data.writer_reader_data(); + scdr << eprosima::fastcdr::MemberId(1) << data.writer_reader_data(); break; case eprosima::fastdds::statistics::NETWORK_LATENCY: - scdr << eprosima::fastcdr::MemberId(1) << data.locator2locator_data(); + scdr << eprosima::fastcdr::MemberId(2) << data.locator2locator_data(); break; case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - scdr << eprosima::fastcdr::MemberId(2) << data.entity_data(); + scdr << eprosima::fastcdr::MemberId(3) << data.entity_data(); break; case eprosima::fastdds::statistics::RTPS_SENT: case eprosima::fastdds::statistics::RTPS_LOST: - scdr << eprosima::fastcdr::MemberId(3) << data.entity2locator_traffic(); + scdr << eprosima::fastcdr::MemberId(4) << data.entity2locator_traffic(); break; case eprosima::fastdds::statistics::RESENT_DATAS: @@ -1597,19 +1597,19 @@ eProsima_user_DllExport void serialize( case eprosima::fastdds::statistics::DATA_COUNT: case eprosima::fastdds::statistics::PDP_PACKETS: case eprosima::fastdds::statistics::EDP_PACKETS: - scdr << eprosima::fastcdr::MemberId(4) << data.entity_count(); + scdr << eprosima::fastcdr::MemberId(5) << data.entity_count(); break; case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - scdr << eprosima::fastcdr::MemberId(5) << data.discovery_time(); + scdr << eprosima::fastcdr::MemberId(6) << data.discovery_time(); break; case eprosima::fastdds::statistics::SAMPLE_DATAS: - scdr << eprosima::fastcdr::MemberId(6) << data.sample_identity_count(); + scdr << eprosima::fastcdr::MemberId(7) << data.sample_identity_count(); break; case eprosima::fastdds::statistics::PHYSICAL_DATA: - scdr << eprosima::fastcdr::MemberId(7) << data.physical_data(); + scdr << eprosima::fastcdr::MemberId(8) << data.physical_data(); break; default: diff --git a/test/blackbox/types/HelloWorldPubSubTypes.cxx b/test/blackbox/types/HelloWorldPubSubTypes.cxx index 27db0b0771a..050724b99a7 100644 --- a/test/blackbox/types/HelloWorldPubSubTypes.cxx +++ b/test/blackbox/types/HelloWorldPubSubTypes.cxx @@ -36,10 +36,10 @@ HelloWorldPubSubType::HelloWorldPubSubType() setName("HelloWorld"); uint32_t type_size = #if FASTCDR_VERSION_MAJOR == 1 - static_cast(HelloWorld::getMaxCdrSerializedSize()); + static_cast(HelloWorld::getMaxCdrSerializedSize()); #else - HelloWorld_max_cdr_typesize; -#endif // if FASTCDR_VERSION_MAJOR == 1 + HelloWorld_max_cdr_typesize; +#endif type_size += static_cast(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */ m_typeSize = type_size + 4; /*encapsulation*/ m_isGetKeyDefined = false; @@ -150,8 +150,8 @@ std::function HelloWorldPubSubType::getSerializedSizeProvider( eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2); size_t current_alignment {0}; return static_cast(calculator.calculate_serialized_size( - *static_cast(data), current_alignment)) + - 4u /*encapsulation*/; + *static_cast(data), current_alignment)) + + 4u /*encapsulation*/; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -189,8 +189,7 @@ bool HelloWorldPubSubType::getKey( HelloWorld_max_key_cdr_typesize); // Object that serializes the data. - eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS, - eprosima::fastcdr::CdrVersion::XCDRv1); + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS, eprosima::fastcdr::CdrVersion::XCDRv1); #if FASTCDR_VERSION_MAJOR == 1 p_type->serializeKey(ser); #else @@ -219,3 +218,4 @@ bool HelloWorldPubSubType::getKey( } return true; } + diff --git a/test/blackbox/types/HelloWorldTypeObject.cxx b/test/blackbox/types/HelloWorldTypeObject.cxx index 6150d2c4763..665051b534a 100644 --- a/test/blackbox/types/HelloWorldTypeObject.cxx +++ b/test/blackbox/types/HelloWorldTypeObject.cxx @@ -21,10 +21,8 @@ #ifdef _WIN32 // Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // ifdef _WIN32 +namespace { char dummy; } +#endif #include "HelloWorld.h" #include "HelloWorldTypeObject.h" @@ -45,7 +43,7 @@ void registerHelloWorldTypes() static std::once_flag once_flag; std::call_once(once_flag, []() { - TypeObjectFactory* factory = TypeObjectFactory::get_instance(); + TypeObjectFactory *factory = TypeObjectFactory::get_instance(); factory->add_type_object("HelloWorld", GetHelloWorldIdentifier(true), GetHelloWorldObject(true)); factory->add_type_object("HelloWorld", GetHelloWorldIdentifier(false), @@ -54,10 +52,11 @@ void registerHelloWorldTypes() }); } -const TypeIdentifier* GetHelloWorldIdentifier( - bool complete) + + +const TypeIdentifier* GetHelloWorldIdentifier(bool complete) { - const TypeIdentifier* c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("HelloWorld", complete); + const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("HelloWorld", complete); if (c_identifier != nullptr && (!complete || c_identifier->_d() == EK_COMPLETE)) { return c_identifier; @@ -67,8 +66,7 @@ const TypeIdentifier* GetHelloWorldIdentifier( return TypeObjectFactory::get_instance()->get_type_identifier("HelloWorld", complete); } -const TypeObject* GetHelloWorldObject( - bool complete) +const TypeObject* GetHelloWorldObject(bool complete) { const TypeObject* c_type_object = TypeObjectFactory::get_instance()->get_type_object("HelloWorld", complete); if (c_type_object != nullptr) @@ -91,7 +89,7 @@ const TypeObject* GetMinimalHelloWorldObject() return c_type_object; } - TypeObject* type_object = new TypeObject(); + TypeObject *type_object = new TypeObject(); type_object->_d(EK_MINIMAL); type_object->minimal()._d(TK_STRUCTURE); @@ -115,7 +113,7 @@ const TypeObject* GetMinimalHelloWorldObject() MD5 index_hash("index"); - for (int i = 0; i < 4; ++i) + for(int i = 0; i < 4; ++i) { mst_index.detail().name_hash()[i] = index_hash.digest[i]; } @@ -133,7 +131,7 @@ const TypeObject* GetMinimalHelloWorldObject() mst_message.common().member_type_id(*TypeObjectFactory::get_instance()->get_string_identifier(128, false)); MD5 message_hash("message"); - for (int i = 0; i < 4; ++i) + for(int i = 0; i < 4; ++i) { mst_message.detail().name_hash()[i] = message_hash.digest[i]; } @@ -150,7 +148,7 @@ const TypeObject* GetMinimalHelloWorldObject() eprosima::fastcdr::CdrSizeCalculator calculator(eprosima::fastcdr::CdrVersion::XCDRv1); size_t current_alignment {0}; SerializedPayload_t payload(static_cast( - calculator.calculate_serialized_size(type_object->minimal().struct_type(), current_alignment) + 4)); + calculator.calculate_serialized_size(type_object->minimal().struct_type(), current_alignment) + 4)); eprosima::fastcdr::FastBuffer fastbuffer((char*) payload.data, payload.max_size); // Fixed endian (Page 221, EquivalenceHash definition of Extensible and Dynamic Topic Types for DDS document) eprosima::fastcdr::Cdr ser( @@ -167,7 +165,7 @@ const TypeObject* GetMinimalHelloWorldObject() MD5 objectHash; objectHash.update((char*)payload.data, payload.length); objectHash.finalize(); - for (int i = 0; i < 14; ++i) + for(int i = 0; i < 14; ++i) { identifier.equivalence_hash()[i] = objectHash.digest[i]; } @@ -185,7 +183,7 @@ const TypeObject* GetCompleteHelloWorldObject() return c_type_object; } - TypeObject* type_object = new TypeObject(); + TypeObject *type_object = new TypeObject(); type_object->_d(EK_COMPLETE); type_object->complete()._d(TK_STRUCTURE); @@ -231,7 +229,6 @@ const TypeObject* GetCompleteHelloWorldObject() // Header type_object->complete().struct_type().header().detail().type_name("HelloWorld"); // TODO inheritance - { AppliedAnnotation ann; //ann.annotation_typeid(GetfinalIdentifier(true)); @@ -246,7 +243,7 @@ const TypeObject* GetCompleteHelloWorldObject() eprosima::fastcdr::CdrSizeCalculator calculator(eprosima::fastcdr::CdrVersion::XCDRv1); size_t current_alignment {0}; SerializedPayload_t payload(static_cast( - calculator.calculate_serialized_size(type_object->complete().struct_type(), current_alignment) + 4)); + calculator.calculate_serialized_size(type_object->complete().struct_type(), current_alignment) + 4)); eprosima::fastcdr::FastBuffer fastbuffer((char*) payload.data, payload.max_size); // Fixed endian (Page 221, EquivalenceHash definition of Extensible and Dynamic Topic Types for DDS document) eprosima::fastcdr::Cdr ser( @@ -263,7 +260,7 @@ const TypeObject* GetCompleteHelloWorldObject() MD5 objectHash; objectHash.update((char*)payload.data, payload.length); objectHash.finalize(); - for (int i = 0; i < 14; ++i) + for(int i = 0; i < 14; ++i) { identifier.equivalence_hash()[i] = objectHash.digest[i]; } diff --git a/test/blackbox/types/HelloWorldv1.cxx b/test/blackbox/types/HelloWorldv1.cxx index 839599f3758..c22a6977683 100644 --- a/test/blackbox/types/HelloWorldv1.cxx +++ b/test/blackbox/types/HelloWorldv1.cxx @@ -85,7 +85,7 @@ struct FindType { }; } -#define HelloWorld_max_cdr_typesize 141ULL; +#define HelloWorld_max_cdr_typesize 137ULL; diff --git a/test/blackbox/types/statistics/typesCdrAux.ipp b/test/blackbox/types/statistics/typesCdrAux.ipp index feec2a39a65..28b168d672d 100644 --- a/test/blackbox/types/statistics/typesCdrAux.ipp +++ b/test/blackbox/types/statistics/typesCdrAux.ipp @@ -1496,24 +1496,24 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.writer_reader_data(), current_alignment); break; case eprosima::fastdds::statistics::NETWORK_LATENCY: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.locator2locator_data(), current_alignment); break; case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), data.entity_data(), current_alignment); break; case eprosima::fastdds::statistics::RTPS_SENT: case eprosima::fastdds::statistics::RTPS_LOST: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), data.entity2locator_traffic(), current_alignment); break; @@ -1525,22 +1525,22 @@ eProsima_user_DllExport size_t calculate_serialized_size( case eprosima::fastdds::statistics::DATA_COUNT: case eprosima::fastdds::statistics::PDP_PACKETS: case eprosima::fastdds::statistics::EDP_PACKETS: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), data.entity_count(), current_alignment); break; case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), data.discovery_time(), current_alignment); break; case eprosima::fastdds::statistics::SAMPLE_DATAS: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), data.sample_identity_count(), current_alignment); break; case eprosima::fastdds::statistics::PHYSICAL_DATA: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(8), data.physical_data(), current_alignment); break; @@ -1572,21 +1572,21 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - scdr << eprosima::fastcdr::MemberId(0) << data.writer_reader_data(); + scdr << eprosima::fastcdr::MemberId(1) << data.writer_reader_data(); break; case eprosima::fastdds::statistics::NETWORK_LATENCY: - scdr << eprosima::fastcdr::MemberId(1) << data.locator2locator_data(); + scdr << eprosima::fastcdr::MemberId(2) << data.locator2locator_data(); break; case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - scdr << eprosima::fastcdr::MemberId(2) << data.entity_data(); + scdr << eprosima::fastcdr::MemberId(3) << data.entity_data(); break; case eprosima::fastdds::statistics::RTPS_SENT: case eprosima::fastdds::statistics::RTPS_LOST: - scdr << eprosima::fastcdr::MemberId(3) << data.entity2locator_traffic(); + scdr << eprosima::fastcdr::MemberId(4) << data.entity2locator_traffic(); break; case eprosima::fastdds::statistics::RESENT_DATAS: @@ -1597,19 +1597,19 @@ eProsima_user_DllExport void serialize( case eprosima::fastdds::statistics::DATA_COUNT: case eprosima::fastdds::statistics::PDP_PACKETS: case eprosima::fastdds::statistics::EDP_PACKETS: - scdr << eprosima::fastcdr::MemberId(4) << data.entity_count(); + scdr << eprosima::fastcdr::MemberId(5) << data.entity_count(); break; case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - scdr << eprosima::fastcdr::MemberId(5) << data.discovery_time(); + scdr << eprosima::fastcdr::MemberId(6) << data.discovery_time(); break; case eprosima::fastdds::statistics::SAMPLE_DATAS: - scdr << eprosima::fastcdr::MemberId(6) << data.sample_identity_count(); + scdr << eprosima::fastcdr::MemberId(7) << data.sample_identity_count(); break; case eprosima::fastdds::statistics::PHYSICAL_DATA: - scdr << eprosima::fastcdr::MemberId(7) << data.physical_data(); + scdr << eprosima::fastcdr::MemberId(8) << data.physical_data(); break; default: diff --git a/test/unittest/dynamic_types/idl/BasicCdrAux.ipp b/test/unittest/dynamic_types/idl/BasicCdrAux.ipp index 99cd2571ef3..98a0f8f1dd5 100644 --- a/test/unittest/dynamic_types/idl/BasicCdrAux.ipp +++ b/test/unittest/dynamic_types/idl/BasicCdrAux.ipp @@ -2380,12 +2380,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case B: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; @@ -2415,11 +2415,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case B: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; default: @@ -2489,12 +2489,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case B: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; @@ -2524,11 +2524,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case B: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; default: @@ -2598,12 +2598,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case B: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; @@ -2633,11 +2633,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case B: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; default: diff --git a/test/unittest/dynamic_types/idl/TestCdrAux.ipp b/test/unittest/dynamic_types/idl/TestCdrAux.ipp index 8832623f78e..f6f905aa6ca 100644 --- a/test/unittest/dynamic_types/idl/TestCdrAux.ipp +++ b/test/unittest/dynamic_types/idl/TestCdrAux.ipp @@ -479,13 +479,13 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case ::A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.basic(), current_alignment); break; case ::B: case ::C: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.complex(), current_alignment); break; @@ -515,12 +515,12 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case ::A: - scdr << eprosima::fastcdr::MemberId(0) << data.basic(); + scdr << eprosima::fastcdr::MemberId(1) << data.basic(); break; case ::B: case ::C: - scdr << eprosima::fastcdr::MemberId(1) << data.complex(); + scdr << eprosima::fastcdr::MemberId(2) << data.complex(); break; default: @@ -591,17 +591,17 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.uno(), current_alignment); break; case B: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.imString(), current_alignment); break; case C: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), data.tres(), current_alignment); break; @@ -631,15 +631,15 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.uno(); + scdr << eprosima::fastcdr::MemberId(1) << data.uno(); break; case B: - scdr << eprosima::fastcdr::MemberId(1) << data.imString(); + scdr << eprosima::fastcdr::MemberId(2) << data.imString(); break; case C: - scdr << eprosima::fastcdr::MemberId(2) << data.tres(); + scdr << eprosima::fastcdr::MemberId(3) << data.tres(); break; default: diff --git a/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.ipp b/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.ipp index c8b73b1b452..55ea9cc4dd5 100644 --- a/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.ipp +++ b/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.ipp @@ -195,12 +195,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case 'a': - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.case_zero(), current_alignment); break; case 'b': - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.case_one(), current_alignment); break; @@ -230,11 +230,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case 'a': - scdr << eprosima::fastcdr::MemberId(0) << data.case_zero(); + scdr << eprosima::fastcdr::MemberId(1) << data.case_zero(); break; case 'b': - scdr << eprosima::fastcdr::MemberId(1) << data.case_one(); + scdr << eprosima::fastcdr::MemberId(2) << data.case_one(); break; default: @@ -304,12 +304,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case 5: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.case_five(), current_alignment); break; case 7: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.case_seven(), current_alignment); break; @@ -339,11 +339,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case 5: - scdr << eprosima::fastcdr::MemberId(0) << data.case_five(); + scdr << eprosima::fastcdr::MemberId(1) << data.case_five(); break; case 7: - scdr << eprosima::fastcdr::MemberId(1) << data.case_seven(); + scdr << eprosima::fastcdr::MemberId(2) << data.case_seven(); break; default: @@ -413,12 +413,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case 3: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.case_three(), current_alignment); break; case 6: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.case_six(), current_alignment); break; @@ -448,11 +448,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case 3: - scdr << eprosima::fastcdr::MemberId(0) << data.case_three(); + scdr << eprosima::fastcdr::MemberId(1) << data.case_three(); break; case 6: - scdr << eprosima::fastcdr::MemberId(1) << data.case_six(); + scdr << eprosima::fastcdr::MemberId(2) << data.case_six(); break; default: diff --git a/test/unittest/xtypes/idl/TypesCdrAux.ipp b/test/unittest/xtypes/idl/TypesCdrAux.ipp index 837c42573bb..5d6735bcfef 100644 --- a/test/unittest/xtypes/idl/TypesCdrAux.ipp +++ b/test/unittest/xtypes/idl/TypesCdrAux.ipp @@ -2545,12 +2545,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case B: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; @@ -2580,11 +2580,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case B: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; default: @@ -2654,12 +2654,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first_case(), current_alignment); break; case B: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second_case(), current_alignment); break; @@ -2689,11 +2689,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first_case(); + scdr << eprosima::fastcdr::MemberId(1) << data.first_case(); break; case B: - scdr << eprosima::fastcdr::MemberId(1) << data.second_case(); + scdr << eprosima::fastcdr::MemberId(2) << data.second_case(); break; default: @@ -2763,12 +2763,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case B: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; @@ -2798,11 +2798,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case B: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; default: @@ -2872,12 +2872,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case C: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; @@ -2907,11 +2907,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case C: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; default: @@ -2981,12 +2981,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case 0: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case 1: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; @@ -3016,11 +3016,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case 0: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case 1: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; default: diff --git a/test/unittest/xtypes/idl/WideEnumCdrAux.ipp b/test/unittest/xtypes/idl/WideEnumCdrAux.ipp index 4cf12cc8050..380b5cf4c6f 100644 --- a/test/unittest/xtypes/idl/WideEnumCdrAux.ipp +++ b/test/unittest/xtypes/idl/WideEnumCdrAux.ipp @@ -135,17 +135,17 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case B: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; case D: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), data.third(), current_alignment); break; @@ -175,15 +175,15 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case B: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; case D: - scdr << eprosima::fastcdr::MemberId(2) << data.third(); + scdr << eprosima::fastcdr::MemberId(3) << data.third(); break; default: diff --git a/test/xtypes/idl/TypesCdrAux.ipp b/test/xtypes/idl/TypesCdrAux.ipp index 837c42573bb..5d6735bcfef 100644 --- a/test/xtypes/idl/TypesCdrAux.ipp +++ b/test/xtypes/idl/TypesCdrAux.ipp @@ -2545,12 +2545,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case B: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; @@ -2580,11 +2580,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case B: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; default: @@ -2654,12 +2654,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first_case(), current_alignment); break; case B: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second_case(), current_alignment); break; @@ -2689,11 +2689,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first_case(); + scdr << eprosima::fastcdr::MemberId(1) << data.first_case(); break; case B: - scdr << eprosima::fastcdr::MemberId(1) << data.second_case(); + scdr << eprosima::fastcdr::MemberId(2) << data.second_case(); break; default: @@ -2763,12 +2763,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case B: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; @@ -2798,11 +2798,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case B: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; default: @@ -2872,12 +2872,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case A: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case C: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; @@ -2907,11 +2907,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case A: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case C: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; default: @@ -2981,12 +2981,12 @@ eProsima_user_DllExport size_t calculate_serialized_size( switch (data._d()) { case 0: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), data.first(), current_alignment); break; case 1: - calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.second(), current_alignment); break; @@ -3016,11 +3016,11 @@ eProsima_user_DllExport void serialize( switch (data._d()) { case 0: - scdr << eprosima::fastcdr::MemberId(0) << data.first(); + scdr << eprosima::fastcdr::MemberId(1) << data.first(); break; case 1: - scdr << eprosima::fastcdr::MemberId(1) << data.second(); + scdr << eprosima::fastcdr::MemberId(2) << data.second(); break; default: