diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-02-16 11:01:38 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-02-16 11:01:38 +0000 |
commit | 207b59ab0318dc4b4bcc762aba8e490ecfdae316 (patch) | |
tree | cf51b14f4b0815d5a26d03fb0f841a926bfecd21 /gpsmon.h | |
parent | a18e94d4eba5f3a394e2baf4003a3a7aa3778d26 (diff) | |
download | gpsd-207b59ab0318dc4b4bcc762aba8e490ecfdae316.tar.gz |
sirfmon now has a driver-table architecture, like the daemon.
Diffstat (limited to 'gpsmon.h')
-rw-r--r-- | gpsmon.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gpsmon.h b/gpsmon.h new file mode 100644 index 00000000..814b9f05 --- /dev/null +++ b/gpsmon.h @@ -0,0 +1,28 @@ +/* gpsmon.h -- what monitor capabuilities look like */ + +#define COMMAND_TERMINATE -1 +#define COMMAND_MATCH 1 +#define COMMAND_UNKNOWN 0 + +struct mdevice_t { + /* a device-specific capability table for the monitor */ + void (*probe)(void); /* to send when we start monitoring */ + void (*analyze)(unsigned char [], size_t); + bool (*windows)(void); /* paint legends on wibndows */ + void (*repaint)(bool); /* now paint the data */ + int (*command)(char[]); /* interpret device-specfic commands */ + int min_y, min_x; /* space required for device info */ + const struct gps_type_t *driver; /* device driver table */ +}; + +// Device-specific code will need this. +extern bool monitor_control_send(unsigned char *buf, size_t len); + +#define BUFLEN 2048 + +extern WINDOW *debugwin; +extern struct gps_context_t context; +extern struct gps_device_t session; +extern int gmt_offset; + +/* gpsmon.h ends here */ |