central point for status codes

Put status code definitions into frappy.datatypes.StatusType.
frappy.datatypes is anyway imported in servers and clients,
so this is a better place than frappy.modules.

Change-Id: I81dfc8a066f598fbd20854ed1a13b937b7facc8c
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30703
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2023-03-14 15:59:36 +01:00
parent 8f9b2902d9
commit e0b2747821
5 changed files with 54 additions and 18 deletions

View File

@@ -1243,6 +1243,26 @@ class LimitsType(TupleOf):
class StatusType(TupleOf):
# shorten initialisation and allow access to status enumMembers from status values
DISABLED = 0
IDLE = 100
STANDBY = 130
PREPARED = 150
WARN = 200
WARN_STANDBY = 230
WARN_PREPARED = 250
UNSTABLE = 270 # no SECoP standard (yet)
BUSY = 300
DISABLING = 310
INITIALIZING = 320
PREPARING = 340
STARTING = 360
RAMPING = 370
STABILIZING = 380
FINALIZING = 390
ERROR = 400
ERROR_STANDBY = 430
ERROR_PREPARED = 450
def __init__(self, enum):
super().__init__(EnumType(enum), StringType())
self._enum = enum