Skip to content

Commit

Permalink
Dynamic language binding tests (#4626)
Browse files Browse the repository at this point in the history
* Created tests for dds_types_test.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Added generated classes for dds_types_test.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Updates generated classes for dds_types_test.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Uncommented asserts.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Added most non-complex tests.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Fixes for maps tests.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Fixes for seq tests.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Added complex array tests.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Added all test except structures.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Added structures test.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Added last tests. Fixed errors.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Fixed some errors.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: add DDS types tests repository as submodule

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: update submodule to use feature/xtypes1.3 branch

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: update type generation script

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: regenerate types

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: update to gtest_discover_tests macro

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: alias

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: update dds types submodule and regenerate types

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: move check de/serialization method to class

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: annotations

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: primitives

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: structures

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: unions

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: strings

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: sequences

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: arrays

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: remove old arrays dynamic type tests

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: update submodule

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: Add test for maps

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: Add test for inheritance

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: Regenerate code

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: fixes after rebase

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: Added tests for enumerations.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: Added tests for bitsets

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: Added test for appendable.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: Added tests for finals and mutables.

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424: Regenerate idl files

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Fix tests

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Apply suggestions 1

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Apply suggestions 2

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Apply suggestions 3

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Apply suggestions 4

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Apply suggestions 4.1

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Apply suggestions 5

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Reduce code

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Fix warnings on windows

Signed-off-by: Ricardo González <ricardo@richiware.dev>

* Refs #20424. Fix bigobj

Signed-off-by: Ricardo González <ricardo@richiware.dev>

* Refs #20424. Fixing more windows warnings

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Fixing windows warning on generated code

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Fixing windows warning on generated code

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #20424. Fixing windows and mac warnings.

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

---------

Signed-off-by: adriancampo <adriancampo@eprosima.com>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Ricardo González <ricardo@richiware.dev>
Co-authored-by: adriancampo <adriancampo@eprosima.com>
Co-authored-by: Ricardo González Moreno <ricardo@richiware.dev>
  • Loading branch information
3 people authored May 14, 2024
1 parent 623db82 commit bc03220
Show file tree
Hide file tree
Showing 277 changed files with 663,791 additions and 4,658 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "thirdparty/tinyxml2"]
path = thirdparty/tinyxml2
url = https://github.com/leethomason/tinyxml2.git
[submodule "thirdparty/dds-types-test"]
path = thirdparty/dds-types-test
url = https://github.com/eProsima/dds-types-test
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if(MSVC OR MSVC_IDE)
endif()
else()
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wno-unknown-pragmas -Wno-error=deprecated-declarations")
"${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wno-unknown-pragmas -Wno-error=deprecated-declarations -Wno-switch-bool")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ void register_AdvancedConfiguration_type_identifier()
}
CollectionElementFlag element_flags_anonymous_array_char_20 = 0;
PlainCollectionHeader header_anonymous_array_char_20 = TypeObjectUtils::build_plain_collection_header(equiv_kind_anonymous_array_char_20, element_flags_anonymous_array_char_20);
std::string type_id_kind_anonymous_array_char_20("TI_PLAIN_ARRAY_SMALL");
if (type_id_kind_anonymous_array_char_20 == "TI_PLAIN_ARRAY_SMALL")
{
SBoundSeq array_bound_seq;
TypeObjectUtils::add_array_dimension(array_bound_seq, static_cast<SBound>(20));
Expand All @@ -208,20 +206,6 @@ void register_AdvancedConfiguration_type_identifier()
"anonymous_array_char_20 already registered in TypeObjectRegistry for a different type.");
}
}
else
{
LBoundSeq array_bound_seq;
TypeObjectUtils::add_array_dimension(array_bound_seq, static_cast<LBound>(20));

PlainArrayLElemDefn array_ldefn = TypeObjectUtils::build_plain_array_l_elem_defn(header_anonymous_array_char_20, array_bound_seq,
eprosima::fastcdr::external<TypeIdentifier>(element_identifier_anonymous_array_char_20));
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_l_array_type_identifier(array_ldefn, "anonymous_array_char_20"))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_array_char_20 already registered in TypeObjectRegistry for a different type.");
}
}
return_code_AdvancedConfiguration =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_array_char_20", type_ids_AdvancedConfiguration);
Expand Down Expand Up @@ -352,8 +336,6 @@ void register_AdvancedConfiguration_type_identifier()
}
CollectionElementFlag element_flags_anonymous_sequence_uint8_t_unbounded = 0;
PlainCollectionHeader header_anonymous_sequence_uint8_t_unbounded = TypeObjectUtils::build_plain_collection_header(equiv_kind_anonymous_sequence_uint8_t_unbounded, element_flags_anonymous_sequence_uint8_t_unbounded);
std::string type_id_kind_anonymous_sequence_uint8_t_unbounded("TI_PLAIN_SEQUENCE_SMALL");
if (type_id_kind_anonymous_sequence_uint8_t_unbounded == "TI_PLAIN_SEQUENCE_SMALL")
{
SBound bound = 0;
PlainSequenceSElemDefn seq_sdefn = TypeObjectUtils::build_plain_sequence_s_elem_defn(header_anonymous_sequence_uint8_t_unbounded, bound,
Expand All @@ -365,18 +347,6 @@ void register_AdvancedConfiguration_type_identifier()
"anonymous_sequence_uint8_t_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
else
{
LBound bound = 0;
PlainSequenceLElemDefn seq_ldefn = TypeObjectUtils::build_plain_sequence_l_elem_defn(header_anonymous_sequence_uint8_t_unbounded, bound,
eprosima::fastcdr::external<TypeIdentifier>(element_identifier_anonymous_sequence_uint8_t_unbounded));
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_l_sequence_type_identifier(seq_ldefn, "anonymous_sequence_uint8_t_unbounded"))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_sequence_uint8_t_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
return_code_AdvancedConfiguration =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_sequence_uint8_t_unbounded", type_ids_AdvancedConfiguration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ eProsima_user_DllExport void register_AdvancedConfiguration_type_objects();
* Hash TypeIdentifiers require to fill the TypeObject information and hash it, consequently, the TypeObject is
* indirectly registered as well.
*/
void register_AdvancedConfiguration_type_identifier();
eProsima_user_DllExport void register_AdvancedConfiguration_type_identifier();


#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ void register_HelloWorld_type_identifier()
}
CollectionElementFlag element_flags_anonymous_array_char_20 = 0;
PlainCollectionHeader header_anonymous_array_char_20 = TypeObjectUtils::build_plain_collection_header(equiv_kind_anonymous_array_char_20, element_flags_anonymous_array_char_20);
std::string type_id_kind_anonymous_array_char_20("TI_PLAIN_ARRAY_SMALL");
if (type_id_kind_anonymous_array_char_20 == "TI_PLAIN_ARRAY_SMALL")
{
SBoundSeq array_bound_seq;
TypeObjectUtils::add_array_dimension(array_bound_seq, static_cast<SBound>(20));
Expand All @@ -208,20 +206,6 @@ void register_HelloWorld_type_identifier()
"anonymous_array_char_20 already registered in TypeObjectRegistry for a different type.");
}
}
else
{
LBoundSeq array_bound_seq;
TypeObjectUtils::add_array_dimension(array_bound_seq, static_cast<LBound>(20));

PlainArrayLElemDefn array_ldefn = TypeObjectUtils::build_plain_array_l_elem_defn(header_anonymous_array_char_20, array_bound_seq,
eprosima::fastcdr::external<TypeIdentifier>(element_identifier_anonymous_array_char_20));
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_l_array_type_identifier(array_ldefn, "anonymous_array_char_20"))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_array_char_20 already registered in TypeObjectRegistry for a different type.");
}
}
return_code_HelloWorld =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_array_char_20", type_ids_HelloWorld);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ eProsima_user_DllExport void register_HelloWorld_type_objects();
* Hash TypeIdentifiers require to fill the TypeObject information and hash it, consequently, the TypeObject is
* indirectly registered as well.
*/
void register_HelloWorld_type_identifier();
eProsima_user_DllExport void register_HelloWorld_type_identifier();


