Embedded Multicore Building Blocks V1.0.0
Public Types | Public Member Functions | List of all members
embb::dataflow::Network::ConstantSource< Type > Class Template Reference

Constant source process template. More...

#include <network.h>

Public Types

typedef Outputs< OUTPUT_TYPE_LIST > OutputsType
 Output port type list. More...
 

Public Member Functions

 ConstantSource (Network &network, Type value)
 Constructs a ConstantSource with a value to emit on each token. More...
 
 ConstantSource (Network &network, Type value, embb::mtapi::ExecutionPolicy const &policy)
 Constructs a ConstantSource with a value to emit on each token. More...
 
virtual bool HasInputs () const
 
virtual bool HasOutputs () const
 
OutputsTypeGetOutputs ()
 
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...
 

Detailed Description

template<typename Type>
class embb::dataflow::Network::ConstantSource< Type >

Constant source process template.

A constant source has one output port and emits a constant value given at construction time for each token.

Template Parameters
TypeThe type of output port 0.

Member Typedef Documentation

template<typename Type >
typedef Outputs<OUTPUT_TYPE_LIST> embb::dataflow::Network::ConstantSource< Type >::OutputsType

Output port type list.

Constructor & Destructor Documentation

template<typename Type >
embb::dataflow::Network::ConstantSource< Type >::ConstantSource ( Network network,
Type  value 
)

Constructs a ConstantSource with a value to emit on each token.

Parameters
networkThe network this node is going to be part of.
valueThe value to emit.
template<typename Type >
embb::dataflow::Network::ConstantSource< Type >::ConstantSource ( Network network,
Type  value,
embb::mtapi::ExecutionPolicy const &  policy 
)

Constructs a ConstantSource with a value to emit on each token.

Parameters
networkThe network this node is going to be part of.
valueThe value to emit.
policyThe execution policy of the process.

Member Function Documentation

template<typename Type >
virtual bool embb::dataflow::Network::ConstantSource< Type >::HasInputs ( ) const
virtual
Returns
Always false.
template<typename Type >
virtual bool embb::dataflow::Network::ConstantSource< Type >::HasOutputs ( ) const
virtual
Returns
Always true.
template<typename Type >
OutputsType& embb::dataflow::Network::ConstantSource< Type >::GetOutputs ( )
Returns
Reference to a list of all output ports.
template<typename Type >
template<int Index>
OutputsType::Types<Index>::Result& embb::dataflow::Network::ConstantSource< Type >::GetOutput ( )
Returns
Output port at Index.
template<typename Type >
template<typename T >
void embb::dataflow::Network::ConstantSource< Type >::operator>> ( T &  target)

Connects output port 0 to input port 0 of target.

Parameters
targetProcess to connect to.
Template Parameters
TType of target process.