add UNKNOWN status code

Change-Id: I10defead938df497ab72672f9e378c8f2dbd4b4a
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/22935
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
Enrico Faulhaber 2020-04-09 15:45:50 +02:00
parent b9f261762f
commit c3911cd0ef

View File

@ -28,7 +28,7 @@ import time
from collections import OrderedDict from collections import OrderedDict
from secop.datatypes import EnumType, FloatRange, BoolType, IntRange, \ from secop.datatypes import EnumType, FloatRange, BoolType, IntRange, \
StringType, TupleOf, get_datatype, ArrayOf, TextType StringType, TupleOf, get_datatype, ArrayOf, TextType, StatusType
from secop.errors import ConfigError, ProgrammingError, SECoPError, BadValueError, SilentError from secop.errors import ConfigError, ProgrammingError, SECoPError, BadValueError, SilentError
from secop.lib import formatException, formatExtendedStack, mkthread from secop.lib import formatException, formatExtendedStack, mkthread
from secop.lib.enum import Enum from secop.lib.enum import Enum
@ -340,6 +340,7 @@ class Readable(Module):
UNSTABLE = 270, UNSTABLE = 270,
ERROR = 400, ERROR = 400,
DISABLED = 0, DISABLED = 0,
UNKNOWN = 401,
) )
parameters = { parameters = {
'value': Parameter('current value of the Module', readonly=True, 'value': Parameter('current value of the Module', readonly=True,
@ -433,7 +434,7 @@ class Drivable(Writable):
} }
overrides = { overrides = {
'status': Override(datatype=TupleOf(EnumType(Status), StringType())), 'status': Override(datatype=StatusType(Status)),
} }
def isBusy(self, status=None): def isBusy(self, status=None):