yumapro  24.10-1
YumaPro SDK
Loading...
Searching...
No Matches
YANG Enum Statement (ncx_enum_t)

Enumeration data type handling. More...

Collaboration diagram for YANG Enum Statement (ncx_enum_t):

Functions

void ncx_init_enum (ncx_enum_t *enu)
 Init the memory of a ncx_enum_t. More...
 
void ncx_clean_enum (ncx_enum_t *enu)
 Scrub the memory of a ncx_enum_t but do not delete it. More...
 
int32 ncx_compare_enums (const ncx_enum_t *enu1, const ncx_enum_t *enu2)
 Compare 2 enum values. More...
 
status_t ncx_set_enum (const xmlChar *enum_name, const int32 enum_val, ncx_enum_t *retenu)
 Parse an enumerated integer string into an ncx_enum_t without matching it against any typdef. More...
 

Detailed Description

Enumeration data type handling.

The VAL_ENUM_NAME macro is used in SIL code to test the ncx_enum_t struct within a val_value_t struct.

Function Documentation

◆ ncx_clean_enum()

void ncx_clean_enum ( ncx_enum_t enu)

Scrub the memory of a ncx_enum_t but do not delete it.

Parameters
enuncx_enum_t struct to clean
Here is the caller graph for this function:

◆ ncx_compare_enums()

int32 ncx_compare_enums ( const ncx_enum_t enu1,
const ncx_enum_t enu2 
)

Compare 2 enum values.

Parameters
enu1first ncx_enum_t check
enu2second ncx_enum_t check
Returns
compare status -1 if enu1 is < enu2 0 if enu1 == enu2 1 if enu1 is > enu2
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_init_enum()

void ncx_init_enum ( ncx_enum_t enu)

Init the memory of a ncx_enum_t.

Parameters
enuncx_enum_t struct to init

◆ ncx_set_enum()

status_t ncx_set_enum ( const xmlChar *  enum_name,
const int32  enum_val,
ncx_enum_t retenu 
)

Parse an enumerated integer string into an ncx_enum_t without matching it against any typdef.

Mallocs a copy of the enum name, using the enu->dname field

Parameters
enum_nameenum string value to set
enum_valenum value number to set
retenupointer to return enum variable to fill in
Returns
status
Here is the caller graph for this function: