summaryrefslogtreecommitdiff
path: root/gpsd.h
Commit message (Collapse)AuthorAgeFilesLines
* Windows libgps supportRobert Norris2017-02-171-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Windows versions for network functions and disable unused features. Add detection of various headers and functions that aren't available in Windows. Note that netlib_localsocket() has no functional implementation on Windows, but it isn't to be used on that platform and it's not part of libgps anyway. Using send() rather than write() seems to work on Windows. For Windows need to ensure networking is initialised on opening of sockets (and then correspondingly shutdown upon closing). Note that within gpsd.h the termios structures and serial related functions are removed from the Windows build. These are only accessed in serial.c by gpsd, so since the Windows build is only generating libgps there is currently no need to modify serial.c. And for os_compat.h, daemon() is simply disabled under Windows as it's not used within libgps. TESTED: Confirmed compiles under a cross compiler. Manual build and run of test_libgps on Windows which successfully connects to a host running GPSD Manual build DLL version and link with a Windows version of a program (Viking) that then successfully connects and monitors positions from GPSD Otherwise no effect on current supported systems. 'scons build-all check' - passes. Signed-off-by: Fred Wright <fw@fwright.net>
* Fixes some issues with C++11.Fred Wright2017-01-241-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | In compiler.h, it adds the missing "std::" namespace prefixes to the memory_barrier() definition. In gpsd.h it: 1) Moves the include of compiler.h outside the conditional 'extern "C"', since the "atomic" stuff in the former is incompatible with the latter. 2) Fixes DEVICEHOOKPATH for C++11 (C++11 requires spaces between literals and string macros). 3) Cleans up some ordering of system includes left over from the former head/tail setup. TESTED: Ran "scons build-all check" on OSX 10.5-10.12, Ubuntu 14, CentOS 7, Fedora 25, FreeBSD 10.3, OpenBSD 5.6 (32- and 64-bit), and NetBSD 6.1.5. Also tested Qt builds with OSX 10.9 (Qt4 and Qt5), OSX 10.12 (Qt5), and Fedora 25 (Qt5). Observed the correct DEVICEHOOKPATH in the log on OSX.
* Eliminates autogeneration of gpsd.h.Fred Wright2017-01-241-0/+1003
| | | | | | | | | | | The reason for directly including the contents of gpsd_config.h in gpsd.h is long gone, so there's no longer any reason to create the latter by concatenation rather than just making it a normal header which #includes gpsd_config.h. This is a minimal rework of this form. TESTED: Ran "scons build-all check" on OSX 10.9 and Fedora 25 (without Qt in the latter case, where the Qt build needs further work).
* Generate gpsd.h so it will contain all relevant configure switches.Eric S. Raymond2007-03-261-458/+0
|
* First step of a layering fix: move the private ldisc member to gpsd.h.Eric S. Raymond2007-03-261-0/+3
|
* Document the fact that the reason we accept oversized NMEA sentences is...Chris Kuethe2007-03-141-0/+1
| | | | ...that my TN-200 with firmware 2.3.2 generates those on occasion.
* While NMEA lines shouldn't be more than 82 characters, one of my receivers...Chris Kuethe2007-03-141-1/+1
| | | | | | ...is currenly emitting 84 character lines. The data is meaningful, the checksum is correct, I think someone just got a format string wrong. GPSD is throwing away usable data.
* Better error modelling. Chris Kuethe2007-01-271-2/+1
| | | | | | | | | Each fix updates the error estimates using the generic model unless the driver provides a better error model. This means that we use the old generic model for most of our drivers, but some devices provide their own error estimates - if so, we'll use those instead. Original diff from Diego Berge, with some corrections from me.
* having both enable-italk and enable-itrax is dumb. Chris Kuethe2006-12-281-7/+9
| | | | | | | now, all itrax features (including italk and $PFST) shall be controlled with enable-itrax. obviously i'm hacking on italk again, so make the italk driver compile again.
* magic to make the UBX SVINFO message parseChris Kuethe2006-12-271-3/+3
|
* The start of a UBX driver, from Andreas Stricker. Not yetChris Kuethe2006-12-151-1/+22
| | | | functional but committed to allow for in-tree development.
* add a --enable-gpsd-user configure option. Chris Kuethe2006-12-151-3/+0
| | | | | if unspecified, gpsd will retain its current behaviour: dropping to "nobody".
* Diego Burge's driver builds, but it messes up some regression tests...Eric S. Raymond2006-12-151-0/+2
| | | | ...(notably the TSIP ones). There's a conflict...
* Make the code for Magnavox-format output work again...Eric S. Raymond2006-12-041-0/+4
| | | | ...though it's still not hooked up to anything in rtcmdecode().
* Change the way the RTCM decoding is layered... Eric S. Raymond2006-12-041-5/+3
| | | | | | | ...so the packet sniffer no longer needs to take an argument that is an rtcm structure. This is a step towards a new and better gpsfake. No logic or protocol changes. All regression tests pass,
* Hide an RTCM detail better. No logic changes. All regression tests pass.Eric S. Raymond2006-12-031-1/+0
|
* This is a try at re-merging my changes.Eric S. Raymond2006-12-011-89/+112
|
* Move some includes around and protect them properly.Chris Kuethe2006-12-011-8/+5
|
* Chris's build broke after my attempt to clean up gpsd.h on 30 Nov 2006.Eric S. Raymond2006-12-011-111/+108
| | | | | | | | | The 'cosmetic rearrangement' appears to have busted something on his system only. Restore the previous version, but with COMMENT_PACKET added. Later: yes, this worked around the problem. Now we get to figure out what broke his toolchain.
* Fix ALLOW_RECONFIGURE compilation.Eric S. Raymond2006-12-011-8/+9
| | | | Teach the daemon to ignore comment packets led with # and ended with \n.
* Separate the packet-level stuff from the rest of the library declarations.Eric S. Raymond2006-11-301-108/+111
| | | | Purely cosmetic change, shouldn't even compile different code.
* Check in regress-builder, after having used it to detect some minor buildEric S. Raymond2006-11-301-2/+2
| | | | problems created by the last big refactoring patch.
* Split the packet-sniffer internals out of the session structure. Eric S. Raymond2006-11-301-41/+49
| | | | | | | | | | | | | This is a big, super-intrusive patch but changes no logic at all -- it's all about ripping out some of the gps_device_t structure members into a new gps_packet_t structure. Even the driver API doesn't change at all, this is all libgpsd(3) internals being rearranged. The motivation here is that we want to kill off the ad-hoc Python implementation of a packet-sniffer in gpsfake. To do that we need to be able to write a "pure" packet sniffer that uses the same C code as the daemon's but without being welded to the rest of the libgpsd(3) code. This is the first step towards that.
* We temporarily need root privs to set up the nmea line discipline on OpenBSD.Chris Kuethe2006-11-291-0/+3
| | | | | This diff makes that happen, and tries to be forthcoming about when it is making gpsd run as root.
* Poll for the Navigation Parameters in SiRF message 0x13...Eric S. Raymond2006-11-271-0/+11
| | | | ...and revert our changes at deactivation time.
* Change the configurator method to take a packet sequence number argument...Eric S. Raymond2006-11-271-1/+1
| | | | ...the same way probe_subtype does, and for the same reason.
* Make back_to_nmea a public flag (rather than a per-driver private flag)...Eric S. Raymond2006-11-211-10/+1
| | | | | | ...that causes the driver's mode switcher to be invoked just after the revert method. This makes the revert methods for SiRF and EverMore unnecessary.
* Pull the "configurable" bit out of the context structure & make it per-driver...Eric S. Raymond2006-11-201-4/+4
| | | | | ...set by an argument to gpsd_active(). Changes the libgpsd(3) API, but not the client-side one.
* Split wrapup method into revert and wrapup. The revert method is onlt calledEric S. Raymond2006-11-141-2/+7
| | | | if configuration is enabled.
* Back-to-NMEA-on-exit logic for the Evermore, too.Eric S. Raymond2006-11-131-0/+7
| | | | Also fixes a typo in the previous change.
* First step towards restoring parameters on close: Eric S. Raymond2006-11-131-0/+3
| | | | undo switch to SiRF binary on close if driver started in SiRF NMEA.
* Compiler-warning and splint cleanup.Eric S. Raymond2006-11-101-1/+1
|
* Interleave NMEA subtype probes with received packets. This seems to Eric S. Raymond2006-11-071-1/+2
| | | | | *immediately* improve detection of SiRF devices in NMEA mode, and probably solves Davor Emard's Garmin GPS-10 bug as well (though this is not yet proven.
* Sigh...avoid harmless but *annoying* name collision...Eric S. Raymond2006-11-021-1/+1
| | | | | between our LOG_ERR and the syslog() macro by changing ours to LOG_ERROR.
* Define uniform log level macros.Eric S. Raymond2006-11-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | This patch defines a uniform set of log levels and changes all gpsd_report() instances to use them. In most cases (I'd say about 80%) this will make no observable difference, as the numeric log levels the code was using were not too badly inconsistent anyway. The new log level macros are defined and described in gpsd.h. The main thing I wanted was to be able to consistently force dumping of all I/O to devices and clients with -D 4. Some drivers didn't honor this. One or two still may not through lack of an internal write() wrapper that does logging; there will need to be some followup changes. Level 0 messages are always displayed, but to make the semantics clearer there are two defines LOG_ERR and LOG_SHOUT. Level 5 is still super-raw I/O reporting. Level 6 and 7 messages are tagged RAW_LOG+1 and RAW_LOG+2; I was particularly careful about these because we have one report of a user who is getting good results from Garmin serial only at -D 7 or up, and perish forbid I should interfere with that bug being found.
* Define a function to do ID reports with subtypes...Eric S. Raymond2006-11-011-0/+1
| | | | | | ...since we need it in like four places now. This version splints clean.
* Another small refactoring step.Eric S. Raymond2006-11-011-0/+1
| | | | Now we have saved_baud completely confined to serial.c
* More pure refactoring.Eric S. Raymond2006-11-011-0/+1
| | | | | We're trying to hide all instances of saved_baud preparatory to some logic changes in the serial layer.
* Pure refactoring. Eric S. Raymond2006-11-011-0/+1
| | | | | Give serial.c a new entry point so storage for TTY settings can stay private to serial.c rather than being tweaked in the Garmin driver.
* Make the subtype member long enough for a Garmin.Eric S. Raymond2006-10-311-1/+1
|
* Enable clients to display the GPS type.Eric S. Raymond2006-10-311-0/+1
|
* Make it possible to disable reconfiguration.Eric S. Raymond2006-10-301-1/+4
|
* Rename some methods for clarity.Eric S. Raymond2006-10-301-3/+3
|
* Split the "initializer" driver method in two.Eric S. Raymond2006-10-301-0/+1
| | | | | | | | | | | There is now a new method, "configurator". The initializer method probes the driver for subtype information (such as a firmware rev) without changing any device settings. The configurator method does things like selecting which packets should send. At the moment, these two methods are always called in tandem, so there has been effectively no change in behavior. Soon, though, gpsctrl will call the initializer method but *not* the configurator.
* Fix libgpsd(3) so it's usable when ntpshm_init() has not been called.Eric S. Raymond2006-10-301-1/+2
| | | | | While investigating this I discovered that part of a previous cange (moving an ntpshm_put() call out of the NMEA driver) was incorrect and reverted it.
* Clean up some unfortunate nomenclature discovered while working on gpscntrl.Eric S. Raymond2006-10-301-1/+1
|
* Rename config.h so it can be installed as gpsd_config.h...Chris Kuethe2006-10-261-1/+0
| | | | | | ...for those who want to build their own apps linked against libgps and want the headers to work. Works on OpenBSD, tested by Jeff Francis on OS X and Linux
* Eliminate duplicative code in the Truenorth driver.Eric S. Raymond2006-10-261-1/+1
| | | | Make the wakeup capability a function returning void.
* Add a new capability to the generic driver structure: wakeup...Eric S. Raymond2006-10-261-0/+1
| | | | | | | | | | ...a function to be called just after the autobaud hunt sets the line speed each time. Use this to get rid of the internal baud hunt loop in the True North driver; instead, the ID query and rate-setting strings will be sent by the wakeup hook. Note: this patch is untested. I'm pretty certain it will work, but somebody needs to try it on live hardware.
* Move the logic for poking the NTP daemomn out of the NMEA driver.Eric S. Raymond2006-10-231-3/+1
|