summaryrefslogtreecommitdiff
path: root/gps
diff options
context:
space:
mode:
authorDaniel_M_Williams <equipoise@gmail.com>2018-03-29 20:08:58 -0700
committerGary E. Miller <gem@rellim.com>2018-03-29 20:08:58 -0700
commit9429b1a5498e0e1ea68d5e53245c897dda52e5aa (patch)
treefd83bf76abd975033222f18c760c97850314649c /gps
parent70824d3f0cc4711de72300c35f12e8968ef2bf7b (diff)
downloadgpsd-9429b1a5498e0e1ea68d5e53245c897dda52e5aa.tar.gz
Client-side Python libraries may automatically reconnect
- 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>
Diffstat (limited to 'gps')
-rw-r--r--gps/watch_options.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/gps/watch_options.py b/gps/watch_options.py
new file mode 100644
index 00000000..7c1fde15
--- /dev/null
+++ b/gps/watch_options.py
@@ -0,0 +1,16 @@
+# WATCH options - controls what data is streamed, and how it's converted
+WATCH_ENABLE = 0x000001 # enable streaming
+WATCH_DISABLE = 0x000002 # disable watching
+WATCH_JSON = 0x000010 # JSON output
+WATCH_NMEA = 0x000020 # output in NMEA
+WATCH_RARE = 0x000040 # output of packets in hex
+WATCH_RAW = 0x000080 # output of raw packets
+
+WATCH_SCALED = 0x000100 # scale output to floats
+WATCH_TIMING = 0x000200 # timing information
+WATCH_DEVICE = 0x000800 # watch specific device
+WATCH_SPLIT24 = 0x001000 # split AIS Type 24s
+WATCH_PPS = 0x002000 # enable PPS JSON
+
+WATCH_NEWSTYLE = 0x010000 # force JSON streaming
+WATCH_OLDSTYLE = 0x020000 # force old-style streaming