RTI Connext C++ API
Version 5.1.0
|
<<interface>> Interface to be used by a custom filter of a DDSContentFilteredTopic. More...
Public Member Functions | |
virtual DDS_ReturnCode_t | writer_compile (void *writer_filter_data, DDS_ExpressionProperty *prop, const char *expression, const DDS_StringSeq *parameters, const DDS_TypeCode *type_code, const char *type_class_name, const DDS_Cookie_t *cookie)=0 |
A writer-side filtering API to compile an instance of the content filter according to the filter expression and parameters specified by a matching DDSDataReader. | |
virtual struct DDS_CookieSeq * | writer_evaluate (void *writer_filter_data, const void *sample, const DDS_FilterSampleInfo *meta_data)=0 |
A writer-side filtering API to retrieve a list of DataReaders whose content filters pass the sample. | |
virtual void | writer_finalize (void *writer_filter_data, const DDS_Cookie_t *cookie)=0 |
A writer-side filtering API to clean up a previously compiled instance of the content filter. | |
virtual DDS_ReturnCode_t | writer_attach (void **writer_filter_data)=0 |
A writer-side filtering API to create some state that can facilitate filtering on the writer side. | |
virtual void | writer_detach (void *writer_filter_data)=0 |
A writer-side filtering API to clean up a previously created state using DDSWriterContentFilter::writer_attach. | |
virtual void | writer_return_loan (void *writer_filter_data, DDS_CookieSeq *cookies)=0 |
A writer-side filtering API to return the loan on the list of DataReaders returned by DDSWriterContentFilter::writer_evaluate. | |
Public Member Functions inherited from DDSContentFilter | |
virtual DDS_ReturnCode_t | compile (void **new_compile_data, const char *expression, const DDS_StringSeq ¶meters, const DDS_TypeCode *type_code, const char *type_class_name, void *old_compile_data)=0 |
Compile an instance of the content filter according to the filter expression and parameters of the given data type. | |
virtual DDS_Boolean | evaluate (void *compile_data, const void *sample, const struct DDS_FilterSampleInfo *meta_data)=0 |
Evaluate whether the sample is passing the filter or not according to the sample content. | |
virtual void | finalize (void *compile_data)=0 |
A previously compiled instance of the content filter is no longer in use and resources can now be cleaned up. | |
<<interface>> Interface to be used by a custom filter of a DDSContentFilteredTopic.
This interface can be implemented by an application-provided class and then registered with the DDSDomainParticipant such that samples can be filtered for a DDSContentFilteredTopic with the given filter name.
Note: The API for using a custom content filter is subject to change in a future release.
|
pure virtual |
A writer-side filtering API to compile an instance of the content filter according to the filter expression and parameters specified by a matching DDSDataReader.
This method is called when the DDSDataWriter discovers a DDSDataReader with a DDSContentFilteredTopic or when a DDSDataWriter is notified of a change in a DataReader's filter parameter for the locally registered content filter instance.
It is possible for multiple threads to be calling into this function at the same time.
writer_filter_data | <<in>> A pointer to the state created using DDSWriterContentFilter::writer_attach . |
prop | <<out>> A pointer to DDS_ExpressionProperty that allows you to indicate to RTI Connext if a filter expression can be optimized. |
expression | <<in>> An ASCIIZ string with the filter expression. The memory used by this string is owned by RTI Connext and must not be freed. If you want to manipulate this string, you must first make a copy of it. |
parameters | <<in>> A string sequence with the expression parameters with which the DDSContentFilteredTopic was created. The string sequence is equal (but not identical) to the string sequence passed to DDSDomainParticipant::create_contentfilteredtopic. Note that the sequence passed to the compile function is owned by RTI Connext and must not be referenced outside the compile function. |
type_code | <<in>> A pointer to the type code for the related DDSTopic of the DDSContentFilteredTopic. A type_code is a description of a type in terms of which types it contains (such as long, string, etc.) and the corresponding member field names in the data type structure. The type code can be used to write custom content filters that can be used with any type. |
type_class_name | <<in>> Fully qualified class name of the related DDSTopic. |
cookie | <<in>> DDS_Cookie_t to uniquely identify DDSDataReader for which DDSWriterContentFilter::writer_compile was called. |
|
readpure virtual |
A writer-side filtering API to retrieve a list of DataReaders whose content filters pass the sample.
This method is called every time a DDSDataWriter writes a new sample. Its purpose is to evaluate the sample for all the readers for which the DDSDataWriter is performing writer-side filtering and return the list of Cookie_t structures associated with the DataReaders whose filters pass the sample.
It is possible for multiple threads to be calling into this function at the same time
writer_filter_data | <<in>> A pointer to the state created using DDSWriterContentFilter::writer_attach . |
sample | <<in>> Pointer to a deserialized sample to be filtered. |
meta_data | <<in>> Pointer to meta data associated with the sample. |
|
pure virtual |
A writer-side filtering API to clean up a previously compiled instance of the content filter.
This method is called to notify the filter implementation that the DDSDataWriter is no longer matching with a DDSDataReader for which it was previously performing writer-side filtering. This will allow the filter to purge any state it was maintaining for the DDSDataReader.
It is possible for multiple threads to be calling into this function at the same time.
writer_filter_data | <<in>> A pointer to the state created using DDSWriterContentFilter::writer_attach. |
cookie | DDS_Cookie_t to uniquely identify DDSDataReader for which DDSWriterContentFilter::writer_finalize was called. |
|
pure virtual |
A writer-side filtering API to create some state that can facilitate filtering on the writer side.
This method is called to create some state required to perform filtering on the writer side using writer-side filtering APIs. This method will be called for every DDSDataWriter; it will be called only the first time the DDSDataWriter matches a DDSDataReader using the specified filter. This function will not be called for any subsequent DataReaders that match the DataWriter and are using the same filter.
writer_filter_data | <<out>> A user-specified opaque pointer to some state created on the DDSDataWriter that will help perform writer-side filtering efficiently. |
|
pure virtual |
A writer-side filtering API to clean up a previously created state using DDSWriterContentFilter::writer_attach.
This method is called to delete any state created using the DDSWriterContentFilter::writer_attach function. This method will be called when the DDSDataWriter is deleted.
writer_filter_data | <<in>> A pointer to the state created using DDSWriterContentFilter::writer_attach. |
|
pure virtual |
A writer-side filtering API to return the loan on the list of DataReaders returned by DDSWriterContentFilter::writer_evaluate.
This method is called to return the loan on ::DDS_CookieSeq returned by DDSWriterContentFilter::writer_return_loan. It is possible for multiple threads to be calling into this function at the same time.
writer_filter_data | <<in>> A pointer to the state created using DDSWriterContentFilter::writer_attach. |
cookies | <<in>> ::DDS_CookieSeq for which the DDSWriterContentFilter::writer_return_loan. was invoked. |