RTI Connext .Net APIs  Version 5.2.3
 All Classes Namespaces Functions Variables Enumerations Properties Groups Pages
DDS::IWriterContentFilter Interface Reference

<<interface>> Interface to be used by a custom filter of a DDS::ContentFilteredTopic. More...

#include <managed_topic.h>

Inheritance diagram for DDS::IWriterContentFilter:
DDS::IContentFilter

Public Member Functions

void writer_compile (Object^ writer_filter_data, const ExpressionProperty% prop, const System::String^ expression, const StringSeq^ parameters, const TypeCode^ type_code, const System::String^ type_class_name, const Cookie_t^ cookie)
 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.
 
CookieSeqwriter_evaluate (Object^ writer_filter_data, const Object^ sample, const FilterSampleInfo% meta_data)
 A writer-side filtering API to retrieve a list of DataReaders whose content filters pass the sample.
 
void writer_finalize (Object^ writer_filter_data, const Cookie_t^ cookie)
 A writer-side filtering API to clean up a previously compiled instance of the content filter.
 
void writer_attach (Object^ %writer_filter_data)
 A writer-side filtering API to create some state that can facilitate filtering on the writer side.
 
void writer_detach (Object^ writer_filter_data)
 A writer-side filtering API to clean up a previously created state using ::DDS::IContentFilter::writer_attach.
 
- Public Member Functions inherited from DDS::IContentFilter
void compile (Object^ %compile_data, const System::String^ expression, const StringSeq^ parameters, const TypeCode^ type_code, const System::String^ type_class_name, Object^ old_compile_data)
 Compile an instance of the content filter according to the filter expression and parameters of the given data type.
 
System::Boolean evaluate (Object^ compile_data, const Object^ sample, const FilterSampleInfo% meta_data)
 Evaluate whether the sample is passing the filter or not according to the sample content.
 
void finalize (Object^ compile_data)
 A previously compiled instance of the content filter is no longer in use and resources can now be cleaned up.
 

Detailed Description

<<interface>> Interface to be used by a custom filter of a DDS::ContentFilteredTopic.

Entity:
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.

See Also
DDS::ContentFilteredTopic
DDS::DomainParticipant::register_contentfilter

Member Function Documentation

void DDS::IWriterContentFilter::writer_compile ( Object^  writer_filter_data,
const ExpressionProperty prop,
const System::String^  expression,
const StringSeq parameters,
const TypeCode type_code,
const System::String^  type_class_name,
const Cookie_t cookie 
)

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 method 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.

Parameters
writer_filter_data<<in>> A pointer to the state created using DDS::IWriterContentFilter::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::IWriterContentFilter::writer_compile was called.
Exceptions
Oneof the Standard Return Codes
CookieSeq ^ DDS::IWriterContentFilter::writer_evaluate ( Object^  writer_filter_data,
const Object^  sample,
const FilterSampleInfo meta_data 
)

A writer-side filtering API to retrieve a list of DataReaders whose content filters pass the sample.

This method 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

Parameters
writer_filter_data<<in>> A pointer to the state created using DDS::IWriterContentFilter::writer_attach .
sample<<in>> Pointer to a deserialized sample to be filtered.
meta_data<<in>> Pointer to meta data associated with the sample.
Returns
The function returns DDS::CookieSeq which identifies the set of DataReaders whose filters pass the sample.
void DDS::IWriterContentFilter::writer_finalize ( Object^  writer_filter_data,
const Cookie_t cookie 
)

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 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.

Parameters
writer_filter_data<<in>> A pointer to the state created using DDS::IWriterContentFilter::writer_attach.
cookieDDS::Cookie_t to uniquely identify DDS::DataReader for which DDS::IWriterContentFilter::writer_finalize was called.
void DDS::IWriterContentFilter::writer_attach ( Object^ %  writer_filter_data)

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 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.

Parameters
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.
void DDS::IWriterContentFilter::writer_detach ( Object^  writer_filter_data)

A writer-side filtering API to clean up a previously created state using ::DDS::IContentFilter::writer_attach.

This method is called to delete any state created using the DDS::IWriterContentFilter::writer_attach function. This method will be called when the DDS::DataWriter is deleted.

Parameters
writer_filter_data<<in>> A pointer to the state created using DDS::IWriterContentFilter::writer_attach.

RTI Connext .Net APIs Version 5.2.3 Copyright © Wed Apr 27 2016 Real-Time Innovations, Inc