Skip to content

Commit 218670c

Browse files
committed
Refs #23264: Fix and improve dw sample prefilter docs
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
1 parent 4b8d976 commit 218670c

3 files changed

Lines changed: 8 additions & 17 deletions

File tree

code/DDSCodeTester.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3347,18 +3347,7 @@ void dds_dataWriter_examples()
33473347

33483348
// Create a custom user write data
33493349
eprosima::fastdds::rtps::GuidPrefix_t filtered_out_prefix;
3350-
filtered_out_prefix.value[0] = 0x01; // Example prefix to filter out
3351-
filtered_out_prefix.value[1] = eprosima::fastdds::rtps::octet(0x73);
3352-
filtered_out_prefix.value[2] = eprosima::fastdds::rtps::octet(0x71);
3353-
filtered_out_prefix.value[3] = eprosima::fastdds::rtps::octet(0x85);
3354-
filtered_out_prefix.value[4] = eprosima::fastdds::rtps::octet(0x69);
3355-
filtered_out_prefix.value[5] = eprosima::fastdds::rtps::octet(0x76);
3356-
filtered_out_prefix.value[6] = eprosima::fastdds::rtps::octet(0x95);
3357-
filtered_out_prefix.value[7] = eprosima::fastdds::rtps::octet(0x66);
3358-
filtered_out_prefix.value[8] = eprosima::fastdds::rtps::octet(0x65);
3359-
filtered_out_prefix.value[9] = eprosima::fastdds::rtps::octet(0x82);
3360-
filtered_out_prefix.value[10] = eprosima::fastdds::rtps::octet(0x82);
3361-
filtered_out_prefix.value[11] = eprosima::fastdds::rtps::octet(0x79);
3350+
std::istringstream("44.53.00.5f.45.60.52.4f.53.49.7c.41") >> filtered_out_prefix;
33623351

33633352
std::shared_ptr<CustomUserWriteData> custom_write_data =
33643353
std::make_shared<CustomUserWriteData>(filtered_out_prefix);

docs/03-exports/aliases-api.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,7 @@
11261126
.. |WriteParams-sample_identity-api| replace:: :cpp:func:`sample_identity() <eprosima::fastdds::rtps::WriteParams::sample_identity>`
11271127
.. |WriteParams-related_sample_identity-api| replace:: :cpp:func:`related_sample_identity() <eprosima::fastdds::rtps::WriteParams::related_sample_identity>`
11281128
.. |WriteParams-user_write_data-api| replace:: :cpp:func:`user_write_data() <eprosima::fastdds::rtps::WriteParams::user_write_data>`
1129+
.. |WriteParams-UserWriteData-api| replace:: :cpp:struct:`UserWriteData <eprosima::fastdds::rtps::WriteParams::UserWriteData>`
11291130

11301131
.. |ThreadSettings::scheduling_policy-api| replace:: :cpp:member:`scheduling_policy<eprosima::fastdds::rtps::ThreadSettings::scheduling_policy>`
11311132
.. |ThreadSettings::priority-api| replace:: :cpp:member:`priority<eprosima::fastdds::rtps::ThreadSettings::priority>`

docs/fastdds/dds_layer/publisher/dataWriter/publishingData.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,14 @@ Prefiltering out DataReaders
9090
----------------------------
9191

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

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

0 commit comments

Comments
 (0)