From c3911cd0efa1be837409d71796029c93f7eff6eb Mon Sep 17 00:00:00 2001 From: Enrico Faulhaber Date: Thu, 9 Apr 2020 15:45:50 +0200 Subject: [PATCH] add UNKNOWN status code Change-Id: I10defead938df497ab72672f9e378c8f2dbd4b4a Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/22935 Tested-by: JenkinsCodeReview Reviewed-by: Enrico Faulhaber --- secop/modules.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/secop/modules.py b/secop/modules.py index f2ccb90..e04fc8d 100644 --- a/secop/modules.py +++ b/secop/modules.py @@ -28,7 +28,7 @@ import time from collections import OrderedDict 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.lib import formatException, formatExtendedStack, mkthread from secop.lib.enum import Enum @@ -340,6 +340,7 @@ class Readable(Module): UNSTABLE = 270, ERROR = 400, DISABLED = 0, + UNKNOWN = 401, ) parameters = { 'value': Parameter('current value of the Module', readonly=True, @@ -433,7 +434,7 @@ class Drivable(Writable): } overrides = { - 'status': Override(datatype=TupleOf(EnumType(Status), StringType())), + 'status': Override(datatype=StatusType(Status)), } def isBusy(self, status=None):