NRP Core  1.4.1
NestEngineJSONDataPackController Class Reference

#include <nest_engine_datapack_controller.h>

Inheritance diagram for NestEngineJSONDataPackController:
JsonDataPackController DataPackController< nlohmann::json >

Public Member Functions

 NestEngineJSONDataPackController (const DataPackIdentifier &devID, boost::python::object nodeCollection, boost::python::dict nest)
 
void handleDataPackData (const nlohmann::json &data) override
 Handle received datapack data. More...
 
virtual nlohmann::jsongetDataPackInformation () override
 Get datapack information to be forwarded to the NRP. More...
 
void setNestID (boost::python::dict nest, boost::python::object nodeCollection)
 Set Nest properties. More...
 
- Public Member Functions inherited from JsonDataPackController
const nlohmann::jsongetEmptyDataPack () const
 
- Public Member Functions inherited from DataPackController< nlohmann::json >
 DataPackController ()=default
 Constructor. More...
 
virtual ~DataPackController ()=default
 

Protected Member Functions

boost::python::list getStatusFromNest ()
 Retrieves datapack status from Nest. More...
 
- Protected Member Functions inherited from JsonDataPackController
 JsonDataPackController (const DataPackIdentifier &datapackId)
 Constructor that should be called by the derived class. More...
 
void setCachedData (const nlohmann::json &data)
 Sets the "data" part of the cached JSON object. More...
 
nlohmann::jsongetCachedData ()
 Returns reference to the "data" part of the cached JSON object. More...
 

Static Protected Member Functions

static boost::python::list getStatusFromNest (boost::python::dict &nest, const boost::python::object &nodeCollection)
 Retrieves datapack status from Nest. More...
 

Protected Attributes

boost::python::dict _nest
 Currently running Nest instance. More...
 
boost::python::object _nodeCollection
 Nest GID of model managed by this controller. More...
 
- Protected Attributes inherited from JsonDataPackController
DataPackIdentifier _datapackId
 
nlohmann::json _data
 Cached incoming/outgoing data in JSON format. More...
 
nlohmann::json _emptyDataPack
 

Constructor & Destructor Documentation

◆ NestEngineJSONDataPackController()

NestEngineJSONDataPackController::NestEngineJSONDataPackController ( const DataPackIdentifier devID,
boost::python::object  nodeCollection,
boost::python::dict  nest 
)

Member Function Documentation

◆ getDataPackInformation()

nlohmann::json * NestEngineJSONDataPackController::getDataPackInformation ( )
overridevirtual

Get datapack information to be forwarded to the NRP.

Returns
Returns a DATA_TYPE pointer containing requested data

Implements DataPackController< nlohmann::json >.

◆ getStatusFromNest() [1/2]

boost::python::list NestEngineJSONDataPackController::getStatusFromNest ( )
protected

Retrieves datapack status from Nest.

Returns
Returns dictionary containing datapack status

◆ getStatusFromNest() [2/2]

boost::python::list NestEngineJSONDataPackController::getStatusFromNest ( boost::python::dict &  nest,
const boost::python::object &  nodeCollection 
)
staticprotected

Retrieves datapack status from Nest.

Parameters
nestNEST object
nodeCollectionNodes of datapack
Returns
Returns dictionary with data

◆ handleDataPackData()

void NestEngineJSONDataPackController::handleDataPackData ( const nlohmann::json data)
overridevirtual

Handle received datapack data.

Parameters
dataData to be processed

Implements DataPackController< nlohmann::json >.

◆ setNestID()

void NestEngineJSONDataPackController::setNestID ( boost::python::dict  nest,
boost::python::object  nodeCollection 
)

Set Nest properties.

Parameters
nestNest instance
nodeCollectionNest GIDs of model managed by this controller

Member Data Documentation

◆ _nest

boost::python::dict NestEngineJSONDataPackController::_nest
protected

Currently running Nest instance.

◆ _nodeCollection

boost::python::object NestEngineJSONDataPackController::_nodeCollection
protected

Nest GID of model managed by this controller.


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