blob: 99078380b132cc937255c9f3a596e81a246847c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/* $Id$ */
/* gpsmon.h -- what monitor capabuilities look like */
#ifndef _GPSD_GPSMON_H_
#define _GPSD_GPSMON_H_
#define COMMAND_TERMINATE -1
#define COMMAND_MATCH 1
#define COMMAND_UNKNOWN 0
struct monitor_object_t {
/* a device-specific capability table for the monitor */
bool (*initialize)(void); /* paint legends on windows */
void (*update)(void); /* now paint the data */
int (*command)(char[]); /* interpret device-specfic commands */
void (*wrap)(void); /* deallocate storage */
int min_y, min_x; /* space required for device info */
const struct gps_type_t *driver; /* device driver table */
};
// Device-specific may need these.
extern bool monitor_control_send(unsigned char *buf, size_t len);
extern void monitor_fixframe(WINDOW *win);
extern void monitor_log(const char *fmt, ...);
extern void monitor_complain(const char *fmt, ...);
#define BUFLEN 2048
extern WINDOW *devicewin;
extern struct gps_device_t session;
extern int gmt_offset;
#endif /* _GPSD_GPSMON_H_ */
/* gpsmon.h ends here */
|