summaryrefslogtreecommitdiff
path: root/gpsmon.h
blob: 5751e726fe0775e49c5f68d3d0b14035380edfdc (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
/* 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 (*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 */