yumapro
24.10-3
YumaPro SDK
|
Use YANG object metadata to generate help text for CLI. More...
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... | |
Use YANG object metadata to generate help text for CLI.
enum help_mode_t |
const xmlChar * help_cvt_enum | ( | help_mode_t | mode | ) |
Convert a help_mode_t enum to a string.
mode | enum value to convert |
help_mode_t help_cvt_str | ( | const xmlChar * | str | ) |
Convert a string to a help_mode_t enum.
str | string to convert |
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
mod | data module struct |
mode | help mode requested |
void help_object | ( | obj_template_t * | obj, |
help_mode_t | mode | ||
) |
Print the full help text for an object template to STDOUT.
obj | object template to report |
mode | help mode requested |
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
modname | module name without file suffix |
cliname | name of CLI parmset within the modname module |
mode | help mode requested |
void help_type | ( | const typ_template_t * | typ, |
help_mode_t | mode | ||
) |
Print the full help text for a YANG data type to STDOUT.
typ | type template struct to report |
mode | help mode requested |
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.
str | string to print; 'indent' number of spaces will be added to each new line |
indent | indent count |
startnl | TRUE if start with a newline, FALSE otherwise |
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.
str | string to print; 'indent' number of spaces will be added to each new line |
indent | indent count |
startnl | TRUE if start with a newline, FALSE otherwise |
maxlen | 0..N max number of chars to output |
void obj_dump_datadefQ | ( | dlq_hdr_t * | datadefQ, |
help_mode_t | mode, | ||
uint32 | nestlevel, | ||
uint32 | indent | ||
) |
Dump the contents of a datadefQ for debugging.
datadefQ | Q of obj_template to dump |
mode | requested help mode |
nestlevel | number of levels from the top-level that should be printed; 0 == all levels |
indent | start indent count |
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.
obj | obj_template to dump help for |
mode | requested help mode |
nestlevel | number of levels from the top-level that should be printed; 0 == all levels |
indent | start indent count |
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
obj | obj_template to dump help for | |
[out] | buff | buffer to use
|
bufflen | buffer length |
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.
obj | obj_template to dump help for |
mode | requested help mode |
nestlevel | number of levels from the top-level that should be printed; 0 == all levels |
indent | start indent count |
with_desc | add 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
obj | obj_template to dump help for |