Skip to content
Snippets Groups Projects

Resolve L2SS-363 "01 12 2021 get rw values from hardware"

Merged Resolve L2SS-363 "01 12 2021 get rw values from hardware"
2 unresolved threads
Merged Taya Snijder requested to merge L2SS-363_01-12-2021-get_RW_values_from_hardware into master
2 unresolved threads

Changed RW caching to instead get the value from hardware.

Fixed bug in our unit tests that caused the scalar_R tests to read RW values instead of R values

Closes L2SS-363

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
77 def read_RW(device):
78 # print("read_RW {}, {}x{}, {}, {}".format(me.name, me.dim_x, me.dim_y, me.attr_type, me.value))
79 """
80 read_RW returns the value that was last written to the attribute
81 """
82 try:
83 return device.value_dict[self]
84 except Exception as e:
85 raise Exception(f"Attribute read_RW function error, attempted to read value_dict with key: `{self}`, are you sure this exists?") from e
86
87 @only_in_states([DevState.STANDBY, DevState.ON], log=False)
88 @fault_on_error()
89 def write_RW(device, value):
77 def write_func_wrapper(device, value):
90 78 """
91 79 _write_RW writes a value to this attribute
  • 102 """ if the attribute is of READ type, assign the read function to it"""
    87 """ Assign the read function to the attribute"""
    103 88
    104 @only_in_states([DevState.STANDBY, DevState.ON], log=False)
    105 @fault_on_error()
    106 def read_R(device):
    107 """
    108 _read_R reads the attribute value, stores it and returns it"
    109 """
    110 device.value_dict[self] = self.read_function()
    111 return device.value_dict[self]
    89 @only_in_states([DevState.STANDBY, DevState.ON], log=False)
    90 @fault_on_error()
    91 def read_func_wrapper(device):
    92 """
    93 _read_R reads the attribute value, stores it and returns it"
  • Overall looks good just to very minor things.

  • Corné Lukken approved this merge request

    approved this merge request

  • Taya Snijder added 125 commits

    added 125 commits

    Compare with previous version

  • Taya Snijder added 1 commit

    added 1 commit

    Compare with previous version

  • Taya Snijder enabled an automatic merge when the pipeline for 3929d81c succeeds

    enabled an automatic merge when the pipeline for 3929d81c succeeds

  • Taya Snijder canceled the automatic merge

    canceled the automatic merge

  • merged

  • Taya Snijder mentioned in commit abf64b5a

    mentioned in commit abf64b5a

  • Please register or sign in to reply
    Loading