In v4.0 of PandABlocks-server we have MODE and QUEUED_LINES attributes:
https://pandablocks.github.io/PandABlocks-server/master/fields.html
After PandABlocks/PandABlocks-client#107 there will be a has_mode attribute in the TableFieldInfo that tells us we have these fields. This ticket is to add some FastCS attributes when has_mode==True to allow table streaming.
At the moment we create a single Attribute for the table value:
|
def _make_table_field( |
|
self, |
|
parent_block: BlockController, |
|
panda_name: PandaName, |
|
field_info: TableFieldInfo, |
|
): |
|
structured_datatype = [ |
|
(name, self._table_datatypes_from_table_field_details(details)) |
|
for name, details in field_info.fields.items() |
|
] |
|
# TODO: Add units handler to update the units field and value of this one PV |
|
# https://github.com/PandABlocks/PandABlocks-ioc/blob/c1e8056abf3f680fa3840493eb4ac6ca2be31313/src/pandablocks_ioc/ioc.py#L750-L769 |
|
parent_block.attributes[panda_name.attribute_name] = AttrRW( |
|
Table(structured_datatype), |
|
handler=TableFieldHandler(panda_name), |
|
) |
The new list of attributes for a table with has_mode==True is:
panda_name + PandaName(sub_field="NEXT_WRITE") a WO enum of Replace / Append / Append Last that says what the next write to the table value will do
panda_name is the RW table value as before
panda_name + PandaName(sub_field="CLEAR") a command that sends an empty table to PandA
panda_name + PandaName(sub_field="MODE") is the RO current table mode, one of INIT / FIXED /STREAMING / STREAMING_LAST whose value is supplied from the PandA field {block_name}.{field_name}.MODE
panda_name + PandaName(sub_field="QUEUED_LINES") is the RO current number of table lines not yet processed by the FPGA whose value is supplied from the PandA {block_name}.{field_name}.QUEUED_LINES
Acceptance Criteria
- The attributes added and tests added
In v4.0 of PandABlocks-server we have
MODEandQUEUED_LINESattributes:https://pandablocks.github.io/PandABlocks-server/master/fields.html
After PandABlocks/PandABlocks-client#107 there will be a
has_modeattribute in theTableFieldInfothat tells us we have these fields. This ticket is to add some FastCS attributes whenhas_mode==Trueto allow table streaming.At the moment we create a single Attribute for the table value:
fastcs-PandABlocks/src/fastcs_pandablocks/panda/blocks/blocks.py
Lines 357 to 372 in f2bf17e
The new list of attributes for a table with
has_mode==Trueis:panda_name + PandaName(sub_field="NEXT_WRITE")a WO enum ofReplace/Append/Append Lastthat says what the next write to the table value will dopanda_nameis the RW table value as beforepanda_name + PandaName(sub_field="CLEAR")a command that sends an empty table to PandApanda_name + PandaName(sub_field="MODE")is the RO current table mode, one ofINIT/FIXED/STREAMING/STREAMING_LASTwhose value is supplied from the PandA field{block_name}.{field_name}.MODEpanda_name + PandaName(sub_field="QUEUED_LINES")is the RO current number of table lines not yet processed by the FPGA whose value is supplied from the PandA{block_name}.{field_name}.QUEUED_LINESAcceptance Criteria