summaryrefslogtreecommitdiff
path: root/test_packet.c
diff options
context:
space:
mode:
authorMichael Brown <mbrown@fensystems.co.uk>2016-02-09 16:15:51 -0500
committerEric S. Raymond <esr@thyrsus.com>2016-02-09 16:15:51 -0500
commit58a352431b563ca46e071eced3e8445133cd0b80 (patch)
treee6a09ec2dfd75825fc306307d71516412cf3405c /test_packet.c
parentdfedfaa584a5d3d6dde66785c1f677298a585d79 (diff)
downloadgpsd-58a352431b563ca46e071eced3e8445133cd0b80.tar.gz
Add support for stashed partial messages
The Spectratime iSync GRClok and LNRClok devices generate NMEA-format status packets, which report the status of the GPS-disciplined rubidium oscillator. These packets are inserted randomly into the middle of packets from the embedded u-Blox GPS. Add support for a stash buffer, used to hold the initial portion of interrupted NMEA packets.
Diffstat (limited to 'test_packet.c')
-rw-r--r--test_packet.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test_packet.c b/test_packet.c
index 3c27025c..156dfe08 100644
--- a/test_packet.c
+++ b/test_packet.c
@@ -62,6 +62,20 @@ static struct map singletests[] = {
.garbage_offset = 0,
.type = BAD_PACKET,
},
+ {
+ .legend = "NMEA interspersed packet",
+ .test = "$GPZDA,112533.00,20,01,20$PTNTA,20000102173852,1,T4,,,6,1,0*32\r\n",
+ .testlen = 64,
+ .garbage_offset = 25,
+ .type = NMEA_PACKET,
+ },
+ {
+ .legend = "NMEA interrupted packet",
+ .test = "$GPZDA,112533.00,20,01,2016,00,00*67\r\n$GPZDA,112533.00,20,01,20$PTNTA,20000102173852,1,T4,,,6,1,0*32\r\n16,00,00*67\r\n",
+ .testlen = 115,
+ .garbage_offset = 0,
+ .type = NMEA_PACKET,
+ },
/* SiRF tests */
{
.legend = "SiRF WAAS version ID",