summaryrefslogtreecommitdiff
path: root/monitor_proto.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-02-19 10:23:22 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-02-19 10:23:22 +0000
commit6be305ebfd924346e7e566b5bc84aaa14c88e34a (patch)
tree2f3d0e8e1891b53560cacb8b61391f06da2c8fc3 /monitor_proto.c
parent2804444cf1e2ea0ca594109f7fad610aab5aa677 (diff)
downloadgpsd-6be305ebfd924346e7e566b5bc84aaa14c88e34a.tar.gz
More documentation and tweaks on the monitor infrastructure.
Diffstat (limited to 'monitor_proto.c')
-rw-r--r--monitor_proto.c37
1 files changed, 23 insertions, 14 deletions
diff --git a/monitor_proto.c b/monitor_proto.c
index 39718954..7d887553 100644
--- a/monitor_proto.c
+++ b/monitor_proto.c
@@ -33,20 +33,8 @@
* Your monitor object will become the handler for incoming packets whenever
* the driver your object points at is selected.
*
- * bool monitor_control_send(unsigned char *buf, size_t len)
- * Ship a packet payload to the device. Calls the driver send_control()
- * method to add headers/trailers/checksum; also dumps the sent
- * packet to the packet window, if the send_control() is playing
- * nice by using session.msgbuf to assemble the message.
- *
- * void monitor_complain(const char *fmt, ...)
- * Post an error message to the command window, wait till user presses a key.
- * You get to make sure the message will fit.
- *
- * void monitor_fixframe(WINDOW *win)
- * Fix the frame of win to the right of the current location by redrawing
- * ACS_VLINE there. Useful after doing wclrtoeol() and writing on the
- * line.
+ * A comment following the method descriptions explains some available
+ * helper functions.
*/
extern const struct gps_type_t PROTO;
@@ -134,3 +122,24 @@ const struct monitor_object_t PROTO_mmt = {
*/
.driver = &PROTO,
};
+
+/*
+ * Helpers:
+ *
+ * bool monitor_control_send(unsigned char *buf, size_t len)
+ * Ship a packet payload to the device. Calls the driver send_control()
+ * method to add headers/trailers/checksum; also dumps the sent
+ * packet to the packet window, if the send_control() is playing
+ * nice by using session.msgbuf to assemble the message.
+ *
+ * void monitor_complain(const char *fmt, ...)
+ * Post an error message to the command window, wait till user presses a key.
+ * You get to make sure the message will fit.
+ *
+ * void monitor_fixframe(WINDOW *win)
+ * Fix the frame of win to the right of the current location by redrawing
+ * ACS_VLINE there. Useful after doing wclrtoeol() and writing on the
+ * line.
+ *
+ * The libgpsd session object is accessible as the global variable 'session'.
+ */