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):
self.debug_stream("Mapping OPC-UA MP/CP to attributes done.")
def init_device(self):
"""Initialises the attributes and properties of the RCUSCC."""
Device.init_device(self)
self.Init()
@command(
)
@DebugIt()
def Init(self):
"""
# NOTE: Will delete_device first, if necessary
Device.init_device(self)
:return:None
"""
self.set_state(DevState.INIT)
# Init the dict that contains attribute to OPC-UA MP/CP mappings.
......@@ -312,6 +303,7 @@ class RCUSCC(Device):
self.Off()
self.debug_stream("Shut down. Good bye.")
# ------------------
# Attributes methods
# ------------------
......@@ -438,6 +430,17 @@ class RCUSCC(Device):
# Commands
# --------
@command(
)
@DebugIt()
def Init(self):
"""
:return:None
"""
self.init_device()
@command(
)
@DebugIt()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment