diff options
-rw-r--r-- | conf.d/project/etc/control-signal-composer.json | 19 | ||||
-rw-r--r-- | conf.d/project/etc/control-txc-demo.json (renamed from conf.d/project/etc/control-basic-conf.json) | 20 | ||||
-rw-r--r-- | conf.d/project/etc/sig-geoloc.json | 16 | ||||
-rw-r--r-- | conf.d/project/etc/sources-basic.json (renamed from conf.d/project/etc/sources.json) | 7 | ||||
-rw-r--r-- | test/afb-test/etc/control-signal-composer.json | 34 | ||||
-rw-r--r-- | test/afb-test/etc/sig-txc.json | 110 | ||||
-rw-r--r-- | test/afb-test/etc/sources-txc.json | 17 |
7 files changed, 186 insertions, 37 deletions
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-basic-conf.json b/conf.d/project/etc/control-txc-demo.json index 1331544..d6083e1 100644 --- a/conf.d/project/etc/control-basic-conf.json +++ b/conf.d/project/etc/control-txc-demo.json @@ -5,13 +5,13 @@ "version": "1.0", "api": "signal-composer", "info": "Signal composer Configuration", - "require": ["low-can"] + "require": ["txc-binding"] }, "plugins": [ { - "uid": "low-can-callbacks", - "info": "Manage interaction with low-can service", - "libs": "low-can.ctlso" + "uid": "convert", + "info": "LUA fonctions used to convert standard unit.", + "libs": "unit-conversion.lua" }, { "uid": "gps-callbacks", @@ -19,16 +19,16 @@ "libs": "gps.ctlso" }, { - "uid": "convert", - "info": "LUA fonctions used to convert standard unit.", - "spath": "/tmp", - "libs": "unit-conversion.lua" + "uid": "builtin", + "info": "Builtin routine for onReceived or getSignals routines", + "libs": "builtin.ctlso", + "lua": { "prefix": "composer", "functions": "setSignalValueWrap"} } ], "signals": { - "files": ["sig-doors", "sig-demoboard", "sig-geoloc" ] + "files": ["sig-txc" ] }, "sources": { - "files": "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.json b/conf.d/project/etc/sources-basic.json index 45d7706..be2d02f 100644 --- a/conf.d/project/etc/sources.json +++ b/conf.d/project/etc/sources-basic.json @@ -22,11 +22,6 @@ "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" + } + } + ] +} |