root / commissioning / api / physical.py @ 9f1a1bd0
History | View | Annotate | Download (1.5 kB)
1 |
|
---|---|
2 |
class Physical(object): |
3 |
|
4 |
def derive_description(self, commission_spec): |
5 |
"""Derive a target physical description from a commission specification
|
6 |
which is understandable and executable by the physical layer.
|
7 |
"""
|
8 |
raise NotImplementedError |
9 |
|
10 |
def initiate_commission(self, serial, description): |
11 |
"""Start creating a resource with a physical description,
|
12 |
tagged by the given serial.
|
13 |
"""
|
14 |
raise NotImplementedError |
15 |
|
16 |
def get_current_state(self, serial, description): |
17 |
"""Query and return the current physical state for the
|
18 |
target physical description initiated by the given serial.
|
19 |
"""
|
20 |
raise NotImplementedError |
21 |
|
22 |
def complies(self, state, description): |
23 |
"""Compare current physical state and target physical description
|
24 |
and decide if the commission has been successfully implemented.
|
25 |
"""
|
26 |
raise NotImplementedError |
27 |
|
28 |
def attainable(self, state, description): |
29 |
"""Compare current physical state and target physical description
|
30 |
and decide if the commission can be implemented.
|
31 |
"""
|
32 |
raise NotImplementedError |
33 |
|
34 |
def continue_commission(self, serial, description): |
35 |
"""Continue an ongoing commission towards
|
36 |
the given target physical description
|
37 |
"""
|
38 |
raise NotImplementedError |
39 |
|
40 |
def end_commission(self, serial, description): |
41 |
"""Cancel and stop tracking the commission identified by serial"""
|
42 |
raise NotImplementedError |
43 |
|