Engineering GUI & CLI

This chapter describes the features and usage of the CCF Engineering GUI (for short CCF GUI). The purpose of this is to provide a general purpose engineering tool, to interact with a CCF instance, stand-alone.

The tool allows for switching states, starting and stopping image acquisition, setting up certain parameters, and supervising the status of the associated CCF instance.

It is not meant as a production tool, although it may be used for troubleshooting in the production environment, to help understand issues encountered in a CCF installation.

The CCF GUI is based on widgets provided by the “ifw-wdglib” project.

Note: The CCF GUI, provided with IFW24, is still an early implementation and provides only a limited set of features. The tool will evolve over the upcoming years and will provide more features for interacting with the associated CCF instance and for viewing the status and image data produced. Nevertheless, it is believed that the tool in its present form, can be useful to help controlling CCF.

Engineering GUI

Starting the GUI

The GUI executable is named “ccfGui”:

$ ccfGui --help

Usage: ccfGui [OPTIONS]

  @brief Entry point of main

  @ingroup ccfgui

Options:
  -n, --name TEXT                 Registered CCF name in Consul
  -u, --uri TEXT                  Service URI. E.g. zpb.rr://127.0.0.1:12091
  -l, --log-level [ERROR|INFO|DEBUG]
                                  Debugging level
  --help                          Show this message and exit.

It needs to be launched, with a reference to the associated CCF instance. The reference can either be given as the Request/Response URI:

$ ccfGui -u zpb.rr://127.0.0.1:12091/

or as the Nomad ID, if deploying with Consul:

$ ccfGui -n CcfInstance1

The GUI Panel

A snapshot of the CCF GUI is shown here:

../_images/ccf_gui.png

In the following the various functional sections of the panel are explained individually.

Top Menu

The panel top menu is shown here:

../_images/ccf_gui_top_menu.png

The options under the pull down manus are as follows:

  • File: Offers only an option to exit the panel for now.

  • State: Used to control the state machine handling of the associated CCF instance.

  • View: Allows only to redock the log output widget for now, if it had been undocked previously.

DCS Widget

The DCS Widget is shown here:

../_images/ccf_gui_dcs_widget.png

The DCS Widget shows the current state of the associated CCF instance.

The DCS state machine is described here State Machine.

In addition the operational mode is shown, which is either Normal Mode or Simulation. Whether to run in either of these modes, is adjusted via the CCF configuration.

Acquisition Widget

The Acquisition Widget is shown here:

../_images/ccf_gui_acq_widget.png

The image acquisition can be started and stopped. The current status is shown “Active” or “Stopped”.

It is possible to select whether CCF should run in Continuous or Finite Acquisition Mode; for latter, it will only carry out the “Number of Frames” specified in the setup. After that the acquisition stops.

The “Status” indicates if the frames are arriving within the expected window of time. If not, an error is shown in the output.

Some statistics about the performance is provided:

  • Frame rate: Frames handled per second by the Acquisition Thread.

  • Throughput: The average amount of bytes being handled.

  • Jitter: The jitter of the frame handling, calculated as a sliding window of a configurable amount of bytes.

Setup Widget

The Setup Widget is shown here:

../_images/ccf_gui_setup_widget.png

The basic parameters, shown in the picture can be modified for now. Other setup parameters are defined; some of them can be adjusted via the “Setup” command, if not supported by the panel.

When values are changed, the new value is typed into the left input box, then return is pressed. If an error occurs during handling, the status value (right) will not be updated. Instead an error will be shown in the log output (if activated).

Window Widget

The Windowing Widget is shown here:

../_images/ccf_gui_window_widget.png

It is only possible to set up all 4 ROI parameters at the same time. The current values in use by the associated CCF, can be set in the inputs by pressing “Set from DB”. To set up the window, the “Set Window” button is pressed.

Recording Widget

The Recording Widget is shown here:

../_images/ccf_gui_recording_widget.png

The recording widget is used to request the CCF to start recording data into data product files.

If “Start” is pressed and “Deferred [seconds]” is 0, the Recording Session will be executed immediately.

If a time is given in the input for “Deferred [seconds]”, the Deferred Recording feature of CCF will be activated and the recording started after the specified amount of seconds.

To set the delay back to 0, the “Reset” button can be selected.

If a Deferred Recording Session, to be executed in absolute time is required, the “Absolute Time” button shall be selected and the time entered. By pressing “Get Current Time”, the current time is written to the input and the “Absolute Time” button select automatically. Note, if giving an absolute time before the current time, the Recording Start is received by CCF, will result in an error.

The status of a Recording Session being executed, is shown in the “Status” area of the widget.

If a Deferred Recording Session has been selected, the “Remaining Time” will include also the time to wait for starting the recording.

It is possible to set the Recording ID manually.

It is not possible to query the status of previously executed recordings in this version.

Pipelines Widget

An example of the Pipelines Widget is shown here:

../_images/ccf_gui_pipelines_widget.png

The tabs to the left are used to select which Pipeline to view. In this case two Pipelines are defined in the CCF Configuration, named “proc_1” and “proc_2” (note, the names can be chosen freely and should reflect the purpose of the Pipeline).

To the right the tabs contains the Recipes and Publisher configured for each Pipeline. Some status information is shown for each Recipe and Publisher.

