ControlSystemStudio / cs-studio

Control System Studio is an Eclipse-based collections of tools to monitor and operate large scale control systems, such as the ones in the accelerator community.
https://controlsystemstudio.org/
Eclipse Public License 1.0
111 stars 96 forks source link

Fixing the case where no data is plotted in the databrowser as the AA returns an empty iterator #2665

Closed rjwills28 closed 3 years ago

rjwills28 commented 3 years ago

This fix is for an issue where recent archive history from the AA is not plotted in the databrowser due to the fact that the PV has not changed within the timeframe requested. If a requested timeframe for optimized data (from the AA) contains no events then the AA returns a GenMsgIterator that is empty. Currently the databrowser checks that a GenMsgIterator is received from the AA request and registers a fail if not, in which case it will revert to some other request type. However it does not check that the GenMsgIterator is not empty, which leads to nothing being plotted. This change fixes this by performing an additional check that the GenMsgIterator is not empty and so will catch the case when it is and fall back to another request type.