RTI Connext C API
Version 6.0.0
|
<<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_ContentFilterWriterCompileFunction | writer_compile |
A writer-side filtering API to compile an instance of the content filter according to the filter expression and parameters specified by a matching DDS_DataReader. | |
DDS_ContentFilterEvaluateFunction | evaluate |
Evaluate whether the sample is passing the filter or not according to the sample content. | |
DDS_ContentFilterWriterEvaluateFunction | writer_evaluate |
A writer-side filtering API to retrieve a list of DataReaders whose content filters pass the sample. | |
DDS_ContentFilterFinalizeFunction | finalize |
A previously compiled instance of the content filter is no longer in use and resources can now be cleaned up. | |
DDS_ContentFilterWriterFinalizeFunction | writer_finalize |
A writer-side filtering API to clean up a previously compiled instance of the content filter. | |
DDS_ContentFilterWriterAttachFunction | writer_attach |
A writer-side filtering API to create some state that can facilitate filtering on the writer side. | |
DDS_ContentFilterWriterDetachFunction | writer_detach |
A writer-side filtering API to clean up a previously created state using DDS_ContentFilter::writer_attach. | |
DDS_ContentFilterWriterReturnLoanFunction | writer_return_loan |
A writer-side filtering API to return the loan on the list of DataReaders returned by DDS_ContentFilter::writer_evaluate. | |
void * | filter_data |
A place for filter implementors to keep a pointer to data that may be needed by their filter. | |
<<interface>> Interface to be used by a custom filter of a DDS_ContentFilteredTopic
This interface 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.
DDS_ContentFilterCompileFunction DDS_ContentFilter::compile |
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.
new_compile_data | <<out>> User specified opaque pointer of this instance of the content filter. This value is then passed to the DDS_ContentFilter::evaluate and DDS_ContentFilter::finalize functions for this instance of the content filter. Can be set to NULL . |
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 the DDS_ContentFilteredTopic was created with. The string sequence is equal (but not identical) to the string sequence passed to DDS_DomainParticipant_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 DDS_Topic of the DDS_ContentFilteredTopic. 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. in Java. |
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 previously allocated resources. |
DDS_ContentFilterWriterCompileFunction DDS_ContentFilter::writer_compile |
A writer-side filtering API to compile an instance of the content filter according to the filter expression and parameters specified by a matching DDS_DataReader.
This function is called when the DDS_DataWriter discovers a DDS_DataReader with a DDS_ContentFilteredTopic or when a DDS_DataWriter 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 DDS_ContentFilter::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 DDS_ContentFilteredTopic was created. The string sequence is equal (but not identical) to the string sequence passed to DDS_DomainParticipant_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 DDS_Topic of the DDS_ContentFilteredTopic. 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 DDS_Topic. |
cookie | <<in>> DDS_Cookie_t to uniquely identify DDS_DataReader for which DDS_ContentFilter::writer_compile was called. |
DDS_ContentFilterEvaluateFunction DDS_ContentFilter::evaluate |
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.
compile_data | <<in>> The last return value of the DDS_ContentFilter::compile function for this instance of the content filter. Can be NULL . |
sample | <<in>> Pointer to a deserialized sample to be filtered |
meta_data | <<in>> Pointer to meta data associated with the sample. |
DDS_ContentFilterWriterEvaluateFunction DDS_ContentFilter::writer_evaluate |
A writer-side filtering API to retrieve a list of DataReaders whose content filters pass the sample.
This function is called every time a DDS_DataWriter writes a new sample. Its purpose is to evaluate the sample for all the readers for which the DDS_DataWriter is performing writer-side filtering and return the list of DDS_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 DDS_ContentFilter::writer_attach . |
sample | <<in>> Pointer to a deserialized sample to be filtered. |
meta_data | <<in>> Pointer to meta data associated with the sample. |
DDS_ContentFilterFinalizeFunction DDS_ContentFilter::finalize |
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.
compile_data | <<in>> The last return value of the DDS_ContentFilter::compile function for this instance of the content filter. Can be NULL . |
DDS_ContentFilterWriterFinalizeFunction DDS_ContentFilter::writer_finalize |
A writer-side filtering API to clean up a previously compiled instance of the content filter.
This function is called to notify the filter implementation that the DDS_DataWriter is no longer matching with a DDS_DataReader for which it was previously performing writer-side filtering. This will allow the filter to purge any state it was maintaining for the DDS_DataReader.
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 DDS_ContentFilter::writer_attach. |
cookie | DDS_Cookie_t to uniquely identify DDS_DataReader for which DDS_ContentFilter::writer_finalize was called. |
DDS_ContentFilterWriterAttachFunction DDS_ContentFilter::writer_attach |
A writer-side filtering API to create some state that can facilitate filtering on the writer side.
This function is called to create some state required to perform filtering on the writer side using writer-side filtering APIs. This function will be called for every DDS_DataWriter; it will be called only the first time the DDS_DataWriter matches a DDS_DataReader 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 DDS_DataWriter that will help perform writer-side filtering efficiently. |
DDS_ContentFilterWriterDetachFunction DDS_ContentFilter::writer_detach |
A writer-side filtering API to clean up a previously created state using DDS_ContentFilter::writer_attach.
This function is called to delete any state created using the DDS_ContentFilter::writer_attach function. This function will be called when the DDS_DataWriter is deleted.
writer_filter_data | <<in>> A pointer to the state created using DDS_ContentFilter::writer_attach. |
DDS_ContentFilterWriterReturnLoanFunction DDS_ContentFilter::writer_return_loan |
A writer-side filtering API to return the loan on the list of DataReaders returned by DDS_ContentFilter::writer_evaluate.
This function is called to return the loan on DDS_CookieSeq returned by DDS_ContentFilter::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 DDS_ContentFilter::writer_attach. |
cookies | <<in>> DDS_CookieSeq for which the DDS_ContentFilter::writer_return_loan was invoked. |
void* DDS_ContentFilter::filter_data |
A place for filter implementors to keep a pointer to data that may be needed by their filter.