Yuzurihara-kun requested to add a duration of staying in the last state to the lockloss list.
So I added a new function to compute a duration in the guardian code and added them in the lockloss table.
A duration for the past lockloss hasn't been computed.
If someone make a list of a duration for the past lockloss events, I can add them to the json file for making the table on the Web pages.
For this update, k1grdconfig was updated to add new channels as shown in Fig.1. All added channels are the EPICS StringIn. So the daqd was not restarted for this work because there was no change in the DAQ list. k1grdconfig is only a process which has been restarted.
-----
For computing an accurate duration, guardian may have to read so long time data when lockloss occurred after staying some state for a long time. Such an implementation is not realistic for guardian which is a semi-real-time process. For solving this issue, LOCKLOSS guardian saves a time stamp when LSC_LOCK guardian moves to states and a duration is computed as a difference between the lockloss time and the saved time stamp. For this reason, this duration doesn't have same accuracy with the DAQ time stamp. Please use it as a rough reference.