From 3612cb18567007ad26a6041fb386d3515cfebf22 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Mon, 26 Apr 2021 10:28:18 +0200
Subject: [PATCH] Put back the initialisation of OPCUA attributes, accidently
 got removed

---
 devices/PCC.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/devices/PCC.py b/devices/PCC.py
index a038a6282..266725ab4 100644
--- a/devices/PCC.py
+++ b/devices/PCC.py
@@ -140,6 +140,16 @@ class PCC(hardware_device):
         self.OPCua_client = OPCUAConnection("opc.tcp://{}:{}/".format(self.OPC_Server_Name, self.OPC_Server_Port), "http://lofar.eu",
                                             self.OPC_Time_Out, self.Fault, self)
 
+        # map the attributes to the OPC ua comm client
+        for i in self.attr_list():
+            try:
+                i.set_comm_client(self.OPCua_client)
+            except:
+                pass
+
+        self.OPCua_client.start()
+
+
 
     # --------
     # Commands
-- 
GitLab