Surprise found while reading the code

Eric S. Raymond esr at thyrsus.com
Sat Jun 25 05:20:30 UTC 2016


Mark Atwood <fallenpegasus at gmail.com>:
> Cool.
> 
> I need to fill in my ignorance about the parse driver, and prompt a
> discussion about which other drivers can be superseded by additions to the
> parse driver.
> 
> ..m

It's a clever idea.  A posse of Germans apparently headed by one Frank Kardel
noticed that a lot of clock-radio drivers are structurally very similar:
repeatedly read a text packet from the device, parse it into a timestamp,
feed the timestamp to the sync algorothms, repeat.

So, why not split a driver into the one part that does the packet parsing
and everything else?  Allow the packet parser to vary by subtype; then
make it table-driven on the assumption that things like (e..g.) the ASCII
decimal digits for hour of day will always be at a constant oggset in the
packet.

Many of the other older drivers, like Spectracomm Type 2, could doubtless be
fit into this framework. I wouldn't want to do it without having the equipment
to live-test on, though.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


More information about the devel mailing list