MG-IP TDM Over IP Gateway Reference Manual
59
When a sub-identifier of OID is greater than or equal to 128 (for example 1.3.6….
24222
– the
Olencom assigned number), it is divided into numerous octets as follows:
Only seven bits in each octet are used to represent the value
The most significant bit (MSB) of the last octet is 0
The most significant bit of other octets is 1
Example1: sub-identifier 128 = 0x80 = 10000000
Last (least significant) 7 bits form the last octet with MSB = 0: 00000000
The first octet is 10000001 – MSB = 1 and LSB is the remaining bit from the original
sub-identifier
Result: 10000001 00000000 = 0x8100. This sub-identifier takes up 2 bytes in the TLV
file
Example2: sub-identifier 24222 = 0x5E9E = 101 1110 1001 1110
Last 7 bits from the last octet. The MSB of the octet is 0: 00011110
Next 7 bits from the next octet with 1 in MSB: 10111101
The remaining bit forms the first octet. The MSB of the octet is 1, the rest of the bits are
zeros: 10000001.
Result: 10000001 10111101 00011110 = 0x81BD1E. This sub-identifier takes up 3 bytes
in the TLV file
Example3: for additional clarification, sub-identifier 127 = 01111111
This sub-identifier is not encoded, as its MSB is 0
Result: 01111111 = 0x7F. This sub-identifier takes up 1 byte in the TLV file
When an octet with 1 as its MSB is encountered while parsing OID in a TLV file, it means
that this is a first octet of an encoded sub-identifier. This encoded sub-identifier ends with an
octet that has 0 in its MSB.
TLV Examples
The following TLV contains the Varbind of dsx1LineCoding (OID = 1.3.6.1.2.1.10.18.6.1.6), index 1
and value AMI = 5 (integer type).
11
21
48
19
6
11
43 6 1 2 1 10 18 6 1 6 1
2
4
0 0 0 5
type length type length type length
type length
TLV 11
Varbind
OID
Integer TLV
The following TLV contains the Varbind of OlencomPwAdminStatus (OID =
1.3.6.1.4.1.24222.3.3.1.2.1.37), index 1 and value UP = 1 (integer type). The sub-identifier 24222 is
encoded to 3 bytes (129, 189, 30 = 0x81BD1E).