Embedded Multicore Building Blocks V1.0.0
|
Generic serial process template. More...
#include <network.h>
Public Types | |
typedef embb::base::Function< void, INPUT_TYPE_LIST, OUTPUT_TYPE_LIST > | FunctionType |
Function type to use when processing tokens. More... | |
typedef Inputs< INPUT_TYPE_LIST > | InputsType |
Input port type list. More... | |
typedef Outputs< OUTPUT_TYPE_LIST > | OutputsType |
Output port type list. More... | |
Public Member Functions | |
SerialProcess (Network &network, FunctionType function) | |
Constructs a SerialProcess with a user specified processing function. More... | |
SerialProcess (Network &network, embb::mtapi::Job job) | |
Constructs a SerialProcess with a user specified embb::mtapi::Job. More... | |
SerialProcess (Network &network, FunctionType function, embb::mtapi::ExecutionPolicy const &policy) | |
Constructs a SerialProcess with a user specified processing function. More... | |
SerialProcess (Network &network, embb::mtapi::Job job, embb::mtapi::ExecutionPolicy const &policy) | |
Constructs a SerialProcess with a user specified embb::mtapi::Job. More... | |
virtual bool | HasInputs () const |
InputsType & | GetInputs () |
template<int Index> | |
InputsType::Types< Index >::Result & | GetInput () |
virtual bool | HasOutputs () const |
OutputsType & | GetOutputs () |
template<int Index> | |
OutputsType::Types< Index >::Result & | GetOutput () |
template<typename T > | |
void | operator>> (T &target) |
Connects output port 0 to input port 0 of target . More... | |
Generic serial process template.
Implements a generic serial process in the network that may have one to four input ports and one to four output ports but no more that five total ports. Tokens are processed in order.
typedef embb::base::Function<void, INPUT_TYPE_LIST, OUTPUT_TYPE_LIST> embb::dataflow::Network::SerialProcess< Inputs, Outputs >::FunctionType |
Function type to use when processing tokens.
typedef Inputs<INPUT_TYPE_LIST> embb::dataflow::Network::SerialProcess< Inputs, Outputs >::InputsType |
Input port type list.
typedef Outputs<OUTPUT_TYPE_LIST> embb::dataflow::Network::SerialProcess< Inputs, Outputs >::OutputsType |
Output port type list.
embb::dataflow::Network::SerialProcess< Inputs, Outputs >::SerialProcess | ( | Network & | network, |
FunctionType | function | ||
) |
Constructs a SerialProcess with a user specified processing function.
network | The network this node is going to be part of. |
function | The Function to call to process a token. |
embb::dataflow::Network::SerialProcess< Inputs, Outputs >::SerialProcess | ( | Network & | network, |
embb::mtapi::Job | job | ||
) |
Constructs a SerialProcess with a user specified embb::mtapi::Job.
The Job must be associated with an action function accepting a struct containing copies of the inputs as its argument buffer and a struct containing the outputs as its result buffer.
network | The network this node is going to be part of. |
job | The embb::mtapi::Job to process a token. |
embb::dataflow::Network::SerialProcess< Inputs, Outputs >::SerialProcess | ( | Network & | network, |
FunctionType | function, | ||
embb::mtapi::ExecutionPolicy const & | policy | ||
) |
Constructs a SerialProcess with a user specified processing function.
network | The network this node is going to be part of. |
function | The Function to call to process a token. |
policy | The execution policy of the process. |
embb::dataflow::Network::SerialProcess< Inputs, Outputs >::SerialProcess | ( | Network & | network, |
embb::mtapi::Job | job, | ||
embb::mtapi::ExecutionPolicy const & | policy | ||
) |
Constructs a SerialProcess with a user specified embb::mtapi::Job.
The Job must be associated with an action function accepting a struct containing copies of the inputs as its argument buffer and a struct containing the outputs as its result buffer.
network | The network this node is going to be part of. |
job | The embb::mtapi::Job to process a token. |
policy | The execution policy of the process. |
|
virtual |
true
if the SerialProcess has any inputs, false
otherwise. InputsType& embb::dataflow::Network::SerialProcess< Inputs, Outputs >::GetInputs | ( | ) |
InputsType::Types<Index>::Result& embb::dataflow::Network::SerialProcess< Inputs, Outputs >::GetInput | ( | ) |
|
virtual |
true
if the SerialProcess has any outputs, false
otherwise. OutputsType& embb::dataflow::Network::SerialProcess< Inputs, Outputs >::GetOutputs | ( | ) |
OutputsType::Types<Index>::Result& embb::dataflow::Network::SerialProcess< Inputs, Outputs >::GetOutput | ( | ) |
void embb::dataflow::Network::SerialProcess< Inputs, Outputs >::operator>> | ( | T & | target | ) |
Connects output port 0 to input port 0 of target
.
target | Process to connect to. |
T | Type of target process. |