NRP Core  1.4.1
OutputEdge< T_IN, T_OUT, OUTPUT_CLASS > Class Template Referenceabstract

Helper class used to implement Python output edge decorators. More...

#include <output_edge.h>

Inheritance diagram for OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >:
OutputDummyEdge OutputEngineEdge OutputMQTTEdge< MSG_TYPE > OutputMQTTEdge< DataPack< MSG_TYPE > * > OutputROSEdge< MSG_TYPE > OutputSpinnakerEdge DPOutputMQTTEdge< MSG_TYPE >

Public Member Functions

 OutputEdge ()=delete
 
 OutputEdge (std::string keyword, std::string id, std::string port, bool publishFromCache, unsigned int computePeriod)
 Constructor. More...
 
boost::python::object pySetup (const boost::python::object &obj)
 call function in the decorator More...
 

Protected Member Functions

void registerEdgePythonFN (OUTPUT_CLASS *oNode, std::shared_ptr< PythonFunctionalNode > &pyFn)
 registers an edge between oNode and pyFn. PythonFunctionalNode case More...
 
void registerEdgeFNBase (OUTPUT_CLASS *oNode, const std::shared_ptr< FunctionalNodeBase > &pyFn)
 registers an edge between oNode and pyFn. FunctionalNodeBase case More...
 
template<class T_INPUT >
void checkPortCanConnectOrThrow (InputPort< T_INPUT, T_OUT > *iPort, OUTPUT_CLASS *oNode)
 
virtual OUTPUT_CLASS * makeNewNode ()=0
 

Protected Attributes

std::string _keyword
 
std::string _id
 
std::string _port
 
bool _publishFromCache
 
unsigned int _computePeriod
 

Detailed Description

template<class T_IN, class T_OUT, OUTPUT_C< T_OUT > OUTPUT_CLASS>
class OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >

Helper class used to implement Python output edge decorators.

Constructor & Destructor Documentation

◆ OutputEdge() [1/2]

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::OutputEdge ( )
delete

◆ OutputEdge() [2/2]

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::OutputEdge ( std::string  keyword,
std::string  id,
std::string  port,
bool  publishFromCache,
unsigned int  computePeriod 
)
inline

Constructor.

Member Function Documentation

◆ checkPortCanConnectOrThrow()

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
template<class T_INPUT >
void OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::checkPortCanConnectOrThrow ( InputPort< T_INPUT, T_OUT > *  iPort,
OUTPUT_CLASS *  oNode 
)
inlineprotected

◆ makeNewNode()

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
virtual OUTPUT_CLASS* OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::makeNewNode ( )
protectedpure virtual

It instantiates a new node of type INPUT_CLASS

To be implemented by any final class derived from this template class

Implemented in DPOutputMQTTEdge< MSG_TYPE >, OutputMQTTEdge< MSG_TYPE >, OutputMQTTEdge< DataPack< MSG_TYPE > * >, OutputEngineEdge, OutputSpinnakerEdge, OutputROSEdge< MSG_TYPE >, and OutputDummyEdge.

◆ pySetup()

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
boost::python::object OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::pySetup ( const boost::python::object &  obj)
inline

call function in the decorator

It creates and registers an output node. Afterwards add a port to it and registers an edge from 'obj'. 'obj' is expected to be a Python object wrapping a Functional Node

◆ registerEdgeFNBase()

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
void OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::registerEdgeFNBase ( OUTPUT_CLASS *  oNode,
const std::shared_ptr< FunctionalNodeBase > &  pyFn 
)
inlineprotected

registers an edge between oNode and pyFn. FunctionalNodeBase case

◆ registerEdgePythonFN()

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
void OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::registerEdgePythonFN ( OUTPUT_CLASS *  oNode,
std::shared_ptr< PythonFunctionalNode > &  pyFn 
)
inlineprotected

registers an edge between oNode and pyFn. PythonFunctionalNode case

Member Data Documentation

◆ _computePeriod

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
unsigned int OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::_computePeriod
protected

◆ _id

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
std::string OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::_id
protected

◆ _keyword

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
std::string OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::_keyword
protected

◆ _port

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
std::string OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::_port
protected

◆ _publishFromCache

template<class T_IN , class T_OUT , OUTPUT_C< T_OUT > OUTPUT_CLASS>
bool OutputEdge< T_IN, T_OUT, OUTPUT_CLASS >::_publishFromCache
protected

The documentation for this class was generated from the following file: