1 [CCode (lower_case_cprefix="", cprefix="", cheader_filename="gps.h")]
4 public const int MAXCHANNELS;
7 [IntegerType (rank = 9)]
8 public struct mask_t {}
10 [CCode (cname = "struct gps_fix_t")]
13 double time; /* Time of update, seconds since Unix epoch */
14 int mode; /* Mode of fix */
15 double ept; /* Expected time uncertainty */
16 double latitude; /* Latitude in degrees (valid if mode >= 2) */
17 double epy; /* Latitude position uncertainty, meters */
18 double longitude; /* Longitude in degrees (valid if mode >= 2) */
19 double epx; /* Longitude position uncertainty, meters */
20 double altitude; /* Altitude in meters (valid if mode == 3) */
21 double epv; /* Vertical position uncertainty, meters */
22 double track; /* Course made good (relative to true north) */
23 double epd; /* Track uncertainty, degrees */
24 double speed; /* Speed over ground, meters/sec */
25 double eps; /* Speed uncertainty, meters/sec */
26 double climb; /* Vertical speed, meters/sec */
27 double epc; /* Vertical speed uncertainty */
29 public const int MODE_NOT_SEEN; /* mode update not seen yet */
30 public const int MODE_NO_FIX; /* none */
31 public const int MODE_2D; /* good for latitude/longitude */
32 public const int MODE_3D; /* good for altitude/climb too */
34 [CCode (cname = "struct dop_t")]
37 /* Dilution of precision factors */
47 [CCode (cname = "struct gps_data_t", destroy_function = "")]
56 int satellites_used; /* Number of satellites used in solution */
57 int[] used; /* PRNs of satellites used in solution */
59 /* redundant with the estimate elements in the fix structure */
60 double epe; /* spherical position error, 95% confidence (meters) */
62 /* satellite status -- valid when satellites_visible > 0 */
63 double skyview_time; /* skyview timestamp */
64 int satellites_visible; /* # of satellites in view */
65 int[] PRN; /* PRNs of satellite */
66 int[] elevation; /* elevation of satellite */
67 int[] azimuth; /* azimuth */
68 double[] ss; /* signal-to-noise ratio (dB) */
70 //struct devconfig_t dev; /* device that shipped last update */
72 //struct policy_t policy; /* our listening policy */
74 //char tag[MAXTAGLEN+1]; /* tag of last sentence processed */
76 public const int ONLINE_SET;
77 public const int TIME_SET;
78 public const int TIMERR_SET;
79 public const int LATLON_SET;
80 public const int ALTITUDE_SET;
81 public const int SPEED_SET;
82 public const int TRACK_SET;
83 public const int CLIMB_SET;
84 public const int STATUS_SET;
85 public const int MODE_SET;
86 public const int DOP_SET;
87 public const int VERSION_SET; /* only used in client library */
88 public const int HERR_SET;
89 public const int VERR_SET;
90 public const int PERR_SET;
91 public const int POLICY_SET; /* only used in client library */
92 public const int ERR_SET;
93 public const int SATELLITE_SET;
94 public const int RAW_SET;
95 public const int USED_SET;
96 public const int SPEEDERR_SET;
97 public const int TRACKERR_SET;
98 public const int CLIMBERR_SET;
99 public const int DEVICE_SET;
100 public const int DEVICELIST_SET;
101 public const int DEVICEID_SET;
102 public const int ERROR_SET;
103 public const int RTCM2_SET;
104 public const int RTCM3_SET;
105 public const int AIS_SET;
106 public const int PACKET_SET;
107 public const int CLEAR_SET; /* sentence starts a reporting cycle */
108 public const int REPORT_SET; /* sentence ends a reporting cycle */
109 public const int DATA_SET;
111 public const int STATUS_NO_FIX; /* no */
112 public const int STATUS_FIX; /* yes, without DGPS */
113 public const int STATUS_DGPS_FIX; /* yes, with DGPS */
115 [CCode (cname = "gps_open_r")]
116 public int open_r(string server, string port, ref data_t gpsdata);
118 [CCode (cname = "gps_close")]
119 public int close(ref data_t gpsdata);
121 [CCode (cname = "gps_errstr")]
122 public weak string errstr(int err);
124 [CCode (cname = "gps_poll")]
125 public int poll(ref data_t gpsdata);
127 [CCode (cname = "gps_waiting")]
128 public bool waiting(ref data_t gpsdata);
130 [CCode (cname = "gps_send")]
131 public int send(ref data_t gpsdata, string fmt, ...);
133 [CCode (cname = "gps_stream")]
134 public int stream(ref data_t gpsdata, uint flags, void* data);
136 /* mode flags for gps_stream() */
137 public int WATCH_DISABLE; /* disable watching */
138 public int WATCH_ENABLE; /* enable streaming */
139 public int WATCH_JSON; /* enable JSON output */
140 public int WATCH_NMEA; /* enable output in NMEA */
141 public int WATCH_RARE; /* enable output of packets in hex */
142 public int WATCH_RAW; /* enable output of raw packets */
143 public int WATCH_SCALED; /* scale output to floats, when applicable */
144 public int WATCH_NEWSTYLE; /* force JSON streaming */
145 public int WATCH_OLDSTYLE; /* force old-style streaming */
146 public int WATCH_DEVICE; /* watch specific device */
147 public int POLL_NONBLOCK; /* set non-blocking poll */
150 [CCode (cname = "struct input_event")]
153 public Posix.timeval time;
156 [CCode (cname="value")]
160 [CCode (cprefix="KEY_")]
166 [CCode (cprefix="EV_")]
183 [CCode (cprefix="", cheader_filename="omhacks/all.h")]
186 [CCode (cname = "struct om_led", cheader_filename = "omhacks/led.h", destroy_function = "")]
189 public char name[255];
192 public int brightness;
193 public char trigger[255];
195 public int delay_off;
197 [CCode (cname = "om_led_init")]
198 public int init(string name);
199 [CCode (cname = "om_led_get")]
201 [CCode (cname = "om_led_set")]
209 [CCode (cname = "om_screen_brightness_get")]
211 [CCode (cname = "om_screen_brightness_get_max")]
212 public int get_max();
213 [CCode (cname = "om_screen_brightness_set")]
214 public int set(int val);
220 [CCode (cname = "struct om_uevent", cheader_filename = "omhacks/uevent.h", destroy_function = "")]
223 public string buffer;
230 [CCode (cname = "om_uevent_open")]
232 [CCode (cname = "om_uevent_read")]
233 public int read(int sock, ref Event ou);
234 [CCode (cname = "om_uevent_parse")]
235 public int parse(ref Event ou);