From ddbf88e33be00bfac3a20bf3861a12361cf0f3c1 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 11 Apr 2019 20:30:21 +0200 Subject: 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 --- conf.d/project/etc/control-basic-conf.json | 34 -------- conf.d/project/etc/control-signal-composer.json | 19 ++-- conf.d/project/etc/control-txc-demo.json | 34 ++++++++ conf.d/project/etc/sig-geoloc.json | 16 ++-- conf.d/project/etc/sources-basic.json | 27 ++++++ conf.d/project/etc/sources.json | 32 ------- test/afb-test/etc/control-signal-composer.json | 34 ++++++++ test/afb-test/etc/sig-txc.json | 110 ++++++++++++++++++++++++ test/afb-test/etc/sources-txc.json | 17 ++++ 9 files changed, 236 insertions(+), 87 deletions(-) delete mode 100644 conf.d/project/etc/control-basic-conf.json create mode 100644 conf.d/project/etc/control-txc-demo.json create mode 100644 conf.d/project/etc/sources-basic.json delete mode 100644 conf.d/project/etc/sources.json create mode 100644 test/afb-test/etc/control-signal-composer.json create mode 100644 test/afb-test/etc/sig-txc.json create mode 100644 test/afb-test/etc/sources-txc.json diff --git a/conf.d/project/etc/control-basic-conf.json b/conf.d/project/etc/control-basic-conf.json deleted file mode 100644 index 1331544..0000000 --- a/conf.d/project/etc/control-basic-conf.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$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": ["low-can"] - }, - "plugins": [ - { - "uid": "low-can-callbacks", - "info": "Manage interaction with low-can service", - "libs": "low-can.ctlso" - }, - { - "uid": "gps-callbacks", - "info": "Manage interaction with gps service", - "libs": "gps.ctlso" - }, - { - "uid": "convert", - "info": "LUA fonctions used to convert standard unit.", - "spath": "/tmp", - "libs": "unit-conversion.lua" - } - ], - "signals": { - "files": ["sig-doors", "sig-demoboard", "sig-geoloc" ] - }, - "sources": { - "files": "sources" - } -} diff --git a/conf.d/project/etc/control-signal-composer.json b/conf.d/project/etc/control-signal-composer.json index d6083e1..0ed9fac 100644 --- a/conf.d/project/etc/control-signal-composer.json +++ b/conf.d/project/etc/control-signal-composer.json @@ -5,13 +5,13 @@ "version": "1.0", "api": "signal-composer", "info": "Signal composer Configuration", - "require": ["txc-binding"] + "require": ["low-can"] }, "plugins": [ { - "uid": "convert", - "info": "LUA fonctions used to convert standard unit.", - "libs": "unit-conversion.lua" + "uid": "low-can-callbacks", + "info": "Manage interaction with low-can service", + "libs": "low-can.ctlso" }, { "uid": "gps-callbacks", @@ -19,16 +19,15 @@ "libs": "gps.ctlso" }, { - "uid": "builtin", - "info": "Builtin routine for onReceived or getSignals routines", - "libs": "builtin.ctlso", - "lua": { "prefix": "composer", "functions": "setSignalValueWrap"} + "uid": "convert", + "info": "LUA fonctions used to convert standard unit.", + "libs": "unit-conversion.lua" } ], "signals": { - "files": ["sig-txc" ] + "files": ["sig-doors", "sig-demoboard", "sig-geoloc" ] }, "sources": { - "files": "sources-txc" + "files": "sources-basic" } } diff --git a/conf.d/project/etc/control-txc-demo.json b/conf.d/project/etc/control-txc-demo.json new file mode 100644 index 0000000..d6083e1 --- /dev/null +++ b/conf.d/project/etc/control-txc-demo.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/conf.d/project/etc/sig-geoloc.json b/conf.d/project/etc/sig-geoloc.json index d3040b8..a09d4d7 100644 --- a/conf.d/project/etc/sig-geoloc.json +++ b/conf.d/project/etc/sig-geoloc.json @@ -5,19 +5,13 @@ "uid": "latitude", "event": "gps/location", "unit": "degree", - "frequency": 1, - "onReceived": { - "action": "plugin://gps-callbacks#getLatitude" - } + "frequency": 1 }, { "uid": "longitude", "event": "gps/location", "unit": "degree", - "frequency": 1, - "onReceived": { - "action": "plugin://gps-callbacks#getLongitude" - } + "frequency": 1 }, { "uid": "altitude", @@ -47,19 +41,19 @@ }, { "uid": "climb", - "event": "mraa/getclimb", + "event": "gps/location", "unit": "degree", "frequency": 1 }, { "uid": "roll_rate", - "event": "mraa/gyroscope", + "event": "gps/location", "unit": "degree/s", "frequency": 1 }, { "uid": "pitch_rate", - "event": "mraa/gyroscope", + "event": "gps/location", "unit": "degree/s", "frequency": 1 }, diff --git a/conf.d/project/etc/sources-basic.json b/conf.d/project/etc/sources-basic.json new file mode 100644 index 0000000..be2d02f --- /dev/null +++ b/conf.d/project/etc/sources-basic.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://iot.bzh/download/public/schema/json/signal-composer-schema.json", + "sources": [ + { + "uid": "CAN-service", + "api": "low-can", + "info": "Low level binding to handle CAN bus communications", + "getSignals": { + "action": "plugin://low-can-callbacks#subscribeToLow" + } + }, + { + "uid": "GPS-service", + "api": "gps", + "info": "Low level binding which retrieve Satellite positionning values", + "init": { + "action": "api://gps#subscribe", + "args": { + "value": "location" + } + }, + "getSignals": { + "function": "lua://convert#_Simple_Echo_Args" + } + } + ] + } diff --git a/conf.d/project/etc/sources.json b/conf.d/project/etc/sources.json deleted file mode 100644 index 45d7706..0000000 --- a/conf.d/project/etc/sources.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "http://iot.bzh/download/public/schema/json/signal-composer-schema.json", - "sources": [ - { - "uid": "CAN-service", - "api": "low-can", - "info": "Low level binding to handle CAN bus communications", - "getSignals": { - "action": "plugin://low-can-callbacks#subscribeToLow" - } - }, - { - "uid": "GPS-service", - "api": "gps", - "info": "Low level binding which retrieve Satellite positionning values", - "init": { - "action": "api://gps#subscribe", - "args": { - "value": "location" - } - }, - "getSignals": { - "function": "lua://convert#_Simple_Echo_Args" - } - }, - { - "uid": "MRAA-service", - "api": "mraa", - "info": "Low level binding which retrieve different values from several sensors like gyroscope, accelerometer, etc" - } - ] - } 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" + } + } + ] +} -- cgit 1.2.3-korg