Tutorials
This section walks you through typical workflows step by step.
The focus is a GigE Vision camera accessed over Ethernet, using:
- The
viva-camctlCLI for quick experiments and ops work. - The
viva-genicamcrate for Rust examples you can copy into your own code.
Each tutorial has a CLI variant and a Rust variant built on the examples in
crates/viva-genicam/examples/.
If you haven’t yet, start with the Quick start: it installs the library and the CLI and runs a first discovery.
Recommended path
- Discovery — find cameras on your network, verify that discovery works, and understand basic NIC and firewall requirements.
- Registers & features — read and write GenApi features
(e.g.
ExposureTime), use selectors such asGainSelector, and learn when you might need raw registers. - Common tasks — exposure, gain, triggers, region of interest, binning, frame rate and user sets, whatever names the camera uses for them; and a program without an async runtime.
- GenApi XML — fetch the GenICam XML from a device, inspect
it, and see how it maps to the NodeMap used by
viva-genapi. - Streaming — start a GVSP stream, receive frames, read the statistics, and learn which knobs matter for throughput and robustness.
- Testing without hardware — run everything above against an in-process fake camera, for tests, demos, or before your camera arrives.
You can stop after Discovery and Streaming if you only need to verify that your camera works. The other tutorials are useful when you want to build a full application or debug deeper GenApi issues.
What you need before starting
-
A Rust toolchain, 1.88 or newer, and a clone of the repository. The commands run from its root, as
cargo run -p viva-camctl -- …andcargo run -p viva-genicam --example …:git clone https://github.com/VitalyVorobyev/viva-genicam cd viva-genicamWith
viva-camctlinstalled (Quick start),viva-camctl …does the same ascargo run -p viva-camctl -- …. -
At least one GigE Vision camera reachable from your machine — connected directly to a NIC, or through a switch on a dedicated subnet. No camera yet? Start with Testing without hardware.
For networking details (MTU, jumbo frames, firewalls, link-local addressing), see the Networking Guide.