61 const char *
const specific_problem,
71 assert(condition != NULL);
72 assert(specific_problem != NULL);
133 assert(fault != NULL);
135 assert(name != NULL);
136 assert(value != NULL);
138 EVEL_DEBUG(
"Adding name=%s value=%s", name, value);
140 assert(addl_info != NULL);
142 addl_info->
name = strdup(name);
143 addl_info->
value = strdup(value);
144 assert(addl_info->
name != NULL);
145 assert(addl_info->
value != NULL);
165 const char *
const interface)
172 assert(fault != NULL);
174 assert(interface != NULL);
178 "Alarm Interface A");
201 assert(fault != NULL);
219 char * fault_severity;
220 char * fault_source_type;
221 char * fault_vf_status;
228 assert(event != NULL);
259 bool item_added =
false;
262 while (addl_info_item != NULL)
265 assert(addl_info != NULL);
268 "alarmAdditionalInformation",
314 assert(event != NULL);
321 while (addl_info != NULL)
323 EVEL_DEBUG(
"Freeing Additional Info (%s, %s)",
326 free(addl_info->
name);
327 free(addl_info->
value);
EVEL_SOURCE_TYPES event_source_type
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.
#define EVEL_DEBUG(FMT,...)
#define EVEL_FAULT_MAJOR_VERSION
DLIST_ITEM * dlist_get_first(DLIST *list)
EVEL_SOURCE_TYPES event_source_type
The type of equipment represented by this VNF.
void dlist_initialize(DLIST *list)
List initialization.
void evel_fault_interface_set(EVENT_FAULT *fault, const char *const interface)
Set the Alarm Interface A property of the Fault.
EVEL_THROTTLE_SPEC * throttle_spec
void evel_free_fault(EVENT_FAULT *event)
Free a Fault.
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_json_close_list(EVEL_JSON_BUFFER *jbuf)
Add the closing bracket of a list to a JSON buffer.
void evel_init_option_string(EVEL_OPTION_STRING *const option)
Initialize an EVEL_OPTION_STRING to a not-set state.
char * evel_source_type(const EVEL_SOURCE_TYPES source_type)
Map an EVEL_SOURCE_TYPES enum value to the equivalent string.
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.
char * evel_vf_status(const EVEL_VF_STATUSES vf_status)
Map an EVEL_VF_STATUSES enum value to the equivalent string.
void evel_json_close_object(EVEL_JSON_BUFFER *jbuf)
Add the closing bracket of an object to a JSON buffer.
#define EVEL_FAULT_MINOR_VERSION
void evel_fault_addl_info_add(EVENT_FAULT *fault, char *name, char *value)
Add an additional value name/value pair to the Fault.
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_open_object(EVEL_JSON_BUFFER *jbuf)
Add the opening bracket of an object to a JSON buffer.
void evel_json_checkpoint(EVEL_JSON_BUFFER *jbuf)
Add a checkpoint - a stake in the ground to which we can rewind.
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.
EVEL_SEVERITIES
Fault / Threshold severities.
void evel_free_header(EVENT_HEADER *const event)
Free an event header.
void * dlist_pop_last(DLIST *list)
void dlist_push_last(DLIST *list, void *item)
A Heartbeat event (event header only).
bool evel_json_open_opt_named_list(EVEL_JSON_BUFFER *jbuf, const char *const key)
Add the key and opening bracket of an optional named list to a JSON buffer.
void log_error_state(char *format,...)
void evel_free_option_string(EVEL_OPTION_STRING *const option)
Free the underlying resources of an EVEL_OPTION_STRING.
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.
DLIST_ITEM * dlist_get_next(DLIST_ITEM *item)
void evel_fault_type_set(EVENT_FAULT *fault, const char *const type)
Set the Event Type property of the Fault.
void evel_json_rewind(EVEL_JSON_BUFFER *jbuf)
Rewind to the latest checkoint.
void evel_header_type_set(EVENT_HEADER *const header, const char *const type)
Set the Event Type property of the event header.
EVEL throttle definitions.
EVEL_EVENT_PRIORITIES
Event priorities.
EVEL internal definitions.
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_init_header(EVENT_HEADER *const header)
Initialize a newly created event header.
EVENT_FAULT * evel_new_fault(const char *const condition, const char *const specific_problem, EVEL_EVENT_PRIORITIES priority, EVEL_SEVERITIES severity)
Create a new fault event.
bool evel_throttle_suppress_nv_pair(EVEL_THROTTLE_SPEC *throttle_spec, const char *const field_name, const char *const name)
Determine whether a name-value pair should be allowed (not suppressed).
EVEL_OPTION_STRING alarm_interface_a
char * evel_severity(const EVEL_SEVERITIES severity)
Map an EVEL_SEVERITIES enum value to the equivalent string.
EVEL_SEVERITIES event_severity
EVEL_VF_STATUSES vf_status