gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH 4/4] Describe gps_mainloop()


From: Robert Norris
Subject: [gpsd-dev] [PATCH 4/4] Describe gps_mainloop()
Date: Sat, 4 Mar 2017 18:59:33 +0000

TESTED:
libgps.3 man page still created
---
 libgps.xml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/libgps.xml b/libgps.xml
index b96b7932..a0e7571f 100644
--- a/libgps.xml
+++ b/libgps.xml
@@ -66,6 +66,12 @@ C:
     <paramdef>void *<parameter>data</parameter></paramdef>
 </funcprototype>
 <funcprototype>
+<funcdef>int <function>gps_mainloop</function></funcdef>
+    <paramdef>struct gps_data_t *<parameter>gpsdata</parameter></paramdef>
+    <paramdef>int <parameter>timeout</parameter></paramdef>
+    <paramdef>void (*<parameter>hook</parameter>)(struct gps_data_t 
*gpsdata)</paramdef>
+</funcprototype>
+<funcprototype>
 <funcdef>const char *<function>gps_errstr</function></funcdef>
     <paramdef>int <parameter>err</parameter></paramdef>
 </funcprototype>
@@ -166,6 +172,13 @@ following <function>gps_read()</function>; in that 
context, because the
 latter does not block, it is probably better to write a simple read
 loop.</para>
 
+<para><function>gps_mainloop()</function> enables the provided hook
+function to be continually called whenever there is gpsd data.
+The second argument is the maximum amount of time to wait (in microseconds)
+on input before exiting the loop (and return a value of -1).
+It will also return a negative value on various errors.
+</para>
+
 <para><function>gps_unpack()</function> parses JSON from the argument
 buffer into the target of the session structure pointer argument.
 Included in case your application wishes to manage socket I/O
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]