summaryrefslogtreecommitdiff
path: root/gpsd.h-tail
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-10-15 12:46:48 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-10-15 12:46:48 -0400
commitae7f68bd787feb6816c800059f5075e5d52786d4 (patch)
tree6984c61553fc3ef31ae83ce0b742ef582dff9cc5 /gpsd.h-tail
parentf78dc1f7d1215122991a7e65e1815d87a0b0f0ef (diff)
downloadgpsd-ae7f68bd787feb6816c800059f5075e5d52786d4.tar.gz
First cut at salience test.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r--gpsd.h-tail14
1 files changed, 13 insertions, 1 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail
index ced2f346..c60c74fc 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -40,7 +40,7 @@ typedef unsigned int speed_t;
* 3.8 AIS course nember becomes float in scaled mode (bug fix).
* 3.9 split24 flag added. Controlled-vocabulary fields are now always
* dumped in both numeric and string form, with the string being the
- * value of a synteshized additional attribute with "_text" appended.
+ * value of a synthesized additional attribute with "_text" appended.
* (Thus, the 'scaled' flag no longer affects display of these fields.)
*/
#define GPSD_PROTO_MAJOR_VERSION 3 /* bump on incompatible changes */
@@ -297,6 +297,18 @@ typedef enum {
typedef /*@unsignedintegraltype@*/ unsigned int driver_mask_t;
#define DRIVER_NOFLAGS 0x00000000u
+/*
+ * True if a device type is non-null and has control methods.
+ */
+#define CONTROLLABLE(dp) (((dp) != NULL) && \
+ ((dp)->speed_switcher != NULL \
+ || (dp)->mode_switcher != NULL \
+ || (dp)->rate_switcher != NULL))
+/*
+ * True if a driver is salient and selection of it should be sticky.
+ */
+#define SALIENT(dp) (CONTROLLABLE(dp))
+
struct gps_type_t {
/* GPS method table, describes how to talk to a particular GPS type */
/*@observer@*/char *type_name;