|
RTI Connext Micro C API Version 4.3.0
|
Filter that allows a DDS_DataReader to specify that it is interested only in (potentially) a subset of the samples on its topic. More...
#include <dds_c_content_filter.h>
Data Fields | |
| DDS_String | filter_name |
| Name of the content filter. | |
| DDS_String | filter_class_name |
| Name of the filter class. | |
| DDS_String | filter_expression |
| Filter expression. | |
| struct DDS_StringSeq | expression_parameters |
| Filter expression parameters. | |
Filter that allows a DDS_DataReader to specify that it is interested only in (potentially) a subset of the samples on its topic.
The CONTENT_FILTER QoS policy allows a DDS_DataReader to specify that it is interested only in (potentially) a subset of the samples on its topic. Once a content filter is configured, the DDS_DataReader will only receive samples that pass the filter. If content filtering is supported by the DDS_DataWriter, samples that do not pass the filter may not be sent at all, thus reducing the network bandwidth usage.
A DDS_DataReader will fail to be created if it specifies a DDS_ContentFilterQosPolicy and the content filtering feature is not enabled for its parent DDS_DomainParticipant. It will also fail to be created if the DDS_ContentFilterQosPolicy specifies a filter that is not compatible with the resource limits specified in the DDS_FilterQosPolicy for its parent DDS_DomainParticipant.
Generally, RTI Connext DDS Micro does not support changing the QoS of DDS entities after they are enabled. DDS_ContentFilterQosPolicy is an exception to this rule, since it can be updated at runtime using DDS_DataReader_set_qos.
For all strings contained in this QoS, be sure to follow the Conventions for allocating and freeing memory. In particular, if you use DDS_DataReaderQos_finalize to finalize the DDS_DataReaderQos, the function will expect that all strings in the DDS_ContentFilterQosPolicy are owned by the policy and will attempt to free them when finalizing the QoS. Therefore, it is recommended to use DDS_String_dup to duplicate all strings that you want to use in the DDS_ContentFilterQosPolicy.
As an example, a content filter could be configured as follows:
| DDS_String DDS_ContentFilterQosPolicy::filter_name |
Name of the content filter.
A name to uniquely identify this content filter within a DomainParticipant. For interoperability with Connext Professional, this field corresponds to the filter_name attribute when configuring a content filter with XML-based application creation.
| DDS_String DDS_ContentFilterQosPolicy::filter_class_name |
Name of the filter class.
The name that identifies the type of filter expression. RTI Connext DDS Micro includes a built-in "DDSSQL" filter class. Custom content filter classes can be registered using DDS_DomainParticipant_register_contentfilter.
| DDS_String DDS_ContentFilterQosPolicy::filter_expression |
Filter expression.
A logical expression on the contents of the DDS_DataReader's Topic. If the expression evaluates to TRUE, a DDS sample is received; otherwise, it is discarded. The notation for this expression depends on the filter that you are using (specified by the DDS_ContentFilterQosPolicy::filter_class_name).
| struct DDS_StringSeq DDS_ContentFilterQosPolicy::expression_parameters |
Filter expression parameters.
A string sequence of filter expression parameters. Each parameter corresponds to a positional argument in the filter expression: element 0 corresponds to positional argument 0, element 1 to positional argument 1, and so forth.