class CreateDataPackClass

Overview

Singleton class. Used to create Nest datapacks in a manner that makes them accessible to the NRP. More…

#include <create_datapack_class.h>

class CreateDataPackClass {
public:
    // construction

    CreateDataPackClass(boost::python::dict nest, boost::python::dict devMap);

    // methods

    boost::python::object createAndRegisterDataPack(
        boost::python::tuple args,
        boost::python::dict kwargs
    );

    void registerDataPack(
        boost::python::str devName,
        boost::python::object nodeCollection
    );

    boost::python::dict pyDevMap();
    const boost::python::dict& devMap() const;

    boost::python::object createAndRegisterDataPack(
        boost::python::tuple args,
        boost::python::dict kwargs
    );

    const boost::python::dict& devMap() const;

    static boost::python::object pyCreateDataPack(
        boost::python::tuple args,
        boost::python::dict kwargs
    );

    static boost::python::object pyRegisterDataPack(
        boost::python::tuple args,
        boost::python::dict kwargs
    );

    static boost::python::object pyCreateDataPack(
        boost::python::tuple args,
        boost::python::dict kwargs
    );

    static boost::python::object pyRegisterDataPack(
        boost::python::tuple args,
        boost::python::dict kwargs
    );
};

Detailed Documentation

Singleton class. Used to create Nest datapacks in a manner that makes them accessible to the NRP.

Construction

CreateDataPackClass(boost::python::dict nest, boost::python::dict devMap)

Constructor.

Parameters:

nest

Nest Dict

devMap

DataPack Mapping

Methods

boost::python::object createAndRegisterDataPack(
    boost::python::tuple args,
    boost::python::dict kwargs
)

Create new Nest datapack and add it to devMap.

Parameters:

args

Python Args. First argument must be string with datapack label. This will be used to reference the datapack from the NRP side. All other args will be passed to nest.Create(…)

kwargs

Python Keyword Args. Will be passed to nest.Create(…)

Returns:

Returns either Nest NodeCollection (Nest 3.x) or python::tuple of nest GIDs (Nest 2.x)

void registerDataPack(
    boost::python::str devName,
    boost::python::object nodeCollection
)

Register an existing datapack.

Parameters:

devName

NRP DataPack name

nodeCollection

NodeCollection of datapack data

boost::python::dict pyDevMap()

Python Call Function to get NRP datapack mapping.

Returns:

Returns dict with datapack mapping

const boost::python::dict& devMap() const

Get datapack map.

Returns:

Returns datapack map

boost::python::object createAndRegisterDataPack(
    boost::python::tuple args,
    boost::python::dict kwargs
)

Create new Nest datapack and add it to devMap.

Parameters:

args

Python Args. First argument must be string with datapack label. This will be used to reference the datapack from the NRP side. All other args will be passed to nest.Create(…)

kwargs

Python Keyword Args. Will be passed to nest.Create(…)

Returns:

Returns either Nest NodeCollection (Nest 3.x) or python::tuple of nest GIDs (Nest 2.x)

const boost::python::dict& devMap() const

Get datapack map.

Returns:

Returns datapack map

static boost::python::object pyCreateDataPack(
    boost::python::tuple args,
    boost::python::dict kwargs
)

Python function to create datapack and register it in _devMap.

Parameters:

args

Python Args. args[0] is CreateDataPackClass, args[1] is the NRP datapack name. The remaining args will be passed to nest.Create(…)

kwargs

Python Keyword Args. Will be passed to nest.Create(…)

Returns:

Returns either Nest NodeCollection (Nest 3.x) or python::tuple of nest GIDs (Nest 2.x)

static boost::python::object pyRegisterDataPack(
    boost::python::tuple args,
    boost::python::dict kwargs
)

pyRegisterDataPack

Parameters:

args

Python Args. args[0] is CreateDataPackClass, args[1] is the NRP datapack name, args[2] is a NodeCollection object

kwargs

Python Kwargs. Not used

static boost::python::object pyCreateDataPack(
    boost::python::tuple args,
    boost::python::dict kwargs
)

Python function to create datapack and register it in _devMap.

Parameters:

args

Python Args. args[0] is CreateDataPackClass, args[1] is the NRP datapack name. The remaining args will be passed to nest.Create(…)

kwargs

Python Keyword Args. Will be passed to nest.Create(…)

Returns:

Returns either Nest NodeCollection (Nest 3.x) or python::tuple of nest GIDs (Nest 2.x)

static boost::python::object pyRegisterDataPack(
    boost::python::tuple args,
    boost::python::dict kwargs
)

pyRegisterDataPack

Parameters:

args

Python Args. args[0] is CreateDataPackClass, args[1] is the NRP datapack name, args[2] is a NodeCollection object

kwargs

Python Kwargs. Not used