31.102: Fix EF.Routing_Indicator for odd number of digits
The routing indicator is BCD-encoded but has an arbitrary length of 1, 2, 3 or 4 digits. In order to support the odd lengths of 1 or 3, we must not pad on the byte level, but on the nibble level. This requires a slight extension of the Rpad() Adapter. Change-Id: I6c26dccdd570de7b7a4cd48338068e230340ec7c Fixes: OS#6054
This commit is contained in:
@@ -1089,7 +1089,8 @@ class EF_Routing_Indicator(TransparentEF):
|
||||
# responsibility of home network operator but BCD coding shall be used. If a network
|
||||
# operator decides to assign less than 4 digits to Routing Indicator, the remaining digits
|
||||
# shall be coded as "1111" to fill the 4 digits coding of Routing Indicator
|
||||
self._construct = Struct('routing_indicator'/BcdAdapter(Rpad(Bytes(2))), 'rfu'/HexAdapter(Bytes(2)))
|
||||
self._construct = Struct('routing_indicator'/Rpad(BcdAdapter(Bytes(2)), 'f', 2),
|
||||
'rfu'/HexAdapter(Bytes(2)))
|
||||
|
||||
# TS 31.102 Section 4.4.11.13
|
||||
class EF_TN3GPPSNN(TransparentEF):
|
||||
|
||||
Reference in New Issue
Block a user