diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-02-24 11:47:19 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-02-24 11:47:19 -0500 |
commit | 25fb04476ddb433a108121f74f356e76e44a6a95 (patch) | |
tree | 69577707141e703513387735ebd9da35c55cdad5 /gpsd.h-tail | |
parent | 6b3fd224e1e2d2e6f086924a6148712a4a445a2c (diff) | |
download | gpsd-25fb04476ddb433a108121f74f356e76e44a6a95.tar.gz |
Eliminate the context->netgnss_service member.
This is more global context that really needed to be per-device state. Instead,
create a per-devicd servicetype member to carry this information. Practically
apeaking, this means gpsd can now watch multiple NTRIP and DGPS sessions without
getting confused.
All regressuin tests pass.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r-- | gpsd.h-tail | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail index 13eec648..4f9fa3e9 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -181,7 +181,6 @@ struct gps_context_t { #define LEAP_SECOND_VALID 0x01 /* we have or don't need correction */ #define GPS_TIME_VALID 0x02 /* GPS week/tow is valid */ /* DGPS status */ - enum { netgnss_none, netgnss_dgpsip, netgnss_ntrip} netgnss_service; /* type of GNSS service */ int fixcnt; /* count of good fixes seen */ size_t rtcmbytes; /* byte count of last RTCM104 report */ char rtcmbuf[RTCM_MAX]; /* last RTCM104 report */ @@ -323,6 +322,15 @@ typedef enum {source_unknown, source_udp, /* UDP stream: case detected but not used */ } sourcetype_t; +/* + * Each input source also has an associated service type. + */ +typedef enum {service_none, + service_sensor, + service_dgpsip, + service_ntrip +} servicetype_t; + struct gps_device_t { /* session object, encapsulates all global state */ struct gps_data_t gpsdata; @@ -330,6 +338,7 @@ struct gps_device_t { struct gps_context_t *context; bool is_serial; sourcetype_t sourcetype; + servicetype_t servicetype; double rtcmtime; /* timestamp of last RTCM104 correction to GPS */ #ifndef _WIN32 struct termios ttyset, ttyset_old; |