Accessing compiled typedefs #2039
Replies: 1 comment
-
What do you mean by compiled typedef? libyang first parses the typedef and then compiles any leaves/leaf-lists that use this typedef into their type. In any case, to only work with the parsed typedef If, however, you have an actual data node |
Beta Was this translation helpful? Give feedback.
-
Is there a means to access a compiled typedef to retrieve the associated string from a numerical value? For example, the chassis-id-subtype-type_ found in ieee802-types@2022-10-31 contains values like [1] chassis-component, [2] interface-alias, etc, I would like to know if I can retrieve string values from the numeric equivalent 1, 2, 3, ... Also, if I have a string from this enumeration, say "mac-address", can I retrieve associated numerical value [4]? What APIs, if any would allow me to accomplish this?
Beta Was this translation helpful? Give feedback.
All reactions