|
transformer
|
#include <Transformer.hpp>
Public Member Functions | |
| Transformer (int priority=-10) | |
| virtual void | clear () |
| void | addTransformationChain (std::string from, std::string to, const std::vector< TransformationElement *> &chain) |
| Transformation & | registerTransformation (std::string sourceFrame, std::string targetFrame) |
| const std::vector< Transformation * > & | getRegisteredTransformations () |
| void | unregisterTransformation (Transformation *transformation) |
| void | registerTransformCallback (Transformation &transform, boost::function< void(const base::Time &ts, const Transformation &t)> callback) |
| template<class T > | |
| int | registerDataStream (base::Time dataPeriod, boost::function< void(const base::Time &ts, const T &value)> callback, int priority=-1, const std::string &name=std::string()) |
| template<class T > | |
| int | registerDataStreamWithTransform (base::Time dataPeriod, Transformation &transformation, boost::function< void(const base::Time &ts, const T &value, const Transformation &t)> callback, int priority=- 1, const std::string &name=std::string()) |
| void | unregisterDataStream (int idx) |
| void | disableStream (int idx) |
| void | enableStream (int idx) |
| bool | isStreamActive (int idx) const |
| void | requestTransformationAtTime (int idx, base::Time ts) |
| template<class T > | |
| void | pushData (int idx, const base::Time &ts, const T &data) |
| int | step () |
| const aggregator::StreamAlignerStatus & | getStreamAlignerStatus () |
| void | setTimeout (const base::Time &t) |
| virtual void | pushDynamicTransformation (const TransformationType &tr) |
| void | pushStaticTransformation (const TransformationType &tr) |
| void | setFrameMapping (const std::string &frameName, const std::string &newName) |
| const aggregator::StreamAlignerStatus & | getStatus () |
| const TransformerStatus & | getTransformerStatus () |
| virtual | ~Transformer () |
Protected Member Functions | |
| void | recomputeAvailableTransformations () |
Protected Attributes | |
| aggregator::StreamAligner | aggregator |
| std::map< std::pair< std::string, std::string >, int > | transformToStreamIndex |
| std::vector< Transformation * > | transformations |
| TransformationTree | transformationTree |
| int | priority |
| TransformerStatus | transformerStatus |
A class that provides transformations to given samples, ordered in time.
|
inline |
Default constructor for a transformer
| priority | - stream priority which is given to dynamic transform streams. |
|
virtual |
Destructor, deletes the TransformationMakers
| void transformer::Transformer::addTransformationChain | ( | std::string | from, |
| std::string | to, | ||
| const std::vector< TransformationElement *> & | chain | ||
| ) |
This function may be used to manually set a transformation chain.
The function seeks through all registered sample streams, and sets the given chain to those streams, where the source and target frame matches.
|
virtual |
Deletes all dynamic and static transformations that are known to the transformer.
Also deletes all samples in the data streams
Callbacks and setups for the data streams are NOT deleted by this method.
Reimplemented in transformer::NonAligningTransformer.
|
inline |
|
inline |
|
inline |
Returns a vector of the registered transformations.
|
inline |
|
inline |
Get debug output of underlying stream aligner
| const TransformerStatus & transformer::Transformer::getTransformerStatus | ( | ) |
|
inline |
|
inline |
Push new data into the stream
| ts | - the timestamp of the data item |
| data | - the data added to the stream |
|
virtual |
Function for adding new Transformation samples.
This function will interally keep track of available transformations and register streams for 'new' transformations.
Reimplemented in transformer::NonAligningTransformer.
| void transformer::Transformer::pushStaticTransformation | ( | const TransformationType & | tr | ) |
Function for adding static Transformations.
|
protected |
|
inline |
This function registes a new data stream together with an callback.
The callback will be called every time a new data sample is available.
|
inline |
This function registes a new data stream together with an callback.
The callback will be called every time a new data sample is available.
| Transformation & transformer::Transformer::registerTransformation | ( | std::string | sourceFrame, |
| std::string | targetFrame | ||
| ) |
This function registers a wanted transformation at the transformation stack.
It returns a reference to an object that represents the wanted transformation.
Note, the time of the transformation advances if one calls step() on the transformer.
|
inline |
Registers a callback that will be called every time a new transformation is available for the given Transformation handle.
|
inline |
| void transformer::Transformer::setFrameMapping | ( | const std::string & | frameName, |
| const std::string & | newName | ||
| ) |
|
inline |
|
inline |
Process data streams, this basically calls StreamAligner::step().
|
inline |
This function unregistes a data stream.
| void transformer::Transformer::unregisterTransformation | ( | Transformation * | transformation | ) |
Unregisteres a transformation from the transfromation stack.
This removes and deletes the given transformation
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.13