aboutsummaryrefslogtreecommitdiffstats
path: root/test/afb-test/etc
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-04-11 20:30:21 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2019-04-11 20:39:12 +0200
commitd23419e94d5edf4121226754aeb38a6bfdfcdf8b (patch)
tree4378d39286776ef0829fddceadfb5a9d22923682 /test/afb-test/etc
parent6503346aced4baada6ea7dec88fe9bbbb03f9b57 (diff)
Cleaning and updating defaults config files
This get rid of nonexistent binding and switch back to the basic configuration by default instead of the TXC one which is used for test purpose mainly since the TXC binding is emulated by the binding test framework. Bug-AGL: SPEC-2312 Change-Id: I7cfd4a9c56d1347bcf5c66d92f0762aa8961816f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'test/afb-test/etc')
-rw-r--r--test/afb-test/etc/control-signal-composer.json34
-rw-r--r--test/afb-test/etc/sig-txc.json110
-rw-r--r--test/afb-test/etc/sources-txc.json17
3 files changed, 161 insertions, 0 deletions
diff --git a/test/afb-test/etc/control-signal-composer.json b/test/afb-test/etc/control-signal-composer.json
new file mode 100644
index 0000000..d6083e1
--- /dev/null
+++ b/test/afb-test/etc/control-signal-composer.json
@@ -0,0 +1,34 @@
+{
+ "$schema": "http://iot.bzh/download/public/schema/json/signal-composer-schema.json",
+ "metadata": {
+ "uid": "Signal Composer",
+ "version": "1.0",
+ "api": "signal-composer",
+ "info": "Signal composer Configuration",
+ "require": ["txc-binding"]
+ },
+ "plugins": [
+ {
+ "uid": "convert",
+ "info": "LUA fonctions used to convert standard unit.",
+ "libs": "unit-conversion.lua"
+ },
+ {
+ "uid": "gps-callbacks",
+ "info": "Manage interaction with gps service",
+ "libs": "gps.ctlso"
+ },
+ {
+ "uid": "builtin",
+ "info": "Builtin routine for onReceived or getSignals routines",
+ "libs": "builtin.ctlso",
+ "lua": { "prefix": "composer", "functions": "setSignalValueWrap"}
+ }
+ ],
+ "signals": {
+ "files": ["sig-txc" ]
+ },
+ "sources": {
+ "files": "sources-txc"
+ }
+}
diff --git a/test/afb-test/etc/sig-txc.json b/test/afb-test/etc/sig-txc.json
new file mode 100644
index 0000000..ec9ed81
--- /dev/null
+++ b/test/afb-test/etc/sig-txc.json
@@ -0,0 +1,110 @@
+{
+ "$schema": "http://iot.bzh/download/public/schema/json/signal-composer-schema.json",
+ "signals": [
+ {
+ "uid": "vehicle_speed",
+ "event": "txc-binding/vehicle_speed",
+ "retention": 30,
+ "unit": "km/h",
+ "getSignalsArgs": {
+ "event": "vehicle_speed"
+ },
+ "onReceived": {
+ "action": "lua://convert#_Unit_Converter",
+ "args": {
+ "from": "km/h",
+ "to": "mi/h"
+ }
+ }
+ },
+ {
+ "uid": "engine_speed",
+ "event": "txc-binding/engine_speed",
+ "retention": 30,
+ "unit": "rpm",
+ "getSignalsArgs": {
+ "event": "engine_speed"
+ }
+ },
+ {
+ "uid": "fuel_level",
+ "event": "txc-binding/fuel_level",
+ "retention": 30,
+ "unit": "liter",
+ "getSignalsArgs": {
+ "event": "fuel_level"
+ }
+ },
+ {
+ "uid": "accelerator_pedal_position",
+ "event": "txc-binding/accelerator_pedal_position",
+ "retention": 30,
+ "getSignalsArgs": {
+ "event": "accelerator_pedal_position"
+ }
+ },
+ {
+ "uid": "torque_at_transmission",
+ "event": "txc-binding/torque_at_transmission",
+ "retention": 30,
+ "unit": "Nm",
+ "getSignalsArgs": {
+ "event": "torque_at_transmission"
+ }
+ },
+ {
+ "uid": "steering_wheel_angle",
+ "event": "txc-binding/steering_wheel_angle",
+ "retention": 30,
+ "unit": "degrees",
+ "getSignalsArgs": {
+ "event": "steering_wheel_angle"
+ }
+ },
+ {
+ "uid": "fuel_consumed_since_restart",
+ "event": "txc-binding/fuel_consumed_since_restart",
+ "retention": 30,
+ "unit": "liter",
+ "getSignalsArgs": {
+ "event": "fuel_consumed_since_restart"
+ }
+ },
+ {
+ "uid": "odometer",
+ "event": "txc-binding/odometer",
+ "retention": 30,
+ "unit": "km",
+ "getSignalsArgs": {
+ "event": "odometer"
+ }
+ },
+ {
+ "uid": "latitude",
+ "event": "txc-binding/latitude",
+ "retention": 30,
+ "unit": "degrees",
+ "getSignalsArgs": {
+ "event": "latitude"
+ }
+ },
+ {
+ "uid": "longitude",
+ "event": "txc-binding/longitude",
+ "retention": 30,
+ "unit": "degrees",
+ "getSignalsArgs": {
+ "event": "longitude"
+ }
+ },
+ {
+ "uid": "heading",
+ "depends": ["longitude", "latitude"],
+ "retention": 30,
+ "unit": "degrees",
+ "onReceived": {
+ "action": "plugin://gps-callbacks#getHeading"
+ }
+ }
+ ]
+}
diff --git a/test/afb-test/etc/sources-txc.json b/test/afb-test/etc/sources-txc.json
new file mode 100644
index 0000000..5f41370
--- /dev/null
+++ b/test/afb-test/etc/sources-txc.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "http://iot.bzh/download/public/schema/json/signal-composer-schema.json",
+ "sources": [
+ {
+ "uid": "txc-binding-demo",
+ "api": "txc-binding",
+ "info": "Use txc-binding demo binding as signals provider",
+ "init": {
+ "action": "api://txc-binding#start",
+ "args": {"filename": "var/nyc-downtown-crosstown.json"}
+ },
+ "getSignals": {
+ "action": "api://txc-binding#subscribe"
+ }
+ }
+ ]
+}