From b59e9bb11445289e99715a1a77b3835ecdf55a3b Mon Sep 17 00:00:00 2001 From: Thomas Juerges <4-jurges@users.noreply.git.astron.nl> Date: Tue, 2 Mar 2021 15:57:21 +0100 Subject: [PATCH] Add new OPC-UA commands - CLK_on - CLK_off - CLK_PLL_setup --- PCC/PCC/PCC.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/PCC/PCC/PCC.py b/PCC/PCC/PCC.py index 196c371cc..68288f094 100644 --- a/PCC/PCC/PCC.py +++ b/PCC/PCC/PCC.py @@ -316,6 +316,12 @@ class PCC(Device): 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.") @@ -424,6 +430,9 @@ class PCC(Device): self.function_mapping["RCU_off"] = {} self.function_mapping["ADC_on"] = {} 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 @@ -887,6 +896,39 @@ class PCC(Device): """ 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 -- GitLab