Helper functions to implement extension plugin's sprinter callback.
◆ lys_ypr_ctx_get_level()
uint16_t* lys_ypr_ctx_get_level |
( |
const struct lyspr_ctx * |
ctx | ) |
|
YANG printer context getter for printer indentation level.
- Parameters
-
[in] | ctx | YANG printer context. |
- Returns
- pointer to the printer's indentation level to allow modifying its value.
◆ lys_ypr_ctx_get_options()
uint32_t* lys_ypr_ctx_get_options |
( |
const struct lyspr_ctx * |
ctx | ) |
|
YANG printer context getter for printer options.
- Parameters
-
[in] | ctx | YANG printer context. |
- Returns
- pointer to the printer options to allow modifying them with Schema output options values.
◆ lys_ypr_ctx_get_out()
struct ly_out** lys_ypr_ctx_get_out |
( |
const struct lyspr_ctx * |
ctx | ) |
|
YANG printer context getter for output handler.
- Parameters
-
[in] | ctx | YANG printer context. |
- Returns
- Output handler where the data are being printed. Note that the address of the handler pointer in the context is returned to allow to modify the handler.
◆ lysc_print_extension_instance()
Print substatements of an extension instance.
Generic function to access YANG printer functions from the extension plugins (lyplg_ext_schema_printer_clb).
- Parameters
-
[in] | ctx | YANG printer context to provide output handler and other information for printing. |
[in] | ext | The compiled extension instance to access the extensions and substatements data. |
[in,out] | flag | Flag to be shared with the caller regarding the opening brackets - 0 if the '{' not yet printed, 1 otherwise. |