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

Add app_id and app_metadata attributes #90

Merged
merged 4 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions ddsrecorder/src/cpp/command_receiver/CommandReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,17 @@ bool CommandReceiver::init()

// CREATE THE PARTICIPANT
pqos.name("DdsRecorderCommandReceiver");

// Set app properties
pqos.properties().properties().emplace_back(
"fastdds.application.id",
participant_configuration_->app_id,
"true");
pqos.properties().properties().emplace_back(
"fastdds.application.metadata",
participant_configuration_->app_metadata,
"true");

participant_ = DomainParticipantFactory::get_instance()->create_participant(domain_, pqos);

if (participant_ == nullptr)
Expand Down
5 changes: 5 additions & 0 deletions ddsrecorder_yaml/src/cpp/recorder/YamlReaderConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,17 @@ void RecorderConfiguration::load_ddsrecorder_configuration_(
// Create Simple Participant Configuration
simple_configuration = std::make_shared<SimpleParticipantConfiguration>();
simple_configuration->id = "SimpleRecorderParticipant";
simple_configuration->app_id = "DDS_RECORDER";
simple_configuration->app_metadata = "";
simple_configuration->is_repeater = false;

/////
// Create Recorder Participant Configuration
recorder_configuration = std::make_shared<ParticipantConfiguration>();
recorder_configuration->id = "RecorderRecorderParticipant";
recorder_configuration->app_id = "DDS_RECORDER";
// TODO: fill metadata field once its content has been defined.
recorder_configuration->app_metadata = "";
irenebm marked this conversation as resolved.
Show resolved Hide resolved
recorder_configuration->is_repeater = false;

/////
Expand Down
5 changes: 5 additions & 0 deletions ddsrecorder_yaml/src/cpp/replayer/YamlReaderConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ void ReplayerConfiguration::load_ddsreplayer_configuration_(
// WARNING: Replayer configuration must have been parsed beforehand
mcap_reader_configuration = std::make_shared<McapReaderParticipantConfiguration>();
mcap_reader_configuration->id = "McapReaderParticipant";
mcap_reader_configuration->app_id = "DDS_REPLAYER";
mcap_reader_configuration->app_metadata = "";
mcap_reader_configuration->is_repeater = false;
mcap_reader_configuration->begin_time = begin_time;
mcap_reader_configuration->end_time = end_time;
Expand All @@ -99,6 +101,9 @@ void ReplayerConfiguration::load_ddsreplayer_configuration_(
// Create Replayer Participant Configuration
replayer_configuration = std::make_shared<SimpleParticipantConfiguration>();
replayer_configuration->id = "ReplayerParticipant";
replayer_configuration->app_id = "DDS_REPLAYER";
// TODO: fill metadata field once its content has been defined.
replayer_configuration->app_metadata = "";
replayer_configuration->is_repeater = false;

/////
Expand Down
10 changes: 10 additions & 0 deletions ddsreplayer/src/cpp/tool/DdsReplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ DdsReplayer::DdsReplayer(
fastdds::dds::DomainParticipantQos pqos;
pqos.name("DdsReplayer_dynTypesPublisher");

// Set app properties
pqos.properties().properties().emplace_back(
"fastdds.application.id",
configuration.replayer_configuration->app_id,
"true");
pqos.properties().properties().emplace_back(
"fastdds.application.metadata",
configuration.replayer_configuration->app_metadata,
"true");

// Set as server in TypeLookup service
pqos.wire_protocol().builtin.typelookup_config.use_client = false;
pqos.wire_protocol().builtin.typelookup_config.use_server = true;
Expand Down
1 change: 1 addition & 0 deletions docs/rst/notes/forthcoming_version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Next release will include the following **DDS Recorder & Replay internal adjustm
* Store *DDS Record & Replay* version in metadata record of the generated MCAP files.
* Move dynamic types storage from metadata to attachments MCAP section.
* Store schemas in OMG IDL format (instead of ROS 2 msg).
* Set `app_id` and `app_metadata` attributes on *DDS Record & Replay* participants.

.. warning::

Expand Down
Loading