#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ eProsima_user_DllExport void register_sample_type_objects();
* Hash TypeIdentifiers require to fill the TypeObject information and hash it, consequently, the TypeObject is
* indirectly registered as well.
*/
void register_sample_type_identifier();
eProsima_user_DllExport void register_sample_type_identifier();


#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ void register_HelloWorld_type_identifier()

if (return_code_HelloWorld != eprosima::fastdds::dds::RETCODE_OK)
{
std::string type_id_kind_anonymous_string_unbounded("TI_STRING8_SMALL");
if (type_id_kind_anonymous_string_unbounded == "TI_STRING8_SMALL")
{
SBound bound = 0;
StringSTypeDefn string_sdefn = TypeObjectUtils::build_string_s_type_defn(bound);
Expand All @@ -146,24 +144,6 @@ void register_HelloWorld_type_identifier()
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
else if (type_id_kind_anonymous_string_unbounded == "TI_STRING8_LARGE")
{
LBound bound = 255;
StringLTypeDefn string_ldefn = TypeObjectUtils::build_string_l_type_defn(bound);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_l_string_type_identifier(string_ldefn,
"anonymous_string_unbounded"))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
else
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded: Unknown String kind.");
return;
}
return_code_HelloWorld =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_string_unbounded", type_ids_HelloWorld);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ eProsima_user_DllExport void register_HelloWorld_type_objects();
* Hash TypeIdentifiers require to fill the TypeObject information and hash it, consequently, the TypeObject is
* indirectly registered as well.
*/
void register_HelloWorld_type_identifier();
eProsima_user_DllExport void register_HelloWorld_type_identifier();


#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
Expand Down
20 changes: 0 additions & 20 deletions examples/cpp/dds/CustomListenerExample/TopicTypeObjectSupport.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ void register_Topic_type_identifier()

if (return_code_Topic != eprosima::fastdds::dds::RETCODE_OK)
{
std::string type_id_kind_anonymous_string_unbounded("TI_STRING8_SMALL");
if (type_id_kind_anonymous_string_unbounded == "TI_STRING8_SMALL")
{
SBound bound = 0;
StringSTypeDefn string_sdefn = TypeObjectUtils::build_string_s_type_defn(bound);
Expand All @@ -146,24 +144,6 @@ void register_Topic_type_identifier()
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
else if (type_id_kind_anonymous_string_unbounded == "TI_STRING8_LARGE")
{
LBound bound = 255;
StringLTypeDefn string_ldefn = TypeObjectUtils::build_string_l_type_defn(bound);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_l_string_type_identifier(string_ldefn,
"anonymous_string_unbounded"))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
else
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded: Unknown String kind.");
return;
}
return_code_Topic =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_string_unbounded", type_ids_Topic);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ eProsima_user_DllExport void register_Topic_type_objects();
* Hash TypeIdentifiers require to fill the TypeObject information and hash it, consequently, the TypeObject is
* indirectly registered as well.
*/
void register_Topic_type_identifier();
eProsima_user_DllExport void register_Topic_type_identifier();


#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ void register_CustomPayloadPoolData_type_identifier()

if (return_code_CustomPayloadPoolData != eprosima::fastdds::dds::RETCODE_OK)
{
std::string type_id_kind_anonymous_string_unbounded("TI_STRING8_SMALL");
if (type_id_kind_anonymous_string_unbounded == "TI_STRING8_SMALL")
{
SBound bound = 0;
StringSTypeDefn string_sdefn = TypeObjectUtils::build_string_s_type_defn(bound);
Expand All @@ -146,24 +144,6 @@ void register_CustomPayloadPoolData_type_identifier()
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
else if (type_id_kind_anonymous_string_unbounded == "TI_STRING8_LARGE")
{
LBound bound = 255;
StringLTypeDefn string_ldefn = TypeObjectUtils::build_string_l_type_defn(bound);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_l_string_type_identifier(string_ldefn,
"anonymous_string_unbounded"))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
else
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded: Unknown String kind.");
return;
}
return_code_CustomPayloadPoolData =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_string_unbounded", type_ids_CustomPayloadPoolData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ eProsima_user_DllExport void register_CustomPayloadPoolData_type_objects();
* Hash TypeIdentifiers require to fill the TypeObject information and hash it, consequently, the TypeObject is
* indirectly registered as well.
*/
void register_CustomPayloadPoolData_type_identifier();
eProsima_user_DllExport void register_CustomPayloadPoolData_type_identifier();


#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,6 @@ void register_HelloMsg_type_identifier()

if (return_code_HelloMsg != eprosima::fastdds::dds::RETCODE_OK)
{
std::string type_id_kind_anonymous_string_256("TI_STRING8_LARGE");
if (type_id_kind_anonymous_string_256 == "TI_STRING8_SMALL")
{
SBound bound = static_cast<SBound>(256);
StringSTypeDefn string_sdefn = TypeObjectUtils::build_string_s_type_defn(bound);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_s_string_type_identifier(string_sdefn,
"anonymous_string_256"))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_256 already registered in TypeObjectRegistry for a different type.");
}
}
else if (type_id_kind_anonymous_string_256 == "TI_STRING8_LARGE")
{
LBound bound = 256;
StringLTypeDefn string_ldefn = TypeObjectUtils::build_string_l_type_defn(bound);
Expand All @@ -171,12 +157,6 @@ void register_HelloMsg_type_identifier()
"anonymous_string_256 already registered in TypeObjectRegistry for a different type.");
}
}
else
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_256: Unknown String kind.");
return;
}
return_code_HelloMsg =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_string_256", type_ids_HelloMsg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ eProsima_user_DllExport void register_deadlinepayload_type_objects();
* Hash TypeIdentifiers require to fill the TypeObject information and hash it, consequently, the TypeObject is
* indirectly registered as well.
*/
void register_HelloMsg_type_identifier();
eProsima_user_DllExport void register_HelloMsg_type_identifier();


