libyang 1.0.184
YANG data modeling language library
Loading...
Searching...
No Matches
lyd_attr Struct Reference

Attribute structure. More...

#include <tree_data.h>

Public Member Functions

LY_DATA_TYPE __attribute__ ((__packed__)) value_type

Data Fields

struct lyd_nodeparent
struct lyd_attrnext
struct lys_ext_instance_complexannotation
const char * name
const char * value_str
lyd_val value
uint8_t value_flags

Detailed Description

Attribute structure.

The structure provides information about attributes of a data element. Such attributes must map to annotations as specified in RFC 7952. The only exception is the filter type (in NETCONF get operations) and edit-config's operation attributes. In XML, they are represented as standard XML attributes. In JSON, they are represented as JSON elements starting with the '@' character (for more information, see the YANG metadata RFC.

Definition at line 128 of file tree_data.h.

Member Function Documentation

◆ __attribute__()

LY_DATA_TYPE __attribute__ ( (__packed__) )

type of the value in the node, mainly for union to avoid repeating of type detection

Field Documentation

◆ parent

struct lyd_node* parent

data node where the attribute is placed

Definition at line 129 of file tree_data.h.

◆ next

struct lyd_attr* next

pointer to the next attribute of the same element

Definition at line 130 of file tree_data.h.

◆ annotation

struct lys_ext_instance_complex* annotation

pointer to the attribute/annotation's definition

Definition at line 131 of file tree_data.h.

◆ name

const char* name

attribute name

Definition at line 132 of file tree_data.h.

◆ value_str

const char* value_str

string representation of value (for comparison, printing,...), always corresponds to value_type

Definition at line 133 of file tree_data.h.

◆ value

lyd_val value

node's value representation, always corresponds to schema->type.base

Definition at line 134 of file tree_data.h.

◆ value_flags

uint8_t value_flags

value type flags

Definition at line 136 of file tree_data.h.


The documentation for this struct was generated from the following file: