ts_51_011, utils: fix Access Technology Identifier coding

When the Access Technology Identifier encoder sets the bits for E-UTRAN
it does not respect that bit "100" is also a valid bit combination that
encodes E-UTRAN WB-S1 and E-UTRAN NB-S1. Lets encode this bit
combination if the user is just specifying "E-UTRAN" without further
spefication of WB or NB.

The decoder only looks at bit 14 and decodes "1xx" always to "E-UTRAN".
This is not specific enough. Lets make sure that the decoder is
complementary to the encoder.

Change-Id: Ibfe8883a05f9ad6988d8e212cb9a598229954296
Related: OS#4963
This commit is contained in:
Philipp Maier
2021-04-29 16:20:07 +02:00
parent b919f8bd75
commit e7d417955d
7 changed files with 26 additions and 11 deletions

View File

@@ -230,7 +230,20 @@ def dec_act(twohexbytes:Hexstr) -> List[str]:
sel = []
for a in act_list:
if u16t & (1 << a['bit']):
sel.append(a['name'])
if a['name'] == "E-UTRAN":
# The Access technology identifier of E-UTRAN
# allows a more detailed specification:
if u16t & (1 << 13) and u16t & (1 << 12):
sel.append("E-UTRAN WB-S1")
sel.append("E-UTRAN NB-S1")
elif u16t & (1 << 13):
sel.append("E-UTRAN WB-S1")
elif u16t & (1 << 12):
sel.append("E-UTRAN NB-S1")
else:
sel.append("E-UTRAN")
else:
sel.append(a['name'])
return sel
def dec_xplmn_w_act(fivehexbytes:Hexstr) -> Dict[str,Any]: