Embedded Multicore Building Blocks V1.0.0
|
Source process template. More...
#include <network.h>
Public Types | |
typedef embb::base::Function< void, OUTPUT_TYPE_LIST > | FunctionType |
Function type to use when processing tokens. More... | |
typedef Outputs< OUTPUT_TYPE_LIST > | OutputsType |
Output port type list. More... | |
Public Member Functions | |
Source (Network &network, FunctionType function) | |
Constructs a Source with a user specified processing function. More... | |
Source (Network &network, embb::mtapi::Job job) | |
Constructs a Source with a user specified embb::mtapi::Job. More... | |
Source (Network &network, FunctionType function, embb::mtapi::ExecutionPolicy const &policy) | |
Constructs a Source with a user specified processing function. More... | |
Source (Network &network, embb::mtapi::Job job, embb::mtapi::ExecutionPolicy const &policy) | |
Constructs a Source with a user specified embb::mtapi::Job. More... | |
virtual bool | HasInputs () const |
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... | |
Source process template.
A source marks the start of a processing chain. It can have one to five output ports and no input ports. Tokens are emitted in order by the source.
O1 | Type of first output port. |
O2 | Optional type of second output port. |
O3 | Optional type of third output port. |
O4 | Optional type of fourth output port. |
O5 | Optional type of fifth output port. |
typedef embb::base::Function<void, OUTPUT_TYPE_LIST> embb::dataflow::Network::Source< O1, O2, O3, O4, O5 >::FunctionType |
Function type to use when processing tokens.
typedef Outputs<OUTPUT_TYPE_LIST> embb::dataflow::Network::Source< O1, O2, O3, O4, O5 >::OutputsType |
Output port type list.
embb::dataflow::Network::Source< O1, O2, O3, O4, O5 >::Source | ( | Network & | network, |
FunctionType | function | ||
) |
Constructs a Source with a user specified processing function.
network | The network this node is going to be part of. |
function | The Function to call to emit a token. |
embb::dataflow::Network::Source< O1, O2, O3, O4, O5 >::Source | ( | Network & | network, |
embb::mtapi::Job | job | ||
) |
Constructs a Source with a user specified embb::mtapi::Job.
The Job must be associated with an action function accepting a null pointer 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::Source< O1, O2, O3, O4, O5 >::Source | ( | Network & | network, |
FunctionType | function, | ||
embb::mtapi::ExecutionPolicy const & | policy | ||
) |
Constructs a Source with a user specified processing function.
network | The network this node is going to be part of. |
function | The Function to call to emit a token. |
policy | The execution policy of the process. |
embb::dataflow::Network::Source< O1, O2, O3, O4, O5 >::Source | ( | Network & | network, |
embb::mtapi::Job | job, | ||
embb::mtapi::ExecutionPolicy const & | policy | ||
) |
Constructs a Source with a user specified embb::mtapi::Job.
The Job must be associated with an action function accepting a null pointer 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 |
false
.
|
virtual |
true
. OutputsType& embb::dataflow::Network::Source< O1, O2, O3, O4, O5 >::GetOutputs | ( | ) |
OutputsType::Types<Index>::Result& embb::dataflow::Network::Source< O1, O2, O3, O4, O5 >::GetOutput | ( | ) |
void embb::dataflow::Network::Source< O1, O2, O3, O4, O5 >::operator>> | ( | T & | target | ) |
Connects output port 0 to input port 0 of target
.
target | Process to connect to. |
T | Type of target process. |