Opening the Cockpit

How Cockpit is opened depends on where it runs: on ctrlX OS it is opened from the ctrlX web interface, on a PC it opens a window of its own.

On ctrlX OS

Cockpit has no window of its own on the device. It is opened from the ctrlX web interface, through the link the application adds to the sidebar when it is installed and running.

  1. Open the ctrlX CORE web interface in a browser.

  2. Click LumiScan Cockpit in the sidebar.

The link opens the address /ctrlx-hdvisionsystems-cockpit/ of the ctrlX web interface; ctrlX hands it on to Cockpit.

On a PC (LumiScan Keryx)

Cockpit runs on a PC with LumiScan Keryx, together with the applications it shows. It opens its pages in a window of its own, and serves them itself, on 127.0.0.1 only.

  1. Start the applications and Cockpit. There is no broker to start first: the first of them to find none starts the LumiScan Keryx broker, at the default address tcp://127.0.0.1:5555, and the broker keeps running when they end (see LumiScan Keryx on a PC).

    lumiscan-cam-driver
    lumiscan-cockpit
  2. The LumiScan Cockpit window opens. Starting Cockpit again while it runs brings that window to the front rather than opening a second one.

Closing the window ends Cockpit; the broker and the applications keep running.

For the broker, the port, the window and the log, see Broker, Window and Pages (PC).

The application overview

The page that opens is the application overview: every compatible HD Vision Systems application currently running on the system, and the views each one offers. It is how you see what is available and active before opening anything.

On ctrlX OS: clicking a view opens it in a new browser tab, which then keeps itself current for as long as it is the visible tab.

On a PC: clicking a view opens it in the same window, which then keeps it current. The bar at the top of the window goes back (←) and forward (→) through the pages opened in it, and to the overview (⌂).

When a view has nothing to show

A view reports the reason rather than showing an empty frame. The reasons and what to do are described in Troubleshooting: A view shows a message instead of an image and Troubleshooting: Findings are not drawn.

Broker, Window and Pages (PC)

This section applies to Cockpit on a PC with LumiScan Keryx.

The broker the applications start is the one of LumiScan Keryx when it is installed, which also brings up the Keryx page, http://127.0.0.1:7555/, to look at the tree; otherwise the krxsystem beside the applications. If the broker stops answering, the applications keep running and start it again.

Cockpit and the applications must use the same address. Without options they all do; an address passed with --keryx-url has to be passed to every one of them. Two cases start no broker, so start krxsystem --backend hdv --url <address> yourself first:

  • an ipc:// address relative to the folder it is started in (ipc://x); start the broker and every application from that same folder;

  • --no-keryx-autostart, or the environment variable LUMISCAN_KERYX_AUTOSTART=0.

Cockpit serves its pages on port 8000. When that port is taken, by another program or by a Cockpit started with --no-gui, Cockpit says so in a message and ends; --port chooses another port.

(Windows) Cockpit’s window shows its pages with the Microsoft Edge WebView2 Runtime. Without the runtime, Cockpit opens them in the default browser instead and shows a message; clicking OK there ends Cockpit.

--no-gui opens no window: Cockpit serves its pages for a browser on the same PC, at http://127.0.0.1:8000/lumiscan-cockpit/ (http://127.0.0.1:8000/ leads there too). A view then opens in a new browser tab.

(Windows) Started from a console as lumiscan-cockpit, without .exe, Cockpit keeps that console until it ends, writes its log there, and ends with Ctrl+C, with its window or with --no-gui. The name runs lumiscan-cockpit.com, which starts lumiscan-cockpit.exe and waits for it; lumiscan-cockpit.exe started directly gives the console back at once.

(Windows) Cockpit always writes its log to %LOCALAPPDATA%\LumiScan Cockpit\logs\lumiscan-cockpit.log.

Cockpit looks for its pages in a www folder beside its program, or in the folder --frontend names. Without them it serves only its API, and says so in its log.

Starting from an Example (PC)

On a PC, Cockpit writes an example of its settings into a folder of your choice, and ends without starting. For example (Windows):

lumiscan-cockpit --generate-settings C:\work\cockpit-settings

Without a folder (-g alone) it writes into the current folder. The example is the settings file lumiscan-cockpit.json - the overlay drawn on the views and the limits of the live view - and its schema, schemas\lumiscan-cockpit.schema.json. Existing files are never overwritten: when one of them is in the folder already, nothing is written and the Cockpit says which.

The Cockpit then names the folder it reads its settings from. On Windows this is %APP_RESOURCE_DIR%\etc\lumiscan-cockpit when the environment variable APP_RESOURCE_DIR is set, otherwise C:\ProgramData\HD Vision Systems GmbH\LumiScan Vision Suite\lumiscan-cockpit\etc\lumiscan-cockpit. Edit the example, copy it there, and start the Cockpit.