[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-users] New driver switching logic
From: |
Eric S. Raymond |
Subject: |
[gpsd-users] New driver switching logic |
Date: |
Wed, 16 Oct 2013 16:13:24 -0400 (EDT) |
gpsmon is working correctly again in git head.
After wrestling with complicated deiver-switching rules for the last
week, I've arrived at some brutally simple ones:
Drivers are now sorted into two classes: sticky and non-sticky. A
driver is flagged "sticky" if it has control methods (speed changer,
mode changer, rate changer) or an identity we don't want to forget.
Importantly, Generic NMEA and AIVDM and the JSON slave driver are
non-sticky.
Here's a table:
. hook . send NMEA . Generic NMEA
. hook trigger send NMEA sticky Ashtech
. hook trigger send NMEA sticky Delorme TripMate
. hook trigger send NMEA sticky Pre-2003 Delorme EarthMate
. hook trigger send NMEA sticky Furuno Electric GH-79L4
control hook trigger send NMEA sticky Garmin NMEA
control hook trigger send NMEA sticky MTK-3301
. hook trigger send NMEA sticky OceanServer Digital Compass
. hook trigger send NMEA sticky San Jose Navigation FV18
control hook trigger send NMEA sticky True North
control hook . send NMEA sticky Jackson Labs Fury
. . . . binary . AIVDM
control hook . send binary sticky EverMore binary
control . . send binary sticky Garmin Serial binary
. hook probe send binary sticky Garmin USB binary
control hook probe send binary sticky GeoStar binary
. . . . binary sticky iTalk binary
. hook . send binary sticky Oncore binary
control hook . send binary sticky Navcom binary
control hook . send binary sticky SiRF binary
control hook . send binary sticky SuperStarII binary
control hook probe send binary sticky Trimble TSIP binary
control hook . send binary sticky uBlox UBX binary
control . . send binary sticky Zodiac binary
. . . . binary . RTCM104V2
. . . . binary . RTCM104V3
. . . . binary . Garmin Simple Text
. . . . binary . JSON slave driver
The rules are:
(1) Always switch drivers to match the incoming packet type. If the
new driver is sticky, save a pointer to it.
(2) After processing the packet, revert to the last sticky driver you
have seen.
The assumption here is that no device will ever match two *different*
sticky drivers. Once you've seen one, you keep it, and let packets
for non-sticky driver types pass through without changing it.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
The right to buy weapons is the right to be free.
-- A.E. Van Vogt, "The Weapon Shops Of Isher", ASF December 1942
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gpsd-users] New driver switching logic,
Eric S. Raymond <=