summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bénier <clement.benier@iot.bzh>2018-06-29 18:22:55 +0200
committerClément Bénier <clement.benier@iot.bzh>2018-06-29 18:22:55 +0200
commit3a1abbbff9f868324cca93f4bf03618552542391 (patch)
treee0bfdbf6a5237574a75cd9869724561d2d3592d8
parent72264cda9b62688cc71c3e603fea561963db8295 (diff)
Change-Id: Iba5fb857ae7e87aa8e2f142495e894aa634229b7 Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
-rw-r--r--README.md44
1 files changed, 41 insertions, 3 deletions
diff --git a/README.md b/README.md
index 85f97e5..852069c 100644
--- a/README.md
+++ b/README.md
@@ -31,12 +31,50 @@ For now, there are 3 different events matching with the different available sens
The frequency is in Hertz, if the frequency is not set, events are triggered via a file descriptor.
+## Client Demo example
+
+Here is an example to show how to get data from iiodevices with the demo client.
+
+### Launch afb-client-demo
+
+First, launch the client demo with right port and right TOKEN, the example below
+matches with ff(6.x) AGL version.
+
+``` bash
+afb-client-demo ws://localhost:1055/api?token=HELLO
+```
+
+### Subscribe to acceleration
+
+Here is a list of different examples to subscribe to acceleration data.
+
+#### Subscribe to acceleration with x,y and z axis with a frequency of 0.1 Hz
+
+``` bash
+iiodevices subscribe { "event": "acceleration", "args": "xyz", "frequency": "0.1" }
+```
+
+#### Subscribe to acceleration with x and z axis
+
+``` bash
+iiodevices subscribe { "event": "acceleration", "args": "xz" }
+```
+
+Events will be sent each time a new value is available (sent by iiodevice).
+
+### Unsubscribe to acceleration
+
+``` bash
+iiodevices unsubscribe { "event": "acceleration" }
+```
+
## Remaining issues
-- Provide a json config file so that it configures the device name and the channel name.
+- Provide a json file to configure the device name and the channel name.
- Handle several values simultaneously, see triggers.
-- Update it to other iiodevices.
-- only read channel values at the maximum frequency.
+- Update this binding for other iiodevices.
+- Only read channel values at the maximum frequency.
+- Change args values into json arrays.
## M3ULCB Kingfisher