yumapro  22.10T-8
YumaPro SDK
Loading...
Searching...
No Matches

Settings to control YANG warnings. More...

Collaboration diagram for Settings:

Functions

void ncx_set_warn_idlen (uint32 warnlen)
 Set the warning length for identifiers. More...
 
uint32 ncx_get_warn_idlen (void)
 Get the warning length for identifiers. More...
 
void ncx_set_warn_linelen (uint32 warnlen)
 Set the warning length for YANG file lines. More...
 
uint32 ncx_get_warn_linelen (void)
 Get the warning length for YANG file lines. More...
 
void ncx_check_warn_idlen (tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *id)
 Check if the identifier length is greater than the specified amount. More...
 
void ncx_check_warn_linelen (tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *line)
 Check if the line display length is greater than the specified amount. More...
 
status_t ncx_turn_off_warning (status_t res)
 Add a warning suppression entry. More...
 
status_t ncx_turn_on_warning (status_t res)
 Remove a warning suppression entry if it exists. More...
 
status_t ncx_turn_up_warning (status_t res)
 Add a warning elevation entry. More...
 
void ncx_set_warn_error (boolean val)
 Set the warn_error flag. More...
 
boolean ncx_warning_enabled (status_t res)
 Check if a specific status_t code is enabled. More...
 
boolean ncx_warning_elevated (status_t res)
 Check if a specific status_t code is elevated. More...
 
void ncx_delete_all_obsolete_objects (void)
 Go through all the modules and delete the obsolete nodes. More...
 
void ncx_set_top_mandatory_allowed (boolean allowed)
 Allow or disallow modules with top-level mandatory object to be loaded; used by the server when agt_running_error is TRUE. More...
 
boolean ncx_get_top_mandatory_allowed (void)
 Check if top-level mandatory objects are allowed or not. More...
 
boolean ncx_collapse_submodules_ok (void)
 Check if it is OK to collapse submodule definitions into the main module. More...
 
void ncx_set_module_setid (uint32 new_setid)
 Update YANG-LIBRARY module set ID. More...
 
uint32 ncx_get_module_setid (void)
 GET YANG-LIBRARY module set ID. More...
 
status_t ncx_sprintf_module_setid (uint32 id, xmlChar *buff, int32 buffsize)
 Write the module set ID for the yang-library to the specified buffer. More...
 
boolean ncx_get_empty_npcon_presence (void)
 Get the empty_npcon_presence value. More...
 
void ncx_set_empty_npcon_presence (boolean val)
 Set the empty_npcon_presence value. More...
 

Detailed Description

Settings to control YANG warnings.

Compiler warnings can be raised to errors and also turned off completely.

Function Documentation

◆ ncx_check_warn_idlen()

void ncx_check_warn_idlen ( tk_chain_t tkc,
ncx_module_t mod,
const xmlChar *  id 
)

Check if the identifier length is greater than the specified amount.

Parameters
tkctoken chain to use (for warning message only)
modmodule (for warning message only)
ididentifier string to check; must be Z terminated
Note
May generate log_warn ouput
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_check_warn_linelen()

void ncx_check_warn_linelen ( tk_chain_t tkc,
ncx_module_t mod,
const xmlChar *  line 
)

Check if the line display length is greater than the specified amount.

