yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
String / Enum Conversions

Convert between enumeration and string for log output. More...

Collaboration diagram for String / Enum Conversions:

Functions

const xmlChar * ncx_get_layer (ncx_layer_t layer)
 Translate ncx_layer_t enum to a string. More...
 
ncx_cvttyp_t ncx_get_cvttyp_enum (const char *str)
 Get the enum for the string name of a ncx_cvttyp_t enum. More...
 
ncx_status_t ncx_get_status_enum (const xmlChar *str)
 Get the enum for the string name of a ncx_status_t enum. More...
 
const xmlChar * ncx_get_status_string (ncx_status_t status)
 Get the string for the enum value of a ncx_status_t enum. More...
 
ncx_data_class_t ncx_get_data_class_enum (const xmlChar *str)
 Get the enum for the string name of a ncx_data_class_t enum. More...
 
const xmlChar * ncx_get_data_class_str (ncx_data_class_t dataclass)
 Get the string value for the ncx_data_class_t enum. More...
 
const xmlChar * ncx_get_access_str (ncx_access_t max_access)
 Get the string name of a ncx_access_t enum. More...
 
ncx_access_t ncx_get_access_enum (const xmlChar *str)
 Get the enum for the string name of a ncx_access_t enum. More...
 
boolean ncx_is_true (const xmlChar *str)
 Check if an xmlChar string is a string OK for XSD boolean. More...
 
boolean ncx_is_false (const xmlChar *str)
 Check if an xmlChar string is a string OK for XSD boolean. More...
 
ncx_bad_data_t ncx_get_baddata_enum (const xmlChar *valstr)
 Check if the specified string matches an ncx_baddata_t enum. More...
 
const xmlChar * ncx_get_baddata_string (ncx_bad_data_t baddata)
 Get the string for the specified enum value. More...
 
const xmlChar * ncx_get_withdefaults_string (ncx_withdefaults_t withdef)
 Get the string for the specified enum value. More...
 
ncx_withdefaults_t ncx_get_withdefaults_enum (const xmlChar *withdefstr)
 Get the enum for the specified string value. More...
 
int32 ncx_get_withdefaults_value (const xmlChar *withdefstr)
 Get the YANG integer value for the enum for the specified string value. More...
 
ncx_display_mode_t ncx_get_display_mode_enum (const xmlChar *dmstr)
 Get the enum for the specified string value. More...
 
const xmlChar * ncx_get_display_mode_str (ncx_display_mode_t dmode)
 Get the string for the specified enum value. More...
 
const xmlChar * ncx_get_confirm_event_str (ncx_confirm_event_t event)
 Get the string for the specified enum value. More...
 
const xmlChar * ncx_get_protocols_enabled (uint16 flags)
 Get the string for the NETCONF protocols enabled in the flags. More...
 
const xmlChar * ncx_get_protocol_name (ncx_protocol_t proto)
 Get the name string for the protocol. More...
 
ncx_name_match_t ncx_get_name_match_enum (const xmlChar *str)
 Get the enum for the string name of a ncx_name_match_t enum. More...
 
const xmlChar * ncx_get_name_match_string (ncx_name_match_t match)
 Get the string for the ncx_name_match_t enum. More...
 
int32 ncx_get_name_match_value (ncx_name_match_t match)
 Get the YANG integer value for the ncx_name_match_t enum. More...
 
status_t ncx_str2txid (const xmlChar *str, ncx_transaction_id_t *txid)
 Convert a string to a ncx_transaction_id_t. More...
 
status_t ncx_txid2str (ncx_transaction_id_t *txid, xmlChar **retbuff)
 Convert a transaction ID to a string. More...
 
const xmlChar * ncx_get_btyp_string (ncx_btype_t btyp)
 Get the enumeration string to the base type enum. More...
 
const xmlChar * ncx_cvt_encoding_enum (ncx_msg_encoding_t msg_encoding)
 Convert an ncx_msg_encoding_t enum to a string. More...
 
ncx_msg_encoding_t ncx_cvt_encoding_str (const xmlChar *msg_encoding)
 Convert a ncx_msg_encoding_t string to its enum. More...
 
