Deployment & Examples
This chapter covers building, installing, configuring, and running CamCom.
Building
Prerequisites
C++20 compiler (GCC 10+, Clang 12+)
CMake 3.10+
Required libraries: yaml-cpp, fmt, cfitsio, httplib
Optional: Aravis (for GenICam adapter), GTest (for tests)
Python 3 with PyQt6, NumPy (for GUI)
Build Systems
CamCom supports two build systems that coexist in the repository:
cmake/make — the primary build system, used for VLT and standalone builds.
waf/wtools — the ELT standard build system, used for ELT IFW integration.
Both produce the same installed layout. Use whichever matches your environment.
cmake/make (VLT and standalone)
CamCom uses CMake, wrapped by a convenience make script:
cd camcom
make build install # Build and install to $PREFIX
Target |
Description |
|---|---|
|
Prepare CMake build environment. |
|
Build all libraries and executables. |
|
Build with debug symbols. |
|
Install to |
|
Remove installed files. |
|
Run unit tests. |
|
Run integration tests. |
|
Run all tests with code coverage. |
|
Build documentation (Sphinx user manual). |
|
Clean build artifacts (keeps CMake cache). |
|
Remove entire build directory. |
Verbosity levels: -v (basic), -vv (CMake verbose), -vvv (Make
verbose), -vvvv (full verbose).
waf/wtools (ELT integration)
For ELT environments where waf and wtools are available:
cd camcom
waf configure build install # Build and install
waf test --alltests # Run unit tests
The waf build uses wscript files at each module level, following the ELT
wtools conventions (declare_project, declare_cshlib,
declare_cprogram, declare_pyprogram, declare_sphinx).
Location |
Function |
|---|---|
|
Top-level project: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Installs |
|
|
Installed Layout
After installation (via either build system), the following is deployed under
$PREFIX:
Path |
Contents |
|---|---|
|
Server executable. |
|
PyQt6 GUI client. |
|
Convenience script: start the simulated demo environment. |
|
Convenience script: stop the simulated demo environment. |
|
Common library (core interfaces). |
|
Simulation adapter. |
|
GenICam core library (node model, parser). |
|
GenICam emulator adapter. |
|
GenICam production adapter (if Aravis found). |
|
camcomGui Python package. |
|
YAML configuration files. |
|
C++ header files. |
Configuration Reference
CamCom is entirely config-driven. All configuration is in YAML files.
Config File Resolution
Config files support includes for layering. A typical pattern:
includes:
- "config/camcom/common.yaml" # Shared defaults
camcom:
camera_name: 'MyCamera' # Camera-specific overrides
...
Included files are resolved using the FindFile algorithm (see API). Values in the main file override those from includes.
Configuration Sections
CamCom Section
Key |
Type |
Description |
|---|---|---|
|
string |
Display name for the camera. |
|
string |
Camera address: IP address, serial number, or protocol URI. |
|
int |
Connection timeout in seconds (default: 10). |
Adapter Section
Key |
Type |
Description |
|---|---|---|
|
string |
Adapter shared library filename (e.g., |
|
string |
Factory function name (default: |
|
bool |
Auto-connect on server start (default: |
|
string |
GenICam XML profile path (for emulator). |
HTTP Server Section
Key |
Type |
Description |
|---|---|---|
|
string |
Listen address (default: |
|
int |
Listen port (default: |
Setup Section
Key |
Type |
Description |
|---|---|---|
|
bool |
Auto-adjust when exposure time and frame rate conflict. |
|
bool |
Stop acquisition during parameter writes, restart after. |
|
bool |
Skip write-protected parameters with a warning. |
Acquisition Section
Key |
Type |
Description |
|---|---|---|
|
int |
Capture-to-publisher queue size (default: 10). |
|
bool |
Drop frames silently vs. log warnings (default: |
Web Interface Section
Key |
Type |
Description |
|---|---|---|
|
bool |
Enable web interface (default: |
|
int |
Maximum display image width in pixels (default: 640). |
|
int |
Maximum display image height in pixels (default: 480). |
|
int |
Server-side display rate limit (default: 5). |
|
string |
|
|
int |
JPEG quality 1-100 (default: 85). |
Streaming Section
Key |
Type |
Description |
|---|---|---|
|
bool |
Enable real-time streaming (default: |
|
string |
|
Recording Section
Key |
Type |
Description |
|---|---|---|
|
string |
Output directory (supports |
|
string |
|
|
string |
|
|
string |
Identifier prefix in filenames. |
|
string |
Filename pattern with variables: |
|
int |
Stop after N frames (0 = unlimited). |
|
double |
Maximum recording duration in seconds (0 = unlimited). |
|
int |
Maximum file size in MB (0 = unlimited). |
|
int |
Recording queue size (default: 100). |
|
string |
|
|
bool |
Write per-frame timestamps in cube mode (default: |
|
string |
|
|
int |
Delay in seconds (when trigger is |
|
string |
ISO8601 timestamp (when trigger is |
Telemetry Section
Key |
Type |
Description |
|---|---|---|
|
bool |
Enable telemetry sampling (default: |
|
double |
Seconds between samples (default: 2.0). |
|
bool |
Pause sampling during acquisition. |
|
bool |
Pause sampling during recording. |
|
bool |
Auto-sample read-only parameters. |
|
list |
Extra parameter names to sample. |
|
int |
Samples to keep per parameter (default: 100). |
Statistics Section
Key |
Type |
Description |
|---|---|---|
|
bool |
Enable statistics collection (default: |
|
int |
Sliding window size in samples (default: 100). |
Logging Section
Key |
Type |
Description |
|---|---|---|
|
string |
Log level: |
|
string |
Log file path (supports |
|
string |
|
|
int |
Maximum rotated log files to keep (default: 7). |
GUI Section
Key |
Type |
Description |
|---|---|---|
|
bool |
Auto-start server from GUI (default: |
|
bool |
Auto-restart server on crash (default: |
|
int |
Seconds before restart attempt (default: 5). |
|
string |
GUI log level. |
|
string |
GUI log file path. |
|
double |
Statistics poll interval in seconds (default: 2.0). |
|
list |
Parameter names to show first in the Set Values tab, in order. |
Set Values Section
The set_values section is a flat map of parameter names to values. These are
applied to the camera after connection, using camera-native names:
set_values:
ExposureTime: 100000 # Microseconds (GenICam)
AcquisitionFrameRate: 10 # Hz
Width: 1024
Height: 768
Parameter Registry
The adapter.parameter_registry section defines metadata for parameters the
server manages:
adapter:
parameter_registry:
ExposureTime:
type: Float
unit: microseconds
min: 10.0
max: 10000000.0
write_access: true
mode:
type: Int32
allowed: [0, 1]
internal: true # CamCom-internal, not on camera
Fields:
Field |
Description |
|---|---|
|
Data type: |
|
Numeric constraints. |
|
List of valid values (for enumerations). |
|
Physical unit description. |
|
Whether writable (default: |
|
If |
Usage Examples
Example 1: Simulated Camera
The simplest way to try CamCom — no hardware needed:
# Start server with simulation adapter
camcomServer -c config/camcom/example_sim.yaml -l DEBUG -v
# In another terminal, start GUI
camcomGui -c config/camcom/example_sim.yaml -l INFO -v
Or use the convenience scripts:
camcomDemoStart # Starts server + GUI
camcomDemoStop # Stops both
Example 2: GenICam Emulator
Test GenICam parameter handling without real hardware:
# Start server with emulator adapter (loads XML profile)
camcomServer -c config/camcom/example_genicam_emulator.yaml -l DEBUG -v
# Start GUI
camcomGui -c config/camcom/example_genicam_emulator.yaml -l INFO -v
The emulator exposes all parameters from the XML profile with GenICam SFNC
names (ExposureTime, Width, PixelFormat, etc.).
Example 3: Real GenICam Camera
For a real GigE Vision camera (requires Aravis):
# Start server (connects to camera at tccd004.hq.eso.org)
camcomServer -c config/camcom/example_avt_mako_g_158b.yaml -l DEBUG -v
# Start GUI
camcomGui -c config/camcom/example_avt_mako_g_158b.yaml -l INFO -v
Example 4: Remote GUI
Connect a GUI to a server running on another host:
# On the server machine
camcomServer -c config/camcom/example_sim.yaml -l INFO -v
# On the client machine (any network-accessible host)
camcomGui -u http://server-host:8080 -l INFO -v
Example 5: Web Dashboard
Open a browser and navigate to the server URL:
http://localhost:8080/
The web dashboard provides status monitoring, acquisition control, and live image display without installing any client software.
Example 6: Recording FITS Files
Configure recording in YAML:
recording:
directory: '/tmp/camcom/data'
format: 'fits:cube' # 3D cube (all frames in one file)
compression: 'rice' # FITS tile compression
nb_of_frames: 100 # Stop after 100 frames
cube_timestamp_table: true # Include per-frame timestamps
Then start recording via the GUI’s Recording tab, or via the HTTP API:
curl -X POST http://localhost:8080/recording/start
# ... wait ...
curl -X POST http://localhost:8080/recording/stop
Environment Variables
Variable |
Description |
|---|---|
|
Installation prefix (used by build and FindFile). |
|
Alternative installation prefix (fallback for |
|
Colon-separated list of directories for config file search. |
|
Default data output directory (used in recording config). |
|
User home directory (used for log files, preferences). |
Helper Scripts
Two convenience wrappers are installed under $PREFIX/bin to spin
up the simulated-camera demo environment without having to remember
the right config path or argument order. Source lives in
camcom/tools/demo/src/; the build system (waf and CMake both)
installs them as executables.
camcomDemoStart
Starts the demo environment (server + GUI):
camcomDemoStart # Start server and GUI
camcomDemoStart --no-gui # Start server only
The script:
Stops any existing CamCom demo environment.
Starts
camcomServerwith the sim adapter config (example_sim.yaml).Starts
camcomGui(unless--no-gui).Saves process IDs to
/tmp/camcom_demo.pids.
camcomDemoStop
Stops the demo environment:
camcomDemoStop
Gracefully stops the GUI and server processes tracked in the PID file.