Alert descriptor, used with ecs_alert_init().
More...
#include <alerts.h>
Alert descriptor, used with ecs_alert_init().
Definition at line 78 of file alerts.h.
◆ _canary
| int32_t ecs_alert_desc_t::_canary |
Used for validity testing.
Do not set.
Definition at line 79 of file alerts.h.
◆ brief
| const char* ecs_alert_desc_t::brief |
Description of alert.
Will only be set if FLECS_DOC addon is enabled.
Definition at line 104 of file alerts.h.
◆ doc_name
| const char* ecs_alert_desc_t::doc_name |
User-friendly name.
Will only be set if FLECS_DOC addon is enabled.
Definition at line 101 of file alerts.h.
◆ entity
Entity associated with alert.
Definition at line 82 of file alerts.h.
◆ id
(Component) ID of member to monitor.
If left to 0, this will be set to the parent entity of the member (optional).
Definition at line 129 of file alerts.h.
◆ member
Alert when member value is out of range.
Uses the warning and error ranges assigned to the member in the MemberRanges component (optional).
Definition at line 125 of file alerts.h.
◆ message
| const char* ecs_alert_desc_t::message |
Template for alert message.
This string is used to generate the alert message and may refer to variables in the query result. The format for the template expressions is as specified by ecs_script_string_interpolate().
Examples:
"$this has Position but not Velocity"
"$this has a parent entity $parent without Position"
Definition at line 98 of file alerts.h.
◆ query
Alert query.
An alert will be created for each entity that matches the specified query. The query must have at least one term that uses the $this variable (default).
Definition at line 87 of file alerts.h.
◆ retain_period
The retain period specifies how long an alert must be inactive before it is cleared.
This makes it easier to track noisy alerts. While an alert is inactive, its duration won't increase. When the retain period is 0, the alert will clear immediately after it no longer matches the alert query.
Definition at line 121 of file alerts.h.
◆ severity
Alert severity.
Must be EcsAlertInfo, EcsAlertWarning, EcsAlertError, or EcsAlertCritical. Defaults to EcsAlertError.
Definition at line 108 of file alerts.h.
◆ severity_filters
Severity filters can be used to assign different severities to the same alert.
This prevents having to create multiple alerts, and allows entities to transition between severities without resetting the alert duration (optional).
Definition at line 114 of file alerts.h.
◆ var
| const char* ecs_alert_desc_t::var |
Variable from which to fetch the member (optional).
When left to NULL, 'id' will be obtained from $this.
Definition at line 133 of file alerts.h.
The documentation for this struct was generated from the following file: