1 /* gpsmon.h -- what monitor capabuilities look like
3 * By Eric S. Raymond, 2009
4 * This file is Copyright (c) 2010 by the GPSD project
5 * BSD terms apply: see the file COPYING in the distribution root for details.
8 #ifndef _GPSD_GPSMON_H_
9 #define _GPSD_GPSMON_H_
11 #define COMMAND_TERMINATE -1
12 #define COMMAND_MATCH 1
13 #define COMMAND_UNKNOWN 0
15 struct monitor_object_t {
16 /* a device-specific capability table for the monitor */
17 bool (*initialize)(void); /* paint legends on windows */
18 void (*update)(void); /* now paint the data */
19 int (*command)(char[]); /* interpret device-specfic commands */
20 void (*wrap)(void); /* deallocate storage */
21 int min_y, min_x; /* space required for device info */
22 const struct gps_type_t *driver; /* device driver table */
25 // Device-specific may need these.
26 extern bool monitor_control_send(unsigned char *buf, size_t len);
27 extern void monitor_fixframe(WINDOW *win);
28 extern void monitor_log(const char *fmt, ...);
29 extern void monitor_complain(const char *fmt, ...);
33 extern WINDOW *devicewin;
34 extern struct gps_device_t session;
35 extern int gmt_offset;
37 #endif /* _GPSD_GPSMON_H_ */
38 /* gpsmon.h ends here */