const xmlChar * ncx_get_yang_version_str (ncx_yang_version_t langver)
 Get the yang-version string value for the enum. More...
 
const xmlChar * ncx_get_ses_event_str (ncx_ses_event_t ses_event)
 Get the session event string for the enum. More...
 

Detailed Description

Convert between enumeration and string for log output.

Used in logging and protocol messages.

Function Documentation

◆ ncx_cvt_encoding_enum()

const xmlChar * ncx_cvt_encoding_enum ( ncx_msg_encoding_t  msg_encoding)

Convert an ncx_msg_encoding_t enum to a string.

Parameters
msg_encodingenum to convert
Returns
string version of enum

◆ ncx_cvt_encoding_str()

ncx_msg_encoding_t ncx_cvt_encoding_str ( const xmlChar *  msg_encoding)

Convert a ncx_msg_encoding_t string to its enum.

Parameters
msg_encodingstring to convert
Returns
enum version of string
Here is the call graph for this function:

◆ ncx_get_access_enum()

ncx_access_t ncx_get_access_enum ( const xmlChar *  str)

Get the enum for the string name of a ncx_access_t enum.

Parameters
strstring name of the enum value
Returns
enum value
Here is the call graph for this function:

◆ ncx_get_access_str()

const xmlChar * ncx_get_access_str ( ncx_access_t  max_access)

Get the string name of a ncx_access_t enum.

Parameters
max_accessenum value to convert
Returns
string value

◆ ncx_get_baddata_enum()

ncx_bad_data_t ncx_get_baddata_enum ( const xmlChar *  valstr)

Check if the specified string matches an ncx_baddata_t enum.

Parameters
valstrvalue string to check
Returns
enum value if OK; NCX_BAD_DATA_NONE if an error
Here is the call graph for this function:

◆ ncx_get_baddata_string()

const xmlChar * ncx_get_baddata_string ( ncx_bad_data_t  baddata)

Get the string for the specified enum value.

Parameters
baddataenum value to check
Returns
string pointer if OK; NULL if an error

◆ ncx_get_btyp_string()

const xmlChar * ncx_get_btyp_string ( ncx_btype_t  btyp)

Get the enumeration string to the base type enum.

Parameters
btypbase type enum
Returns
string for the enum name

◆ ncx_get_confirm_event_str()

const xmlChar * ncx_get_confirm_event_str ( ncx_confirm_event_t  event)

Get the string for the specified enum value.

Parameters
eventenum confirm event value to convert
Returns
string value for the enum; NULL if none found
Here is the caller graph for this function:

◆ ncx_get_cvttyp_enum()

ncx_cvttyp_t ncx_get_cvttyp_enum ( const char *  str)

Get the enum for the string name of a ncx_cvttyp_t enum.

Parameters
strstring name of the enum value
Returns
enum value
Here is the call graph for this function:

◆ ncx_get_data_class_enum()

ncx_data_class_t ncx_get_data_class_enum ( const xmlChar *  str)

Get the enum for the string name of a ncx_data_class_t enum.

Parameters
strstring name of the enum value
Returns
enum value
Here is the call graph for this function:

◆ ncx_get_data_class_str()

const xmlChar * ncx_get_data_class_str ( ncx_data_class_t  dataclass)

Get the string value for the ncx_data_class_t enum.

Parameters
dataclassenum value to convert
Returns
string value for the enum

◆ ncx_get_display_mode_enum()

ncx_display_mode_t ncx_get_display_mode_enum ( const xmlChar *  dmstr)

Get the enum for the specified string value.

Parameters
dmstrstring value to check
Returns
enum value for the string; NCX_DISPLAY_MODE_NONE if invalid value
Here is the call graph for this function:

◆ ncx_get_display_mode_str()

const xmlChar * ncx_get_display_mode_str ( ncx_display_mode_t  dmode)

Get the string for the specified enum value.

Parameters
dmodeenum display mode value to check
Returns
string value for the enum; NULL if none found

◆ ncx_get_layer()

const xmlChar * ncx_get_layer ( ncx_layer_t  layer)

Translate ncx_layer_t enum to a string.

Get the ncx_layer_t string

Parameters
layerncx_layer_t to convert to a string
Returns
const pointer to the string value
Here is the caller graph for this function:

