I am defining a yang leaf “tlvmap” of type “bits” which has multiple bit positions defined. I want to add a default value (130943) for this leaf. When I added “default” statement to add the value as shown below, the confdc compiler is giving error like “error: the value “130943” is not valid for the base type - bit not defined for bits type defined”. Can please suggest, how to set default value for yang leaf type bits?
leaf tlvmap {
type bits {
bit chassis-id {
position 0;
}
bit port-id {
position 1;
}
bit ttl {
position 2;
}
bit port-description {
position 3;
}
bit system-name {
position 4;
}
bit system-description {
position 5;
}
bit system-capabilities {
position 6;
}
bit management-address {
position 7;
}
bit pvid {
position 8;
}
bit ppvid {
position 9;
}
bit vlan-name {
position 10;
}
bit protocol-identity {
position 11;
}
bit macphy {
position 12;
}
bit link-aggregation {
position 13;
}
bit power-mdi {
position 14;
}
bit mfs {
position 15;
}
bit product-model {
position 16;
}
}
default 130943;
}