Create records for appending tables#20
Create records for appending tables#20hyperrealist wants to merge 2 commits intoPandABlocks:update_to_fastcs_0.11from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## update_to_fastcs_0.11 #20 +/- ##
=========================================================
- Coverage 39.19% 39.00% -0.20%
=========================================================
Files 18 18
Lines 995 1000 +5
=========================================================
Hits 390 390
- Misses 605 610 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
LuisFSegalla
left a comment
There was a problem hiding this comment.
It looks good for me. I'm not so sure how the newest versions of FastCS are implementing the attributes handling, but I can't see anything obviously wrong with the code. I'm happy to test it against real hardware whenever you're available to do so!
|
This projects going to be updated to use FastCS 0.11 once #17 is in; would you mind rebasing over that branch, @hyperrealist? I can help, if there are ambiguous merge conflicts. |
ce11833 to
f834d4d
Compare
| # CLEAR | ||
| parent_block.add_attribute( | ||
| panda_name + PandaName(sub_field="CLEAR"), | ||
| AttrW( |
| ) | ||
| ), | ||
| description="Current table mode.", | ||
| group=WidgetGroup.OUTPUTS.value, |
There was a problem hiding this comment.
Can you put this in PARAMETERS please so it appears under the table
| AttrR( | ||
| Int(), | ||
| description="Number of queued lines not yet processed.", | ||
| group=WidgetGroup.READBACKS.value, |
There was a problem hiding this comment.
Can you put this in PARAMETERS please so it appears under the table
| Bool(), | ||
| description="Clear the table.", | ||
| io_ref=DefaultFieldIORef( | ||
| panda_name, self._raw_panda.put_value_to_panda |
There was a problem hiding this comment.
This should call client.send(Put(panda_name, [])) which sets it to an empty table
@shihab-dls I don't know how to make an IORef do that
There was a problem hiding this comment.
I think you'd want to do something like this instead:
async def clear_table() -> None:
await self._raw_panda.put_value_to_panda(panda_name, attribute.datatype, [])
parent_block.clear = Command(clear_table)Although, it looks like the widget made for commands sends "False" to the SharedPV, which raises an error, which we should look at. Putting True to the command PV will clear the table.
| Table(structured_datatype), | ||
| handler=TableFieldHandler(panda_name), | ||
| io_ref=TableFieldIORef( | ||
| panda_name, field_info, self._raw_panda.put_value_to_panda |
There was a problem hiding this comment.
This should check the value of the NEXT_WRITE attribute, and decide whether to Put, Append or Append(last=True) based on its value
| Enum(enum.Enum("NextWrite", ["Replace", "Append", "Append Last"])), | ||
| description="What the next write will do to the table.", | ||
| io_ref=DefaultFieldIORef( | ||
| panda_name, self._raw_panda.put_value_to_panda |
There was a problem hiding this comment.
This should not write to the PandA, it should just store the value
f163852 to
d23f70b
Compare
d23f70b to
dc45db0
Compare
Fixes #18