AT&T ECOMP Vendor Event Listener library
0.1
|
Implementation of EVEL functions relating to the State Change. More...
Go to the source code of this file.
Functions | |
EVENT_STATE_CHANGE * | evel_new_state_change (const EVEL_ENTITY_STATE new_state, const EVEL_ENTITY_STATE old_state, const char *const interface) |
Create a new State Change event. More... | |
void | evel_free_state_change (EVENT_STATE_CHANGE *const state_change) |
Free a State Change. More... | |
void | evel_state_change_type_set (EVENT_STATE_CHANGE *const state_change, const char *const type) |
Set the Event Type property of the State Change. More... | |
void | evel_state_change_addl_field_add (EVENT_STATE_CHANGE *const state_change, const char *const name, const char *const value) |
Add an additional field name/value pair to the State Change. More... | |
void | evel_json_encode_state_change (EVEL_JSON_BUFFER *jbuf, EVENT_STATE_CHANGE *state_change) |
Encode the state change as a JSON state change. More... | |
Implementation of EVEL functions relating to the State Change.
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_state_change.c.
void evel_free_state_change | ( | EVENT_STATE_CHANGE *const | state_change | ) |
Free a State Change.
Free off the State Change supplied. Will free all the contained allocated memory.
Definition at line 111 of file evel_state_change.c.
void evel_json_encode_state_change | ( | EVEL_JSON_BUFFER * | jbuf, |
EVENT_STATE_CHANGE * | state_change | ||
) |
Encode the state change as a JSON state change.
jbuf | Pointer to the EVEL_JSON_BUFFER to encode into. |
state_change | Pointer to the EVENT_STATE_CHANGE to encode. |
Definition at line 221 of file evel_state_change.c.
EVENT_STATE_CHANGE* evel_new_state_change | ( | const EVEL_ENTITY_STATE | new_state, |
const EVEL_ENTITY_STATE | old_state, | ||
const char *const | interface | ||
) |
Create a new State Change event.
new_state | The new state of the reporting entity. |
old_state | The old state of the reporting entity. |
interface | The card or port name of the reporting entity. |
NULL | Failed to create the event. |
Definition at line 58 of file evel_state_change.c.
void evel_state_change_addl_field_add | ( | EVENT_STATE_CHANGE *const | state_change, |
const char *const | name, | ||
const char *const | value | ||
) |
Add an additional field name/value pair to the State Change.
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.
state_change | Pointer to the EVENT_STATE_CHANGE. |
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 186 of file evel_state_change.c.
void evel_state_change_type_set | ( | EVENT_STATE_CHANGE *const | state_change, |
const char *const | type | ||
) |
Set the Event Type property of the State Change.
state_change | Pointer to the EVENT_STATE_CHANGE. |
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 156 of file evel_state_change.c.