summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-10-13 14:09:08 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-10-13 14:10:30 -0400
commit60b874d966ce88bea269879b1ac86cc7b6ae39cc (patch)
tree3085e4a526a823863197cdd79fa9bb27fe822feb
parent6649e751fe084cf1034d8ccb65496f0c167b66c4 (diff)
downloadgpsd-60b874d966ce88bea269879b1ac86cc7b6ae39cc.tar.gz
Create driver slot and scons option for a visualizer driver method.
-rw-r--r--SConstruct2
-rw-r--r--driver_evermore.c3
-rw-r--r--driver_garmin.c9
-rw-r--r--driver_geostar.c3
-rw-r--r--driver_italk.c3
-rw-r--r--driver_navcom.c3
-rw-r--r--driver_nmea2000.c3
-rw-r--r--driver_oncore.c3
-rw-r--r--driver_proto.c3
-rw-r--r--driver_sirf.c3
-rw-r--r--driver_superstar2.c3
-rw-r--r--driver_tsip.c3
-rw-r--r--driver_ubx.c3
-rw-r--r--driver_zodiac.c3
-rw-r--r--drivers.c51
-rw-r--r--gpsd.h-tail1
16 files changed, 99 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 5b4ae05b..aa2bdbc6 100644
--- a/SConstruct
+++ b/SConstruct
@@ -144,6 +144,8 @@ boolopts = (
("oldstyle", True, "oldstyle (pre-JSON) protocol support"),
("libgpsmm", True, "build C++ bindings"),
("libQgpsmm", True, "build QT bindings"),
+ # Daemon options
+ ("visualize", True, "visualizer functions for logging and gpsmon"),
("reconfigure", True, "allow gpsd to change device settings"),
("controlsend", True, "allow gpsctl/gpsmon to change device settings"),
("cheapfloats", True, "float ops are cheap, compute error estimates"),
diff --git a/driver_evermore.c b/driver_evermore.c
index 536d1fc6..dfbd5024 100644
--- a/driver_evermore.c
+++ b/driver_evermore.c
@@ -633,6 +633,9 @@ const struct gps_type_t evermore_binary =
#ifdef CONTROLSEND_ENABLE
.control_send = evermore_control_send, /* how to send a control string */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
diff --git a/driver_garmin.c b/driver_garmin.c
index 5263163b..67d23cec 100644
--- a/driver_garmin.c
+++ b/driver_garmin.c
@@ -1391,6 +1391,9 @@ const struct gps_type_t garmin_usb_binary_old =
#ifdef CONTROLSEND_ENABLE
.control_send = garmin_control_send, /* send raw bytes */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = garmin_ntp_offset,
#endif /* NTPSHM_ ENABLE */
@@ -1420,6 +1423,9 @@ const struct gps_type_t garmin_usb_binary =
#ifdef CONTROLSEND_ENABLE
.control_send = garmin_control_send, /* send raw bytes */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = garmin_ntp_offset,
#endif /* NTPSHM_ ENABLE */
@@ -1448,6 +1454,9 @@ const struct gps_type_t garmin_ser_binary =
#ifdef CONTROLSEND_ENABLE
.control_send = garmin_control_send, /* send raw bytes */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = garmin_ntp_offset,
#endif /* NTPSHM_ ENABLE */
diff --git a/driver_geostar.c b/driver_geostar.c
index a65d168a..193a2b2e 100644
--- a/driver_geostar.c
+++ b/driver_geostar.c
@@ -629,6 +629,9 @@ const struct gps_type_t geostar_binary =
#ifdef CONTROLSEND_ENABLE
.control_send = geostar_control_send,/* how to send commands */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = geostar_ntp_offset,
#endif /* NTPSHM_ENABLE */
diff --git a/driver_italk.c b/driver_italk.c
index 01e350ce..bc3719ee 100644
--- a/driver_italk.c
+++ b/driver_italk.c
@@ -418,6 +418,9 @@ const struct gps_type_t italk_binary =
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* no control string sender */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
diff --git a/driver_navcom.c b/driver_navcom.c
index 03a984ad..999e772e 100644
--- a/driver_navcom.c
+++ b/driver_navcom.c
@@ -1296,6 +1296,9 @@ const struct gps_type_t navcom_binary =
#ifdef CONTROLSEND_ENABLE
.control_send = navcom_control_send, /* how to send a control string */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
diff --git a/driver_nmea2000.c b/driver_nmea2000.c
index 01a652f1..8df6a2cf 100644
--- a/driver_nmea2000.c
+++ b/driver_nmea2000.c
@@ -1313,6 +1313,9 @@ const struct gps_type_t nmea2000 = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL,
#endif /* NTPSHM_ ENABLE */
diff --git a/driver_oncore.c b/driver_oncore.c
index 022d4280..e5686a7b 100644
--- a/driver_oncore.c
+++ b/driver_oncore.c
@@ -540,6 +540,9 @@ const struct gps_type_t oncore_binary = {
/* Control string sender - should provide checksum and headers/trailer */
.control_send = oncore_control_send, /* to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = oncore_ntp_offset, /* NTP offset array */
#endif /* NTPSHM_ENABLE */
diff --git a/driver_proto.c b/driver_proto.c
index dbeacc54..d4fe3179 100644
--- a/driver_proto.c
+++ b/driver_proto.c
@@ -530,6 +530,9 @@ const struct gps_type_t _proto__binary = {
/* Control string sender - should provide checksum and headers/trailer */
.control_send = _proto__control_send,
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = _proto_ntp_offset,
#endif /* NTPSHM_ENABLE */
diff --git a/driver_sirf.c b/driver_sirf.c
index d7faf3eb..9b457129 100644
--- a/driver_sirf.c
+++ b/driver_sirf.c
@@ -1383,6 +1383,9 @@ const struct gps_type_t sirf_binary =
#ifdef CONTROLSEND_ENABLE
.control_send = sirf_control_send,/* how to send a control string */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = sirf_ntp_offset,
#endif /* NTP_SHM_ENABLE */
diff --git a/driver_superstar2.c b/driver_superstar2.c
index 9cf22d24..89aa4cfd 100644
--- a/driver_superstar2.c
+++ b/driver_superstar2.c
@@ -575,6 +575,9 @@ const struct gps_type_t superstar2_binary = {
/* Control string sender - should provide checksum and trailer */
.control_send = superstar2_control_send,
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
diff --git a/driver_tsip.c b/driver_tsip.c
index c56a8054..de14dfec 100644
--- a/driver_tsip.c
+++ b/driver_tsip.c
@@ -1300,6 +1300,9 @@ const struct gps_type_t tsip_binary =
#ifdef CONTROLSEND_ENABLE
.control_send = tsip_control_send,/* how to send commands */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = tsip_ntp_offset,
#endif /* NTPSHM_ENABLE */
diff --git a/driver_ubx.c b/driver_ubx.c
index 3dc76822..6f92a570 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -840,6 +840,9 @@ const struct gps_type_t ubx_binary = {
#ifdef CONTROLSEND_ENABLE
.control_send = ubx_control_send, /* no control sender yet */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
diff --git a/driver_zodiac.c b/driver_zodiac.c
index 1af2250d..1682acb0 100644
--- a/driver_zodiac.c
+++ b/driver_zodiac.c
@@ -522,6 +522,9 @@ const struct gps_type_t zodiac_binary =
#ifdef CONTROLSEND_ENABLE
.control_send = zodiac_control_send, /* for gpsctl and friends */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = zodiac_ntp_offset, /* compute NTO fudge factor */
#endif /* NTPSHM_ENABLE */
diff --git a/drivers.c b/drivers.c
index 46f26871..9c6eed26 100644
--- a/drivers.c
+++ b/drivers.c
@@ -107,6 +107,9 @@ const struct gps_type_t unknown = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
@@ -271,6 +274,9 @@ const struct gps_type_t nmea = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
@@ -372,6 +378,9 @@ const struct gps_type_t garmin = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
@@ -434,6 +443,9 @@ const struct gps_type_t ashtech = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
@@ -485,6 +497,9 @@ const struct gps_type_t fv18 = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
@@ -539,6 +554,9 @@ const struct gps_type_t gpsclock = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
@@ -594,6 +612,9 @@ static const struct gps_type_t tripmate = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
@@ -645,6 +666,9 @@ static const struct gps_type_t earthmate = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
@@ -768,6 +792,9 @@ const struct gps_type_t trueNorth = {
#ifdef CONTROLSEND_ENABLE
.control_send = tnt_control_send, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL,
#endif /* NTPSHM_ ENABLE */
@@ -846,6 +873,9 @@ static const struct gps_type_t oceanServer = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL,
#endif /* NTPSHM_ ENABLE */
@@ -913,6 +943,9 @@ static const struct gps_type_t fury = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL,
#endif /* NTPSHM_ ENABLE */
@@ -966,6 +999,9 @@ static const struct gps_type_t rtcm104v2 = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL,
#endif /* NTPSHM_ ENABLE */
@@ -1012,6 +1048,9 @@ static const struct gps_type_t rtcm104v3 = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL,
#endif /* NTPSHM_ ENABLE */
@@ -1047,6 +1086,9 @@ static const struct gps_type_t garmintxt = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL,
#endif /* NTPSHM_ ENABLE */
@@ -1136,6 +1178,9 @@ const struct gps_type_t mtk3301 = {
#ifdef CONTROLSEND_ENABLE
.control_send = nmea_write, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL,
#endif /* NTPSHM_ ENABLE */
@@ -1369,6 +1414,9 @@ const struct gps_type_t aivdm = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* no control sender */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no NTP communication */
#endif /* NTPSHM_ ENABLE */
@@ -1467,6 +1515,9 @@ const struct gps_type_t json_passthrough = {
#ifdef CONTROLSEND_ENABLE
.control_send = NULL, /* how to send control strings */
#endif /* CONTROLSEND_ENABLE */
+#ifdef VISUALIZE_ENABLE
+ .visualize = NULL, /* no visualization method */
+#endif /* VISUALIZE_ENABLE */
#ifdef NTPSHM_ENABLE
.ntp_offset = NULL, /* no method for NTP fudge factor */
#endif /* NTPSHM_ ENABLE */
diff --git a/gpsd.h-tail b/gpsd.h-tail
index 48fac64b..5adf4e4e 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -318,6 +318,7 @@ struct gps_type_t {
#endif /* RECONFIGURE_ENABLE */
#ifdef CONTROLSEND_ENABLE
/*@null@*/ssize_t (*control_send)(struct gps_device_t *session, char *buf, size_t buflen);
+ /*@null@*/ssize_t (*visualize)(struct gps_device_t *session, char *buf, size_t buflen);
#endif /* CONTROLSEND_ENABLE */
#ifdef NTPSHM_ENABLE
/*@null@*/double (*ntp_offset)(struct gps_device_t *session);