Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20595] DynamicType implementation #4190

Merged
merged 100 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
f446e29
Refs 17138. DynamicTypePtr as shared_ptr alias
Feb 8, 2023
877138d
Refs 17138. Applied new dynamic-types Types.hpp
richiware Nov 27, 2023
4e919ff
Refs 17138. New TypeDescriptor
richiware Nov 29, 2023
3579434
Refs 17138. Applying new TypeDescriptor
richiware Nov 29, 2023
3b1baca
Refs 17138. Update after rebase new TypeDescriptor
richiware Nov 30, 2023
75eb833
Refs 17138. New MemberDescriptor API
richiware Dec 4, 2023
59c8550
Refs 17138. New MemberDescriptor impl
richiware Dec 4, 2023
853e776
Refs 17138. Fix after rebase
richiware Dec 11, 2023
6dc121d
Refs 17138. New AnnotationDescriptor impl
richiware Dec 11, 2023
8403e76
Refs 17138. New DynamicTypeMember API
richiware Dec 14, 2023
ee96a5d
Refs 17138. New DynamicTypeMember impl
richiware Dec 14, 2023
73301b5
Refs 17138. Fix after rebase
richiware Dec 14, 2023
58a9761
Refs 17138. New DynamicType API
richiware Dec 14, 2023
db913bb
Refs 17138. New DynamicType impl
richiware Dec 14, 2023
af1a25e
Refs 17138. New DynamicTypeBuilder API
richiware Dec 18, 2023
48a37d4
Refs 17138. New DynamicTypeBuilder impl
richiware Dec 18, 2023
aa4105b
Refs 17138. New DynamicTypeBuilderFactory API
richiware Dec 19, 2023
1bae894
Refs 17138. New DynamicTypeBuilderFactory impl
richiware Dec 19, 2023
3980d08
Refs #17138. New DynamicData API
richiware Dec 21, 2023
2011fdb
Refs #17138. New DynamicData impl
richiware Dec 21, 2023
45b6f38
Refs #17138. Fix after rebase
richiware Dec 21, 2023
2b4177f
Refs #17138. Fixes
richiware Dec 22, 2023
ab62c5b
Refs #17138. Continue impl DynamicData
richiware Dec 29, 2023
f18d368
Refs #17138. First approach XVCRv2
richiware Jan 9, 2024
beb5dd0
Refs #17138. Several:
richiware Jan 11, 2024
1dbc9a7
Refs #17138. Support string types
richiware Jan 11, 2024
b9f03be
Refs #17138. Support string types
richiware Jan 11, 2024
793a21d
Refs #17138. Fixes after rebase
richiware Jan 15, 2024
023bbe6
Refs #17138. Add primitive sequences
richiware Jan 15, 2024
0781c8a
Refs #17138. Support sequences inside sequences
richiware Jan 16, 2024
29d87b2
Refs #17138. Support of arrays
richiware Jan 17, 2024
cbf6d35
Refs #17138. Improve structure support
richiware Jan 18, 2024
88c46c3
Refs #17138. Support unions.
richiware Jan 23, 2024
6ea0dc5
Refs #17138. Support of maps.
richiware Jan 25, 2024
733470b
Refs #17138. Support of bitmasks
richiware Jan 29, 2024
a96950e
Refs #17138. Fix rebase and remove use of old dynamic api
richiware Jan 29, 2024
45eeec1
Refs #17138. Remove old code
richiware Jan 29, 2024
d0ed6fb
Refs #17138. Refactor test to use DDS API
richiware Jan 31, 2024
f9c9a38
Refs #17138. Fixes
richiware Jan 31, 2024
91dbea9
Refs #17138. Bring to live xml tests
richiware Feb 1, 2024
4d91513
Refs #17138. Fix
richiware Feb 7, 2024
33dca37
Refs #17138. Forgotten use of template
richiware Feb 7, 2024
91b374f
Refs #17138. Support of bitsets
richiware Feb 8, 2024
9e272a7
Refs #17138.
richiware Feb 11, 2024
a355bd7
Refs #17138. Testing calculate_max_serialized_size.
richiware Feb 13, 2024
b9dc526
Refs #17138. Implement DynamicData::clone
richiware Feb 14, 2024
a04e951
Refs #17138. Implement get_complex_data
richiware Feb 15, 2024
8430790
Refs #17138. Fix aliases of enumerators
richiware Feb 15, 2024
eb4a7dc
Refs #17138. Move dynamictests to feature folder
richiware Feb 15, 2024
5cd7a04
Refs #17138. Implementation set_complex_value
richiware Feb 15, 2024
c299de6
Refs #17138. Fix warning on windows
richiware Feb 15, 2024
2d7e511
Refs #17138. Improve alias management
richiware Feb 16, 2024
9887b35
Refs #17138. Remove unused file
richiware Feb 16, 2024
e2a13b5
Refs #17138. Fix warnings on Windows
richiware Feb 16, 2024
77cf260
Refs #17138. Change Bitmask behaviour
richiware Feb 16, 2024
7852bb7
Refs #17138. Fix warnings on Windows
richiware Feb 19, 2024
a1dead4
Refs #17138. Improve bitmask usage
richiware Feb 19, 2024
f1f70f9
Refs #17138. Removed examples
richiware Feb 19, 2024
e83400e
Refs #17138. Fix warnings
richiware Feb 19, 2024
dd5d112
Refs #17138. Fix bitfield as boolean
richiware Feb 19, 2024
7e1cd25
Refs #17138. Fix warnings on windows
richiware Feb 19, 2024
f323249
Refs #17138. Fix bitset
richiware Feb 19, 2024
abe4c56
Refs #17138. Remove unused header
richiware Feb 19, 2024
dab3062
Refs #17138. Using new CdrSizeCalculator API for arrays
richiware Feb 20, 2024
3d5e887
Refs #17138. Refactor xtypes interface library
richiware Feb 20, 2024
ee34a9d
Refs #17138. Fix warnings on windows
richiware Feb 21, 2024
1923d7d
Refs #17138. Improves reviewing
richiware Feb 22, 2024
8e090d0
Refs #17138. Fix deserialization of unions
richiware Feb 23, 2024
b950678
Refs #17138. Applying review
richiware Feb 26, 2024
918ffbc
Refs #17138. Applying changes after review
richiware Feb 26, 2024
b58da2f
Refs #17138. Several fixes
richiware Feb 27, 2024
13db9ad
Refs #17138. Several fixes
richiware Feb 27, 2024
e06e3ec
Refs #17138.
richiware Feb 28, 2024
bdf23ff
Refs #17138.
richiware Feb 29, 2024
e951acb
Refs #17138. Remove obsolete test code
richiware Feb 29, 2024
e416331
Refs #17138. Fixing arrays and sequences
richiware Feb 29, 2024
74d2245
Refs #17138. Remove todos
richiware Feb 29, 2024
2400112
Refs #17138. Fix
richiware Feb 29, 2024
1797a78
Refs #17138. Fix accessing an empty sequence
richiware Mar 1, 2024
4aa3480
Refs #17138. Fix warning on windows
richiware Mar 1, 2024
aeeb5c8
Refs #17138. Fix warnings on windows
richiware Mar 1, 2024
64abaec
Refs #17138. Fix warnings on windows
richiware Mar 4, 2024
7ee35ae
Refs #17138. Fix warnings
richiware Mar 4, 2024
8173e9c
Refs #17138. Fixes in maps
richiware Mar 12, 2024
fb58ee1
Refs #17138. Apply suggestions 1
richiware Mar 13, 2024
4156690
Refs #17138. Apply suggestions 2
richiware Mar 13, 2024
10dde74
Refs #17138. Fix inheritance
richiware Mar 14, 2024
b064d4d
Refs #17138. Apply suggestions 3
richiware Mar 15, 2024
2613dbe
Refs #17138. Apply suggestions 4
richiware Mar 18, 2024
9c69c3a
Refs #17138. Forgotten suggestion
richiware Mar 19, 2024
bf187e0
Refs #17138. Applying suggestions 5
richiware Mar 21, 2024
17f34e8
Refs #17138. Move test to other branch
richiware Mar 21, 2024
c8b1745
Refs #17138. Applying suggestions 6
richiware Mar 22, 2024
d5af16a
Refs #17138. Apply suggestions 7
richiware Mar 22, 2024
8dc454d
Refs #17138. Apply suggestion 8
richiware Mar 22, 2024
c8f6dde
Refs #17138. Apply suggestions 9
richiware Mar 23, 2024
675f796
Refs #17138. Fix uncrustify
richiware Mar 23, 2024
4af3c43
Refs #20595: apply review suggestions
JLBuenoLopez Mar 25, 2024
3a1c2bc
Refs #20595: linters
JLBuenoLopez Mar 25, 2024
f7b29df
Refs #20595: apply review suggestion and fix Mac warnings
JLBuenoLopez Mar 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refs #17138. Remove todos
Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware committed Mar 19, 2024
commit 74d2245d2002dbb6da1cfc7718b473bba6e351f0
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ bool TypeDescriptorImpl::equals(

bool TypeDescriptorImpl::is_consistent() noexcept
{
//TODO(richiware) when dynamic_type has is_consisten.
// Alias Types need the base type to indicate what type has been aliased.
if (TK_ALIAS == kind_ && !base_type_)
{
Expand Down
6 changes: 0 additions & 6 deletions src/cpp/rtps/RTPSDomain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

#include <fastdds/dds/log/Log.hpp>
#include <fastdds/LibrarySettings.hpp>
#include <fastdds/dds/xtypes/dynamic_types/DynamicDataFactory.hpp>
#include <fastdds/dds/xtypes/dynamic_types/DynamicTypeBuilderFactory.hpp>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/participant/RTPSParticipant.h>
#include <fastdds/rtps/reader/RTPSReader.h>
Expand Down Expand Up @@ -123,10 +121,6 @@ void RTPSDomainImpl::stopAll()
lock.lock();
}

// TODO(richiware) Why this layer contains calls to dynamictypes
// Deletes DynamicTypes and TypeObject factories
fastdds::dds::DynamicDataFactory::delete_instance();
fastdds::dds::DynamicTypeBuilderFactory::delete_instance();
xmlparser::XMLProfileManager::DeleteInstance();

EPROSIMA_LOG_INFO(RTPS_PARTICIPANT, "RTPSParticipants deleted correctly ");
Expand Down
1 change: 0 additions & 1 deletion src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,6 @@ bool EDP::pairing_remote_writer_with_local_reader_after_security(
{
found = true;

// TODO(richiware) Implement and use move with attributes
if (r.matched_writer_add(remote_writer_data))
{
EPROSIMA_LOG_INFO(RTPS_EDP, "Valid Matching to local reader: " << readerGUID.entityId);
Expand Down
1 change: 0 additions & 1 deletion src/cpp/xmlparser/XMLProfileManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ class XMLProfileManager
dynamic_types_.clear();
}

// TODO(richiware) Version for v1.3
/**
* Retrieves a DynamicPubSubType for the given dynamic type name.
* Any instance retrieve by calling this method must be deleted calling the
Expand Down
68 changes: 0 additions & 68 deletions test/unittest/dds/participant/ParticipantTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3076,74 +3076,6 @@ TEST(ParticipantTests, RegisterDynamicTypeToFactories)
ASSERT_EQ(DomainParticipantFactory::get_instance()->delete_participant(participant), RETCODE_OK);
}

/* TODO(richiware)
// Mocked DynamicType for DynamicType creation tests
class DynamicTypeMock : public DynamicType
{
public:

DynamicTypeMock(
const eprosima::fastrtps::types::TypeDescriptor* descriptor)
: DynamicType(descriptor)
{
}

DynamicType_ptr get_base_type_wrapper() const
{
return get_base_type();
}

};
*/

/*
* This test attempts to add a non supported custom dynamic type to the participant dynamic type factories. The type
* should be registered in the participant but not added to the dynamic types factories.
*/
/* TODO(richiware)
TEST(ParticipantTests, RegisterDynamicTypeToFactoriesNotTypeIdentifier)
{
// Do not enable entities on creation
DomainParticipantFactoryQos factory_qos;
factory_qos.entity_factory().autoenable_created_entities = false;
DomainParticipantFactory::get_instance()->set_qos(factory_qos);

// Create a disabled participant
DomainParticipant* participant =
DomainParticipantFactory::get_instance()->create_participant(
(uint32_t)GET_PID() % 230, PARTICIPANT_QOS_DEFAULT);

// Create a not supported TypeDescriptor
const TypeDescriptor* myDescriptor = new TypeDescriptor("my_descriptor", 0x11);
// Create the base type for the dynamic type
DynamicType_ptr base_type(new DynamicTypeMock(myDescriptor));
// Create a custom dynamic type builder using the wrong TypeDescriptor
DynamicTypeBuilder_ptr builder =
DynamicTypeBuilderFactory::get_instance()->create_custom_builder(myDescriptor, "my_dynamic_type");
builder->add_member(0, "uint", base_type);
// Create the dynamic type
DynamicType_ptr dyn_type = builder->build();
// Create the data instance
DynamicData_ptr data(DynamicDataFactory::get_instance()->create_data(dyn_type));

// Register the type
TypeSupport type(new eprosima::fastrtps::types::DynamicPubSubType(dyn_type));
type->auto_fill_type_information(true);
type.register_type(participant);

TypeSupport ret_type = participant->find_type("my_dynamic_type");

// The type is registered in the participant but not in the dynamic types factories
ASSERT_FALSE(ret_type.empty());

// Remove TypeDescriptor before closing
delete myDescriptor;

// Remove the participant
ASSERT_EQ(DomainParticipantFactory::get_instance()->delete_participant(participant), RETCODE_OK);
}
*/

// Delete contained entities test
TEST(ParticipantTests, DeleteContainedEntities)
{
Expand Down