libyang  1.0.184
YANG data modeling language library
Printer flags
Collaboration diagram for Printer flags:

Macros

#define LYP_WITHSIBLINGS   0x01
 
#define LYP_FORMAT   0x02
 
#define LYP_KEEPEMPTYCONT   0x04
 
#define LYP_WD_MASK   0xF0
 
#define LYP_WD_EXPLICIT   0x00
 
#define LYP_WD_TRIM   0x10
 
#define LYP_WD_ALL   0x20
 
#define LYP_WD_ALL_TAG   0x40
 
#define LYP_WD_IMPL_TAG   0x80
 
#define LYP_NETCONF   0x100
 

Detailed Description

Validity flags for data nodes.

Macro Definition Documentation

◆ LYP_WITHSIBLINGS

#define LYP_WITHSIBLINGS   0x01

Flag for printing also the (following) sibling nodes of the data node.

Definition at line 1821 of file libyang.h.

◆ LYP_FORMAT

#define LYP_FORMAT   0x02

Flag for formatted output.

Definition at line 1822 of file libyang.h.

◆ LYP_KEEPEMPTYCONT

#define LYP_KEEPEMPTYCONT   0x04

Preserve empty non-presence containers

Definition at line 1823 of file libyang.h.

◆ LYP_WD_MASK

#define LYP_WD_MASK   0xF0

Mask for with-defaults modes

Definition at line 1824 of file libyang.h.

◆ LYP_WD_EXPLICIT

#define LYP_WD_EXPLICIT   0x00

Explicit mode - print only data explicitly being present in the data tree. Note that this is the default value when no WD option is specified.

Definition at line 1825 of file libyang.h.

◆ LYP_WD_TRIM

#define LYP_WD_TRIM   0x10

Do not print the nodes with the value equal to their default value

Definition at line 1827 of file libyang.h.

◆ LYP_WD_ALL

#define LYP_WD_ALL   0x20

Include implicit default nodes

Definition at line 1828 of file libyang.h.

◆ LYP_WD_ALL_TAG

#define LYP_WD_ALL_TAG   0x40

Same as LYP_WD_ALL but also adds attribute 'default' with value 'true' to all nodes that has its default value. The 'default' attribute has namespace: urn:ietf:params:xml:ns:netconf:default:1.0 and thus the attributes are printed only when the ietf-netconf-with-defaults module is present in libyang context (but in that case this namespace is always printed).

Definition at line 1829 of file libyang.h.

◆ LYP_WD_IMPL_TAG

#define LYP_WD_IMPL_TAG   0x80

Same as LYP_WD_ALL_TAG but the attributes are added only to the nodes that are not explicitly present in the original data tree despite their value is equal to their default value. There is the same limitation regarding the presence of ietf-netconf-with-defaults module in libyang context.

Definition at line 1834 of file libyang.h.

◆ LYP_NETCONF

#define LYP_NETCONF   0x100

Print the data tree for use in NETCONF meaning:

  • for RPC output - skip the top-level RPC node,
  • for action output - skip all the parents of and the action node itself,
  • for action input - enclose the data in an action element in the base YANG namespace,
  • for all other data - print the whole data tree normally.

Definition at line 1838 of file libyang.h.