event.h
Go to the documentation of this file.
1 
11 #ifndef EVENT_H_
12 #define EVENT_H_
13 
14 #include "item.h"
15 #include "mcl_core/mcl_json_util.h"
16 #include "mcl_core/mcl_time_util.h"
17 
21 typedef struct event_payload_t
22 {
23  char *id;
27  char *description;
28  char *type;
29  char *version;
32 
36 typedef struct mcl_event_t
37 {
40 } event_t;
41 
53 
54 extern const char *mcl_event_versions[];
55 
56 #endif //EVENT_H_
#define MCL_LOCAL
#define MCL_TIMESTAMP_LENGTH
mcl_int32_t severity
Severity level.
Definition: event.h:26
char * correlation_id
Parent event id.
Definition: event.h:24
int32_t mcl_int32_t
mcl_json_t * details
Event/alarm details.
Definition: event.h:30
char * version
Version of the event/alarm type.
Definition: event.h:29
void mcl_json_t
char * description
Event description.
Definition: event.h:27
const char * mcl_event_versions[]
Definition: event.c:17
mcl_int32_t mcl_error_t
struct mcl_event_t mcl_event_t
Definition: mcl_event.h:34
event_payload_t * payload
Payload of event.
Definition: event.h:39
char * type
Type of the event.
Definition: event.h:28
Item module header file.
MCL_LOCAL mcl_error_t event_validate(event_t *event)
Definition: event.c:158
mcl_item_t item_base
Item base of event.
Definition: event.h:38
char * id
Unique identifier of the event.
Definition: event.h:23
Definition: event.h:36
char timestamp[MCL_TIMESTAMP_LENGTH]
Creation time of the event in ISO format.
Definition: event.h:25