Skip to content
Snippets Groups Projects
Commit 057d3a82 authored by Jan David Mol's avatar Jan David Mol
Browse files

Convert incoming numpy values to python types for OPC-UA

parent 37f430c8
No related branches found
No related tags found
No related merge requests found
...@@ -427,9 +427,9 @@ class RCUSCC(Device): ...@@ -427,9 +427,9 @@ class RCUSCC(Device):
@fault_on_opcua_error @fault_on_opcua_error
def write_Attenuator_RW(self, value): def write_Attenuator_RW(self, value):
"""Set the Attenuator_RW attribute.""" """Set the Attenuator_RW attribute."""
self.attribute_mapping["Attenuator_RW"][0].set_value(value[0]) self.attribute_mapping["Attenuator_RW"][0].set_value(value[0].tolist())
self.attribute_mapping["Attenuator_RW"][1].set_value(value[1]) self.attribute_mapping["Attenuator_RW"][1].set_value(value[1].tolist())
self.attribute_mapping["Attenuator_RW"][2].set_value(value[2]) self.attribute_mapping["Attenuator_RW"][2].set_value(value[2].tolist())
self._Attenuator_RW = value self._Attenuator_RW = value
@only_when_on @only_when_on
...@@ -450,9 +450,9 @@ class RCUSCC(Device): ...@@ -450,9 +450,9 @@ class RCUSCC(Device):
@fault_on_opcua_error @fault_on_opcua_error
def write_Band_RW(self, value): def write_Band_RW(self, value):
"""Set the Band_RW attribute.""" """Set the Band_RW attribute."""
self.attribute_mapping["Band_RW"][0].set_value(value[0]) self.attribute_mapping["Band_RW"][0].set_value(value[0].tolist())
self.attribute_mapping["Band_RW"][1].set_value(value[1]) self.attribute_mapping["Band_RW"][1].set_value(value[1].tolist())
self.attribute_mapping["Band_RW"][2].set_value(value[2]) self.attribute_mapping["Band_RW"][2].set_value(value[2].tolist())
self._Band_RW = value self._Band_RW = value
@only_when_on @only_when_on
...@@ -480,8 +480,8 @@ class RCUSCC(Device): ...@@ -480,8 +480,8 @@ class RCUSCC(Device):
@fault_on_opcua_error @fault_on_opcua_error
def write_Dither_Frequency_RW(self, value): def write_Dither_Frequency_RW(self, value):
"""Set the Dither_Frequency_RW attribute.""" """Set the Dither_Frequency_RW attribute."""
self.attribute_mapping["Dither_Frequency_RW"][0].set_value(value[0]) self.attribute_mapping["Dither_Frequency_RW"][0].set_value(value[0].tolist())
self.attribute_mapping["Dither_Frequency_RW"][1].set_value(value[1]) self.attribute_mapping["Dither_Frequency_RW"][1].set_value(value[1].tolist())
self._Dither_Frequency_RW = value self._Dither_Frequency_RW = value
@only_when_on @only_when_on
...@@ -502,7 +502,7 @@ class RCUSCC(Device): ...@@ -502,7 +502,7 @@ class RCUSCC(Device):
@fault_on_opcua_error @fault_on_opcua_error
def write_LED_RW(self, value): def write_LED_RW(self, value):
"""Set the LED_RW attribute.""" """Set the LED_RW attribute."""
self.attribute_mapping["LED_RW"].set_value(value) self.attribute_mapping["LED_RW"].set_value(value.tolist())
self._LED_RW = value self._LED_RW = value
@only_when_on @only_when_on
......
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