Skip to content
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
13 changes: 1 addition & 12 deletions code/DDSCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3347,18 +3347,7 @@ void dds_dataWriter_examples()

// Create a custom user write data
eprosima::fastdds::rtps::GuidPrefix_t filtered_out_prefix;
filtered_out_prefix.value[0] = 0x01; // Example prefix to filter out
filtered_out_prefix.value[1] = eprosima::fastdds::rtps::octet(0x73);
filtered_out_prefix.value[2] = eprosima::fastdds::rtps::octet(0x71);
filtered_out_prefix.value[3] = eprosima::fastdds::rtps::octet(0x85);
filtered_out_prefix.value[4] = eprosima::fastdds::rtps::octet(0x69);
filtered_out_prefix.value[5] = eprosima::fastdds::rtps::octet(0x76);
filtered_out_prefix.value[6] = eprosima::fastdds::rtps::octet(0x95);
filtered_out_prefix.value[7] = eprosima::fastdds::rtps::octet(0x66);
filtered_out_prefix.value[8] = eprosima::fastdds::rtps::octet(0x65);
filtered_out_prefix.value[9] = eprosima::fastdds::rtps::octet(0x82);
filtered_out_prefix.value[10] = eprosima::fastdds::rtps::octet(0x82);
filtered_out_prefix.value[11] = eprosima::fastdds::rtps::octet(0x79);
std::istringstream("44.53.00.5f.45.60.52.4f.53.49.7c.41") >> filtered_out_prefix;

std::shared_ptr<CustomUserWriteData> custom_write_data =
std::make_shared<CustomUserWriteData>(filtered_out_prefix);
Expand Down
1 change: 1 addition & 0 deletions docs/03-exports/aliases-api.include
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,7 @@
.. |WriteParams-sample_identity-api| replace:: :cpp:func:`sample_identity() <eprosima::fastdds::rtps::WriteParams::sample_identity>`
.. |WriteParams-related_sample_identity-api| replace:: :cpp:func:`related_sample_identity() <eprosima::fastdds::rtps::WriteParams::related_sample_identity>`
.. |WriteParams-user_write_data-api| replace:: :cpp:func:`user_write_data() <eprosima::fastdds::rtps::WriteParams::user_write_data>`
.. |WriteParams-UserWriteData-api| replace:: :cpp:struct:`UserWriteData <eprosima::fastdds::rtps::WriteParams::UserWriteData>`

.. |ThreadSettings::scheduling_policy-api| replace:: :cpp:member:`scheduling_policy<eprosima::fastdds::rtps::ThreadSettings::scheduling_policy>`
.. |ThreadSettings::priority-api| replace:: :cpp:member:`priority<eprosima::fastdds::rtps::ThreadSettings::priority>`
Expand Down
11 changes: 6 additions & 5 deletions docs/fastdds/dds_layer/publisher/dataWriter/publishingData.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,14 @@ Prefiltering out DataReaders
----------------------------

The user can use an overload of the |DataWriter::write-api| method that allows providing a |WriteParams-api| structure.
One of the members of this latter structure is the |WriteParams-user_write_data-api| in which the user
can store extra information to be used by the prefiltering mechanism.
One of the members of this latter structure is the |WriteParams-UserWriteData-api| in which the user
can store extra information to be used by the prefiltering mechanism and it can be set using the
|WriteParams-user_write_data-api|.

By implementing the |IContentFilter-api| and passing it to the DataWriter with |DataWriter::set_sample_prefilter|,
user can prevent the DataWriter from sending samples to the matched DataReaders based on both:
the content of the sample (|SerializedPayload_t-api|) and/or the |WriteParams-user_write_data-api|
within |FilteredSampleInfo::user_write_data-api|.
user can prevent the DataWriter from sending samples to the matched DataReaders based on both
the content of the sample (|SerializedPayload_t-api|) and/or the |FilteredSampleInfo::user_write_data-api| within
|FilteredSampleInfo-api|.
If the return value of |IContentFilter::evaluate-api| is ``false``, the sample will not be sent to the DataReader
identified by its |Guid_t-api| in the method's input argument.
It is strongly recommended that the |IContentFilter::evaluate-api| implementation neither performs any blocking
Expand Down