aboutsummaryrefslogtreecommitdiffstats
path: root/conf.d/project/etc
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-14 19:31:42 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commiteabae24ea592420de46e36f0b1af5d39eee5b8a4 (patch)
tree16cbc39e84eb71d655add40e715f7d87b4b02132 /conf.d/project/etc
parent140fd3d8f76a8cbbde8f6b0bf997808855f3da43 (diff)
Attach and recursion check working
Change-Id: I2f9509d4b6aa63a16df8db2187810337fd802ef4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'conf.d/project/etc')
-rw-r--r--conf.d/project/etc/init-daemon.json19
-rw-r--r--conf.d/project/etc/sig-doors.json121
-rw-r--r--conf.d/project/etc/sig-sources.json59
-rw-r--r--conf.d/project/etc/sources.json50
4 files changed, 118 insertions, 131 deletions
diff --git a/conf.d/project/etc/init-daemon.json b/conf.d/project/etc/init-daemon.json
new file mode 100644
index 0000000..dc18f7e
--- /dev/null
+++ b/conf.d/project/etc/init-daemon.json
@@ -0,0 +1,19 @@
+{
+ "$schema": "ToBeDone",
+ "metadata": {
+ "label": "Signal Composer",
+ "version": "1.0",
+ "api": "signal-composer",
+ "info": "Signal composer Configuration",
+ "require": ["low-can"],
+ "files": ["sources", "sig-doors"]
+ },
+ "plugins": [
+ {
+ "label": "Door handle",
+ "version": "1.0",
+ "info": "Manage all doors and windows status",
+ "basename": "doors"
+ }
+ ]
+}
diff --git a/conf.d/project/etc/sig-doors.json b/conf.d/project/etc/sig-doors.json
index e93745e..bc26296 100644
--- a/conf.d/project/etc/sig-doors.json
+++ b/conf.d/project/etc/sig-doors.json
@@ -1,83 +1,60 @@
{
"signals": [
{
- "id": "rear_left_windows",
- "source": "low-can/messages.windows.rear_left.open",
- "class": "state",
- "onReceived": {
- "function": "_Door_opened",
- "args": {
- "evtname": "messages.windows.rear_left.open"
- }
- }
+ "id": "rear_left_window",
+ "source": "low-can/messages.windows.rear_left.open"
},
{
"id": "rear_left_door",
- "source": "low-can/messages.doors.rear_left.open",
- "class": "state",
- "onReceived": {
- "function": "_Door_opened",
- "args": {
- "evtname": "messages.doors.rear_left.open"
- }
- }
+ "source": "low-can/messages.doors.rear_left.open"
},
{
- "id": "rear_left",
- "source": [
- "rear_left_windows",
- "rear_left_doors"
- ],
- "class": "state",
- "onReceived": {
- "function": "_Door_opened",
- "args": {
- "ojoi": "pok"
- }
- }
+ "id": "rear_right_window",
+ "source": "low-can/messages.windows.rear_right.open"
+ },
+ {
+ "id": "rear_right_door",
+ "source": "low-can/messages.doors.rear_right.open"
+ },
+ {
+ "id": "front_left_window",
+ "source": "low-can/messages.windows.front_left.open"
+ },
+ {
+ "id": "front_left_door",
+ "source": "low-can/messages.doors.front_left.open"
},
{
"id": "front_right_window",
- "source": "low-can/messages.windows.front_right.open",
- "class": "state",
- "onReceived": {
- "function": "_Door_opened",
- "args": {
- "evtname": "messages.windows.front_right.open"
- }
- }
+ "source": "low-can/messages.windows.front_right.open"
},
{
- "id": "rear_right_door",
- "source": "low-can/messages.doors.rear_right.open",
- "class": "state",
- "onReceived": {
- "function": "_Door_opened",
- "args": {
- "evtname": "messages.doors.rear_right.open"
- }
- }
+ "id": "front_right_door",
+ "source": "low-can/messages.doors.front_right.open"
},
{
- "id": "rear_right_window",
- "source": "low-can/messages.windows.rear_right.open",
- "class": "state",
+ "id": "rear_left",
+ "source": [
+ "rear_left_window",
+ "rear_left_door"
+ ],
"onReceived": {
- "function": "_Door_opened",
+ "plugin": "Door handle",
+ "function": "isOpen",
"args": {
- "evtname": "messages.windows.rear_right.open"
+ "ojoi": "pok"
}
}
},
{
"id": "rear_right",
"source": [
- "rear_right_doors",
- "rear_right_windows"
+ "rear_right_door",
+ "rear_right_window"
],
- "class": "state",
"onReceived": {
- "function": "_Complete_Door",
+ "plugin": "Door handle",
+ "function": "isOpen",
"args": {}
}
},
@@ -85,41 +62,41 @@
"id": "front_left",
"source": [
"front_left_door",
- "front_left_windows"
+ "front_left_window"
],
- "class": "state",
"onReceived": {
- "function": "_Complete_Door",
+ "plugin": "Door handle",
+ "function": "isOpen",
"args": {}
}
},
{
"id": "front_right",
"source": [
- "front_right_doors",
- "front_right_windows"
+ "front_right_door",
+ "front_right_window"
],
- "class": "state",
"onReceived": {
- "function": "_Complete_Door",
+ "plugin": "Door handle",
+ "function": "isOpen",
"args": {}
}
},
{
"id": "all_doors",
"source": [
- "front_left_doors",
- "front_left_windows",
- "front_right_doors",
- "front_right_windows",
- "rear_left_doors",
- "rear_left_windows",
- "rear_right_doors",
- "rear_right_windows"
+ "front_left_door",
+ "front_left_window",
+ "front_right_door",
+ "front_right_window",
+ "rear_left_door",
+ "rear_left_window",
+ "rear_right_door",
+ "rear_right_window"
],
- "class": "state",
"onReceived": {
- "function": "_Door_opened",
+ "plugin": "Door handle",
+ "function": "isOpen",
"args": {
"evtname": "doors.open"
}
diff --git a/conf.d/project/etc/sig-sources.json b/conf.d/project/etc/sig-sources.json
deleted file mode 100644
index 1142196..0000000
--- a/conf.d/project/etc/sig-sources.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "$schema": "ToBeDone",
- "metadata": {
- "label": "signal-composer",
- "info": "Signal composer Configuration",
- "name": "afb-signal-composer",
- "version": "1.0"
- },
- "sources": [
- {
- "api": "low-can",
- "info": "Low level binding to handle CAN bus communications",
- "init": {
- "function": "c/lua (depend on name) function to initialize binding",
- "args": {
- "arg1": "first argument"
- }
- },
- "getSignal": {
- "function": "c/lua (depend on name) function to get signals",
- "args": {
- "arg": "first argument"
- }
- }
- }, {
- "api": "gps",
- "info": "Low level binding which retrieve Satellite positionning values",
- "actions": [{
- "label": "init",
- "function": "c/lua (depend on name) function to initialize binding",
- "args": {
- "arg": "first argument"
- }
- }, {
- "label": "getSignal",
- "function": "c/lua (depend on name) function to get signals",
- "args": {
- "arg": "first argument"
- }
- }]
- }, {
- "api": "mraa",
- "info": "Low level binding which retrieve different values from several sensors like gyroscope, accelerometer, etc",
- "actions": [{
- "label": "init",
- "function": "c/lua (depend on name) function to initialize binding",
- "args": {
- "arg": "first argument"
- }
- }, {
- "label": "getSignal",
- "function": "c/lua (depend on name) function to get signals",
- "args": {
- "arg": "first argument"
- }
- }]
- }
- ]
-}
diff --git a/conf.d/project/etc/sources.json b/conf.d/project/etc/sources.json
new file mode 100644
index 0000000..a70da50
--- /dev/null
+++ b/conf.d/project/etc/sources.json
@@ -0,0 +1,50 @@
+{
+ "sources": [
+ {
+ "api": "low-can",
+ "info": "Low level binding to handle CAN bus communications",
+ "init": {
+ "function": "low-can/subscribe",
+ "args": {
+ "event": "message*"
+ }
+ },
+ "getSignal": {
+ "function": "_LUA_Simple_Echo_Args",
+ "args": {
+ "arg": "first argument"
+ }
+ }
+ }, {
+ "api": "gps",
+ "info": "Low level binding which retrieve Satellite positionning values",
+ "init": {
+ "function": "_LUA_Simple_Echo_Args",
+ "args": {
+ "arg1": "first argument"
+ }
+ },
+ "getSignal": {
+ "function": "_LUA_Simple_Echo_Args",
+ "args": {
+ "arg": "first argument"
+ }
+ }
+ }, {
+ "api": "mraa",
+ "info": "Low level binding which retrieve different values from several sensors like gyroscope, accelerometer, etc",
+ "init": {
+ "function": "_LUA_Simple_Echo_Args",
+ "args": {
+ "arg1": "first argument"
+ }
+ },
+ "getSignal": {
+ "function": "_LUA_Simple_Echo_Args",
+ "args": {
+ "arg": "first argument"
+ }
+ }
+ }
+ ]
+}