summaryrefslogtreecommitdiff
path: root/drivers.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-03-09 18:37:19 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-03-09 18:37:19 +0000
commit4996fc1cfdf2510d6d9063a30516bcf5ef4f9a8b (patch)
tree8152e2d59e9eb526f4575da2599f582f24530847 /drivers.c
parentf309aecdd914e578a0e64ffc700c9cd20cb726f0 (diff)
downloadgpsd-4996fc1cfdf2510d6d9063a30516bcf5ef4f9a8b.tar.gz
The shell of an AIVDM driver.
This gets packets and delivers them to a stub analyzer, fields parsed out and checksum verified.
Diffstat (limited to 'drivers.c')
-rw-r--r--drivers.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers.c b/drivers.c
index 06e731c9..a8375efc 100644
--- a/drivers.c
+++ b/drivers.c
@@ -94,6 +94,13 @@ gps_mask_t nmea_parse_input(struct gps_device_t *session)
}
#endif /* GARMINTXT_ENABLE */
+#ifdef AIVDM_ENABLE
+ if (strncmp((char *)session->packet.outbuffer, "!AIVDM", 6)==0) {
+ (void)gpsd_switch_driver(session, "AIVDM");
+ return aivdm_parse(session);
+ }
+#endif /* AIVDM_ENABLE */
+
#ifdef OCEANSERVER_ENABLE
if (strncmp((char *)session->packet.outbuffer, "$C", 2)==0 || strncmp((char *)session->packet.outbuffer, "$OHPR", 5)==0) {
(void)gpsd_switch_driver(session, "OceanServer Digital Compas OS5000");
@@ -1083,6 +1090,7 @@ const struct gps_type_t mkt3301 = {
};
#endif /* MKT3301_ENABLE */
+extern const struct gps_type_t aivdm;
extern const struct gps_type_t garmin_usb_binary, garmin_ser_binary;
extern const struct gps_type_t sirf_binary, tsip_binary;
extern const struct gps_type_t evermore_binary, italk_binary;
@@ -1120,6 +1128,9 @@ static const struct gps_type_t *gpsd_driver_array[] = {
#ifdef TNT_ENABLE
&trueNorth,
#endif /* TNT_ENABLE */
+#ifdef AIVDM_ENABLE
+ &aivdm,
+#endif /* AIVDM_ENABLE */
#endif /* NMEA_ENABLE */