Skip to content
Snippets Groups Projects
Commit b59e9bb1 authored by Thomas Juerges's avatar Thomas Juerges
Browse files

Add new OPC-UA commands

- CLK_on
- CLK_off
- CLK_PLL_setup
parent a8c1831b
Branches
Tags
No related merge requests found
...@@ -316,6 +316,12 @@ class PCC(Device): ...@@ -316,6 +316,12 @@ class PCC(Device):
self.function_mapping["RCU_update"] = self.get_pcc_node("RCU_update") self.function_mapping["RCU_update"] = self.get_pcc_node("RCU_update")
self.function_mapping["CLK_off"] = self.get_pcc_node("CLK_off")
self.function_mapping["CLK_on"] = self.get_pcc_node("CLK_on")
self.function_mapping["CLK_PLL_setup"] = self.get_pcc_node("CLK_PLL_setup")
self.debug_stream("Mapping OPC-UA MP/CP to attributes done.") self.debug_stream("Mapping OPC-UA MP/CP to attributes done.")
...@@ -424,6 +430,9 @@ class PCC(Device): ...@@ -424,6 +430,9 @@ class PCC(Device):
self.function_mapping["RCU_off"] = {} self.function_mapping["RCU_off"] = {}
self.function_mapping["ADC_on"] = {} self.function_mapping["ADC_on"] = {}
self.function_mapping["RCU_update"] = {} self.function_mapping["RCU_update"] = {}
self.function_mapping["CLK_on"] = {}
self.function_mapping["CLK_off"] = {}
self.function_mapping["CLK_PLL_setup"] = {}
self.client = opcua.Client("opc.tcp://{}:{}/".format(self.OPC_Server_Name, self.OPC_Server_Port), self.OPC_Time_Out) # timeout in seconds self.client = opcua.Client("opc.tcp://{}:{}/".format(self.OPC_Server_Name, self.OPC_Server_Port), self.OPC_Time_Out) # timeout in seconds
...@@ -887,6 +896,39 @@ class PCC(Device): ...@@ -887,6 +896,39 @@ class PCC(Device):
""" """
self.function_mapping["RCU_update"]() self.function_mapping["RCU_update"]()
@command()
@DebugIt()
@only_when_on
@fault_on_error
def CLK_off(self):
"""
:return:None
"""
self.function_mapping["CLK_off"]()
@command()
@DebugIt()
@only_when_on
@fault_on_error
def CLK_on(self):
"""
:return:None
"""
self.function_mapping["CLK_on"]()
@command()
@DebugIt()
@only_when_on
@fault_on_error
def CLK_PLL_setup(self):
"""
:return:None
"""
self.function_mapping["CLK_PLL_setup"]()
# ---------- # ----------
# Run server # Run server
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment