Add PLI qualifier description to PROVIDE LOCAL INFORMATION decode
- PLI_QUALIFIERS: TS 102 223 qualifier values (Location Info, IMEI, NMR, Date/time, Timing Advance, Access Technology, etc.) - _command_details_name(): appends the qualifier description to PROVIDE LOCAL INFORMATION (type 0x26) in Command Details - decode_cat (FETCH) and decode_tr_command (TR) now use it, so both 'cat_command' and 'response_to' carry the qualifier (e.g. 'PROVIDE LOCAL INFORMATION — IMEI') tests: PLI qualifier cases (TR/FETCH, IMEI/location/date, non-PLI)
This commit is contained in:
1 parent
f30fe41d75
commit
31011301ea
2 files changed
+75
-5
No files matched your search
+26
-1
@@ -58,7 +58,8 @@ class TestCatDecoding(unittest.TestCase):
|
||||
def test_fetch_provide_local_info(self):
|
||||
r = decode_message(bytes.fromhex(
|
||||
'801200000BD0098103012600820281829000'))
|
||||
self.assertEqual(r['cat_command'], 'PROVIDE LOCAL INFORMATION')
|
||||
self.assertEqual(r['cat_command'],
|
||||
'PROVIDE LOCAL INFORMATION — Location Info (MCC, MNC, LAC/TAC, Cell ID)')
|
||||
|
||||
def test_envelope_event_download(self):
|
||||
r = decode_message(bytes.fromhex(
|
||||
@@ -138,6 +139,30 @@ class TestTerminalResponse(unittest.TestCase):
|
||||
self.assertEqual(r['response_to'], 'POLL INTERVAL')
|
||||
|
||||
|
||||
class TestPliQualifier(unittest.TestCase):
|
||||
def test_tr_pli_imei(self):
|
||||
r = decode_message(bytes.fromhex(
|
||||
'8014000016810301260102028281030106130952F0991EC57A68009F'))
|
||||
self.assertEqual(r['response_to'], 'PROVIDE LOCAL INFORMATION — IMEI')
|
||||
|
||||
def test_fetch_pli_location(self):
|
||||
r = decode_message(bytes.fromhex(
|
||||
'801200000BD0098103012600820281829000'))
|
||||
self.assertEqual(r['cat_command'],
|
||||
'PROVIDE LOCAL INFORMATION — Location Info (MCC, MNC, LAC/TAC, Cell ID)')
|
||||
|
||||
def test_fetch_pli_date_time(self):
|
||||
r = decode_message(bytes.fromhex(
|
||||
'801200000BD0098103012603820281829000'))
|
||||
self.assertEqual(r['cat_command'],
|
||||
'PROVIDE LOCAL INFORMATION — Date, time and time zone')
|
||||
|
||||
def test_non_pli_no_qualifier(self):
|
||||
r = decode_message(bytes.fromhex(
|
||||
'801400000C810301250002028281830100910F'))
|
||||
self.assertEqual(r['response_to'], 'SET UP MENU')
|
||||
|
||||
|
||||
class TestGetResponseContext(unittest.TestCase):
|
||||
GET_RESPONSE = bytes.fromhex('00C000002962278202782183023F00A50A800171')
|
||||
|
||||
|
||||
Reference in new issue
Block a user