summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-03-09 19:54:00 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-03-09 19:54:00 +0000
commitb52f7f6cbd5e7478065ab42c848baac08731ccab (patch)
treeca3d218192379079478a3814eaf509a27556669d
parentc6508d944b31dca62fba6ea1d4c57a275e91d811 (diff)
downloadgpsd-b52f7f6cbd5e7478065ab42c848baac08731ccab.tar.gz
Document the simplification in the driver interface.
-rw-r--r--www/hacking.html9
-rw-r--r--www/writing-a-driver.xml24
2 files changed, 12 insertions, 21 deletions
diff --git a/www/hacking.html b/www/hacking.html
index 9ee7f89b..93916f58 100644
--- a/www/hacking.html
+++ b/www/hacking.html
@@ -1064,14 +1064,11 @@ by an elaborate state machine in packet.c. The purpose of this
state machine is so gpsd can autobaud and recognize GPS types
automatically. The other way for a driver to be invoked is for
the state machine to recognize a special packet type associated
-with the driver.<p>
+with the driver. It will look through the list of drivers compiled
+in to find the (first) one that handles that packet type.<p>
<p>If you have to add a new packet type to packet.c, add tests for the
-type to the TESTMAIN code. Also, remember to tell gpsfake how to
-gather the new packet type so it can handle logs for regression
-testing. The relevant function in gpsfake is packet_get(). It
-doesn't have to deal with garbage or verify checksums, as we assume
-the logfiles will be clean packet sequences.</p>
+type to the TESTMAIN code.</p>
<p>Probe-detect methods are intended for drivers that don't use the packet
getter because they read from a device with special kernel support.
diff --git a/www/writing-a-driver.xml b/www/writing-a-driver.xml
index 13834893..044c4c92 100644
--- a/www/writing-a-driver.xml
+++ b/www/writing-a-driver.xml
@@ -17,6 +17,15 @@
<revhistory>
<revision>
<revnumber>1.6</revnumber>
+ <date>9 Mar 2009</date>
+ <authorinitials>er</authorinitials>
+ <revremark>
+ Updated by esr; libgpsd_core.c no longr requires modification
+ when you add a driver.
+ </revremark>
+ </revision>
+ <revision>
+ <revnumber>1.6</revnumber>
<date>1 Mar 2009</date>
<authorinitials>er</authorinitials>
<revremark>
@@ -392,11 +401,6 @@ files:</para>
<entry><para>data type definitions</para></entry>
</row>
<row>
-<entry><filename>libgpsd_core.c</filename></entry>
-<entry><para>library to access GPSs at low
-level</para></entry>
-</row>
-<row>
<entry><filename>packet.c</filename></entry>
<entry><para>packet sniffing state machine</para></entry>
</row>
@@ -477,16 +481,6 @@ declarations of prototypes in <quote>
<userinput>**gpsd_drivers</userinput></quote> that the new driver
needs to interface to the rest of the code.</para>
-<para>The function of <quote><filename>libgpsd_core.c</filename>
-</quote> is to provide some low-level entries into <application>
-gpsd</application> from external client software since these cannot
-directly access the GPS or its port when the daemon is running.
-The change is again quite small. It is just an extra entry in the
-<quote><function>gpsd_poll</function></quote> code to include a
-packet switch to the Jupiter-T driver if the packet sniffer finds
-a matching packet.</para>
-
-
<para>The file <quote><filename>packet.c</filename></quote> is
the state engine which scans packets as they arrive and tries to
match them to an existing driver. Here is where our driver will