52 static int event_sequence = 1;
63 EVEL_INFO(
"Setting event sequence to %d, was %d ", sequence, event_sequence);
64 event_sequence = sequence;
87 if (heartbeat == NULL)
119 assert(header != NULL);
121 gettimeofday(&tv, NULL);
130 header->
event_id = strdup(scratchpad);
165 const char *
const type)
172 assert(header != NULL);
173 assert(type != NULL);
190 const unsigned long long start_epoch_microsec)
197 assert(header != NULL);
213 const unsigned long long last_epoch_microsec)
220 assert(header != NULL);
235 const char *
const entity_name)
242 assert(header != NULL);
243 assert(entity_name != NULL);
265 const char *
const entity_id)
272 assert(header != NULL);
273 assert(entity_id != NULL);
302 assert(jbuf != NULL);
303 assert(jbuf->
json != NULL);
305 assert(event != NULL);
357 assert(event != NULL);
457 assert(jbuf->
depth == 0);
472 const char *
const vendor_id,
473 const char *
const event_id)
480 assert(instance_id != NULL);
481 assert(vendor_id != NULL);
482 assert(event_id != NULL);
487 instance_id->
vendor_id = strdup(vendor_id);
488 instance_id->
event_id = strdup(event_id);
512 assert(instance_id != NULL);
514 assert(instance_id->
event_id != NULL);
542 assert(jbuf != NULL);
543 assert(jbuf->
json != NULL);
545 assert(instance_id != NULL);
547 assert(instance_id->
event_id != NULL);
EVENT_HEADER * evel_new_heartbeat()
Create a new heartbeat event.
char * evel_event_domain(const EVEL_EVENT_DOMAINS domain)
Map an EVEL_EVENT_DOMAINS enum value to the equivalent string.
void evel_set_option_string(EVEL_OPTION_STRING *const option, const char *const value, const char *const description)
Set the value of an EVEL_OPTION_STRING.
void evel_json_buffer_init(EVEL_JSON_BUFFER *jbuf, char *const json, const int max_size, EVEL_THROTTLE_SPEC *throttle_spec)
Initialize a EVEL_JSON_BUFFER.
void evel_reporting_entity_id_set(EVENT_HEADER *const header, const char *const entity_id)
Set the Reporting Entity Id property of the event header.
Event Instance Identifier JSON equivalent field: eventInstanceIdentifier.
#define EVEL_INFO(FMT,...)
#define EVEL_HEADER_MINOR_VERSION
void evel_header_type_set(EVENT_HEADER *const header, const char *const type)
Set the Event Type property of the event header.
void evel_json_encode_mobile_flow(EVEL_JSON_BUFFER *jbuf, EVENT_MOBILE_FLOW *event)
Encode the Mobile Flow in JSON according to AT&T's schema for the event type.
void evel_json_encode_service(EVEL_JSON_BUFFER *const jbuf, EVENT_SERVICE *const event)
Encode the Service Event in JSON according to AT&T's schema for the event type.
void evel_json_encode_state_change(EVEL_JSON_BUFFER *jbuf, EVENT_STATE_CHANGE *state_change)
Encode the state change as a JSON state change.
void evel_json_encode_fault(EVEL_JSON_BUFFER *jbuf, EVENT_FAULT *event)
Encode the fault in JSON according to AT&T's schema for the fault type.
void evel_init_option_string(EVEL_OPTION_STRING *const option)
Initialize an EVEL_OPTION_STRING to a not-set state.
A Measurement for VF Reporting event.
char * evel_event_priority(const EVEL_EVENT_PRIORITIES priority)
Map an EVEL_EVENT_PRIORITIES enum value to the equivalent string.
void evel_json_encode_instance_id(EVEL_JSON_BUFFER *jbuf, EVEL_EVENT_INSTANCE_ID *instance_id)
Encode the instance id as a JSON object according to AT&T's schema.
#define EVEL_MAX_STRING_LEN
void evel_force_option_string(EVEL_OPTION_STRING *const option, const char *const value)
Force the value of an EVEL_OPTION_STRING.
EVEL_THROTTLE_SPEC * evel_get_throttle_spec(EVEL_EVENT_DOMAINS domain)
Return the EVEL_THROTTLE_SPEC for a given domain.
void evel_enc_kv_string(EVEL_JSON_BUFFER *jbuf, const char *const key, const char *const value)
Encode a string key and string value to a EVEL_JSON_BUFFER.
void evel_json_close_object(EVEL_JSON_BUFFER *jbuf)
Add the closing bracket of an object to a JSON buffer.
Event Throttling Specification for a domain which is in a throttled state.
#define EVEL_HEADER_MAJOR_VERSION
void evel_enc_kv_ull(EVEL_JSON_BUFFER *jbuf, const char *const key, const unsigned long long value)
Encode a string key and unsigned long long value to a EVEL_JSON_BUFFER.
void evel_enc_kv_int(EVEL_JSON_BUFFER *jbuf, const char *const key, const int value)
Encode a string key and integer value to a EVEL_JSON_BUFFER.
char * functional_role
The Functional Role of the equipment represented by this VNF.
#define EVEL_ERROR(FMT,...)
void evel_reporting_entity_name_set(EVENT_HEADER *const header, const char *const entity_name)
Set the Reporting Entity Name property of the event header.
void evel_json_open_named_object(EVEL_JSON_BUFFER *jbuf, const char *const key)
Add the opening bracket of an object to a JSON buffer.
void evel_json_encode_signaling(EVEL_JSON_BUFFER *const jbuf, EVENT_SIGNALING *const event)
Encode the Signaling in JSON according to AT&T's schema for the event type.
void evel_json_open_object(EVEL_JSON_BUFFER *jbuf)
Add the opening bracket of an object to a JSON buffer.
EVEL_OPTION_STRING event_friendly_name
void evel_json_encode_report(EVEL_JSON_BUFFER *jbuf, EVENT_REPORT *event)
Encode the report as a JSON report.
EVEL_OPTION_STRING product_id
void evel_json_encode_header(EVEL_JSON_BUFFER *jbuf, EVENT_HEADER *event)
Encode the event as a JSON event object according to AT&T's schema.
void evel_set_next_event_sequence(const int sequence)
Set the next event_sequence to use.
EVEL_OPTION_STRING subsystem_id
A Heartbeat event (event header only).
void evel_json_encode_measurement(EVEL_JSON_BUFFER *jbuf, EVENT_MEASUREMENT *event)
Encode the measurement as a JSON measurement.
void log_error_state(char *format,...)
void evel_start_epoch_set(EVENT_HEADER *const header, const unsigned long long start_epoch_microsec)
Set the Start Epoch property of the event header.
void evel_free_option_string(EVEL_OPTION_STRING *const option)
Free the underlying resources of an EVEL_OPTION_STRING.
A Measurement for VF Scaling event.
bool evel_enc_kv_opt_string(EVEL_JSON_BUFFER *jbuf, const char *const key, const EVEL_OPTION_STRING *const option)
Encode a string key and string value to a EVEL_JSON_BUFFER.
int evel_json_encode_event(char *json, int max_size, EVENT_HEADER *event)
Encode the event as a JSON event object according to AT&T's schema.
Internal event, not for external routing.
EVEL throttle definitions.
void evel_json_encode_syslog(EVEL_JSON_BUFFER *jbuf, EVENT_SYSLOG *event)
Encode the Syslog in JSON according to AT&T's schema for the event type.
EVEL internal definitions.
void evel_init_event_instance_id(EVEL_EVENT_INSTANCE_ID *const instance_id, const char *const vendor_id, const char *const event_id)
Initialize an event instance id.
void evel_enc_version(EVEL_JSON_BUFFER *jbuf, const char *const key, const int major_version, const int minor_version)
Encode a key and version.
void evel_free_event_instance_id(EVEL_EVENT_INSTANCE_ID *const instance_id)
Free an event instance id.
void evel_json_encode_other(EVEL_JSON_BUFFER *jbuf, EVENT_OTHER *event)
Encode the Other in JSON according to AT&T's schema for the event type.
void evel_free_header(EVENT_HEADER *const event)
Free an event header.
void evel_last_epoch_set(EVENT_HEADER *const header, const unsigned long long last_epoch_microsec)
Set the Last Epoch property of the event header.
void evel_init_header(EVENT_HEADER *const header)
Initialize a newly created event header.