Exchange of simulation data between different components of NRP Core is performed by user-defined Functions. They are Python functions that live inside of the NRP Core main process. Three types of Functions are currently supported:
It is possible to get access to the current simulation time and iteration number in all Functions. Both of these values can be acquired by adding a proper decorator to the Python function definition, for example:
The SimulationIteration
decorator will return the current iteration number, starting at 0. The SimulationTime
decorator will return the current simulation time in nanoseconds. Both of these decorators require a single argument, which is the name (keyword) under which it is going to be accessible in the Python function. The same keyword must be added as the function parameter.