summaryrefslogtreecommitdiff
path: root/ubxtool
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2019-05-27 16:04:29 -0700
committerGary E. Miller <gem@rellim.com>2019-05-27 16:04:29 -0700
commit8db83b355998f6aeeec98434ecd71399feaeadf0 (patch)
tree65ad701ae189ef80fd8588cebb0213483be7f182 /ubxtool
parent6de94e9274c0ccd76927b5043fe159dc269b0aa1 (diff)
downloadgpsd-8db83b355998f6aeeec98434ecd71399feaeadf0.tar.gz
ubxtool: Add poll and decode for UBX-MON-MSGPP
Diffstat (limited to 'ubxtool')
-rwxr-xr-xubxtool24
1 files changed, 23 insertions, 1 deletions
diff --git a/ubxtool b/ubxtool
index 13f803fc..804ca57b 100755
--- a/ubxtool
+++ b/ubxtool
@@ -2590,6 +2590,24 @@ class ubx(object):
i += 1
return s
+ def mon_msgpp(self, buf):
+ """UBX-MON-MSGPP decode"""
+ m_len = len(buf)
+ if 0 == m_len:
+ return " Poll request"
+
+ if 120 > m_len:
+ return " Bad Length %s" % m_len
+
+ s = ''
+ for i in range(1, 6):
+ u = struct.unpack_from('<HHHHHHHH', buf, 0)
+ s += "msg%u %u %u %u %u %u %u %u %u\n" % ((i,) + u)
+
+ u = struct.unpack_from('<LLLLLL', buf, 0)
+ s += "skipped %u %u %u %u %u %u" % u
+ return s
+
def mon_ver(self, buf):
"""UBX-MON-VER decode"""
m_len = len(buf)
@@ -2617,7 +2635,7 @@ class ubx(object):
mon_ids = {2: {'str': 'IO', 'dec': mon_io, 'name': 'UBX-MON-IO'},
4: {'str': 'VER', 'dec': mon_ver, 'name': 'UBX-MON-VER'},
- 6: {'str': 'MSGPP', 'name': 'UBX-MON-MSGPP'},
+ 6: {'str': 'MSGPP', 'dec': mon_msgpp, 'name': 'UBX-MON-MSGPP'},
7: {'str': 'RXBUF', 'name': 'UBX-MON-RXBUF'},
8: {'str': 'TXBUF', 'name': 'UBX-MON-TXBUF'},
9: {'str': 'HW', 'dec': mon_hw, 'name': 'UBX-MON-HW'},
@@ -4739,6 +4757,10 @@ class ubx(object):
# UBX-MON-IO
"MON-IO": {"command": send_poll, "opt": [0x0a, 0x02],
"help": "poll UBX-MON-IO I/O Subsystem Status"},
+ # UBX-MON-MSGPP
+ "MON-MSGPP": {"command": send_poll, "opt": [0x0a, 0x06],
+ "help": "poll UBX-MON-MSGPP Message Parese and "
+ "Process Status"},
# UBX-MON-VER
"MON-VER": {"command": send_poll, "opt": [0x0a, 0x04],
"help": "poll UBX-MON-VER GPS version"},