summaryrefslogtreecommitdiff
path: root/gpsd.h-tail
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-01-06 14:49:21 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-01-06 14:49:21 +0000
commit649df04ceb10762b70916d9c58bbc86179fb8896 (patch)
treebb996691fe96676be5da7e4330810cb6b4ba2402 /gpsd.h-tail
parent4ada7201b3e3ea30cc5cf7f905025c72e2ff0761 (diff)
downloadgpsd-649df04ceb10762b70916d9c58bbc86179fb8896.tar.gz
Refactor sending of control strings.
Most drivers now have a control_send method that takes a payload. provides whatever checksuming and leader/trailer bytes are needed, and ships it to a specified active device. This change should not alter any behavior. All regression tests pass.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r--gpsd.h-tail4
1 files changed, 3 insertions, 1 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail
index fc156feb..10d7a69c 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -183,6 +183,7 @@ struct gps_type_t {
/*@observer@*/char *type_name;
/*@observer@*//*@null@*/char *trigger;
int channels;
+ ssize_t (*control_send)(struct gps_device_t *session, char *buf, size_t buflen);
/*@null@*/bool (*probe_detect)(struct gps_device_t *session);
/*@null@*/void (*probe_wakeup)(struct gps_device_t *session);
/*@null@*/void (*probe_subtype)(struct gps_device_t *session, unsigned int seq);
@@ -349,7 +350,8 @@ extern struct gps_type_t **gpsd_drivers;
/* gpsd library internal prototypes */
extern gps_mask_t nmea_parse_input(struct gps_device_t *);
extern gps_mask_t nmea_parse(char *, struct gps_device_t *);
-extern int nmea_send(int, const char *, ... );
+extern ssize_t nmea_write(struct gps_device_t *session, char *buf, size_t len);
+extern ssize_t nmea_send(struct gps_device_t *session, const char *, ... );
extern void nmea_add_checksum(char *);
ssize_t generic_get(struct gps_device_t *);