31#define ECS_ALERT_MAX_SEVERITY_FILTERS (4)
168#define ecs_alert(world, ...)\
169 ecs_alert_init(world, &(ecs_alert_desc_t)__VA_ARGS__)
struct EcsAlertsActive EcsAlertsActive
Map with active alerts for entity.
FLECS_API ecs_entity_t ecs_get_alert(const ecs_world_t *world, ecs_entity_t entity, ecs_entity_t alert)
Return alert instance for specified alert.
struct ecs_alert_severity_filter_t ecs_alert_severity_filter_t
Alert severity filter.
struct EcsAlertInstance EcsAlertInstance
Component added to alert instance.
FLECS_API void FlecsAlertsImport(ecs_world_t *world)
Alert module import function.
FLECS_API ecs_entity_t ecs_alert_init(ecs_world_t *world, const ecs_alert_desc_t *desc)
Create a new alert.
struct ecs_alert_desc_t ecs_alert_desc_t
Alert descriptor, used with ecs_alert_init().
FLECS_API int32_t ecs_get_alert_count(const ecs_world_t *world, ecs_entity_t entity, ecs_entity_t alert)
Return number of active alerts for entity.
ecs_id_t ecs_entity_t
An entity identifier.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
uint64_t ecs_id_t
Ids are the things that can be added to an entity.
#define ECS_TAG_DECLARE
Forward declare a tag.
#define ECS_COMPONENT_DECLARE(id)
Forward declare a component.
#define ecs_ftime_t
Customizable precision for scalar time values.
Component added to alert instance.
char * message
Generated alert message.
Map with active alerts for entity.
int32_t error_count
Number of alerts for source with error severity.
int32_t info_count
Number of alerts for source with info severity.
int32_t warning_count
Number of alerts for source with warning severity.
Alert descriptor, used with ecs_alert_init().
ecs_alert_severity_filter_t severity_filters[(4)]
Severity filters can be used to assign different severities to the same alert.
const char * brief
Description of 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.
ecs_entity_t entity
Entity associated with alert.
ecs_entity_t severity
Metric kind.
ecs_query_desc_t query
Alert query.
const char * doc_name
User friendly name.
const char * message
Template for alert message.
const char * var
Variable from which to fetch the member (optional).
Used with ecs_query_init().