summaryrefslogtreecommitdiffstats
path: root/conf.d/project/etc
diff options
context:
space:
mode:
Diffstat (limited to 'conf.d/project/etc')
-rw-r--r--conf.d/project/etc/sig-demoboard.json16
-rw-r--r--conf.d/project/etc/sig-doors.json65
-rw-r--r--conf.d/project/etc/sig-geoloc.json105
-rw-r--r--conf.d/project/etc/sources.json25
4 files changed, 110 insertions, 101 deletions
diff --git a/conf.d/project/etc/sig-demoboard.json b/conf.d/project/etc/sig-demoboard.json
index c078d27..3d03f3e 100644
--- a/conf.d/project/etc/sig-demoboard.json
+++ b/conf.d/project/etc/sig-demoboard.json
@@ -1,11 +1,12 @@
{
"signals": [
{
- "label": "low-can/messages.vehicle.speed",
+ "id": "vehicle_speed",
+ "event": "low-can/messages.vehicle.speed",
"class": "temporal",
"unit": "km/h",
"frequency": 1,
- "actions": {
+ "onReceived": {
"label": "Unit converter",
"lua": "_Unit_Converter",
"args": {
@@ -15,22 +16,25 @@
}
},
{
- "name": "low-can/diagnostic_messages.engine.speed",
+ "id": "engine_speed",
+ "event": "low-can/diagnostic_messages.engine.speed",
"class": "temporal",
"unit": "rpm",
"frequency": 1
},
{
- "name": "low-can/diagnostic_messages.fuel.level",
+ "id": "fuel_level",
+ "event": "low-can/diagnostic_messages.fuel.level",
"class":"temporal",
"unit": "litre",
"frequency": 1
},
{
- "name": "low-can/diagnostic_messages.engine.load",
+ "id": "engine_load",
+ "event": "low-can/diagnostic_messages.engine.load",
"class":"temporal",
"unit": "Nm",
- "interval": 1
+ "frequency": 1
}
]
}
diff --git a/conf.d/project/etc/sig-doors.json b/conf.d/project/etc/sig-doors.json
index ea191e4..1d23f9a 100644
--- a/conf.d/project/etc/sig-doors.json
+++ b/conf.d/project/etc/sig-doors.json
@@ -2,10 +2,9 @@
"signals": [
{
"id": "rear_left_window",
- "source": "low-can/messages.windows.rear_left.open",
+ "event": "low-can/messages.windows.rear_left.open",
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {
"ojoi": "pok"
}
@@ -13,10 +12,9 @@
},
{
"id": "rear_left_door",
- "source": "low-can/messages.doors.rear_left.open",
+ "event": "low-can/messages.doors.rear_left.open",
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {
"ojoi": "pok"
}
@@ -24,10 +22,9 @@
},
{
"id": "rear_right_window",
- "source": "low-can/messages.windows.rear_right.open",
+ "event": "low-can/messages.windows.rear_right.open",
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {
"ojoi": "pok"
}
@@ -35,10 +32,9 @@
},
{
"id": "rear_right_door",
- "source": "low-can/messages.doors.rear_right.open",
+ "event": "low-can/messages.doors.rear_right.open",
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {
"ojoi": "pok"
}
@@ -46,10 +42,9 @@
},
{
"id": "front_left_window",
- "source": "low-can/messages.windows.front_left.open",
+ "event": "low-can/messages.windows.front_left.open",
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {
"ojoi": "pok"
}
@@ -57,10 +52,9 @@
},
{
"id": "front_left_door",
- "source": "low-can/messages.doors.front_left.open",
+ "event": "low-can/messages.doors.front_left.open",
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {
"ojoi": "pok"
}
@@ -68,10 +62,9 @@
},
{
"id": "front_right_window",
- "source": "low-can/messages.windows.front_right.open",
+ "event": "low-can/messages.windows.front_right.open",
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {
"ojoi": "pok"
}
@@ -79,10 +72,9 @@
},
{
"id": "front_right_door",
- "source": "low-can/messages.doors.front_right.open",
+ "event": "low-can/messages.doors.front_right.open",
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {
"ojoi": "pok"
}
@@ -90,13 +82,12 @@
},
{
"id": "rear_left",
- "source": [
+ "depends": [
"rear_left_window",
"rear_left_door"
],
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {
"ojoi": "pok"
}
@@ -104,43 +95,40 @@
},
{
"id": "rear_right",
- "source": [
+ "depends": [
"rear_right_door",
"rear_right_window"
],
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {}
}
},
{
"id": "front_left",
- "source": [
+ "depends": [
"front_left_door",
"front_left_window"
],
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {}
}
},
{
"id": "front_right",
- "source": [
+ "depends": [
"front_right_door",
"front_right_window"
],
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {}
}
},
{
"id": "all_doors",
- "source": [
+ "depends": [
"front_left_door",
"front_left_window",
"front_right_door",
@@ -151,8 +139,7 @@
"rear_right_window"
],
"onReceived": {
- "plugin": "low-can-callbacks",
- "function": "isOpen",
+ "function": "plugin://low-can-callbacks/isOpen",
"args": {
"evtname": "doors.open"
}
diff --git a/conf.d/project/etc/sig-geoloc.json b/conf.d/project/etc/sig-geoloc.json
index 7fc4d29..3b0e4eb 100644
--- a/conf.d/project/etc/sig-geoloc.json
+++ b/conf.d/project/etc/sig-geoloc.json
@@ -1,136 +1,155 @@
{
"signals": [
{
- "label": "gps/latitude",
- "class": "state",
+ "id": "latitude",
+ "event": "gps/location",
"unit": "degree",
- "frequency": 1
+ "frequency": 1,
+ "onReceived": {
+ "function": "plugin://gps-callbacks/getLatitude"
+ }
},
{
- "label": "gps/longitude",
- "class": "state",
+ "id": "longitude",
+ "event": "gps/location",
"unit": "degree",
- "frequency": 1
+ "frequency": 1,
+ "onReceived": {
+ "function": "plugin://gps-callbacks/getSignal",
+ "args": {
+ "what": "longitude"
+ }
+ }
},
{
- "label": "gps/altitude",
- "class": "state",
+ "id": "altitude",
+ "event": "gps/location",
"unit": "meter",
"frequency": 1
},
{
- "label": "heading",
+ "id": "heading",
+ "depends": [
+ "latitude",
+ "longitude"
+ ],
"class": "state",
"unit": "degree",
"frequency": 1,
- "dependsOn": [
- "gps/latitude",
- "gps/longitude"
- ],
"actions": {
- "label": "Heading calculation",
+ "id": "Heading calculation",
"lua": "_Heading",
"args": {}
}
},
{
- "label": "gps/speed",
+ "id": "speed",
+ "event": "gps/location",
"class": "temporal",
"unit": "m/s",
"frequency": 1
},
{
- "label": "mraa/climb",
- "class": "state",
+ "id": "climb",
+ "event": "mraa/getclimb",
"unit": "degree",
"frequency": 1
},
{
- "label": "mraa/roll_rate",
- "class": "state",
+ "id": "roll_rate",
+ "event": "mraa/gyroscope",
"unit": "degree/s",
"frequency": 1
},
{
- "label": "mraa/roll_rate",
- "class": "state",
+ "id": "pitch_rate",
+ "event": "mraa/gyroscope",
"unit": "degree/s",
"frequency": 1
},
{
- "label": "mraa/roll_rate",
- "class": "state",
+ "id": "yaw_rate",
+ "event": "gps/gyroscope",
"unit": "degree/s",
"frequency": 1
},
{
- "label": "gps/pdop",
+ "id": "pdop",
+ "event": "gps/location",
"frequency": 1
},
{
- "label": "gps/hdop",
+ "id": "hdop",
+ "event": "gps/location",
"frequency": 1
},
{
- "label": "gps/vdop",
+ "id": "vdop",
+ "event": "gps/location",
"frequency": 1
},
{
- "label": "gps/used_satellites",
+ "id": "used_satellites",
+ "event": "gps/location",
"frequency": 1
},
{
- "label": "gps/tracked_satellites",
+ "id": "tracked_satellites",
+ "event": "gps/location",
"frequency": 1
},
{
- "label": "gps/visible_satellites",
+ "id": "visible_satellites",
+ "event": "gps/location",
"frequency": 1
},
{
- "label": "gps/sigma_hposition",
- "class": "state",
+ "id": "sigma_hposition",
+ "event": "gps/location",
"unit": "meter",
"frequency": 1
},
{
- "label": "gps/sigma_altitude",
- "class": "state",
+ "id": "sigma_altitude",
+ "event": "gps/location",
"unit": "meter",
"frequency": 1
},
{
- "label": "gps/sigma_heading",
- "class": "state",
+ "id": "sigma_heading",
+ "event": "gps/location",
"unit": "degree",
"frequency": 1
},
{
- "label": "gps/sigma_speed",
+ "id": "sigma_speed",
+ "event": "gps/location",
"class": "temporal",
"unit": "m/s",
"frequency": 1
},
{
- "label": "gps/sigma_climb",
- "class": "state",
+ "id": "sigma_climb",
+ "event": "gps/location",
"unit": "degree",
"frequency": 1
},
{
- "label": "gps/gnss_fix_status",
- "class": "state",
+ "id": "gnss_fix_status",
+ "event": "gps/location",
"frequency": 1
},
{
- "label": "gps/dr_status",
+ "id": "dr_status",
+ "event": "gps/location",
"class": "state",
"frequency": 1
},
{
- "label": "gps/reliabilty_index",
+ "id": "reliabilty_index",
+ "event": "gps/location",
"class": "temporal",
"frequency": 1
}
]
-} \ No newline at end of file
+}
diff --git a/conf.d/project/etc/sources.json b/conf.d/project/etc/sources.json
index 6a9657a..be99a41 100644
--- a/conf.d/project/etc/sources.json
+++ b/conf.d/project/etc/sources.json
@@ -4,14 +4,13 @@
"api": "low-can",
"info": "Low level binding to handle CAN bus communications",
"init": {
- "function": "low-can/subscribe",
+ "function": "api://low-can/subscribe",
"args": {
"event": "message*"
}
- },
- "getSignal": {
- "plugin": "low-can-callbacks",
- "function": "subscribeToLow",
+ },
+ "getSignals": {
+ "function": "plugin://low-can-callbacks/subscribeToLow",
"args": {
"arg": "first argument"
}
@@ -20,13 +19,13 @@
"api": "gps",
"info": "Low level binding which retrieve Satellite positionning values",
"init": {
- "function": "_LUA_Simple_Echo_Args",
+ "function": "api://gps/location",
"args": {
"arg1": "first argument"
}
- },
- "getSignal": {
- "function": "_LUA_Simple_Echo_Args",
+ },
+ "getSignals": {
+ "function": "lua://_Simple_Echo_Args",
"args": {
"arg": "first argument"
}
@@ -35,13 +34,13 @@
"api": "mraa",
"info": "Low level binding which retrieve different values from several sensors like gyroscope, accelerometer, etc",
"init": {
- "function": "_LUA_Simple_Echo_Args",
+ "function": "lua://_Simple_Echo_Args",
"args": {
"arg1": "first argument"
}
- },
- "getSignal": {
- "function": "_LUA_Simple_Echo_Args",
+ },
+ "getSignals": {
+ "function": "lua://_Simple_Echo_Args",
"args": {
"arg": "first argument"
}