gpsd.h-tail

来自「gpsd, a popular GPS daemon.」· H-TAIL 代码 · 共 463 行 · 第 1/2 页

H-TAIL
463
字号
#ifdef NMEA_ENABLE	struct {	    int part, await;		/* for tracking GSV parts */	    struct tm date;	    double subseconds;#ifdef GPSCLOCK_ENABLE	    bool ignore_trailing_edge;#endif /* GPSCLOCK_ENABLE */	} nmea;#endif /* NMEA_ENABLE */#ifdef BINARY_ENABLE#ifdef SIRF_ENABLE	struct {	    unsigned int driverstate;	/* for private use */#define SIRF_LT_231	0x01		/* SiRF at firmware rev < 231 */#define SIRF_EQ_231     0x02            /* SiRF at firmware rev == 231 */#define SIRF_GE_232     0x04            /* SiRF at firmware rev >= 232 */#define UBLOX   	0x08		/* uBlox firmware with packet 0x62 */	    unsigned long satcounter;	    unsigned int time_seen;#define TIME_SEEN_GPS_1	0x01	/* Seen GPS time variant 1? */#define TIME_SEEN_GPS_2	0x02	/* Seen GPS time variant 2? */#define TIME_SEEN_UTC_1	0x04	/* Seen UTC time variant 1? */#define TIME_SEEN_UTC_2	0x08	/* Seen UTC time variant 2? */#ifdef ALLOW_RECONFIGURE	    /* fields from Navigation Parameters message */	    bool nav_parameters_seen;	/* have we seen one? */	    unsigned char altitude_hold_mode;	    unsigned char altitude_hold_source;	    int16_t altitude_source_input;	    unsigned char degraded_mode;	    unsigned char degraded_timeout;	    unsigned char dr_timeout;	    unsigned char track_smooth_mode;#endif /* ALLOW_RECONFIGURE */	} sirf;#endif /* SIRF_ENABLE */#ifdef TSIP_ENABLE	struct {	    int16_t gps_week;		/* Current GPS week number */	    bool superpkt;		/* Super Packet mode requested */	    time_t last_41;		/* Timestamps for packet requests */	    time_t last_5c;	    time_t last_6d;	    time_t last_46;	    unsigned int parity, stopbits; /* saved RS232 link parameters */	} tsip;#endif /* TSIP_ENABLE */#ifdef GARMIN_ENABLE	/* private housekeeping stuff for the Garmin driver */	struct {	    unsigned char Buffer[4096+12];	/* Garmin packet buffer */	    size_t BufferLen;		/* current GarminBuffer Length */	} garmin;#endif /* GARMIN_ENABLE */#ifdef ZODIAC_ENABLE	/* private housekeeping stuff for the Zodiac driver */	struct {	    unsigned short sn;		/* packet sequence number */	    /*	     * Zodiac chipset channel status from PRWIZCH. Keep it so	     * raw-mode translation of Zodiac binary protocol can send	     * it up to the client.	     */#define ZODIAC_CHANNELS	12	    unsigned int Zs[ZODIAC_CHANNELS];	/* satellite PRNs */	    unsigned int Zv[ZODIAC_CHANNELS];	/* signal values (0-7) */	} zodiac;#endif /* ZODIAC_ENABLE */#ifdef UBX_ENABLE	struct {            unsigned int gps_week;    	} ubx;#endif /* UBX_ENABLE */#ifdef NAVCOM_ENABLE	struct {	    u_int8_t physical_port;	    bool warned;	} navcom;#endif /* NAVCOM_ENABLE */	/*	 * This is not conditionalized on RTCM104_ENABLE because we need to	 * be able to build rtcmdecode even when RTCM support is not	 * configured in the daemon.  It doesn't take up extra space.	 */	struct {	    /* ISGPS200 decoding */	    bool            locked;	    int             curr_offset;	    isgps30bits_t   curr_word;	    isgps30bits_t   buf[RTCM_WORDS_MAX];	    unsigned int    bufindex;	} isgps;#endif /* BINARY_ENABLE */    } driver;};/* logging levels */#define LOG_ERROR 	0	/* errors, display always */#define LOG_SHOUT	0	/* not an error but we should always see it */#define LOG_WARN	1	/* not errors but may indicate a problem */#define LOG_INF 	2	/* key informative messages */#define LOG_PROG	3	/* progress messages */#define LOG_IO  	4	/* IO to and from devices */#define LOG_RAW 	5	/* raw low-level I/O */#define IS_HIGHEST_BIT(v,m)	(v & ~((m<<1)-1))==0/* here are the available GPS drivers */extern struct gps_type_t **gpsd_drivers;/* gpsd library internal prototypes */extern gps_mask_t nmea_parse_input(struct gps_device_t *);extern gps_mask_t nmea_parse(char *, struct gps_device_t *);extern int nmea_send(int, const char *, ... );extern void nmea_add_checksum(char *);ssize_t generic_get(struct gps_device_t *);ssize_t pass_rtcm(struct gps_device_t *, char *, size_t);extern gps_mask_t sirf_parse(struct gps_device_t *, unsigned char *, size_t);extern gps_mask_t evermore_parse(struct gps_device_t *, unsigned char *, size_t);extern gps_mask_t navcom_parse(struct gps_device_t *, unsigned char *, size_t);extern gps_mask_t garmin_ser_parse(struct gps_device_t *);extern gps_mask_t garmintxt_parse(struct gps_device_t *);extern bool dgnss_url(char *);extern int dgnss_open(struct gps_context_t *, char *);extern int dgnss_poll(struct gps_context_t *);extern void dgnss_report(struct gps_device_t *);extern void dgnss_autoconnect(struct gps_context_t *, double, double);extern void rtcm_relay(struct gps_device_t *);extern void rtcm_output_mag(isgps30bits_t *, FILE *);extern int dgpsip_open(struct gps_context_t *, const char *);extern void dgpsip_report(struct gps_device_t *);extern void dgpsip_autoconnect(struct gps_context_t *, 			       double, double, const char *);extern int ntrip_open(struct gps_context_t *, char *);extern void ntrip_report(struct gps_device_t *);extern void gpsd_tty_init(struct gps_device_t *);extern int gpsd_open(struct gps_device_t *);extern bool gpsd_set_raw(struct gps_device_t *);extern ssize_t gpsd_write(struct gps_device_t *, void const *, size_t);extern bool gpsd_next_hunt_setting(struct gps_device_t *);extern int gpsd_switch_driver(struct gps_device_t *, char *);extern void gpsd_set_speed(struct gps_device_t *, speed_t, unsigned char, unsigned int);extern speed_t gpsd_get_speed(struct termios *);extern void gpsd_assert_sync(struct gps_device_t *);extern void gpsd_close(struct gps_device_t *);extern void gpsd_zero_satellites(/*@out@*/struct gps_data_t *sp)/*@modifies sp@*/;extern void gpsd_interpret_subframe(struct gps_device_t *, unsigned int[]);extern /*@ observer @*/ char *gpsd_hexdump(const void *, size_t);extern int gpsd_hexpack(char *, char *, int);extern int hex2bin(char *);extern void ntpd_link_activate(struct gps_device_t *session);extern char /*@observer@*/ *gpsd_id(/*@in@*/struct gps_device_t *);extern void gpsd_position_fix_dump(struct gps_device_t *, /*@out@*/char[], size_t);extern void gpsd_error_model(struct gps_device_t *, struct gps_fix_t *, struct gps_fix_t *);extern void gpsd_clear_data(struct gps_device_t *);extern int netlib_connectsock(const char *, const char *, const char *);extern char /*@observer@*/ *sock2ip(int);extern void ntpshm_init(struct gps_context_t *, bool);extern int ntpshm_alloc(struct gps_context_t *);extern bool ntpshm_free(struct gps_context_t *, int);extern int ntpshm_put(struct gps_device_t *, double);extern int ntpshm_pps(struct gps_device_t *,struct timeval *);extern void ecef_to_wgs84fix(struct gps_data_t *,			     double, double, double, 			     double, double, double);extern gps_mask_t dop(struct gps_data_t *);/* srecord.c */extern void hexdump(size_t, unsigned char *, unsigned char *);extern unsigned char sr_sum(unsigned int, unsigned int, unsigned char *);extern int bin2srec(unsigned int, unsigned int, unsigned int, unsigned char *, unsigned char *);extern int srec_hdr(unsigned int, unsigned char *, unsigned char *);extern int srec_fin(unsigned int, unsigned char *);extern unsigned char hc(unsigned char);/* exported bits for the GPS flasher */bool sirf_write(int fd, unsigned char *msg);/* application interface */extern void gpsd_init(struct gps_device_t *, struct gps_context_t *, char *);extern int gpsd_activate(struct gps_device_t *, bool);extern void gpsd_deactivate(struct gps_device_t *);extern gps_mask_t gpsd_poll(struct gps_device_t *);extern void gpsd_wrap(struct gps_device_t *);/* caller should supply this */void gpsd_report(int, const char *, ...);#ifdef S_SPLINT_Sextern bool finite(double);extern int cfmakeraw(struct termios *);extern struct protoent *getprotobyname(const char *);extern /*@observer@*/char *strptime(const char *,const char *tp,/*@out@*/struct tm *)/*@modifies tp@*/;extern struct tm *gmtime_r(const time_t *,/*@out@*/struct tm *tp)/*@modifies tp@*/;extern struct tm *localtime_r(const time_t *,/*@out@*/struct tm *tp)/*@modifies tp@*/;extern float roundf(float x);#endif /* S_SPLINT_S *//* some OSes don't have round(). fake it if need be */#ifndef HAVE_ROUND#define	round(x) ((double)rint(x))#define roundf(x) ((float)rintf((double)x))#endif /* !HAVE_ROUND *//* OpenBSD and FreeBSD and Cygwin don't seem to have NAN, NetBSD does, others? *//* XXX test for this in configure? */#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__CYGWIN__)#ifndef NAN#define NAN (0.0/0.0)#endif /* !NAN */#endif /* list of Operating Systems *//* Cygwin, in addition to NAN, doesn't have cfmakeraw */#if defined(__CYGWIN__)void cfmakeraw(struct termios *);#endif /* defined(__CYGWIN__) */#endif /* _gpsd_h_ */// Local variables:// mode: c// end:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?