AT&T ECOMP Vendor Event Listener library
0.1
|
Implementation of EVEL functions relating to the Fault. More...
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include "evel.h"
#include "evel_internal.h"
#include "evel_throttle.h"
Go to the source code of this file.
Functions | |
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. More... | |
void | evel_fault_addl_info_add (EVENT_FAULT *fault, char *name, char *value) |
Add an additional value name/value pair to the Fault. More... | |
void | evel_fault_interface_set (EVENT_FAULT *fault, const char *const interface) |
Set the Alarm Interface A property of the Fault. More... | |
void | evel_fault_type_set (EVENT_FAULT *fault, const char *const type) |
Set the Event Type property of the Fault. More... | |
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. More... | |
void | evel_free_fault (EVENT_FAULT *event) |
Free a Fault. More... | |
Implementation of EVEL functions relating to the Fault.
Copyright(c) <2016>, AT&T Intellectual Property. All other rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY AT&T INTELLECTUAL PROPERTY ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AT&T INTELLECTUAL PROPERTY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file evel_fault.c.
void evel_fault_addl_info_add | ( | EVENT_FAULT * | fault, |
char * | name, | ||
char * | value | ||
) |
Add an additional value name/value pair to the Fault.
The name and value are null delimited ASCII strings. The library takes a copy so the caller does not have to preserve values after the function returns.
fault | Pointer to the fault. |
name | ASCIIZ string with the attribute's name. The caller does not need to preserve the value once the function returns. |
value | ASCIIZ string with the attribute's value. The caller does not need to preserve the value once the function returns. |
Definition at line 125 of file evel_fault.c.
void evel_fault_interface_set | ( | EVENT_FAULT * | fault, |
const char *const | interface | ||
) |
Set the Alarm Interface A property of the Fault.
fault | Pointer to the fault. |
interface | The Alarm Interface A to be set. ASCIIZ string. The caller does not need to preserve the value once the function returns. |
Definition at line 164 of file evel_fault.c.
void evel_fault_type_set | ( | EVENT_FAULT * | fault, |
const char *const | type | ||
) |
Set the Event Type property of the Fault.
fault | Pointer to the fault. |
type | The Event Type to be set. ASCIIZ string. The caller does not need to preserve the value once the function returns. |
Definition at line 194 of file evel_fault.c.
void evel_free_fault | ( | EVENT_FAULT * | event | ) |
Free a Fault.
Free off the Fault supplied. Will free all the contained allocated memory.
Definition at line 304 of file evel_fault.c.
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.
jbuf | Pointer to the EVEL_JSON_BUFFER to encode into. |
event | Pointer to the EVENT_HEADER to encode. |
Definition at line 214 of file evel_fault.c.
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.
condition | The condition indicated by the Fault. |
specific_problem | The specific problem triggering the fault. |
priority | The priority of the event. |
severity | The severity of the Fault. |
NULL | Failed to create the event. |
Definition at line 60 of file evel_fault.c.