DDS_ContentFilter Struct Reference
[Topics]

<<interface>> Interface to be used by a custom filter of a DDS_ContentFilteredTopic More...


Data Fields

DDS_ContentFilterCompileFunction compile
 Compile an instance of the content filter according to the filter expression and parameters of the given data type.
DDS_ContentFilterEvaluateFunction evaluate
 Evaluate whether the sample is passing the filter or not according to the sample content.
DDS_ContentFilterFinalizeFunction finalize
 A previously compiled instance of the content filter is no longer in use and resources can now be cleaned up.
void * filter_data
 A place for filter implementors to keep a pointer to data that may be needed by their filter.


Detailed Description

<<interface>> Interface to be used by a custom filter of a DDS_ContentFilteredTopic

Entity:
DDS_ContentFilteredTopic
This is the interface that can be implemented by an application-provided class and then registered with the DDS_DomainParticipant such that samples can be filtered for a DDS_ContentFilteredTopic with the given filter name.

Note: the API for using a custom content filter is subject to change in a future release.

See also:
DDS_ContentFilteredTopic

DDS_DomainParticipant_register_contentfilter


Field Documentation

Compile an instance of the content filter according to the filter expression and parameters of the given data type.

This function is called when an instance of the locally registered content filter is created or when the expression parameter for the locally registered content filter instance is changed.

An instance of the locally registered content filter is created every time a local DDS_ContentFilteredTopic with the matching filter name is created, or when a DDS_DataReader with a matching filter name is discovered.

It is possible for multiple threads to be calling into this function at the same time. However, this function will never be called on a content filter that has been unregistered.

Parameters:
type_class_name <<in>> Fully qualified class name of the related DDS_Topic.
old_compile_data <<in>> The previous new_compile_data value from a previous call to this instance of a content filter. If the compile function is called more than once for an instance of a DDS_ContentFilteredTopic, e.g., if the expression parameters are changed, then the new_compile_data value returned by the previous invocation is passed in the old_compile_data parameter (which can be NULL). If this is a new instance of the filter, NULL is passed. This parameter is useful for freeing or reusing resources previously allocated for this
One of the Standard Return Codes

Evaluate whether the sample is passing the filter or not according to the sample content.

This function is called when a sample for a locally created DDS_DataReader associated with the filter is received, or when a sample for a discovered DDS_DataReader assocated with the filter needs to be sent.

It is possible for multiple threads to be calling into this function at the same time. However, this function will never be called on a content filter that has been unregistered.

A previously compiled instance of the content filter is no longer in use and resources can now be cleaned up.

This function is called when an instance of the locally registered content filter is deleted.

An instance of the locally registered content filter is deleted every time a local DDS_ContentFilteredTopic with the matching filter name is deleted, or when a DDS_DataReader with a matching filter name is removed due to discovery.

This function is also called on all instances of the discovered DDS_DataReader with a matching filter name if the filter is unregistered with DDS_DomainParticipant_unregister_contentfilter

It is possible for multiple threads to be calling into this function at the same time. However, this function will never be called on a content filter that has been unregistered.

A place for filter implementors to keep a pointer to data that may be needed by their filter.


RTI Data Distribution Service C API Version 4.5e Copyright © 23 Oct 2011 Real-Time Innovations, Inc