Parameters
tkctoken chain to use
modmodule (used in warning message only
lineline to check
Note
May generate log_warn ouput
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_collapse_submodules_ok()

boolean ncx_collapse_submodules_ok ( void  )

Check if it is OK to collapse submodule definitions into the main module.

Used by the server to make data access more efficient

Returns
TRUE if OK; FALSE if not
See also
ncx_collapse_submod_defs

◆ ncx_delete_all_obsolete_objects()

void ncx_delete_all_obsolete_objects ( void  )

Go through all the modules and delete the obsolete nodes.

This is not a setting. Used by the server to scrub unused objects when the server starts up

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_get_empty_npcon_presence()

boolean ncx_get_empty_npcon_presence ( void  )

Get the empty_npcon_presence value.

Returns
TRUE if Empty NP containers should be created; FALSE if should not

◆ ncx_get_module_setid()

uint32 ncx_get_module_setid ( void  )

GET YANG-LIBRARY module set ID.

Returns
module set ID value
Here is the caller graph for this function:

◆ ncx_get_top_mandatory_allowed()

boolean ncx_get_top_mandatory_allowed ( void  )

Check if top-level mandatory objects are allowed or not.

Returns
TRUE: allowed; FALSE: disallowed
See also
ncx_set_top_mandatory_allowed

◆ ncx_get_warn_idlen()

uint32 ncx_get_warn_idlen ( void  )

Get the warning length for identifiers.

Returns
warning length to use

◆ ncx_get_warn_linelen()

uint32 ncx_get_warn_linelen ( void  )

Get the warning length for YANG file lines.

Returns
warning length to use

◆ ncx_set_empty_npcon_presence()

void ncx_set_empty_npcon_presence ( boolean  val)

Set the empty_npcon_presence value.

Parameters
valTRUE if Empty NP containers should be created; FALSE if should not
Here is the caller graph for this function:

◆ ncx_set_module_setid()

void ncx_set_module_setid ( uint32  new_setid)

Update YANG-LIBRARY module set ID.

Parameters
new_setidmodule-set-id calue to keep

◆ ncx_set_top_mandatory_allowed()

void ncx_set_top_mandatory_allowed ( boolean  allowed)

Allow or disallow modules with top-level mandatory object to be loaded; used by the server when agt_running_error is TRUE.

There are msome OpenConfig and other modules that have mandatory leafs nested within NP-containers, which creates a top-level mandatory object. The server parameters –startup-error=continue and –running-error=continue are usually used for such modules

An invalid configuration needs to be fixed by an operator before an edit-config or commit to running will be accepted

Parameters
allowedvalue to set T: to allow; F: to disallow
See also
ncx_get_top_mandatory_allowed
Here is the caller graph for this function:

◆ ncx_set_warn_error()

void ncx_set_warn_error ( boolean  val)

Set the warn_error flag.

Parameters
valvalue to set
Here is the caller graph for this function:

◆ ncx_set_warn_idlen()

void ncx_set_warn_idlen ( uint32  warnlen)

Set the warning length for identifiers.

Parameters
warnlenwarning length to use
Here is the caller graph for this function:

◆ ncx_set_warn_linelen()

void ncx_set_warn_linelen ( uint32  warnlen)

Set the warning length for YANG file lines.

Parameters
warnlenwarning length to use
Here is the caller graph for this function:

◆ ncx_sprintf_module_setid()

status_t ncx_sprintf_module_setid ( uint32  id,
xmlChar *  buff,
int32  buffsize 
)

Write the module set ID for the yang-library to the specified buffer.

Parameters
idmodule set id to use
[out]buffbuffer to use
  • buff filled in if big enough
buffsizebuffer size to use
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_turn_off_warning()

status_t ncx_turn_off_warning ( status_t  res)

Add a warning suppression entry.

Parameters
resinternal status code to suppress
Returns
status (duplicates are silently dropped)
Here is the caller graph for this function:

◆ ncx_turn_on_warning()

status_t ncx_turn_on_warning ( status_t  res)

Remove a warning suppression entry if it exists.

Parameters
resinternal status code to enable
Returns
status (duplicates are silently dropped)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_turn_up_warning()

status_t ncx_turn_up_warning ( status_t  res)

Add a warning elevation entry.

Parameters
resinternal status code to suppress
Returns
status (duplicates are silently dropped)
Here is the caller graph for this function:

◆ ncx_warning_elevated()

boolean ncx_warning_elevated ( status_t  res)

Check if a specific status_t code is elevated.

Parameters
resinternal status code to check
Returns
TRUE if warning is elevated to error; FALSE if warning is not elevated
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_warning_enabled()

boolean ncx_warning_enabled ( status_t  res)

Check if a specific status_t code is enabled.

Parameters
resinternal status code to check
Returns
TRUE if warning is enabled; FALSE if warning is suppressed
Here is the caller graph for this function: