| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Add notes as reminder for next change.
|
|
|
|
| |
A tilda, not a dash.
|
| |
|
| |
|
|
|
|
| |
Found a bug. Variable steam s/b stream.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
So client can check for matching python module version
|
| |
|
| |
|
|
|
|
| |
We have to support Python 2 for a bit longer.
|
|
|
|
| |
So gps/client crashes on a failed connection.
|
| |
|
|
|
|
| |
Note the program pep8 is now called pycodestyle
|
|
|
|
| |
Thanks to Virgin Orbit for their support on this patch.
|
|
|
|
| |
The reconnect patch lost host and port.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Whoops, the auto reconnect patch broke scons check.
Signed-off-by: Gary E. Miller <gem@rellim.com>
|
|
|
|
| |
Signed-off-by: Gary E. Miller <gem@rellim.com>
|
|
|
|
|
|
|
|
|
|
| |
- moved WATCH_* options to their own file to deduplicate definition
- defaults behavior is to exit-on-failure
- activated by calling to `gps.gps(..., reconnect=True)`
- refactors stream(...) function to deduplicate processing
- added dictionary methods to 'class dictwrapper'
Signed-off-by: Gary E. Miller <gem@rellim.com>
|
| |
|
|
|
|
|
| |
pylint complains when a class function is overridden with a function
taking different arguments.
|
| |
|
| |
|
|
|
|
|
|
| |
Not sure how to decode class DEVICES yet...
pylint does not like FIXME, and not broken, just a TODO (enhancement).
|
|
|
|
|
|
|
|
|
|
|
| |
This doesn't fix all complaints by pylint, but significantly
reduces their number. Ditto for pep8 complaints.
Also makes a couple of related cosmetic edits.
TESTED:
Ran "scons build-all check" with no errors.
Both "pylint" and "pep8" targets report fewer issues.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default port number used by gpsfake is (probably incorrectly)
specified as a string rather than an integer. The shmkey derivation
added in commit 1f209455 expects an integer, causing a failure when
the port is not explicitly specified. This fix forces an integer
where needed.
TESTED:
Ran "scons build-all check".
Previously failing gpsfake case now works correctly.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this change, multiple gpsd instances would normally share a
single SHM segment, confusing anyone using it. This was a problem
either when running parallel regression tests, or even when running a
single test with a system gpsd also running. Now, each gpsd instance
launched by fake.py gets a SHM ID of the form 0x4770xxxx, where xxxx
is the TCP or UDP port number. The high-order part is 0x4770 ('Gp')
instead of 0x4750 ('GP') to ensure that it doesn't collide with the
standard 'GPSD'.
This does not do anything about 'NTPx' SHM segments.
TESTED:
Ran "scons -j24 check", and observed many 'Gpxx' SHM segments with
ipcs, all disappearing by the end of testing.
|
|
|
|
|
|
|
|
|
|
|
| |
This generates a more specific exception when a connect from
client_add() fails due to the daemon's having died. Aside from real
daemon failures, this also catches some broken valgrind cases.
TESTED:
Ran "scons build-all check" on OSX. Also ran failing valgrind-audit
and observed more informative (and less verbose) backtrace. Note that
this is due to an OSX issue with valgrind itself, not the daemon.
|
|
|
|
|
|
|
|
|
| |
This reduces duplicated code by using subclasses for local exceptions.
It's not entirely clear that limiting __str__() to only certain
exceptions is necessary, but it preserves that behavior.
TESTED:
Ran "scons build-all check" on several platforms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This does two things:
1) It splits DaemonInstance into a base class and subclass, where the
base class is a more generic subprogram runner. This makes it easier
to add additional program runners without code duplication.
2) It switches from os.system() to subprocess.Popen() as the mechanism
for running subprograms. This is generally cleaner, and in
"background mode" is able to use natural parallelism rather than the
ugly kludge of using shell backgrounding. Aside from being less ugly,
this also makes termination of the "background" process directly
visible, avoiding, e.g., hangs when valgrind bombs.
TESTED:
Ran "scons build-all check" on several platforms. Also ran
valgrind-audit where valgrind was installed, though this has issues on
some platforms.
|
|
|
|
|
|
|
|
|
|
| |
This value is only provided as a convenience, and has no internal
function at all. It was never updated to reflect the two increases in
gps.h. The new value would be excessive for xgps, but that no longer
uses this definition.
TESTED:
No point.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given that the data returned bye fake.py may include binary data,
'bytes' is a more appropriate type. Unlike the client API, where it's
easy to provide both return types, it would be less convenient to do
that here, so 'bytes' is preferred as the one choice (and is
consistent with network sockets).
When sending such data to stdout (or stderr), the straightforward
method is to write to sys.stdXXX.buffer rather than sys.stdXXX. That
doesn't exist in Python 2, but a helper function is now provided to
get the appropriate 'bytes' stream for stdXXX.
Since no previous *release* of GPSD is compatible with Python 3,
changing this now doesn't break anything based on released code.
TESTED:
Ran "scons check" on OSX with all supported Python versions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Python 2, 'bytes' and 'str' are synonyms, but in Python 3 they are
not. Since the client may return binary data in some cases, 'bytes'
is a more appropriate data type. Rather than requiring double
conversions in this case (the socket returns 'bytes'), this adds an
alternative response item which is typed as 'bytes'.
Although the accessor method 'data()' has always existed, it's
shadowed by a name collision in some cases, resulting in the
requirement that the caller access the 'response' item directly (as
noted in the documentation). Thus, it's not possible to avoid the
conversion to 'str' in the cases where it isn't actually used.
This change doesn't bother to add an accessor method for 'bresponse',
for consistency with the way the API is normally used, though that
should be fixed if this aspect of the API is ever cleaned up.
TESTED:
Ran "scons check" on OSX with all supported versions of Python.
|
| |
|
| |
|