aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-07-08 16:37:05 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-07-08 16:37:10 +0200
commit00eb71805ccf4b2c47ba8322fd5d8bb85c44ae0e (patch)
tree8cb7b9233411508c3faf6214cbacd2cac5895a38
parentcdd89665bb56c6a28d299dd392692b4c0da4cab0 (diff)
more document on verbs
Change-Id: Iaa41e3387fd2d85214e1bdb39ba211347df36615 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/af-gps-binding.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/af-gps-binding.c b/src/af-gps-binding.c
index c304160..f404b83 100644
--- a/src/af-gps-binding.c
+++ b/src/af-gps-binding.c
@@ -919,6 +919,26 @@ static int get_type_for_req(struct afb_req req, enum type *type)
/*
* Get the last known position
+ *
+ * parameter of the get are:
+ *
+ * type: string: the type of position expected (defaults to "WGS84" if not present)
+ *
+ * returns the position
+ *
+ * The valid types are:
+ *
+ * +==========+=======================+=======+==========+=======+
+ * | type | longitude & latitude | speed | altitude | track |
+ * +==========+=======================+=======+==========+=======+
+ * | WGS84 | degre | m/s | | |
+ * +----------+-----------------------+-------+ | |
+ * | DMS.km/h | | km/h | | |
+ * +----------+ +-------+ meter | degre |
+ * | DMS.mph | deg°min'sec"X | mph | | |
+ * +----------+ +-------+ | |
+ * | DMS.kn | | kn | | |
+ * +==========+=======================+=======+==========+=======+
*/
static void get(struct afb_req req)
{
@@ -929,6 +949,17 @@ static void get(struct afb_req req)
/*
* subscribe to notification of position
+ *
+ * parameters of the subscription are:
+ *
+ * type: string: the type of position expected (defaults to WCS84 if not present)
+ * see the list above (get)
+ * period: integer: the expected period in milliseconds (defaults to 2000 if not present)
+ *
+ * returns an object with 2 fields:
+ *
+ * name: string: the name of the event without its prefix
+ * id: integer: a numeric identifier of the event to be used for unsubscribing
*/
static void subscribe(struct afb_req req)
{
@@ -955,6 +986,10 @@ static void subscribe(struct afb_req req)
/*
* unsubscribe a previous subscription
+ *
+ * parameters of the unsubscription are:
+ *
+ * id: integer: the numeric identifier of the event as returned when subscribing
*/
static void unsubscribe(struct afb_req req)
{