AT&T ECOMP Vendor Event Listener library  0.1
Functions
evel_strings.c File Reference

Implementation of EVEL functions to convert common enum types to strings. More...

#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include "evel_internal.h"
Include dependency graph for evel_strings.c:

Go to the source code of this file.

Functions

char * evel_criticality (const EVEL_COUNTER_CRITICALITIES criticality)
 Map an EVEL_COUNTER_CRITICALITIES enum value to the equivalent string. More...
 
char * evel_severity (const EVEL_SEVERITIES severity)
 Map an EVEL_SEVERITIES enum value to the equivalent string. More...
 
char * evel_alert_action (const EVEL_ALERT_ACTIONS alert_action)
 Map an EVEL_ALERT_ACTIONS enum value to the equivalent string. More...
 
char * evel_alert_type (const EVEL_ALERT_TYPES alert_type)
 Map an EVEL_ALERT_TYPES enum value to the equivalent string. More...
 
char * evel_event_domain (const EVEL_EVENT_DOMAINS domain)
 Map an EVEL_EVENT_DOMAINS enum value to the equivalent string. More...
 
char * evel_event_priority (const EVEL_EVENT_PRIORITIES priority)
 Map an EVEL_EVENT_PRIORITIES enum value to the equivalent string. More...
 
char * evel_source_type (const EVEL_SOURCE_TYPES source_type)
 Map an EVEL_SOURCE_TYPES enum value to the equivalent string. More...
 
char * evel_vf_status (const EVEL_VF_STATUSES vf_status)
 Map an EVEL_VF_STATUSES enum value to the equivalent string. More...
 
char * evel_entity_state (const EVEL_ENTITY_STATE state)
 Convert a EVEL_ENTITY_STATE to it's string form for JSON encoding. More...
 
char * evel_service_endpoint_desc (const EVEL_ENTITY_STATE endpoint_desc)
 Convert a EVEL_SERVICE_ENDPOINT_DESC to string form for JSON encoding. More...
 

Detailed Description

Implementation of EVEL functions to convert common enum types to strings.

License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the AT&T.
  4. Neither the name of AT&T nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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_strings.c.

Function Documentation

§ evel_alert_action()

char* evel_alert_action ( const EVEL_ALERT_ACTIONS  alert_action)

Map an EVEL_ALERT_ACTIONS enum value to the equivalent string.

Parameters
alert_actionThe alert_action to convert.
Returns
The equivalent string.

Definition at line 123 of file evel_strings.c.

§ evel_alert_type()

char* evel_alert_type ( const EVEL_ALERT_TYPES  alert_type)

Map an EVEL_ALERT_TYPES enum value to the equivalent string.

Parameters
alert_typeThe alert_type to convert.
Returns
The equivalent string.

Definition at line 159 of file evel_strings.c.

§ evel_criticality()

char* evel_criticality ( const EVEL_COUNTER_CRITICALITIES  criticality)

Map an EVEL_COUNTER_CRITICALITIES enum value to the equivalent string.

Parameters
criticalityThe criticality to convert.
Returns
The equivalent string.

Definition at line 47 of file evel_strings.c.

§ evel_entity_state()

char* evel_entity_state ( const EVEL_ENTITY_STATE  state)

Convert a EVEL_ENTITY_STATE to it's string form for JSON encoding.

Parameters
stateThe entity state to encode.
Returns
the corresponding string

Definition at line 416 of file evel_strings.c.

§ evel_event_domain()

char* evel_event_domain ( const EVEL_EVENT_DOMAINS  domain)

Map an EVEL_EVENT_DOMAINS enum value to the equivalent string.

Parameters
domainThe domain to convert.
Returns
The equivalent string.

Definition at line 199 of file evel_strings.c.

§ evel_event_priority()

char* evel_event_priority ( const EVEL_EVENT_PRIORITIES  priority)

Map an EVEL_EVENT_PRIORITIES enum value to the equivalent string.

Parameters
priorityThe priority to convert.
Returns
The equivalent string.

Definition at line 264 of file evel_strings.c.

§ evel_service_endpoint_desc()

char* evel_service_endpoint_desc ( const EVEL_ENTITY_STATE  endpoint_desc)

Convert a EVEL_SERVICE_ENDPOINT_DESC to string form for JSON encoding.

Parameters
endpoint_descendpoint description to encode.
Returns
the corresponding string

Definition at line 453 of file evel_strings.c.

§ evel_severity()

char* evel_severity ( const EVEL_SEVERITIES  severity)

Map an EVEL_SEVERITIES enum value to the equivalent string.

Parameters
severityThe severity to convert.
Returns
The equivalent string.

Definition at line 79 of file evel_strings.c.

§ evel_source_type()

char* evel_source_type ( const EVEL_SOURCE_TYPES  source_type)

Map an EVEL_SOURCE_TYPES enum value to the equivalent string.

Parameters
source_typeThe source type to convert.
Returns
The equivalent string.

Definition at line 305 of file evel_strings.c.

§ evel_vf_status()

char* evel_vf_status ( const EVEL_VF_STATUSES  vf_status)

Map an EVEL_VF_STATUSES enum value to the equivalent string.

Parameters
vf_statusThe vf_status to convert.
Returns
The equivalent string.

Definition at line 370 of file evel_strings.c.