Holds a single Python function created with StatusFunction decorator.
More...
#include <status_function.h>
Holds a single Python function created with StatusFunction decorator.
◆ StatusFunction()
StatusFunction::StatusFunction |
( |
| ) |
|
Constructs a status function object.
Status functions live on the boundary between C++ and Python worlds. The constructor only allocates the memory needed by the objects, but they are truly initialized only when a proper Python decorator is called from the Python context. The decorators are linked to the pySetup method, which performs the true initialization.
◆ ~StatusFunction()
virtual StatusFunction::~StatusFunction |
( |
| ) |
|
|
overridevirtualdefault |
◆ getRequestedDataPackIDs()
◆ isPreprocessing()
bool StatusFunction::isPreprocessing |
( |
| ) |
const |
|
finaloverridevirtual |
Returns false.
Status functions don't have the concept of pre-processing. The method is implemented in order to conform to the base interface.
Reimplemented from TransceiverDataPackInterface.
◆ linkedEngineName()
const std::string & StatusFunction::linkedEngineName |
( |
| ) |
const |
|
finaloverridevirtual |
Returns an empty string.
Status functions are not linked to any engine, so the string returned by this method should always be empty. The method is implemented in order to conform to the base interface.
Reimplemented from TransceiverDataPackInterface.
◆ pySetup()
Performs actual initialization of the object.
- Parameters
-
statusFunction | User-defined python function. It will be linked to this C++ object. |
- Returns
- shared_ptr referencing data from this object
This method is linked to the call() method of Python StatusFunction decorator. It links the user-defined python function to this C++ object. It also registers the C++ object in the function manager.
◆ runTf()
boost::python::object StatusFunction::runTf |
( |
boost::python::tuple & |
args, |
|
|
boost::python::dict & |
kwargs, |
|
|
datapacks_set_t |
dataPacks |
|
) |
| |
|
overridevirtual |
Runs the status function.
- Parameters
-
args | Python args |
kwargs | Python keywords |
- Returns
- Result of status function execution
Reimplemented from TransceiverDataPackInterface.
◆ updateRequestedDataPackIDs()
Appends its own datapack requests onto datapackIDs. Uses getRequestedDataPackIDs to check which IDs are requested by this datapack.
- Parameters
-
datapackIDs | Container with datapack IDs that gets expanded |
- Returns
- Returns datapackIDs, with own datapackIDs appended
Reimplemented from TransceiverDataPackInterface.
The documentation for this class was generated from the following files: