From 19bc13783a7451c81848ea132614a8df11c7740a Mon Sep 17 00:00:00 2001 From: "Forlot Romain [IoT.bzh]" Date: Mon, 4 Sep 2017 23:37:22 +0200 Subject: Initial commit Change-Id: I2bb38bffdd92602659670901b8442201b7c56214 Signed-off-by: Romain Forlot --- conf.d/project/etc/CMakeLists.txt | 31 ++++ conf.d/project/etc/sig-demoboard.json | 58 +++++++ conf.d/project/etc/sig-doors.json | 85 ++++++++++ conf.d/project/etc/sig-geoloc.json | 294 ++++++++++++++++++++++++++++++++++ conf.d/project/etc/sig-sources.json | 44 +++++ 5 files changed, 512 insertions(+) create mode 100644 conf.d/project/etc/CMakeLists.txt create mode 100644 conf.d/project/etc/sig-demoboard.json create mode 100644 conf.d/project/etc/sig-doors.json create mode 100644 conf.d/project/etc/sig-geoloc.json create mode 100644 conf.d/project/etc/sig-sources.json (limited to 'conf.d/project/etc') diff --git a/conf.d/project/etc/CMakeLists.txt b/conf.d/project/etc/CMakeLists.txt new file mode 100644 index 0000000..1ff98b1 --- /dev/null +++ b/conf.d/project/etc/CMakeLists.txt @@ -0,0 +1,31 @@ +########################################################################### +# Copyright 2017 IoT.bzh +# +# author: Fulup Ar Foll +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +########################################################################### + +################################################## +# Control Policy Config file +################################################## +PROJECT_TARGET_ADD(signal-composer-config) + + file(GLOB CONF_FILES "*.json") + + add_input_files("${CONF_FILES}") + + SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES + LABELS "BINDING-CONFIG" + OUTPUT_NAME ${TARGET_NAME} + ) diff --git a/conf.d/project/etc/sig-demoboard.json b/conf.d/project/etc/sig-demoboard.json new file mode 100644 index 0000000..4b81989 --- /dev/null +++ b/conf.d/project/etc/sig-demoboard.json @@ -0,0 +1,58 @@ +{ + "resources": [{ + "name": "/car/demoboard/", + "values": [{ + "name": "vehicleSpeed", + "additionnals_infos": { + "unit": "km/h", + "interval": 1000 + }, + "source": "CAN bus", + "class": "raw", + "type": "double", + "source_args": { + "event": "diagnostic_messages.vehicle.speed", + "filter": { + "frequency": "100", + "min": 10 + } + } + }, { + "name": "engineSpeed", + "additionnals_infos": { + "unit": "rpm", + "interval": 1000 + }, + "source":"CAN bus", + "class": "raw", + "type": "double", + "source_args": { + "event": "diagnostic_messages.engine.speed" + } + }, { + "name": "fuelLevel", + "additionnals_infos": { + "unit": "litre", + "interval": 1000 + }, + "class":"raw", + "source":"CAN bus", + "type": "double", + "source_args": { + "event": "diagnostic_messages.fuel.level" + } + }, { + "name": "engineLoad", + "additionnals_infos": { + "unit": "Nm", + "interval": 1000 + }, + "source":"CAN bus", + "type":"double", + "class":"raw", + "source_args": { + "event": "diagnostic_messages.engine.load" + } + }] + }] +} diff --git a/conf.d/project/etc/sig-doors.json b/conf.d/project/etc/sig-doors.json new file mode 100644 index 0000000..46d37cc --- /dev/null +++ b/conf.d/project/etc/sig-doors.json @@ -0,0 +1,85 @@ +{ + "signals": [ + { + "label": "low-can/messages.windows.front_left.open", + "actions": { + "label": "Door open event action", + "lua": "_Door_opened", + "args": { + "evtname": "messages.windows.front_left.open" + } + } + }, + { + "label": "low-can/messages.windows.front_right.open", + "actions": { + "label": "Door open event action", + "lua": "_Door_opened", + "args": { + "evtname": "messages.windows.front_right.open" + } + } + }, + { + "label": "low-can/messages.windows.rear_left.open", + "actions": { + "label": "Door open event action", + "lua": "_Door_opened", + "args": { + "evtname": "messages.windows.rear_left.open" + } + } + }, + { + "label": "low-can/messages.windows.rear_right.open", + "actions": { + "label": "Door open event action", + "lua": "_Door_opened", + "args": { + "evtname": "messages.windows.rear_right.open" + } + } + }], + "virtual_signals": [ + { + "label": "sig-orc/doors.open", + "depends_on": [ + "front_left_doors", + "front_left_windows", + "front_right_doors", + "front_right_windows", + "rear_left_doors", + "rear_left_windows", + "rear_right_doors", + "rear_right_windows" + ], + "actions": { + "label": "A door is open", + "lua": "_Door_opened", + "args": { + "evtname": "doors.open" + } + } + }, + { + "label": "sig-orc/doors.average", + "depends_on": [ + "front_left_doors", + "front_left_windows", + "front_right_doors", + "front_right_windows", + "rear_left_doors", + "rear_left_windows", + "rear_right_doors", + "rear_right_windows" + ], + "actions": { + "label": "A door is open", + "lua": "_Door_average", + "args": { + "evtname": "door.average", + "time": 120 + } + } + }] +} \ No newline at end of file diff --git a/conf.d/project/etc/sig-geoloc.json b/conf.d/project/etc/sig-geoloc.json new file mode 100644 index 0000000..6db766d --- /dev/null +++ b/conf.d/project/etc/sig-geoloc.json @@ -0,0 +1,294 @@ +{ + "resources": [{ + "group": "/car/geoloc/", + "values": [{ + "name": "latitude", + "additionnals_infos": { + "unit": "degree", + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "location" + } + }, + { + "name": "longitude", + "additionnals_infos": { + "unit": "degree", + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "location" + } + }, + { + "name": "altitude", + "additionnals_infos": { + "unit": "meter", + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "location" + } + }, + { + "name": "heading", + "additionnals_infos": { + "unit": "degree", + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "location" + } + }, + { + "name": "speed", + "additionnals_infos": { + "unit": "m/s", + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "location" + } + }, + { + "name": "climb", + "additionnals_infos": { + "unit": "degree", + "interval": 1000 + }, + "source": "Sensors", + "class": "raw", + "type": "double", + "source_args": { + "sensor": "gyro" + } + }, + { + "name": "roll_rate", + "additionnals_infos": { + "unit": "degree/s", + "interval": 1000 + }, + "source": "Sensors", + "class": "raw", + "type": "double", + "source_args": { + "sensor": "roll_rate" + } + }, + { + "name": "roll_rate", + "additionnals_infos": { + "unit": "degree/s", + "interval": 1000 + }, + "source": "Sensors", + "class": "raw", + "type": "double", + "source_args": { + "sensor": "pitch_rate" + } + }, + { + "name": "roll_rate", + "additionnals_infos": { + "unit": "degree/s", + "interval": 1000 + }, + "source": "Sensors", + "class": "raw", + "type": "double", + "source_args": { + "sensor": "yaw_rate" + } + }, + { + "name": "pdop", + "additionnals_infos": { + "interval": 1000 + }, "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "location" + } + }, + { + "name": "hdop", + "additionnals_infos": { + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "location" + } + }, + { + "name": "vdop", + "additionnals_infos": { + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "location" + } + }, + { + "name": "used_satellites", + "additionnals_infos": { + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "uint8", + "source_args": { + "value": "configuration" + } + }, + { + "name": "tracked_satellites", + "additionnals_infos": { + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "uint8", + "source_args": { + "value": "configuration" + } + }, + { + "name": "visible_satellites", + "additionnals_infos": { + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "uint8", + "source_args": { + "value": "configuration" + } + }, + { + "name": "sigma_hposition", + "additionnals_infos": { + "unit": "meter", + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "configuration" + } + }, + { + "name": "sigma_altitude", + "additionnals_infos": { + "unit": "meter", + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "configuration" + } + }, + { + "name": "sigma_heading", + "additionnals_infos": { + "unit": "degree", + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "configuration" + } + }, + { + "name": "sigma_speed", + "additionnals_infos": { + "unit": "m/s", + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "configuration" + } + }, + { + "name": "sigma_climb", + "additionnals_infos": { + "unit": "degree", + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "double", + "source_args": { + "value": "configuration" + } + }, + { + "name": "gnss_fix_status", + "additionnals_infos": { + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "uint16", + "source_args": { + "value": "configuration" + } + }, + { + "name": "dr_status", + "additionnals_infos": { + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "boolean", + "source_args": { + "value": "configuration" + } + }, + { + "name": "reliabilty_index", + "additionnals_infos": { + "interval": 1000 + }, + "source": "GNSS/GPS", + "class": "raw", + "type": "uint8_t", + "source_args": { + "value": "configuration" + } + }] + }] +} diff --git a/conf.d/project/etc/sig-sources.json b/conf.d/project/etc/sig-sources.json new file mode 100644 index 0000000..076139f --- /dev/null +++ b/conf.d/project/etc/sig-sources.json @@ -0,0 +1,44 @@ +{ + "$schema": "ToBeDone", + "metadata": { + "label": "signal-composer", + "info": "Signal composer Configuration", + "name": "afb-signal-composer", + "version": "1.0" + }, + "onload": [{ + "label": "onload-signal-composer", + "info": "onload initialisation config", + "require": [ + { + "label": "CAN bus", + "api": "low-can", + "info": "Low level binding to handle CAN bus communications", + "callback": "c function to subscribe on signals", + "lua": "or a lua function to subscribe on signals", + "args": { + "arg": "first argument" + } + }, + { + "label": "GNSS/GPS", + "api": "gps", + "info": "Low level binding which retrieve Satellite positionning values", + "callback": "c function to subscribe on signals", + "lua": "or a lua function to subscribe on signals", + "args": { + "value" : "arg" + } + }, + { + "label": "Sensors", + "api": "mraa", + "info": "Low level binding which retrieve different values from several sensors like gyroscope, accelerometer, etc", + "callback": "c function to subscribe on signals", + "lua": "or a lua function to subscribe on signals", + "args": { + "sensor" : "eg" + } + }] + }] +} -- cgit 1.2.3-korg