Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


ODL Yang tool alway recognize rang like "-199..199" as an Integer even it's in a decimal64 type data.

asked 2015-04-30 02:01:12 -0700

Yesmanlucky gravatar image

typedef TEMPREADING would be generated to be a correct java class. but alway after it's used in anywhere like below, a container, the "type TEMPREADING;", the range would be recognized as a BigInteger in java and BigDecimal (came from decimal64 in yang) would be forced to BigInteger in java coded, of course it's error. Why? Is there any way to avoid this without change the data type (decimal64)? Thx a lot.

Yang: module exa-base { namespace ""; prefix exa;

revision "2014-02-26" {
    description "Initial version";

container info {
    leaf system-temperature {
        type TEMP_READING;
            units "degC";
            description "System temperature";

    type decimal64{
        fraction-digits 1;
        range "-199..199";
    description "System temperature sensor reading (range: -199.9-199.9)";
    type-mode FLOAT;


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-05-03 07:13:09 -0700

Yesmanlucky gravatar image

is it a bug? or should i use decimal64 directly not with a type use decimal64 included?

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-04-30 02:01:12 -0700

Seen: 98 times

Last updated: May 03 '15