class TransceiverFunction

Overview

Holds a single transfer function decorator. More…

#include <transceiver_function.h>

class TransceiverFunction:
    public TransceiverDataPackInterface,
    public PtrTemplates {
public:
    // construction

    TransceiverFunction(std::string linkedEngine, bool isPreprocessing);

    // methods

    virtual const std::string& linkedEngineName() const;
    virtual bool isPreprocessing() const;
    TransceiverDataPackInterface::shared_ptr pySetup(boost::python::object transceiverFunction);

    virtual boost::python::object runTf(
        boost::python::tuple& args,
        boost::python::dict& kwargs,
        datapacks_set_t dataPacks
    );
};

// direct descendants

class PreprocessingFunction;

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<T> shared_ptr;
    typedef std::shared_ptr<const T> const_shared_ptr;
    typedef std::unique_ptr<T> unique_ptr;
    typedef std::unique_ptr<const T> const_unique_ptr;

    // methods

    template <class TRANSCEIVER_DATAPACK>
    TransceiverDataPackInterface::shared_ptr pySetup(const TransceiverDataPackInterface::shared_ptr& tfDataPack);

    virtual const std::string& linkedEngineName() const;
    virtual bool isPreprocessing() const;

    virtual boost::python::object runTf(
        boost::python::tuple& args,
        boost::python::dict& kwargs,
        datapacks_set_t dataPacks
    );

    virtual datapack_identifiers_set_t updateRequestedDataPackIDs(datapack_identifiers_set_t&& datapackIDs = datapack_identifiers_set_t()) const;
    virtual datapack_identifiers_set_t getRequestedDataPackIDs() const;
    static void setTFInterpreter(FunctionManager* interpreter);
    static const FunctionManager* getFunctionManager();

Detailed Documentation

Holds a single transfer function decorator.

Construction

TransceiverFunction(std::string linkedEngine, bool isPreprocessing)

Constructor.

Parameters:

linkedEngine

Name of linked engine. This TF will only be called whenever Said engine finishes a timestep

Methods

virtual const std::string& linkedEngineName() const

Get name of engine this transceiver is linked to.

virtual bool isPreprocessing() const

Indicates if this is a preprocessing function.

TransceiverDataPackInterface::shared_ptr pySetup(boost::python::object transceiverFunction)

Decorator call () function. Takes the Transfer Function as a parameter. Moves this class into a shared_ptr.

Parameters:

transceiverFunction

User defined TF

Returns:

shared_ptr referencing data from this object

virtual boost::python::object runTf(
    boost::python::tuple& args,
    boost::python::dict& kwargs,
    datapacks_set_t dataPacks
)

Execute the transfer function.

Parameters:

args

Python args

kwargs

Python keywords

Returns:

Returns result of TF