Create table that shows state of different RF cavities.
All modifications to be done in rflearning project.
There will be just one text field named "Cavity".
Main Table
The table will have following columns:
- Cavity name (type String)
- Amplitude (type Double)
- Amplitude live (type Double)
- Phase (type Double)
- Phase live (type Double)
- Selected (type Boolean)
Rename "Submit" button into "Add cavity". Whenever the "Add cavity" button is pressed a new row will be added to the table. The "Cavity" text field will be used as name (the first column). All other fields (except the last one used for selection) will show values of different PVs associated with the cavity.
Amplitude PV: XXX:cavAmpAvg
Phase PV: XXX:cavPhaseAvg
XXX is the cavity name, e.g. SCL_LLRF:FCM01a. When a cavity is added "Amplitude" and "Amplitude live" columns should be populated with Amplitude PV value (two columns will show the same value), same for the phase columns. The live columns should keep updating with the most recent value of corresponding PV, the non live column should stay the same.
Example
After launch the table will be empty. User sets the "Cavity" text field to SCL_LLRF:FCM01a and presses "Add cavity" The table will look similar to following:
Cavity name | Amplitude | Amplitude live | Phase | Phase live | Selected |
---|---|---|---|---|---|
SCL_LLRF:FCM01a | 9.995 | 9.995 | 137.5 | 137.5 | [x] |
In couple seconds the live value would change and the table will look like:
Cavity name | Amplitude | Amplitude live | Phase | Phase live | Selected |
---|---|---|---|---|---|
SCL_LLRF:FCM01a | 9.995 | 9.876 | 137.5 | 137.8 | [x] |
Capturing live data
There will be another button "Capture live", if pressed it should copy the live columns to non live columns. So if this button is pressed the above table would transform into:
Cavity name | Amplitude | Amplitude live | Phase | Phase live | Selected |
---|---|---|---|---|---|
SCL_LLRF:FCM01a | 9.876 | 9.876 | 137.8 | 137.8 | [x] |
Saving documents
When user saves the document only non-live values should be saved. When user opens a document the non-live columns should be populated from the file, and the live columns will start updating from EPICS.