Go to the documentation of this file.
22 #ifndef TRANSCEIVER_DATAPACK_INTERFACE_H
23 #define TRANSCEIVER_DATAPACK_INTERFACE_H
30 #include <boost/python.hpp>
52 template<
class TRANSCEIVER_DATAPACK>
55 static_assert((std::is_base_of_v<TransceiverDataPackInterface, TRANSCEIVER_DATAPACK>) || (std::is_same_v<TransceiverDataPackInterface, TRANSCEIVER_DATAPACK>),
"Parameter TRANSCEIVER_DATAPACK must derive from TransceiverDataPackInterface or be same");
57 this->_nextDecorator = tfDataPack;
59 auto thisPtr = this->moveToSharedPtr<TRANSCEIVER_DATAPACK>();
62 assert(registryPtr !=
nullptr);
64 *registryPtr = thisPtr;
84 virtual boost::python::object
runTf(boost::python::tuple &
args, boost::python::dict &kwargs,
datapacks_set_t dataPacks);
114 template<
class TRANSCEIVER_DATAPACK>
117 static_assert((std::is_base_of_v<TransceiverDataPackInterface, TRANSCEIVER_DATAPACK>) || (std::is_same_v<TransceiverDataPackInterface, TRANSCEIVER_DATAPACK>),
"Parameter TRANSCEIVER_DATAPACK must derive from TransceiverDataPackInterface or be same");
static const FunctionManager * getFunctionManager()
Definition: transceiver_datapack_interface.h:103
std::set< std::shared_ptr< const DataPackInterface >, DataPackPointerComparator > datapacks_set_t
Definition: datapack_interface.h:219
virtual bool isPreprocessing() const
Indicates if this is a preprocessing function.
Definition: transceiver_datapack_interface.cpp:32
TransceiverDataPackInterface::const_shared_ptr TransceiverDataPackInterfaceConstSharedPtr
Definition: transceiver_datapack_interface.h:135
Namespace args
Definition: python_json_engine.py:196
virtual ~TransceiverDataPackInterface()=default
std::shared_ptr< const TransceiverDataPackInterface > const_shared_ptr
Definition: ptr_templates.h:32
virtual boost::python::object runTf(boost::python::tuple &args, boost::python::dict &kwargs, datapacks_set_t dataPacks)
Execute Transceiver Function. Base class will simply call runTf on _function.
Definition: transceiver_datapack_interface.cpp:37
std::set< DataPackIdentifier > datapack_identifiers_set_t
Definition: datapack_interface.h:221
virtual TransceiverDataPackInterface::shared_ptr * getTFInterpreterRegistry()
Gets address of ptr under which the _functionManager has registered this TF. Mainly used during setup...
Definition: transceiver_datapack_interface.cpp:62
Definition: ptr_templates.h:28
TransceiverDataPackInterface()=default
Base of TF Decorators.
Definition: transceiver_datapack_interface.h:40
std::shared_ptr< const FunctionManager > TransceiverFunctionInterpreterConstSharedPtr
Definition: transceiver_datapack_interface.h:34
std::shared_ptr< TransceiverDataPackInterface > shared_ptr
Definition: ptr_templates.h:31
TransceiverDataPackInterface::shared_ptr TransceiverDataPackInterfaceSharedPtr
Definition: transceiver_datapack_interface.h:134
std::shared_ptr< FunctionManager > TransceiverFunctionInterpreterSharedPtr
Definition: transceiver_datapack_interface.h:33
virtual datapack_identifiers_set_t getRequestedDataPackIDs() const
Returns datapack IDs of this DataPack that should be requested from the engines. TODO: Make protected...
Definition: transceiver_datapack_interface.cpp:52
virtual datapack_identifiers_set_t updateRequestedDataPackIDs(datapack_identifiers_set_t &&datapackIDs=datapack_identifiers_set_t()) const
Appends its own datapack requests onto datapackIDs. Uses getRequestedDataPackIDs to check which IDs a...
Definition: transceiver_datapack_interface.cpp:42
static void setTFInterpreter(FunctionManager *interpreter)
Set global TF Interpreter. All Transceiver Functions will register themselves with it upon creation.
Definition: transceiver_datapack_interface.cpp:57
virtual const std::string & linkedEngineName() const
Get name of engine this transceiver is linked to.
Definition: transceiver_datapack_interface.cpp:27
PtrTemplates< TRANSCEIVER_DATAPACK >::shared_ptr moveToSharedPtr()
Definition: transceiver_datapack_interface.h:115
TransceiverDataPackInterface::shared_ptr pySetup(const TransceiverDataPackInterface::shared_ptr &tfDataPack)
Decorator call() function. Takes the lower decorator as a parameter. Moves the given class into a sha...
Definition: transceiver_datapack_interface.h:53
Manages all types of Python functions that can be run as part of NRP Core.
Definition: function_manager.h:73
static FunctionManager * _functionManager
Pointer to TF Interpreter. Will be used to register a new TF function.
Definition: transceiver_datapack_interface.h:112