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

Add conditional use of the OPC_Namespace property

parent 5e4254ae
No related branches found
No related tags found
1 merge request!12Adjustments and fixes for attribute_wrapper merge
...@@ -126,8 +126,11 @@ class PCC(hardware_device): ...@@ -126,8 +126,11 @@ class PCC(hardware_device):
""" user code here. is called when the state is set to INIT """ """ user code here. is called when the state is set to INIT """
#set up the OPC ua client #set up the OPC ua client
self.OPCua_client = OPCUAConnection("opc.tcp://{}:{}/".format(self.OPC_Server_Name, self.OPC_Server_Port), "http://lofar.eu", self.OPC_Time_Out, self.Standby, self.Fault, self) namespace = "http://lofar.eu"
if self.OPC_Namespace is not None:
namespace = self.OPC_Namespace
self.OPCua_client = OPCUAConnection("opc.tcp://{}:{}/".format(self.OPC_Server_Name, self.OPC_Server_Port), namespace, self.OPC_Time_Out, self.Standby, self.Fault, self)
# map the attributes to the OPC ua comm client # map the attributes to the OPC ua comm client
for i in self.attr_list(): for i in self.attr_list():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment