Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
ecs_alert_desc_t Struct Reference

Public Attributes

int32_t _canary
 
ecs_entity_t entity
 Entity associated with alert.
 
ecs_filter_desc_t filter
 Alert query.
 
const char * message
 Template for alert message.
 
const char * doc_name
 User friendly name.
 
const char * brief
 Description of alert.
 
ecs_entity_t severity
 Metric kind.
 
ecs_alert_severity_filter_t severity_filters [(4)]
 Severity filters can be used to assign different severities to the same alert.
 
ecs_ftime_t retain_period
 The retain period specifies how long an alert must be inactive before it is cleared.
 
ecs_entity_t member
 Alert when member value is out of range.
 
ecs_id_t id
 (Component) id of member to monitor.
 
const char * var
 Variable from which to fetch the member (optional).
 

Detailed Description

Definition at line 75 of file alerts.h.

Member Data Documentation

◆ _canary

int32_t ecs_alert_desc_t::_canary

Definition at line 76 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 101 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 98 of file alerts.h.

◆ entity

ecs_entity_t ecs_alert_desc_t::entity

Entity associated with alert.

Definition at line 79 of file alerts.h.

◆ filter

ecs_filter_desc_t ecs_alert_desc_t::filter

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 84 of file alerts.h.

◆ id

ecs_id_t ecs_alert_desc_t::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 126 of file alerts.h.

◆ member

ecs_entity_t ecs_alert_desc_t::member

Alert when member value is out of range.

Uses the warning/error ranges assigned to the member in the MemberRanges component (optional).

Definition at line 122 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_interpolate_string().

Examples:

"$this has Position but not Velocity"
"$this has a parent entity $parent without Position"

Definition at line 95 of file alerts.h.

◆ retain_period

ecs_ftime_t ecs_alert_desc_t::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 118 of file alerts.h.

◆ severity

ecs_entity_t ecs_alert_desc_t::severity

Metric kind.

Must be EcsAlertInfo, EcsAlertWarning, EcsAlertError or EcsAlertCritical. Defaults to EcsAlertError.

Definition at line 105 of file alerts.h.

◆ severity_filters

ecs_alert_severity_filter_t ecs_alert_desc_t::severity_filters[(4)]

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 111 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 130 of file alerts.h.


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