diff options
Diffstat (limited to 'monitor_proto.c')
-rw-r--r-- | monitor_proto.c | 37 |
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'. + */ |