diff options
author | Christian Gagneraud <chgans@gna.org> | 2012-05-23 00:27:04 +0100 |
---|---|---|
committer | Christian Gagneraud <cgagneraud@techworks.ie> | 2012-05-23 21:36:34 +0100 |
commit | f2ba497b7ebe1158bb2e0088ad828c45600938ee (patch) | |
tree | 5abb21afc08b3465844c628639923840ceea9a04 /devtools | |
parent | 6041bdbf72c9b92d50b5bad8a7e7ced9ef65678f (diff) | |
download | gpsd-f2ba497b7ebe1158bb2e0088ad828c45600938ee.tar.gz |
[AIS] Add UK/ROI AtoN monitoring data message handling
Diffstat (limited to 'devtools')
-rwxr-xr-x | devtools/ais.py | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/devtools/ais.py b/devtools/ais.py index 5869a111..d8dd25c7 100755 --- a/devtools/ais.py +++ b/devtools/ais.py @@ -306,6 +306,35 @@ type5 = ( spare(1), ) +type6_dac_or_fid_unknown = ( + bitfield("data", 920, 'raw', None, "Data"), + ) + +type6_dispatch = {} +type6_dispatch[0] = type6_dac_or_fid_unknown + +# DAC 235 and 250 (UK, Rep. of Ireland) +type6_dac235_dispatch = {} +type6_dac235_dispatch[0] = type6_dac_or_fid_unknown + +type6_dac235_fid10 = ( + bitfield("ana_int", 10, 'unsigned', None, "Supply voltage"), + bitfield("ana_ext1", 10, 'unsigned', None, "Analogue (Ext#1)"), + bitfield("ana_ext2", 10, 'unsigned', None, "Analogue (Ext#2)"), + bitfield("racon", 2, 'unsigned', None, "RACON status"), + bitfield("light", 2, 'unsigned', None, "Light status"), + bitfield("health", 1, 'unsigned', None, "Health"), + bitfield("stat_ext", 8, 'unsigned', None, "Status (ext)"), + bitfield("off_pos", 1, 'unsigned', None, "Position status"), +) +type6_dac235_dispatch[10] = type6_dac235_fid10 + +type6_dac235 = ( + dispatch("fid", type6_dac235_dispatch, lambda m: m if m in type6_dac235_dispatch else 0), + ) +type6_dispatch[235] = type6_dac235 +type6_dispatch[250] = type6_dac235 + type6 = ( bitfield("seqno", 2, 'unsigned', None, "Sequence Number"), bitfield("dest_mmsi", 30, 'unsigned', None, "Destination MMSI"), @@ -313,7 +342,7 @@ type6 = ( spare(1), bitfield("dac", 10, 'unsigned', 0, "DAC"), bitfield("fid", 6, 'unsigned', 0, "Functional ID"), - bitfield("data", 920, 'raw', None, "Data"), + dispatch("dac", type6_dispatch, lambda m: m if m in type6_dispatch else 0), ) type7 = ( |