Skip to content
Snippets Groups Projects
Commit 6ccf0145 authored by Taya Snijder's avatar Taya Snijder
Browse files

renamed read_R and write_RW to read_func_wrapper and write_func_wrapper

parent d6faf226
No related branches found
No related tags found
1 merge request!197Resolve L2SS-363 "01 12 2021 get rw values from hardware"
...@@ -74,28 +74,28 @@ class attribute_wrapper(attribute): ...@@ -74,28 +74,28 @@ class attribute_wrapper(attribute):
@only_in_states([DevState.STANDBY, DevState.ON], log=False) @only_in_states([DevState.STANDBY, DevState.ON], log=False)
@fault_on_error() @fault_on_error()
def write_RW(device, value): def write_func_wrapper(device, value):
""" """
_write_RW writes a value to this attribute _write_RW writes a value to this attribute
""" """
self.write_function(value) self.write_function(value)
self.fset = write_RW self.fset = write_func_wrapper
""" Assign the read function to the attribute""" """ Assign the read function to the attribute"""
@only_in_states([DevState.STANDBY, DevState.ON], log=False) @only_in_states([DevState.STANDBY, DevState.ON], log=False)
@fault_on_error() @fault_on_error()
def read_R(device): def read_func_wrapper(device):
""" """
_read_R reads the attribute value, stores it and returns it" _read_R reads the attribute value, stores it and returns it"
""" """
device.value_dict[self] = self.read_function() device.value_dict[self] = self.read_function()
return device.value_dict[self] return device.value_dict[self]
self.fget = read_R self.fget = read_func_wrapper
super().__init__(dtype=datatype, max_dim_y=max_dim_y, max_dim_x=max_dim_x, access=access, **kwargs) super().__init__(dtype=datatype, max_dim_y=max_dim_y, max_dim_x=max_dim_x, access=access, **kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment