Aurora Events

Aurora’s event system monitors and captures many interesting events that occur during operation. Each supported event is identified by a unique id in the range of 0-31. Additionally, a 32-bit integer payload carries extra information/flags specific to each event and occurence. In general, events must first be subscribed to and can be configured to notify one or more Event Outputs for logging/responding to emissions. A complete list of events and outputs are below.

Event Outputs

Event Outputs are the "receivers" of event messages emitted by Aurora during operation. Event commands generally accept a mask of outputs. For example, an output mask of 5 would target both the Session and USB outputs since 1 + 4 = 5.

Event Output Id Mask Description
USB 0 1 Outputs events to an open USB serial connection, of the form "event-name: flags".
Log 1 2 Outputs events as log messages of type Event, where output can be configured further.
Session 2 4 Writes event occurences to any active session.txt file.
Profile 3 8 Allows the profile to respond to an event occurence. These events are subscribed to automatically when a profile is loaded.
BLE 4 16 Sends event occurences over BLE to any connected devices.
Handler 5 32 Used internally to let other system modules to respond to events.

Event List

The following is a comprehensive list of all currently supported Aurora events with links to more detailed information. Note that each event uses the payload/flags a little differently. Similar to Event Outputs, most event commands accept a mask of event ids for targetting multiple events with a single command. For targetting events with large ids, hexadecimal notation is generally easier to specify. For example, the command event-output-enable 0x00010004 5 would send both button events and movement events to both the Session and USB outputs.

Event Id Mask (Hex) Description
Signal Monitor 0 0x00000001 Monitors whether an EEG signal is present, and for how long.
Sleep Monitor 1 0x00000002 Emitted when a sleep stage change is detected.
Movement Monitor 2 0x00000004 Emitted when movement is detected.
REM Stim 3 0x00000008 Emitted when a REM stimulation is triggered.
Awakening 4 0x00000010 Emitted when an awakening is detected.
Auto-Shutdown 5 0x00000020 Emitted when the Aurora shuts down automatically.
Smart Alarm 6 0x00000040 Emitted when the smart alarm is triggered.
N/A 7-15 Reserved for future events.
Button Monitor 16 0x00010000 Emitted when the pushbutton is pressed, held, or released.
SD Card Monitor 17 0x00020000 Monitors changes to the SD card status.
USB Monitor 18 0x00040000 Monitors changes to USB status.
Battery Monitor 19 0x00080000 Monitors the battery level.
N/A 20-21 Reserved for future events.
Profile Monitor 22 0x00400000 Monitors when profiles are loaded and unloaded.
N/A 23-26 Reserved for future events.
Clock Alarm Fire 27 0x08000000 Emitted when a configured system alarm is fired.
Clock Timer0 Fire 28 0x10000000 Emitted when Timer0 fires.
Clock Timer1 Fire 29 0x20000000 Emitted when Timer1 fires.
Clock Timer2 Fire 30 0x40000000 Emitted when Timer2 fires.
Clock Timer Fire 31 0x80000000 Emitted when any timer fires.

results matching ""

    No results matching ""