Skip to main content
Version: AT3 v1.0

Event manager

The event manager handles the application events. Any part of the application can register one or more event classes with the event manager to receive the corresponding events.

Each application event is composed of a class and a type. A class represents a set of events related to a specific functionality, while a type refers to a specific event within the class.

The event manager maintains an event queue (a FreeRTOS queue), that can hold up to 40 events. The events are distributed one by one to the software components registered with the event manager.

Event classes and types

The AT3 application supports the following classes and types

Class 0 and 1: Button_1 (0) & Button_2 (1)

Event typeIDComments
type_btn_press0Button press
type_btn_long_press1Button long press
type_btn_1_click2Single click
type_btn_2_clicks3Double clicks
type_btn_3_clicks4Triple clicks
type_btn_seq_reset5Button reset sequence has been entered.
type_btn_seq_bond_del6Button bond delete sequence has been entered.
type_btn_seq_ble_boot7Button BLE bootloader sequence has been entered.
type_btn_ble_connectivity8Button event to start connectivity.

Note that the very long press event (14s+) and the detection of special command sequences is implemented by the button driver and not available for customization by the application, hence these special command actions are not reported as events.

Class 2: Buzzer

Event typeIDComments
type_buzzer_on0The buzzer is playing
type_buzzer_off1The buzzer is no more playing

Class 3: Accelerometer

Event typeIDComments
type_acc_motion_start0Motion start detected.
type_acc_motion_end1Motion end detected (after motion duration timeout).
type acc_shock_detected2A shock has been detected.

Class 4. Power

Event typeIDComments
type_power_battery_low0Critically low battery level detected
type_power_charging1Battery is charging
type_power_not_charging2Battery is no more charging

Class 5. Temperature

Event typeIDComments
type_temp_normal0Temperature back to normal (within minimum and maximum thresholds)
type_temp_low1Temperature fell below the minimum threshold
type_temp_high2Temperature increased above the maximum threshold

Class 6. Geolocation

Event typeIDComments
type_geoloc_start0Geolocation has started
type_geoloc_done1Geolocation is done
type_geoloc_abort2Geolocation has been aborted
type_geoloc_timeout_acq3Geolocation timeout occurred
type_geoloc_timeout_hold4GNSS hold mode timeout occurred
type_geoloc_geozoning_in6Geozoning indoor event has been raised
type_geoloc_geozoning_out7Geozoning outdoor event has been raised

Class 7. Configuration

Event typeComments
type_network_main_upMain network up.

Class 8. Network

Event typeIDComments
type_network_main_up0Main network up.
type_network_backup_up1Backup network up.
type_network_down2Network is down. No connectivity at all
type_network_hold3Network is temporarily not available
type_network_pipe1_up4Data pipe 1 up. Traffic accepted on this pipe.
type_network_pipe1_down5Data pipe 1 down. Traffic refused on this pipe.
type_network_pipe1_rx_data6Data pipe 1 has available RX data

Class 9. Core

Event typeIDComments
type_core_app_init_done0Application has ended initialization
type_core_off1Core application moved to the off state
type_core_skip_off2Core was expected to move in off mode but the configuration prevents it
type_core_running3The core application is running
type_core_hold4The core application moved to the hold state. Reserved for future use.
type_core_time_update5The system time has been updated
type_core_device_start6A start action for the core has been issued
type_core_device_stop7A stop action for the core has been issued
type_core_sos_start8A SOS start action has been issued
type_core_sos_stop9A SOS stop action has been issued
type_core_status_ul10The sending of a status uplink has been requested
type_core_monitoring11The timeout of the monitoring timer has elapsed
type_core_pod12A position on demand has been requested
type_core_refresh_alm13Almanac refresh
type_core_tamper_on14Tracker casing is open
type_core_tamper_off15Tracker casing is closed
type_core_gnss_timeout16GNSS core timeout
type_core_battery_level17Show battery level

Class 10. BLE connectivity/beaconing

Event typeIDComments
type_ble_conn_start0Start advertisement for connectivity
type_ble_conn_stop1Stop connectivity
type_ble_conn_idle2No connection nor advertisement
type_ble_conn_fast_adv3Fast advertisement for connectivity
type_ble_conn_slow_adv4Slow advertisement for connectivity
type_ble_connected5BLE is in the connection state
type_ble_bonded6BLE is securely connected (bonded)
type_ble_conn_link_lost7Connection lost
type_ble_beacon_start8BLE beacon started
type_ble_beacon_stop9BLE beacon stopped

Class 11. User

Event typeIDComments
core_event_type_user_10User event 1
core_event_type_user_21User event 2
core_event_type_user_32User event 3
core_event_type_user_43User event 4
core_event_type_user_54User event 5