RTI Routing Service Version 7.2.0
|
A wrapper implementation of a Transformation that provides a strongly-typed interface through template parameters for data and info representation. More...
#include <Transformation.hpp>
Public Types | |
typedef Data | DataRep |
The data type. More... | |
typedef Info | InfoRep |
The info type. More... | |
Public Member Functions | |
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) RTI_FINAL |
Performs the conversion between the vector of data and info pointers to strongly-type pointers. More... | |
void | return_loan (std::vector< SamplePtr > &sample_seq, std::vector< InfoPtr > &info_seq) RTI_FINAL |
Performs the conversion between the vector of data and info pointers to strongly-type pointers. More... | |
virtual void | transform (std::vector< Data * > &output_sample_seq, std::vector< Info * > &output_info_seq, const std::vector< Data * > &input_sample_seq, const std::vector< Info * > &input_info_seq)=0 |
Interface redefinition. More... | |
virtual void | return_loan (std::vector< Data * > &sample_seq, std::vector< Info * > &info_seq)=0 |
Interface redefinition. More... | |
virtual | ~TypedTransformation () |
Virtual destructor. More... | |
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 | 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... | |
Public Member Functions inherited from rti::routing::UpdatableEntity | |
virtual void | update (const std::map< std::string, std::string > &properties) |
Updates a pluggable entity. More... | |
virtual | ~UpdatableEntity () |
Virtual destructor. More... | |
A wrapper implementation of a Transformation that provides a strongly-typed interface through template parameters for data and info representation.
You can implement this interface as a convenience to manipulate the data and info representation without dealing with opaque pointers.
typedef Data rti::routing::transf::TypedTransformation< Data, Info >::DataRep |
The data type.
typedef Info rti::routing::transf::TypedTransformation< Data, Info >::InfoRep |
The info type.
|
inlinevirtual |
Virtual destructor.
|
inlinevirtual |
Performs the conversion between the vector of data and info pointers to strongly-type pointers.
Implements rti::routing::transf::Transformation.
References rti::routing::transf::TypedTransformation< Data, Info >::transform().
Referenced by rti::routing::transf::TypedTransformation< Data, Info >::transform().
|
inlinevirtual |
Performs the conversion between the vector of data and info pointers to strongly-type pointers.
Implements rti::routing::transf::Transformation.
References rti::routing::transf::TypedTransformation< Data, Info >::return_loan().
Referenced by rti::routing::transf::TypedTransformation< Data, Info >::return_loan().
|
pure virtual |
Interface redefinition.
|
pure virtual |
Interface redefinition.
|
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 |
Implements rti::routing::transf::Transformation.
|
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 |
Implements rti::routing::transf::Transformation.