RTI Routing Service Version 7.1.0
|
Provides a way to read samples of a specific type from a data domain. In the XML configuration file, StreamReaders are associated with the tag <input> within <route> and <auto_route>. More...
#include <StreamReader.hpp>
Public Member Functions | |
virtual void | take (std::vector< SamplePtr > &sample_seq, std::vector< InfoPtr > &info_seq)=0 |
Takes a collection of all data samples and info samples available from an input stream. More... | |
virtual void | read (std::vector< SamplePtr > &sample_seq, std::vector< InfoPtr > &info_seq)=0 |
Variation of StreamReader::take where the returned samples will remain in the StreamReader's cache, so they can be read again by subsequence StreamReader::take or StreamReader::read operations. More... | |
virtual void | take (std::vector< SamplePtr > &sample_seq, std::vector< InfoPtr > &info_seq, const SelectorState &selector_state)=0 |
Variation of StreamReader::take where the returned samples shall represent the subset specified by the SelectorState. More... | |
virtual void | read (std::vector< SamplePtr > &sample_seq, std::vector< InfoPtr > &info_seq, const SelectorState &selector_state)=0 |
Variation of StreamReader::read where the returned samples shall represent the subset specified by the SelectorState. More... | |
virtual void | return_loan (std::vector< SamplePtr > &sample_seq, std::vector< InfoPtr > &info_seq)=0 |
Returns a loan on the read or taken data samples and info samples. More... | |
virtual void * | create_content_query (void *old_query_data, const dds::topic::Filter &filter)=0 |
Creates a query object that selects the data with the specified filter. More... | |
virtual void | delete_content_query (void *query_data)=0 |
Deletes a content query created from this StreamReader. More... | |
virtual | ~StreamReader () |
Virtual destructor. More... | |
![]() | |
virtual void | update (const std::map< std::string, std::string > &properties) |
Updates a pluggable entity. More... | |
virtual | ~UpdatableEntity () |
Virtual destructor. More... | |
Provides a way to read samples of a specific type from a data domain. In the XML configuration file, StreamReaders are associated with the tag <input> within <route> and <auto_route>.
|
inlinevirtual |
Virtual destructor.
|
pure virtual |
Takes a collection of all data samples and info samples available from an input stream.
When RTI Routing Service is done using the samples, it will 'return the loan' to the StreamReader by calling StreamReader::return_loan. Note that multiple calls to this operation can be made before returning the loans.
The samples provided with this operation are considered 'removed' from the StreamReader cache, and they shall no longer be returned by subsequent StreamReader::take or StreamReader::read operations.
This operation represents the minimum required behavior by RTI Routing Service in order to forward data.
sample_seq | <<inout>> Vector that will hold the output samples. RTI Routing Service provides this vector to the StreamReader to fill. For each call, the size of the vector is zero. The data representation associated with the samples will be given by the value of TypeInfo::data_representation_kind that is part of the StreamInfo object passed at StreamWriter creation time. Usually the data representation is dynamic type, which corresponds to dds::core::xtypes::DynamicData. |
info_seq | <<inout>> Vector that will hold the output info samples. RTI Routing Service provides this vector to the StreamReader to fill. For each call, the size of the vector is zero. The implementation may leave the vector untouched if it does not support the concept of sample info. The info representation is dependent of the StreamWriter implementation. Usually when data representation is dynamic type, the sample info is dds::sub::SampleInfo. |
std::exception |
Implemented in rti::routing::adapter::TStreamReader< Data, Info >, and rti::routing::adapter::TStreamReader< Data, Info >.
|
pure virtual |
Variation of StreamReader::take where the returned samples will remain in the StreamReader's cache, so they can be read again by subsequence StreamReader::take or StreamReader::read operations.
Implemented in rti::routing::adapter::TStreamReader< Data, Info >, and rti::routing::adapter::TStreamReader< Data, Info >.
|
pure virtual |
Variation of StreamReader::take where the returned samples shall represent the subset specified by the SelectorState.
SelectorState is configured accordingly from the values set on rti::routing::processor::Selector. This operation will be called only by custom rti::routing::processor::Processor implementations.
sample_seq | |
info_seq | |
selector_state | <<in>> A description of the subset of samples that shall be returned. |
Implemented in rti::routing::adapter::TStreamReader< Data, Info >, and rti::routing::adapter::TStreamReader< Data, Info >.
|
pure virtual |
Variation of StreamReader::read where the returned samples shall represent the subset specified by the SelectorState.
SelectorState is configured accordingly from the values set on rti::routing::processor::Selector. This operation will be called only by custom rti::routing::processor::Processor implementations.
sample_seq | |
info_seq | |
selector_state | <<in>> A description of the subset of samples that shall be returned. |
Implemented in rti::routing::adapter::TStreamReader< Data, Info >, and rti::routing::adapter::TStreamReader< Data, Info >.
|
pure virtual |
Returns a loan on the read or taken data samples and info samples.
RTI Routing Service calls this method to indicate that it is done accessing the collection of data samples and info samples obtained by an earlier invocation of any variation of StreamReader::take.
sample_seq | <<in>> Vector of loaned data samples. |
info_seq | <<in>> Vector of loaned info samples. |
std::exception |
Implemented in rti::routing::adapter::TStreamReader< Data, Info >, and rti::routing::adapter::TStreamReader< Data, Info >.
|
pure virtual |
Creates a query object that selects the data with the specified filter.
This operation allows to read data with a SelectorState that contains a query object returned by this operation.
A query object type is implementation dependent and it's guaranteed to to be used only within the same StreamReader that created it. Because a query object may be a expensive resource, this operation allows to receive a previously created query for a potential reuse and update of its filter.
[in] | old_query_data | A previously created query object that that is provided for potential reuse and update of its filter. |
[in] | filter | The query content filter |
std::exception |
Implemented in rti::routing::adapter::NoOpStreamReader< Data, Info >.
|
pure virtual |
Deletes a content query created from this StreamReader.
[in] | query_data | the query object to be deleted. |
Implemented in rti::routing::adapter::NoOpStreamReader< Data, Info >.