summaryrefslogtreecommitdiffstats
path: root/docs/part-1/4-SignalComposerAPI.md
diff options
context:
space:
mode:
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"}
+```