summaryrefslogtreecommitdiffstats
path: root/docs/part-1/3-Plugins.md
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-12-18 15:20:13 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-18 17:40:02 +0100
commit1b3411359d6a0e53f12811436a5410104816da34 (patch)
tree0f00b876b61eea6ffc46ed6e4d0f20914c399e1d /docs/part-1/3-Plugins.md
parent7ecafda0fb26647381f45b45f5b7d1ed0d252165 (diff)
Update documentation
Change-Id: I82edfc5111805cf5e2affad1a6366d1144006fbf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'docs/part-1/3-Plugins.md')
-rw-r--r--docs/part-1/3-Plugins.md11
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/part-1/3-Plugins.md b/docs/part-1/3-Plugins.md
index cbc7284..50ece7b 100644
--- a/docs/part-1/3-Plugins.md
+++ b/docs/part-1/3-Plugins.md
@@ -1,6 +1,15 @@
# Plugins
-Plugins are C/C++ shared library that is loaded by the binding to execute some
+Plugins are C/C++ shared library loaded by the binding to execute some
simple routine. Routine could be on reception of a new signal or at sources
initialization time or signal subscription with the respective JSON field
**onReceived**, **init** and **getSignals**.
+
+A default plugin (builtin) is provided with 2 functions:
+
+- **defaultOnReceived**: set and record a new signal value and its timestamp
+ in the signal composer service. It simply tooks the incoming event JSON object
+ and search for *key* **value** and **timestamp** then call function
+ `setSignalValue`.
+- **setSignalValueWrap**: a **lua2c** function the could be called from any LUA
+ script to record a new signal value.