You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently status arrays (i.e. arrays that are read-only) are left as a single parameter and formatted as a string. This is useful in cases where the list will change at at runtime, e.g. the the error parameter of a frame processor. In cases where the array is static, it could be useful to unpack the array into individually indexed attributes, for example so that PV clients can read individual integers rather than a string that needs parsing.
The formatting as a string (here) is done too early to be able to change the logic because we don't even know what plugins are loaded at this point. I think the best thing do is search for array OdinParameters in _process_parameters and replace them with individual parameters. There should be a function (suggest unpack_status_arrays) in odin_fastcs.util that takes a list[OdinParameter] and a (list of uris) (list[list[str]]) to search for and replace. It will insert the new indexed OdinParameters into the list and remove the original. Then in a specific OdinAdapterController this function can be called with whatever parameter uris it wants to be split.
This can be tested in FrameProcessorController._process_parameters to split ["status", "plugins", "names"], although possibly we don't actually want it on this. Let's see. Or it could be tested on xspress if a controller is made for that, this was the original use case.
The text was updated successfully, but these errors were encountered:
Currently status arrays (i.e. arrays that are read-only) are left as a single parameter and formatted as a string. This is useful in cases where the list will change at at runtime, e.g. the the error parameter of a frame processor. In cases where the array is static, it could be useful to unpack the array into individually indexed attributes, for example so that PV clients can read individual integers rather than a string that needs parsing.
The formatting as a string (here) is done too early to be able to change the logic because we don't even know what plugins are loaded at this point. I think the best thing do is search for array
OdinParameter
s in_process_parameters
and replace them with individual parameters. There should be a function (suggestunpack_status_arrays
) inodin_fastcs.util
that takes alist[OdinParameter]
and a (list of uris) (list[list[str]]
) to search for and replace. It will insert the new indexedOdinParameter
s into the list and remove the original. Then in a specificOdinAdapterController
this function can be called with whatever parameter uris it wants to be split.This can be tested in
FrameProcessorController._process_parameters
to split["status", "plugins", "names"]
, although possibly we don't actually want it on this. Let's see. Or it could be tested on xspress if a controller is made for that, this was the original use case.The text was updated successfully, but these errors were encountered: