RTI Routing Service Version 7.3.0
|
Provides a way to transform input samples into output samples of a different format and/or content. More...
#include <Transformation.hpp>
Public Member Functions | |
virtual void | transform (std::vector< SamplePtr > &output_sample_seq, std::vector< InfoPtr > &output_info_seq, const std::vector< SamplePtr > &input_sample_seq, const std::vector< InfoPtr > &input_info_seq)=0 |
Transforms a vector of input samples into a vector of output samples. More... | |
virtual void | return_loan (std::vector< SamplePtr > &sample_seq, std::vector< InfoPtr > &info_seq)=0 |
Returns a loan on the transformed data samples and info samples. 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 transform input samples into output samples of a different format and/or content.
|
pure virtual |
Transforms a vector of input samples into a vector of output samples.
When RTI Routing Service is done using the output samples, it will 'return the loan' to the transformation by calling Transformation::return_loan. It is guaranteed RTI Routing Service takes one outstanding loan at time.
The number of output samples can be different than the number of input samples.
The format associated with the input and output data samples and info samples depends on the format provided and consumed by the input's rti::routing::adapter::StreamReader and the output's rti::routing::adapter::StreamWriter.
For the built-in DDS adapter, the format of the samples is dds::core::xtypes::DynamicData and the format of the sample info is dds::sub::SampleInfo.
output_sample_seq | <<inout>> Vector that will hold the output data samples. RTI Routing Service provides this vector to the Transformation to fill. For each call, the size of the vector is zero. |
output_info_seq | <<inout>> Vector that will hold the input info samples. RTI Routing Service provides this vector to the Transformation to fill. For each call, the size of the vector is zero. |
input_sample_seq | <<in>> Vector of input data samples. This vector contains the list of samples that need to be transformed before calling rti::routing::adapter::StreamWriter::write. |
input_info_seq | <<in>> Vector of input info sample. This vector contains the list of samples that need to be transformed before calling rti::routing::adapter::StreamWriter::write. |
std::exception |
Implemented in rti::routing::transf::TypedTransformation< Data, Info >, and rti::routing::transf::TypedTransformation< Data, Info >.
|
pure virtual |
Returns a loan on the transformed 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 Transformation::transform.
sample_seq | <<in>> Vector of loaned data samples. |
info_seq | <<in>> Vector of loaned info samples. |
std::exception |
Implemented in rti::routing::transf::TypedTransformation< Data, Info >, and rti::routing::transf::TypedTransformation< Data, Info >.