yumapro  24.10-1
YumaPro SDK
Loading...
Searching...
No Matches

Use YANG object metadata to generate help text for CLI. More...

Collaboration diagram for Help Support:

Enumerations

enum  help_mode_t {
  HELP_MODE_NONE ,
  HELP_MODE_BRIEF ,
  HELP_MODE_NORMAL ,
  HELP_MODE_FULL
}
 modes to match the keywords brief, normal, full More...
 

Functions

void help_program_module (const xmlChar *modname, const xmlChar *cliname, help_mode_t mode)
 Print the full help text for an entire program module to STDOUT. More...
 
void help_data_module (const ncx_module_t *mod, help_mode_t mode)
 Print the full help text for an entire data module to STDOUT. More...
 
void help_type (const typ_template_t *typ, help_mode_t mode)
 Print the full help text for a YANG data type to STDOUT. More...
 
void help_object (obj_template_t *obj, help_mode_t mode)
 Print the full help text for an object template to STDOUT. More...
 
void help_write_lines (const xmlChar *str, uint32 indent, boolean startnl)
 write some indented output to STDOUT More...
 
void help_write_lines_max (const xmlChar *str, uint32 indent, boolean startnl, uint32 maxlen)
 write some indented output to STDOUT More...
 
help_mode_t help_cvt_str (const xmlChar *str)
 Convert a string to a help_mode_t enum. More...
 
const xmlChar * help_cvt_enum (help_mode_t mode)
 Convert a help_mode_t enum to a string. More...
 
void obj_dump_template (obj_template_t *obj, help_mode_t mode, uint32 nestlevel, uint32 indent)
 Dump the contents of an obj_template_t struct for help text. More...
 
void obj_dump_template_ex (obj_template_t *obj, help_mode_t mode, uint32 nestlevel, uint32 indent, boolean with_desc)
 Dump the contents of an obj_template_t struct for help text. More...
 
void obj_dump_datadefQ (dlq_hdr_t *datadefQ, help_mode_t mode, uint32 nestlevel, uint32 indent)
 Dump the contents of a datadefQ for debugging. More...
 
status_t obj_dump_template_buff (obj_template_t *obj, xmlChar *buff, uint32 bufflen)
 Dump the contents of an obj_template_t struct for help text Send text to a buffer instead of a screen. More...
 
const xmlChar * obj_help_description (const obj_template_t *obj)
 Get the preferred help description for an object. More...
 

Detailed Description

Use YANG object metadata to generate help text for CLI.

Enumeration Type Documentation

◆ help_mode_t

modes to match the keywords brief, normal, full

Enumerator
HELP_MODE_NONE 

value not set

HELP_MODE_BRIEF 

–brief mode selected

HELP_MODE_NORMAL 

–normal mode selected or default

HELP_MODE_FULL 

–full selected

Function Documentation

◆ help_cvt_enum()

const xmlChar * help_cvt_enum ( help_mode_t  mode)

Convert a help_mode_t enum to a string.

Parameters
modeenum value to convert
Returns
string value

◆ help_cvt_str()

help_mode_t help_cvt_str ( const xmlChar *  str)

Convert a string to a help_mode_t enum.

Parameters
strstring to convert
Returns
enum value
Here is the call graph for this function:

◆ help_data_module()

void help_data_module ( const ncx_module_t mod,
help_mode_t  mode 
)

Print the full help text for an entire data module to STDOUT.

This API is for regular YANG modules

Parameters
moddata module struct
modehelp mode requested

◆ help_object()

void help_object ( obj_template_t obj,
help_mode_t  mode 
)

Print the full help text for an object template to STDOUT.

Parameters
objobject template to report
modehelp mode requested
Here is the call graph for this function:

◆ help_program_module()

void help_program_module ( const xmlChar *  modname,
const xmlChar *  cliname,
help_mode_t  mode 
)

Print the full help text for an entire program module to STDOUT.

This API is for special YANG modules like netconfd-pro.yang used only for CLI parameters

Parameters
modnamemodule name without file suffix
clinamename of CLI parmset within the modname module
modehelp mode requested
Here is the call graph for this function:

◆ help_type()

void help_type ( const typ_template_t typ,
help_mode_t  mode 
)

Print the full help text for a YANG data type to STDOUT.

Parameters
typtype template struct to report
modehelp mode requested
Here is the call graph for this function:

◆ help_write_lines()

void help_write_lines ( const xmlChar *  str,
uint32  indent,
boolean  startnl 
)

write some indented output to STDOUT

This is an internal API. Do not use.

Parameters
strstring to print; 'indent' number of spaces will be added to each new line
indentindent count
startnlTRUE if start with a newline, FALSE otherwise
Here is the caller graph for this function:

◆ help_write_lines_max()

void help_write_lines_max ( const xmlChar *  str,
uint32  indent,
boolean  startnl,
uint32  maxlen 
)

write some indented output to STDOUT

This is an internal API. Do not use.

Parameters
strstring to print; 'indent' number of spaces will be added to each new line
indentindent count
startnlTRUE if start with a newline, FALSE otherwise
maxlen0..N max number of chars to output
Here is the caller graph for this function:

◆ obj_dump_datadefQ()

void obj_dump_datadefQ ( dlq_hdr_t *  datadefQ,
help_mode_t  mode,
uint32  nestlevel,
uint32  indent 
)

Dump the contents of a datadefQ for debugging.

Parameters
datadefQQ of obj_template to dump
moderequested help mode
nestlevelnumber of levels from the top-level that should be printed; 0 == all levels
indentstart indent count
Here is the call graph for this function:
Here is the caller graph for this function:

◆ obj_dump_template()

void obj_dump_template ( obj_template_t obj,
help_mode_t  mode,
uint32  nestlevel,
uint32  indent 
)

Dump the contents of an obj_template_t struct for help text.

Parameters
objobj_template to dump help for
moderequested help mode
nestlevelnumber of levels from the top-level that should be printed; 0 == all levels
indentstart indent count
Here is the call graph for this function:
Here is the caller graph for this function:

◆ obj_dump_template_buff()

status_t obj_dump_template_buff ( obj_template_t obj,
xmlChar *  buff,
uint32  bufflen 
)

Dump the contents of an obj_template_t struct for help text Send text to a buffer instead of a screen.

Used by yuma-bench GUI for hover text Does not include object description Does not include banner line that is printed in bold Used for the TipExtra API in the GUI Buffer is formatted with newline at the end of a line instead of the start of the line line like a yumapro line

Parameters
objobj_template to dump help for
[out]buffbuffer to use
  • buff filled in with object extra banner text
bufflenbuffer length
Returns
status: ERR_BUFF_OVFL if could not finish writing text
Here is the call graph for this function:

◆ obj_dump_template_ex()

void obj_dump_template_ex ( obj_template_t obj,
help_mode_t  mode,
uint32  nestlevel,
uint32  indent,
boolean  with_desc 
)

Dump the contents of an obj_template_t struct for help text.

Parameters
objobj_template to dump help for
moderequested help mode
nestlevelnumber of levels from the top-level that should be printed; 0 == all levels
indentstart indent count
with_descadd description
Here is the call graph for this function:
Here is the caller graph for this function:

◆ obj_help_description()

const xmlChar * obj_help_description ( const obj_template_t obj)

Get the preferred help description for an object.

  1) check ncx:help extension added
  2) check ncx:info extension added
  3) check object description-stmt
Parameters
objobj_template to dump help for
Returns
pointer to description or NULL if none
Here is the call graph for this function: