Skip to content
Snippets Groups Projects
Commit a8fa8fb0 authored by Jan David Mol's avatar Jan David Mol
Browse files

Allow explicit reinitialisation through Init(), and disabled direct On() command.

parent f678ef97
No related branches found
No related tags found
No related merge requests found
...@@ -206,21 +206,12 @@ class RCUSCC(Device): ...@@ -206,21 +206,12 @@ class RCUSCC(Device):
self.debug_stream("Mapping OPC-UA MP/CP to attributes done.") self.debug_stream("Mapping OPC-UA MP/CP to attributes done.")
def init_device(self): def init_device(self):
"""Initialises the attributes and properties of the RCUSCC.""" """Initialises the attributes and properties of the RCUSCC."""
Device.init_device(self)
self.Init()
@command( # NOTE: Will delete_device first, if necessary
) Device.init_device(self)
@DebugIt()
def Init(self):
"""
:return:None
"""
self.set_state(DevState.INIT) self.set_state(DevState.INIT)
# Init the dict that contains attribute to OPC-UA MP/CP mappings. # Init the dict that contains attribute to OPC-UA MP/CP mappings.
...@@ -312,6 +303,7 @@ class RCUSCC(Device): ...@@ -312,6 +303,7 @@ class RCUSCC(Device):
self.Off() self.Off()
self.debug_stream("Shut down. Good bye.") self.debug_stream("Shut down. Good bye.")
# ------------------ # ------------------
# Attributes methods # Attributes methods
# ------------------ # ------------------
...@@ -438,6 +430,17 @@ class RCUSCC(Device): ...@@ -438,6 +430,17 @@ class RCUSCC(Device):
# Commands # Commands
# -------- # --------
@command(
)
@DebugIt()
def Init(self):
"""
:return:None
"""
self.init_device()
@command( @command(
) )
@DebugIt() @DebugIt()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment