From f739095f40c1aa707b095a0788d72bf3c66f6dc2 Mon Sep 17 00:00:00 2001 From: Thomas Juerges <4-jurges@users.noreply.git.astron.nl> Date: Tue, 26 Jan 2021 12:05:09 +0100 Subject: [PATCH] Fix name clash Init() -> Initialise() The Tango C++ kernel provides a built-in function init(). Unfortunately are names in Tango (mostly) case-insensitive. This led to a name clash with our own Init() function and at first unexplainable behaviour. --- RCUSCC/RCUSCC/RCUSCC.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RCUSCC/RCUSCC/RCUSCC.py b/RCUSCC/RCUSCC/RCUSCC.py index dd30828d3..1ea70af03 100644 --- a/RCUSCC/RCUSCC/RCUSCC.py +++ b/RCUSCC/RCUSCC/RCUSCC.py @@ -60,7 +60,7 @@ class RCUSCC(Device): * -> 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, - The user triggers their transitions by the commands reflecting the target state (Init(), On(), Fault()). + The user triggers their transitions by the commands reflecting the target state (Initialise(), On(), Fault()). """ client = 0 name_space_index = 0 @@ -392,7 +392,7 @@ class RCUSCC(Device): This method allows for any memory or other resources allocated in the init_device method to be released. This method is called by the device - destructor and by the device Init command. + destructor and by the device Init command (a Tango built-in). """ self.debug_stream("Shutting down...") @@ -607,7 +607,7 @@ class RCUSCC(Device): @command() @only_in_states([DevState.FAULT, DevState.OFF]) @DebugIt() - def Init(self): + def Initialise(self): """ Command to ask for initialisation of this device. Can only be called in FAULT or OFF state. @@ -668,7 +668,7 @@ class RCUSCC(Device): This device will try to reconnect once, and transition to the ON state on success. - If reconnecting fails, the user needs to call Init() to retry to restart this device. + If reconnecting fails, the user needs to call Initialise() to retry to restart this device. :return:None """ -- GitLab