|
joint_dispatcher
|
#include <Dispatcher.hpp>
Public Types | |
| typedef size_t | ChannelID |
Public Member Functions | |
| ChannelID | addInput (std::string const &name="") |
| ChannelID | addOutput (std::string const &name, std::vector< std::string > const &jointNames) |
| ChannelID | addOutput (std::string const &name="", size_t size=0) |
| ChannelID | getInputByName (std::string const &name) const |
| ChannelID | getOutputByName (std::string const &name) const |
| Output & | getOutput (ChannelID id) |
| void | addDispatch (ChannelID input, JointSelection const &inputJoints, ChannelID output, JointSelection const &outputJoints) |
| void | addDispatch (std::string const &input, JointSelection const &inputJoints, std::string const &output, JointSelection const &outputJoints) |
| void | write (ChannelID input, base::samples::Joints const &sample) |
| void | write (std::string const &input, base::samples::Joints const &sample) |
| bool | read (ChannelID output, base::samples::Joints &sample) |
| bool | read (std::string const &name, base::samples::Joints &sample) |
| void | reset () |
Implementation of mux/demux logic for base::samples::Joints
This class allows to transfer arbitrary sets of joints on inputs to other sets on outputs. It allows to
| typedef size_t joint_dispatcher::Dispatcher::ChannelID |
| void Dispatcher::addDispatch | ( | ChannelID | input, |
| JointSelection const & | inputJoints, | ||
| ChannelID | output, | ||
| JointSelection const & | outputJoints | ||
| ) |
This declares a mapping from some joints on a given input and some joints on a given output
| void Dispatcher::addDispatch | ( | std::string const & | input, |
| JointSelection const & | inputJoints, | ||
| std::string const & | output, | ||
| JointSelection const & | outputJoints | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| Dispatcher::ChannelID Dispatcher::addInput | ( | std::string const & | name = "" | ) |
This declares an input to the dispatcher
| name | the input name. This is mostly used for debugging / status purposes |
| Dispatcher::ChannelID Dispatcher::addOutput | ( | std::string const & | name, |
| std::vector< std::string > const & | jointNames | ||
| ) |
This declares an output to the dispatcher, as well as the joint names for this output
| name | the output name. This can be left empty. |
| Dispatcher::ChannelID Dispatcher::addOutput | ( | std::string const & | name = "", |
| size_t | size = 0 |
||
| ) |
This declares an output to the dispatcher, as well as the expected number of joints.
If non-zero, the number of joints is used for (1) consistency checking and (2) pre-allocating the needed arrays.
| Dispatcher::ChannelID Dispatcher::getInputByName | ( | std::string const & | name | ) | const |
Returns the ID of an input from its name
Returns the Output object associated with the given ID
| Dispatcher::ChannelID Dispatcher::getOutputByName | ( | std::string const & | name | ) | const |
Returns the ID of an output from its name
| bool Dispatcher::read | ( | ChannelID | output, |
| base::samples::Joints & | sample | ||
| ) |
Reads a given output channel
| bool Dispatcher::read | ( | std::string const & | name, |
| base::samples::Joints & | sample | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void Dispatcher::reset | ( | ) |
Resets the internal tracking state without changing the configuration state
| void Dispatcher::write | ( | ChannelID | input, |
| base::samples::Joints const & | sample | ||
| ) |
Pushes a sample on a given input
The outputs for which there is a dispatch are going to be updated
| void Dispatcher::write | ( | std::string const & | input, |
| base::samples::Joints const & | sample | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
1.8.13