diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-09-08 19:03:21 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-12-14 11:00:25 +0100 |
commit | bdf2d19cf8a3d6005456508ca52dba74cd9c103f (patch) | |
tree | c53d5a5bbf411b15123b9e5989fca26a25dcf844 /conf.d/project/etc/sig-doors.json | |
parent | 19bc13783a7451c81848ea132614a8df11c7740a (diff) |
Reformat configuration schema
Change-Id: I9550b51bb343c683e84de7200ec6a73ce1dcd71a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'conf.d/project/etc/sig-doors.json')
-rw-r--r-- | conf.d/project/etc/sig-doors.json | 160 |
1 files changed, 102 insertions, 58 deletions
diff --git a/conf.d/project/etc/sig-doors.json b/conf.d/project/etc/sig-doors.json index 46d37cc..05b7e54 100644 --- a/conf.d/project/etc/sig-doors.json +++ b/conf.d/project/etc/sig-doors.json @@ -1,85 +1,129 @@ { "signals": [ { - "label": "low-can/messages.windows.front_left.open", - "actions": { - "label": "Door open event action", - "lua": "_Door_opened", + "id": "rear_left_windows", + "source": "low-can/messages.windows.rear_left.open", + "class": "state", + "onReceived": { + "function": "_Door_opened", "args": { - "evtname": "messages.windows.front_left.open" + "evtname": "messages.windows.rear_left.open" } } }, { - "label": "low-can/messages.windows.front_right.open", - "actions": { - "label": "Door open event action", - "lua": "_Door_opened", + "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" + } + } + }, + { + "id": "rear_left", + "source": [ + "rear_left_windows", + "rear_left_doors" + ], + "class": "state", + "onReceived": { + "function": "_Door_opened", + "args": { + "ojoi": "pok" + } + } + }, + { + "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" } } }, { - "label": "low-can/messages.windows.rear_left.open", - "actions": { - "label": "Door open event action", - "lua": "_Door_opened", + "id": "rear_right_door", + "source": "low-can/messages.doors.rear_right.open", + "class": "state", + "onReceived": { + "function": "_Door_opened", "args": { - "evtname": "messages.windows.rear_left.open" + "evtname": "messages.doors.rear_right.open" } } }, { - "label": "low-can/messages.windows.rear_right.open", - "actions": { - "label": "Door open event action", - "lua": "_Door_opened", + "id": "rear_right_window", + "source": "low-can/messages.windows.rear_right.open", + "class": "state", + "onReceived": { + "function": "_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" + }, + { + "id": "rear_right", + "source": [ + "rear_right_doors", + "rear_right_windows" + ], + "class": "state", + "onReceived": { + "function": "_Complete_Door", + "args": {} } - } - }, - { - "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 + }, + { + "id": "front_left", + "source": [ + "front_left_door", + "front_left_windows" + ], + "class": "state", + "onReceived": { + "function": "_Complete_Door", + "args": {} + } + }, + { + "id": "front_right", + "source": [ + "front_right_doors", + "front_right_windows" + ], + "class": "state", + "onReceived": { + "function": "_Complete_Door", + "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" + ], + "class": "state", + "onReceived": { + "function": "_Door_opened", + "args": { + "evtname": "doors.open" + } } } - }] + ] }
\ No newline at end of file |