Writing Module Processes

In LiCoRICE, modules represent user-defined computational blocks which take inputs, manipulate them, and set outputs. Users are responsible for defining the sections of a module in their model YAML config and then must create code snippet files implementing each section. The term module is overloaded here and encompasses sources, internal modules, and sinks. We will commonly refer to internal modules as just modules and specify module processes where ambiguous when referring to source, internal modules, and sinks.

For a full syntactic description, please check out the YAML Config Reference.

Common Properties

The scaffold surrounding a module exposes some variables that the user may take advantage of:

Name

Type

Description

time_tick

int64_t

The current system tick 0-indexed to when all module processes start running (set by timer at tick start)

time_monotonic_raw

uint64_t

The current tick’s start time as measured by clock_gettime using CLOCK_MONOTONIC_RAW in nanoseconds set by timer at tick start

time_monotonic

uint64_t

The current tick’s start time as measured by clock_gettime using CLOCK_MONOTONIC in nanoseconds. Set by timer at tick start

time_realtime

uint64_t

The current tick’s start time as measured by clock_gettime using CLOCK_REALTIME in nanoseconds. Set by timer at tick start).