docs/reference/system-functional/event-management.md
Event management collects time-tagged log entries from components across the system, packages them for downlink, and optionally logs human-readable text to the console. Events are the primary mechanism for recording system activities, anomalies, and state changes in F Prime. Every component can emit events at various severity levels, and the event management subsystem ensures they are captured and delivered.
The Event Manager is an active component that receives events from all components in the system. Events arrive as serialized data containing the event ID, severity, timestamp, and arguments. The Event Manager packages these events into communication buffers and sends them to the downlink path for transmission to the ground system.
Events are categorized by severity to support filtering and prioritization:
Events can be configured with throttle limits to prevent log flooding when a condition triggers the same event repeatedly. Throttling is configured on the individual component that emits the event. Two throttling modes are available:
In addition to binary event distribution for downlink, F Prime supports human-readable text logging to the console. Two text logging components are available:
Both text loggers support configurable per-severity filtering via setSeverityFilter(). Each of the six filterable severity levels can be independently enabled or disabled, and FATAL events always pass through regardless of filter configuration. Default filter states are set via configuration headers (ActiveTextLoggerCfg.hpp and PassiveTextLoggerCfg.hpp). The filtering logic is provided by the shared Svc::EventSeverityFilter utility class.
Text logging is primarily used for development and ground testing. It is connected via a separate text event port that carries pre-formatted strings.
Fatal events receive special handling through a dedicated path. When a fatal event is issued, the Event Manager announces it via a fatal announcement port. This is connected to a fatal handler component that performs platform-specific responses to unrecoverable errors (such as rebooting the system or entering a safe mode).
The Assert Fatal Adapter component converts framework-level assertions (FW_ASSERT failures) into FATAL events, bridging the C++ assertion mechanism with the event system.