rework closable interfaces a bit

simpleclosable  (a: open, close)
|- awning (a: stop)
|  |- extendedawning (s: percentage, moving)
|- blind  (a: stop)
|  |- extendedblind (s: percentage, moving)
|- closable (s: state)
|  |- garagegate (a: stop, s: intermediateposition)
|- shutter (a: stop)
|- smartlock (a, unlatch s: state)

simpleclosable (a: open, close)
|- closable (a: stop)
|  |- awning
|  |- blind
|  |- shutter
|  |- garagegate (s: state, intermediatePosition)
|  |- extendedclosable (s: moving, s: percentage)
|     |- extendedawning
|     |- extendedblind
|     |- extendedshutter
|- smartlock (a: unlatch, s: state)
pull/135/head
Michael Zanetti 2018-07-07 19:38:29 +02:00
parent 24c8a4f815
commit 9dcab1293c
10 changed files with 45 additions and 20 deletions

View File

@ -0,0 +1,3 @@
{
"extends": "closable"
}

View File

@ -1,8 +1,3 @@
{
"extends": "simpleclosable",
"actions": [
{
"name": "stop"
}
]
"extends": "closable"
}

View File

@ -1,10 +1,8 @@
{
"extends": "simpleclosable",
"states": [
"actions": [
{
"name": "state",
"type": "QString",
"allowedValues": ["open", "closed", "opening", "closing"]
"name": "stop"
}
]
}

View File

@ -0,0 +1,3 @@
{
"extends": "extendedclosable"
}

View File

@ -0,0 +1,3 @@
{
"extends": "blind"
}

View File

@ -0,0 +1,15 @@
{
"extends": "closable",
"states": [
{
"name": "moving",
"type": "bool"
},
{
"name": "percentage",
"type": "int",
"minimumValue": 0,
"maximumValue": 100
}
]
}

View File

@ -0,0 +1,3 @@
{
"extends": "extendedclosable"
}

View File

@ -1,6 +1,11 @@
{
"extends": "closable",
"states": [
{
"name": "state",
"type": "QString",
"allowedValues": ["open", "closed", "opening", "closing"]
},
{
"name": "intermediatePosition",
"type": "bool"

View File

@ -23,16 +23,21 @@
<file>sensor.json</file>
<file>temperaturesensor.json</file>
<file>humiditysensor.json</file>
<file>pressuresensor.json</file>
<file>connectable.json</file>
<file>inputtrigger.json</file>
<file>outputtrigger.json</file>
<file>power.json</file>
<file>closable.json</file>
<file>smartlock.json</file>
<file>shutter.json</file>
<file>simpleclosable.json</file>
<file>closable.json</file>
<file>awning.json</file>
<file>shutter.json</file>
<file>blind.json</file>
<file>pressuresensor.json</file>
<file>extendedclosable.json</file>
<file>extendedawning.json</file>
<file>extendedblind.json</file>
<file>extendedshutter.json</file>
<file>smartlock.json</file>
</qresource>
<qresource prefix="/"/>
</RCC>

View File

@ -1,8 +1,3 @@
{
"extends": "simpleclosable",
"actions": [
{
"name": "stop"
}
]
"extends": "simpleclosable"
}