#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
Expand Down
20 changes: 0 additions & 20 deletions examples/cpp/dds/DisablePositiveACKs/TopicTypeObjectSupport.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ void register_Topic_type_identifier()

if (return_code_Topic != eprosima::fastdds::dds::RETCODE_OK)
{
std::string type_id_kind_anonymous_string_unbounded("TI_STRING8_SMALL");
if (type_id_kind_anonymous_string_unbounded == "TI_STRING8_SMALL")
{
SBound bound = 0;
StringSTypeDefn string_sdefn = TypeObjectUtils::build_string_s_type_defn(bound);
Expand All @@ -146,24 +144,6 @@ void register_Topic_type_identifier()
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
else if (type_id_kind_anonymous_string_unbounded == "TI_STRING8_LARGE")
{
LBound bound = 255;
StringLTypeDefn string_ldefn = TypeObjectUtils::build_string_l_type_defn(bound);
if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
TypeObjectUtils::build_and_register_l_string_type_identifier(string_ldefn,
"anonymous_string_unbounded"))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded already registered in TypeObjectRegistry for a different type.");
}
}
else
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"anonymous_string_unbounded: Unknown String kind.");
return;
}
return_code_Topic =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"anonymous_string_unbounded", type_ids_Topic);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ eProsima_user_DllExport void register_Topic_type_objects();
* Hash TypeIdentifiers require to fill the TypeObject information and hash it, consequently, the TypeObject is
* indirectly registered as well.
*/
void register_Topic_type_identifier();
eProsima_user_DllExport void register_Topic_type_identifier();


#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
Expand Down
Loading

0 comments on commit bc03220

Please sign in to comment.