Tony Li <[email protected]> writes:

> Hi,
>
> I have some basic questions about YANG. I’m pretty certain this is NOT the 
> right place to ask them, so please feel free to redirect me.
>
>
> 1) Is there a way to define the width of an enumeration?  Suppose I had an 
> enumeration that was in a 16 bit field, how do I describe that?

In the description, if necessary. However, this should be an implementation 
detail, as long as the underlying numeric type can accommodate all enums.

You could perhaps also define and enum for the highest possible value and make 
in reserved.

>
> 2) How do I model a non-octet sized multi-bit field?  For example, if there 
> is a 5 bit numeric value as part of some ‘bits’?  Position only takes a 
> single value, I can’t really say ‘position 3-7’.

In this case, I would question whether the 'bits' type is really appropriate. 
It might be useful to split the value into multiple items in YANG.

Lada

>
> Thanks,
> Tony
> _______________________________________________
> netmod mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to