File tree Expand file tree Collapse file tree
fastdds/dds_layer/publisher/dataWriter Expand file tree Collapse file tree Original file line number Diff line number Diff 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);
Original file line number Diff line number Diff line change 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>`
Original file line number Diff line number Diff line change @@ -90,13 +90,14 @@ Prefiltering out DataReaders
9090----------------------------
9191
9292The 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
9697By 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 |.
100101If the return value of |IContentFilter::evaluate-api | is ``false ``, the sample will not be sent to the DataReader
101102identified by its |Guid_t-api | in the method's input argument.
102103It is strongly recommended that the |IContentFilter::evaluate-api | implementation neither performs any blocking
You can’t perform that action at this time.
0 commit comments