◆ ncx_get_name_match_enum()

ncx_name_match_t ncx_get_name_match_enum ( const xmlChar *  str)

Get the enum for the string name of a ncx_name_match_t enum.

Parameters
strstring name of the enum value
Returns
enum value
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_get_name_match_string()

const xmlChar * ncx_get_name_match_string ( ncx_name_match_t  match)

Get the string for the ncx_name_match_t enum.

Parameters
matchenum value
Returns
string value
Here is the caller graph for this function:

◆ ncx_get_name_match_value()

int32 ncx_get_name_match_value ( ncx_name_match_t  match)

Get the YANG integer value for the ncx_name_match_t enum.

Parameters
matchenum value
Returns
integer value

◆ ncx_get_protocol_name()

const xmlChar * ncx_get_protocol_name ( ncx_protocol_t  proto)

Get the name string for the protocol.

Parameters
protoprotocol enum to get
Returns
const string representing the protocol name
Here is the caller graph for this function:

◆ ncx_get_protocols_enabled()

const xmlChar * ncx_get_protocols_enabled ( uint16  flags)

Get the string for the NETCONF protocols enabled in the flags.

Only checks base:1.0 and base:1.1!!!

Parameters
flagsbitmask to check
Returns
const string representing the bits set

◆ ncx_get_ses_event_str()

const xmlChar * ncx_get_ses_event_str ( ncx_ses_event_t  ses_event)

Get the session event string for the enum.

Parameters
ses_eventenum to get string mapping for
Returns
session event name string

◆ ncx_get_status_enum()

ncx_status_t ncx_get_status_enum ( const xmlChar *  str)

Get the enum for the string name of a ncx_status_t enum.

Parameters
strstring name of the enum value
Returns
enum value
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_get_status_string()

const xmlChar * ncx_get_status_string ( ncx_status_t  status)

Get the string for the enum value of a ncx_status_t enum.

Parameters
statusenum value
Returns
string name of the enum value

◆ ncx_get_withdefaults_enum()

ncx_withdefaults_t ncx_get_withdefaults_enum ( const xmlChar *  withdefstr)

Get the enum for the specified string value.

Parameters
withdefstrstring value to check
Returns
enum value for the string; NCX_WITHDEF_NONE if invalid value
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_get_withdefaults_string()

const xmlChar * ncx_get_withdefaults_string ( ncx_withdefaults_t  withdef)

Get the string for the specified enum value.

Parameters
withdefenum value to check
Returns
string pointer if OK; NULL if an error
Here is the caller graph for this function:

◆ ncx_get_withdefaults_value()

int32 ncx_get_withdefaults_value ( const xmlChar *  withdefstr)

Get the YANG integer value for the enum for the specified string value.

Parameters
withdefstrstring value to check
Returns
integer value for the string; 0 if invalid value
Here is the call graph for this function:

◆ ncx_get_yang_version_str()

const xmlChar * ncx_get_yang_version_str ( ncx_yang_version_t  langver)

Get the yang-version string value for the enum.

Returns
YANG language version string for the enum

◆ ncx_is_false()

boolean ncx_is_false ( const xmlChar *  str)

Check if an xmlChar string is a string OK for XSD boolean.

Parameters
strxmlChar string to check
Returns
TRUE if a valid boolean value indicating false' FALSE otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_is_true()

boolean ncx_is_true ( const xmlChar *  str)

Check if an xmlChar string is a string OK for XSD boolean.

Parameters
strxmlChar string to check
Returns
TRUE if a valid boolean value indicating true; FALSE otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_str2txid()

status_t ncx_str2txid ( const xmlChar *  str,
ncx_transaction_id_t txid 
)

Convert a string to a ncx_transaction_id_t.

Parameters
strstring to convert
[out]txidaddress of return TXID
  • *txid converted TXID
Returns
status
Here is the call graph for this function:

◆ ncx_txid2str()

status_t ncx_txid2str ( ncx_transaction_id_t txid,
xmlChar **  retbuff 
)

Convert a transaction ID to a string.

Parameters
txidtransaction ID to convert
[out]retbuffaddress of return buffer to malloc
  • *retbuff set to malloced buffer
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function: