summaryrefslogtreecommitdiff
path: root/gps_json.h
blob: bf5150d2e9da6ce1e1b124ec5e2a4efac8263d5c (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* gps_json.h - JSON handling for libgps and gpsd
 *
 * By Eric S. Raymond, 2009
 * This file is Copyright (c) 2010 by the GPSD project
 * BSD terms apply: see the file COPYING in the distribution root for details.
 */

#include "json.h"

#define GPS_JSON_COMMAND_MAX	80
#define GPS_JSON_RESPONSE_MAX	4096

#ifdef __cplusplus
extern "C" {
#endif
void json_data_report(gps_mask_t, struct gps_data_t *, struct policy_t *,
		      /*@out@*/char *, size_t);
char *json_stringify(/*@out@*/char *, size_t, /*@in@*/const char *);
void json_tpv_dump(const struct gps_data_t *, /*@out@*/char *, size_t);
void json_noise_dump(const struct gps_data_t *, /*@out@*/char *, size_t);
void json_sky_dump(const struct gps_data_t *, /*@out@*/char *, size_t);
void json_att_dump(const struct gps_data_t *, /*@out@*/char *, size_t);
void json_subframe_dump(const struct gps_data_t *, /*@out@*/ char buf[], size_t);
void json_device_dump(const struct gps_device_t *, /*@out@*/char *, size_t);
void json_watch_dump(const struct policy_t *, /*@out@*/char *, size_t);
int json_watch_read(const char *, /*@out@*/struct policy_t *, 
		    /*@null@*/const char **);
int json_device_read(const char *, /*@out@*/struct devconfig_t *, 
		     /*@null@*/const char **);
void json_version_dump(/*@out@*/char *, size_t);
void json_aivdm_dump(const struct ais_t *, /*@null@*/const char *, bool, 
		     /*@out@*/char *, size_t);
int json_rtcm2_read(const char *, char *, size_t, struct rtcm2_t *, 
		    /*@null@*/const char **);
int json_ais_read(const char *, char *, size_t, struct ais_t *, 
		  /*@null@*/const char **);
int libgps_json_unpack(const char *, struct gps_data_t *, 
		       /*@null@*/const char **);
#ifdef __cplusplus
}
#endif

/* these values don't matter in themselves, they just have to be out-of-band */
#define DEVDEFAULT_BPS  	0
#define DEVDEFAULT_PARITY	'X'
#define DEVDEFAULT_STOPBITS	3
#define DEVDEFAULT_NATIVE	-1

/* gps_json.h ends here */