[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-users] [gpsd-dev] Getting the driver-switching logic right
From: |
Greg Troxel |
Subject: |
Re: [gpsd-users] [gpsd-dev] Getting the driver-switching logic right |
Date: |
Sun, 13 Oct 2013 11:20:13 -0400 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.4 (berkeley-unix) |
I think your proposal makes sense. Two comments/concerns:
The notion of a single fallback driver in the processing chain seems
arbitrarily limiting. And the notion of "unique packet for a driver
with control capabilities" seems overly broad. I see (perhaps with
overly zealous CS complexity) a DAG of drivers, where a device can be
handled by any driver downstream of the right one, with the most
upstream one being correct. This is essentially what you've done,
except that there is only one link in the DAG from "right driver" to
"NMEA-flavor driver, with implicit links from the special-NMEA drivers
to the generic NMEA driver. So perhaps the world fits now and will
fit into your model. With the full DAG model, the rule is to move
upstream only, or really not to move downstream on a match.
These rules have to interact with device changes. I think your rules
mostly work, but in rule 2, I think a check "and the packet is
consistent with the currently selected driver" is needed.
pgpyLqfSmLehE.pgp
Description: PGP signature
Re: [gpsd-users] [gpsd-dev] Getting the driver-switching logic right, Michael R. Davis, 2013/10/14