diff --git a/RCUSCC/RCUSCC/RCUSCC.py b/RCUSCC/RCUSCC/RCUSCC.py index a8d697845a8fdf98fe5b6ca8065ac46d80c3a513..eec910de17bde6678de7e4a6dbef8da558f405de 100644 --- a/RCUSCC/RCUSCC/RCUSCC.py +++ b/RCUSCC/RCUSCC/RCUSCC.py @@ -51,14 +51,14 @@ class RCUSCC(Device): OFF = Device is turned off, drops connection to the hardware, The following state transitions are implemented: - boot -> INIT: Triggered by device. Device will initialise when it is started, + boot -> OFF: Triggered by tango. Device will be instantiated, + OFF -> INIT: Triggered by device. Device will initialise (connect to hardware, other devices), INIT -> STANDBY: Triggered by device. Device is initialised, and is ready for additional configuration by the user, STANDBY -> ON: Triggered by user. Device reports to be functional, * -> FAULT: Triggered by device. Device has degraded to malfunctional, for example because the connection to the hardware is lost, * -> FAULT: Triggered by user. Emulate a forced malfunction for integration testing purposes, * -> OFF: Triggered by user. Device is turned off. Triggered by the Off() command, FAULT -> INIT: Triggered by user. Device is reinitialised to recover from an error, - OFF -> INIT: Triggered by user. Device is turned on again. The user triggers their transitions by the commands reflecting the target state (Init(), On(), Fault()). """ @@ -226,11 +226,16 @@ class RCUSCC(Device): self.debug_stream("Mapping OPC-UA MP/CP to attributes done.") def init_device(self): - """Initialises the attributes and properties of the RCUSCC.""" + """ Instantiates the device in the OFF state. """ # NOTE: Will delete_device first, if necessary Device.init_device(self) + self.set_state(DevState.OFF) + + def initialise(self): + """Initialises the attributes and properties of the RCUSCC.""" + self.set_state(DevState.INIT) # Init the dict that contains attribute to OPC-UA MP/CP mappings. @@ -453,7 +458,7 @@ class RCUSCC(Device): :return:None """ - self.init_device() + self.initialise() @only_in_states([DevState.INIT]) def Standby(self):