The version of the GUI for IFW24, does not provide all parameters and also does not provide the option of setting up the adapters via the Setup command. This will be added in a future version.

Note, in the DDT Publisher Widget it is possible to launch the DDT for viewing the images. After starting a DDT instance, the “Open DDT Viewer” button remains disabled as long as the DDT Viewer launched, is running.

Logs Output Widget

The Logs Output Widget is shown here:

../_images/ccf_gui_logs_widget.png

It’s the standard widget used in many ELT panels. By right-clicking in the log output area, it is possible to enable the filter menu. If the widget has been undocked, it is possible to re-dock it in the panel, via the “View->Hide/Unhide Logs” pull-down menu in the panel top-menu.

Connection and OLDB Status Widget

The connection status widget is shown here:

../_images/ccf_gui_con_status_widget.png

It indicates if the connection (request/response MAL interface) to the associated CCF server, is working properly, which is signalled by the LED being green. The connection status shown, is the sum of the connections of the three interfaces provided by CCF: “stdif”, “dcsif” and “recif”.

When the LED to the right of the “DB Prefix” output is green, the connection to the OLDB is valid.

Command-Line Interface - CLI

Like other IFW components, CCF also provides a Command-Line Interface (CLI), built on the shared infrastructure offered by the “ifw-core”, “acli” tool.

To use it, start it up with the CCF server URI, or the Consul name, to which to connect, e.g.:

> ccfCli --uri zpb.rr://127.0.0.1:12092
zpb.rr://127.0.0.1:12092
ccf> help
reply> = Available command list:
- abort
- disable
- enable
- execute
- exit
- getconfig
- getdiagnostics
- getloglevel
- getsetup
- help
- init
- ping
- readpars
- recabort
- reccontinue
- recover
- recpause
- recstart
- recstatus
- recstop
- recwait
- reset
- scan
- setconfig
- setloglevel
- setup
- start
- state
- status
- stop
- version
- writepars

ccf>

Note, that not all commands listed above, may be supported, yet.

In the following some examples of the usage are shown:

ccf> getloglevel
reply> = Logger: <base, Level: ERROR
Logger: CiiOldbDataPoint, Level: ERROR
Logger: app, Level: ERROR
Logger: ccf, Level: ERROR
Logger: ccf-fast, Level: ERROR
Logger: cii.config.api, Level: ERROR
Logger: cii.internal.config.api, Level: NOTSET
Logger: cii.internal.redis, Level: NOTSET
Logger: cii.mal.zpb.api, Level: ERROR
Logger: cii.mal.zpb.client, Level: NOTSET
Logger: cii.mal.zpb.internal, Level: NOTSET
Logger: cii.mal.zpb.publisher, Level: NOTSET
Logger: cii.mal.zpb.server, Level: NOTSET
Logger: cii.oldb.api, Level: NOTSET
Logger: cii.oldb.dp, Level: NOTSET
Logger: cii.oldb.dp.provider.directory, Level: NOTSET
Logger: cii.oldb.dp.provider.redis, Level: NOTSET
Logger: cii.oldb.factory, Level: NOTSET
Logger: ddt, Level: ERROR
Logger: didlib, Level: ERROR
Logger: fitslib, Level: ERROR
Logger: ifwfnd, Level: ERROR
Logger: open62541, Level: ERROR
Logger: rad, Level: ERROR
Logger: rad.sm, Level: NOTSET
Logger: rootLogger, Level: ERROR
Logger: rtmslib, Level: ERROR
Logger: rtmstools, Level: NOTSET
Logger: scxml4cpp, Level: ERROR
ccf> getsetup expo
reply> = dcs.expo.bin_x=1
dcs.expo.bin_y=1
dcs.expo.frame_rate=150
dcs.expo.mode=Continuous
dcs.expo.nb=1000
dcs.expo.time=0.006
dcs.expo.win_height=487
dcs.expo.win_start_x=370
dcs.expo.win_start_y=5
dcs.expo.win_width=88
ccf> getsetup expo.time
reply> = dcs.expo.time=0.016
ccf> setup expo.time=0.01
reply> = OK

ccf> getsetup expo.time
reply> = dcs.expo.time=0.01
ccf> recstart
reply> = Recording Status:
ID: RecId-89bb3166-2570-4f17-b679-07cb1536c861
Start Time: 2025-07-15T11:51:58.771130
End Time: 2025-07-15T11:51:58.782130
Time Elapsed (s): 0.0
Remaining Time (s): 0.011
Status: RecStatusNames.Active
Files Generated: 0
Frames Processed: 0
Size Recorded: 0
Data Product Files:


ccf> recstatus
reply> = Recording Status:
ID: RecId-0ee18058-e1b1-4c24-b5e1-78b812564acf
Start Time: 2025-07-15T11:52:02.065688
End Time: 2025-07-15T11:52:02.076688
Time Elapsed (s): 0.05477142333984375
Remaining Time (s): 0.0
Status: RecStatusNames.Completed
Files Generated: 2
Frames Processed: 11
Size Recorded: 8912896
Data Product Files:
- /scratch/jknudstr/DATAROOT/dcs/TestDcs/PubFitsTest1.fits
- /scratch/jknudstr/DATAROOT/dcs/TestDcs/PubFitsTest2.fits