![]() |
libyang 1.0.184
YANG data modeling language library
|
Structure for data nodes defined as LYS_LEAF or LYS_LEAFLIST. More...
#include <tree_data.h>
Public Member Functions | |
| LY_DATA_TYPE | __attribute__ ((__packed__)) value_type |
Data Fields | |
| struct lys_node * | schema |
| uint8_t | validity |
| uint8_t | dflt:1 |
| uint8_t | when_status:3 |
| struct lyd_attr * | attr |
| struct lyd_node * | next |
| struct lyd_node * | prev |
| struct lyd_node * | parent |
| void * | priv |
| uint32_t | hash |
| const char * | value_str |
| lyd_val | value |
| uint8_t | value_flags |
Structure for data nodes defined as LYS_LEAF or LYS_LEAFLIST.
Extension for lyd_node structure. It replaces the lyd_node::child member by three new members (value, value_str and #value_type) to provide information about the value. The first five members (schema, attr, next, prev and parent) are compatible with the lyd_node's members.
To traverse through all the child elements or attributes, use LY_TREE_FOR or LY_TREE_FOR_SAFE macro.
Definition at line 217 of file tree_data.h.
| LY_DATA_TYPE __attribute__ | ( | (__packed__) | ) |
type of the value in the node, mainly for union to avoid repeating of type detection
| struct lys_node* schema |
pointer to the schema definition of this node which is lys_node_leaflist structure
Definition at line 218 of file tree_data.h.
| uint8_t validity |
Definition at line 220 of file tree_data.h.
| uint8_t dflt |
flag for implicit default node
Definition at line 221 of file tree_data.h.
| uint8_t when_status |
bit for checking if the when-stmt condition is resolved - internal use only, do not use this value!
Definition at line 222 of file tree_data.h.
| struct lyd_attr* attr |
pointer to the list of attributes of this node
Definition at line 225 of file tree_data.h.
| struct lyd_node* next |
pointer to the next sibling node (NULL if there is no one)
Definition at line 226 of file tree_data.h.
| struct lyd_node* prev |
pointer to the previous sibling node
Definition at line 227 of file tree_data.h.
| struct lyd_node* parent |
pointer to the parent node, NULL in case of root node
Definition at line 231 of file tree_data.h.
| void* priv |
private user data, not used by libyang
Definition at line 234 of file tree_data.h.
| uint32_t hash |
hash of this particular node (module name + schema name + string value if leaf-list)
Definition at line 238 of file tree_data.h.
| const char* value_str |
string representation of value (for comparison, printing,...), always corresponds to value_type
Definition at line 244 of file tree_data.h.
| lyd_val value |
node's value representation, always corresponds to schema->type.base
Definition at line 245 of file tree_data.h.
| uint8_t value_flags |
value type flags
Definition at line 247 of file tree_data.h.