summaryrefslogtreecommitdiff
path: root/jsongen.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-09-22 23:10:08 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-09-22 23:10:08 +0000
commita450f4ae94b6c266f8062c2a9544479aecda1ac3 (patch)
treed80bdc1460c4f6cbce84d65bce991fbdc40f91f6 /jsongen.py
parent0b87f38c11d786a3ebeddeac536ea3e62ad31998 (diff)
downloadgpsd-a450f4ae94b6c266f8062c2a9544479aecda1ac3.tar.gz
Fully support AIS type 22 and 23 messages. All regression tests pass.
Codebase splints clean.
Diffstat (limited to 'jsongen.py')
-rwxr-xr-xjsongen.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/jsongen.py b/jsongen.py
index f1a06652..be1dafd9 100755
--- a/jsongen.py
+++ b/jsongen.py
@@ -312,7 +312,7 @@ ais_specs = (
# fieldname type default
('channel_a', 'uinteger', '0'),
('channel_b', 'uinteger', '0'),
- ('mode', 'uinteger', '0'),
+ ('txrx', 'uinteger', '0'),
('power', 'boolean', 'false'),
('ne_lon', 'integer', 'AIS_GNS_LON_NOT_AVAILABLE'),
('ne_lat', 'integer', 'AIS_GNS_LAT_NOT_AVAILABLE'),
@@ -324,7 +324,23 @@ ais_specs = (
('zonesize', 'uinteger', '0'),
),
},
- # Structure of mesage 23 is a mystery
+ {
+ "initname" : "json_ais23",
+ "header": "\tAIS_HEADER,",
+ "structname": "ais->type23",
+ "fieldmap":(
+ # fieldname type default
+ ('ne_lon', 'integer', 'AIS_GNS_LON_NOT_AVAILABLE'),
+ ('ne_lat', 'integer', 'AIS_GNS_LAT_NOT_AVAILABLE'),
+ ('sw_lon', 'integer', 'AIS_GNS_LON_NOT_AVAILABLE'),
+ ('sw_lat', 'integer', 'AIS_GNS_LAT_NOT_AVAILABLE'),
+ ('stationtype', 'uinteger', '0'),
+ ('shiptype', 'uinteger', '0'),
+ ('txrx', 'uinteger', '0'),
+ ('interval', 'uinteger', '0'),
+ ('quiet', 'uinteger', '0'),
+ ),
+ },
{
"initname" : "json_ais24",
"header": "\tAIS_HEADER,",