Tool Libs
UMIT-TIROL Institute of Automation and Control Engineering library collection
 
Loading...
Searching...
No Matches
Experiment Class Reference

Experiment Controller. More...

#include <experiment.h>

Public Types

enum  State { IDLE , RUN }
 States during which recurring tasks can be called using during. More...
 
enum  Event { INIT , STOP , TIMEOUT }
 Events upon which tasks can be called using onEvent. More...
 

Public Member Functions

 Experiment (FrameRegistry *fr=nullptr)
 construct. if FrameRegistry is not available at this point, call registerWith at the earliest convenience
 
void registerWith (FrameRegistry &reg)
 set frame registry from which Experiment will receive frames
 
Schedule::Evented::RegistryonEvent (Event e)
 register callbacks for Experiment state change events
 
Schedule::Recurring::Registryduring (State s)
 register recurring callbacks during Experiment states
 
void setHeartbeatTimeout (uint32_t ms, Sink< Frame > &notify)
 set Heartbeat timeout in ms
 

Public Attributes

const Statestate {state_}
 const access to Experiment state
 
const uint32_t & time {time_}
 const access to Experiment time
 
ELog log {time, k.log}
 Logging facility.
 

Detailed Description

Experiment Controller.

Implements a simple state machine and provides hooks for recurring callbacks during the states, or on Events (state changes).

Note
implicitly depends on a Kernel object k in this namespace to be alive

Member Enumeration Documentation

◆ State

States during which recurring tasks can be called using during.

Enumerator
IDLE 

initial Experiment state

RUN 

running Experiment state

◆ Event

Events upon which tasks can be called using onEvent.

Enumerator
INIT 

Event generated on experiment start.

STOP 

Event generated on experiment end.

TIMEOUT 

Event generated on missed heartbeat.


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