summaryrefslogtreecommitdiffstats
path: root/docs/part-1/4-SignalComposerAPI.md
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-19 16:43:41 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commite11314b2e9fef34f569bb7b042b432aed661cdc0 (patch)
treeaaaae4d5820238e53a555f290a0a1ea8faa28b9e /docs/part-1/4-SignalComposerAPI.md
parentf4fba8a2744991ff8c5cb8af4a67c7d9456f1057 (diff)
Added documentation
Change-Id: Iaa6bb0470652d3d0dc97c6320dbf210567ccec80 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'docs/part-1/4-SignalComposerAPI.md')
-rw-r--r--docs/part-1/4-SignalComposerAPI.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/part-1/4-SignalComposerAPI.md b/docs/part-1/4-SignalComposerAPI.md
new file mode 100644
index 0000000..6e53800
--- /dev/null
+++ b/docs/part-1/4-SignalComposerAPI.md
@@ -0,0 +1,33 @@
+# Signal Composer API
+
+## get
+
+You can get a signal value be requesting the API with the verb *get*:
+
+```json
+signal-composer get {"signal": "vehicle_speed", "options": {"average": 10}}
+signal-composer get {"signal": "vehicle_speed", "options": {"minimum": 10}}
+signal-composer get {"signal": "vehicle_speed", "options": {"maximum": 10}}
+signal-composer get {"signal": "vehicle_speed"}
+```
+
+You apply apply some simple mathematical function by default present in the binding
+, by default **last** is used:
+
+- **average**: make an average on X latest seconds.
+- **minimum**: return the minimum value found in the X latest seconds.
+- **maximum**: return the maximum value found in the X latest seconds.
+- **last**: return the latest value.
+
+## list
+
+Verb **list** will output the list of defined signals.
+
+## loadConf
+
+Verb **loadConf** let you add new files to be able to add new **sources** or
+**signals**.
+
+```json
+signal-composer loadConf {"filepath": "/path/to/your/json/file.json"}
+```