Public Member Functions |
int32_t | input_count () const |
| Returns the total number of inputs in this Route.
|
|
int32_t | output_count () const |
| Returns the total number of outputs in this Route.
|
|
Input & | input (int32_t index) |
| Returns the Input object at the specified index.
|
|
Input & | input (const std::string &name) |
| Returns the Input object with the specified name.
|
|
template<typename DataRep , typename InfoRep > |
TypedInput< DataRep, InfoRep > | input (int32_t index) |
| Returns the TypedInput object at the specified index.
|
|
template<typename DataRep > |
TypedInput< DataRep > | input (int32_t index) |
| Same as input<DataRep, InfoRep>(int32_t) with InfoRep = dds::sub::SampleInfo.
|
|
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.
|
|
template<typename DataRep > |
TypedInput< DataRep > | input (const std::string &name) |
| Same as input<DataRep, InfoRep>(std::string&) with InfoRep = dds::sub::SampleInfo.
|
|
Output & | output (int32_t index) |
| Returns the Output object at the specified index.
|
|
Output & | output (const std::string &name) |
| Returns the Output object with the specified name.
|
|
template<typename DataRep , typename InfoRep > |
TypedOutput< DataRep, InfoRep > | output (int32_t index) |
| Returns the TypedOutput object at the specified index.
|
|
template<typename DataRep > |
TypedOutput< DataRep > | output (int32_t index) |
| Same as output<DataRep, InfoRep>(int32_t) with InfoRep = dds::sub::SampleInfo.
|
|
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.
|
|
template<typename DataRep > |
TypedOutput< DataRep > | output (const std::string &name) |
| Same as output<DataRep, InfoRep>(std::string&) with InfoRep = dds::sub::SampleInfo.
|
|
template<typename DataRep , typename InfoRep > |
Inputs< DataRep, InfoRep > | inputs () |
| Returns an accessor for the contained inputs.
|
|
template<typename DataRep > |
Inputs< DataRep > | inputs () |
| Same as Inputs<DataRep, InfoRep> inputs() with InfoRep = dds::sub::SampleInfo.
|
|
template<typename DataRep , typename InfoRep > |
Outputs< DataRep, InfoRep > | outputs () |
| Returns an accessor for the contained outputs.
|
|
template<typename DataRep > |
Outputs< DataRep > | outputs () |
| Same as Inputs<DataRep, InfoRep> outputs() with InfoRep = dds::sub::SampleInfo.
|
|
void | period (const dds::core::Duration &period) |
| Changes the event period of the Session.
|
|
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>()) {
for (
auto output : route.outputs<DynamicData>()) {
for(auto sample = samples) {
output.write(sample.data(), sample.info());
}
}
}
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().
void rti::routing::processor::Route::period |
( |
const dds::core::Duration & |
period | ) |
|
|
inline |
Changes the event period of the Session.
This operation can be called many times within the same periodic event, in which only the last call will have effect. If many Routes within a Session are calling this operation, then only the call made by the last Route will have effect.
The operation has no effect if the periodic event is not enabled in the session.
- Parameters
-
[in] | period | New session period |