|
int32_t | input_count () const |
| Returns the total number of inputs in this Route. More...
|
|
int32_t | output_count () const |
| Returns the total number of outputs in this Route. More...
|
|
bool | input_enabled (int32_t index) const |
| Checks whether the Input at the specified index is enabled. More...
|
|
bool | output_enabled (int32_t index) const |
| Checks whether the Input at the specified index is enabled. More...
|
|
Input & | input (int32_t index) |
| Returns the Input object at the specified index. More...
|
|
Input & | input (const std::string &name) |
| Returns the Input object with the specified name or throws an exception if the input with the given name is not found or if it is found but is not enabled. More...
|
|
template<typename DataRep , typename InfoRep > |
TypedInput< DataRep, InfoRep > | input (int32_t index) |
| Returns the TypedInput object at the specified index. More...
|
|
template<typename DataRep > |
TypedInput< DataRep > | input (int32_t index) |
| Same as input<DataRep, InfoRep>(int32_t) with InfoRep = dds::sub::SampleInfo. More...
|
|
template<typename DataRep , typename InfoRep > |
TypedInput< DataRep, InfoRep > | input (const std::string &name) |
| Same as input<DataRep, InfoRep>(int32_t) but using the configuration name of the input. More...
|
|
template<typename DataRep > |
TypedInput< DataRep > | input (const std::string &name) |
| Same as input<DataRep, InfoRep>(std::string&) with InfoRep = dds::sub::SampleInfo. More...
|
|
Output & | output (int32_t index) |
| Returns the Output object at the specified index. More...
|
|
Output & | output (const std::string &name) |
| Returns the Output object with the specified name or throws an exception if the output with the given name is not found or if it is found but is not enabled. More...
|
|
template<typename DataRep , typename InfoRep > |
TypedOutput< DataRep, InfoRep > | output (int32_t index) |
| Returns the TypedOutput object at the specified index. More...
|
|
template<typename DataRep > |
TypedOutput< DataRep > | output (int32_t index) |
| Same as output<DataRep, InfoRep>(int32_t) with InfoRep = dds::sub::SampleInfo. More...
|
|
template<typename DataRep , typename InfoRep > |
TypedOutput< DataRep, InfoRep > | output (const std::string &name) |
| Same as output<DataRep, InfoRep>(int32_t) but using the configuration name of the output. More...
|
|
template<typename DataRep > |
TypedOutput< DataRep > | output (const std::string &name) |
| Same as output<DataRep, InfoRep>(std::string&) with InfoRep = dds::sub::SampleInfo. More...
|
|
template<typename DataRep , typename InfoRep > |
Inputs< DataRep, InfoRep > | inputs () |
| Returns an accessor for the contained inputs. More...
|
|
template<typename DataRep > |
Inputs< DataRep > | inputs () |
| Same as Inputs<DataRep, InfoRep> inputs() with InfoRep = dds::sub::SampleInfo. More...
|
|
template<typename DataRep , typename InfoRep > |
Outputs< DataRep, InfoRep > | outputs () |
| Returns an accessor for the contained outputs. More...
|
|
template<typename DataRep > |
Outputs< DataRep > | outputs () |
| Same as Inputs<DataRep, InfoRep> outputs() with InfoRep = dds::sub::SampleInfo. More...
|
|
void | period (const dds::core::Duration &period) |
| Changes the event period of this Route. More...
|
|
const std::string & | full_name () const |
| Returns the fully qualified of this Route, derived from the configuration. More...
|
|
Representation of the Route object that owns a Processor.
This class provides an interface to access the capabilities of a Route, such as retrieving any of its inputs and outputs. Usage of this class is restricted within the Processor context where the object is passed.
An example of how to use this object is shown below. This example illustrates a simple use case of reading from all inputs and writing to all outputs, assuming that the sample data and info have the same representation and type.
{.c++}
using dds::core::xtypes::DynamicData;
using dds::sub::SampleInfo;
using namespace rti::routing::processor;
...
for (
auto input : route.inputs<DynamicData>()) {
LoanedSamples<DynamicData> samples =
input->read();
for (
auto output : route.outputs<DynamicData>()) {
for(auto sample = samples) {
output.write(sample.data(), sample.info());
}
}
}
Output & output(int32_t index)
Returns the Output object at the specified index.
Definition: Route.hpp:293
Input & input(int32_t index)
Returns the Input object at the specified index.
Definition: Route.hpp:193
template<typename DataRep , typename InfoRep >
TypedInput< DataRep, InfoRep > rti::routing::processor::Route::input |
( |
int32_t |
index | ) |
|
|
inline |
Returns the TypedInput object at the specified index.
The returned object is typed so it can read samples whose type is DataRep
for data, and InfoRep
for info. These types must match the expected type representations of the underlying rti::routing::adapter::StreamReader.
Typically, these template arguments are typed dds::core::xtypes::DynamicData and dds::sub::SampleInfo, respectively.
- Warning
- This operation performs no type integrity check. It is responsibility of the caller to ensure the provided template arguments match with the expected types of the input. Otherwise behavior accessing the input is undefined.
- Returns
- The TypedInput object at the specified index.
- See also
- input(int32_t)
-
TypedInput
References input().
template<typename DataRep , typename InfoRep >
TypedOutput< DataRep, InfoRep > rti::routing::processor::Route::output |
( |
int32_t |
index | ) |
|
|
inline |
Returns the TypedOutput object at the specified index.
The returned object is typed so it can write samples whose type is DataRep
for data, and InfoRep
for info. These types must match the expected type representations of the underlying rti::routing::adapter::StreamWriter.
Typically, these template arguments are typed dds::core::xtypes::DynamicData and dds::sub::SampleInfo, respectively.
- Warning
- This operation performs no type integrity check. It is responsibility of the caller to ensure the provided template arguments match with the expected types of the output. Otherwise behavior accessing the output is undefined.
- Returns
- The TypedOutput object at the specified index.
- See also
- input(int32_t)
References output().