TODO: A lot left to include



CPM Timer

The timer class can be used to call tasks periodically, based either on the system clock or the simulated time which is controlled by the LCC. It can wait for a central start signal and can be stopped when a stop signal is sent (both by the LCC). Thus, timers on multiple systems can be started at the same time, and then work simultaneously if their period is set accordingly as well.

Several parameters must be set to use to cpm timer:

The callback function is registered within the start(...) function. The timer can be started synchronously, blocking / using the current thread until it was stopped, or asynchronously in a new thread, using start_async(...). It can either be stopped manually using stop(), which is especially useful if the LCC is not used for real-time timing purposes, or it can be stopped with an LCC command.

The callback function registered in start is called periodically until the timer is stopped, according to period, offset and the usage of simulated time. The following figures illustrate the role of the timer in combination with the LCC as central timing instance.