Pure-Rust GenICam camera library (GigE Vision backend, no vendor SDK)
Project description
telegenic
Pure-Rust GenICam camera library.
Transports are pluggable backends behind the feature layer. The only backend
today is GigE Vision (telegenic::gige): GVCP (control) and GVSP (stream)
spoken directly over UDP — no vendor SDK, no GenTL producer. USB3 Vision can
slot in later without touching the feature API.
use telegenic::{GenICamera, StreamConfig};
let mut cam = GenICamera::new([10, 0, 0, 210]); // no I/O, infallible
cam.connect()?; // dial, take control, load the feature model
cam.set_float("ExposureTime", 5000.0)?;
cam.set_enum("PixelFormat", "Mono8")?;
// One frame on demand — zero stream bandwidth between captures:
let frame = cam.snap(StreamConfig::new(), std::time::Duration::from_secs(5))?;
println!("{}x{} {}", frame.width, frame.height, frame.pixel_format);
// Or continuous acquisition. The guard subscribes before the camera
// starts (so even the first frame is delivered) and stops it on drop:
let acq = cam.start_acquisition(StreamConfig::new())?;
while let Some(frame) = acq.wait_for(std::time::Duration::from_secs(1)) {
println!("{}x{} {}", frame.width, frame.height, frame.pixel_format);
}
acq.stop()?; // or just drop it
cam.disconnect(std::time::Duration::from_millis(500)); // or just drop it
# Ok::<(), telegenic::GenicamError>(())
Cameras are plain owned values with an explicit lifecycle: construction is
free, connect(&mut self) is where I/O happens (and doubles as the
reconnect path after a dropped link), disconnect/drop releases device
control, and per-connection state — identity, capabilities, the GenICam
model, stats — lives exactly as long as the connection. Worker-facing
methods return Disconnected while no link is up.
Layers
GenICamera: the GenICam feature layer and the type most users hold. String-keyed typed feature access over the node graph from the device's XML (zipped or plain), Converter/SwissKnife formula evaluation, register caching with pInvalidator handling, and acquisition tied together for you:start_acquisitionreturns an RAII guard for continuous streaming,snap/snapshot_sessioncapture single frames on demand with the camera idle between shots. Both guards borrow the camera mutably, so stopping is automatic and disconnecting mid-acquisition cannot compile.gige: the GigE Vision backend.gige::discovery: broadcast device discovery per network adapter, plus Force IP for repointing a camera whose address doesn't match the local subnet (examples/discover.rs,examples/force_ip.rs).gige::GigECamera: the GVCP transport: register/memory IO as [ResponseHandle]s (syncwait_timeoutorawait), automatic heartbeat, pending-ack handling, retries, message-channel events, andopen_streamfor raw GVSP channels.gige::stream: per-channel GVSP receiver on its own thread: preallocated buffer pool (zero allocation per packet/frame at steady state), out-of-order reassembly, packet-resend requests, automatic packet size negotiation, frames fanned out asArc<Frame>over bounded channels with drop-on-full.
Python
The same library ships as a Python package (PyO3/maturin, py feature;
pip install telegenicam once published, or maturin develop from a
checkout. The import name stays telegenic). The GenICam surface maps one-to-one, every blocking call
releases the GIL, and frames expose their pixels as bytes for
numpy.frombuffer:
import telegenic
cam = telegenic.Camera("10.0.0.210")
cam.connect()
cam.set_float("ExposureTime", 5000.0)
with cam.snapshot_session() as session: # camera idle between snaps
frame = session.snap(timeout=5.0)
print(frame.width, frame.height, frame.pixel_format)
with cam.start_acquisition() as acq: # stops the camera again on exit
for _ in range(100):
frame = acq.wait_for(timeout=1.0)
if frame is not None:
print(frame)
telegenic.discover() finds cameras on the local subnets. Type stubs and
docstrings ship in the package (telegenic/__init__.pyi).
Examples
cargo run --example discover [interface-ip] # find cameras
cargo run --example force_ip <mac> <ip> <mask> <gw>
cargo run --example info <camera-ip> # identity + GenICam URL
cargo run --example snap <camera-ip> [n] # n on-demand single frames
cargo run --example grab <camera-ip> [n] # stream n frames
python examples/grab.py <camera-ip> [n] # the same, via the bindings
Testing
cargo test runs everything against an in-process fake camera over loopback
UDP (tests/fake_camera/): GVCP semantics (retries, pending-ack, control
loss), discovery/force-IP, GVSP reassembly under loss/reordering/duplication
with resend replay, GenICam evaluation against the real Hikrobot and Imperx
vendor XMLs in tests/data/, and the full GenICamera path including
message-channel events and single-frame snapshots.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file telegenicam-1.0.2.tar.gz.
File metadata
- Download URL: telegenicam-1.0.2.tar.gz
- Upload date:
- Size: 248.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e95fa8bc324b7d3500118f495deb451410deeff0d615649079fee1eb65123a09
|
|
| MD5 |
5a18e8d5304aaecbf8aaf3921b953a02
|
|
| BLAKE2b-256 |
d060642a0be26c8a5c4d8f73b3f382f86a44df8f9a90e58a6b8dfb6064ee67d0
|
File details
Details for the file telegenicam-1.0.2-cp315-abi3.abi3t-win_arm64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp315-abi3.abi3t-win_arm64.whl
- Upload date:
- Size: 505.0 kB
- Tags: CPython 3.15, CPython 3.15+, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab8a5100f20ae95d92fd1ac0dc2518e6f09dc31a6e432566aaca575ba49b3c40
|
|
| MD5 |
2014a117a323e808c2c6255bbcfc02aa
|
|
| BLAKE2b-256 |
6518399cf451674d8ceddee6da9eb11ca7415e2f32bf306ca5a6f579881ab6ef
|
File details
Details for the file telegenicam-1.0.2-cp315-abi3.abi3t-win_amd64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp315-abi3.abi3t-win_amd64.whl
- Upload date:
- Size: 525.9 kB
- Tags: CPython 3.15, CPython 3.15+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b9c28e397a7993585c1e47dc41c754a37f13bbfcb2497f6983a3909e4edd906
|
|
| MD5 |
f81e4990d6c72816a0cb3b7d08ec9b93
|
|
| BLAKE2b-256 |
01dc6fb118ba3462710f56ef4bb9cdeba6fbc86a6e0aead7f0be26778c964e5b
|
File details
Details for the file telegenicam-1.0.2-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 695.1 kB
- Tags: CPython 3.15, CPython 3.15+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23f3bb5d3291cda01f315aea932f2066f32b07979de838302bacb4b135faffd4
|
|
| MD5 |
10b840a33467a32f20d315b1ff325fcd
|
|
| BLAKE2b-256 |
fe7803fc26a246733a8e99d42be0d7d07f86622c69841fde138f0a6a9a61e951
|
File details
Details for the file telegenicam-1.0.2-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 690.1 kB
- Tags: CPython 3.15, CPython 3.15+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2745cbbd879bea19eb48bdac3eb28538dac0c7a38e8d7b5389383ea69cff8664
|
|
| MD5 |
d7540552c50406b0ff9f515da7a79de5
|
|
| BLAKE2b-256 |
cfc877e6ecad3b502847a0ef3a65566710278623ac278f36cf0782feda5b02b3
|
File details
Details for the file telegenicam-1.0.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl
- Upload date:
- Size: 631.0 kB
- Tags: CPython 3.15, CPython 3.15+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e2d3dba5c1eb2e8f57231df0cc1d4262059450a03ecac2d60bc70857fede903
|
|
| MD5 |
67b0da0d1b02d9c843bc35f2c2278de3
|
|
| BLAKE2b-256 |
c2af5dcd6ca6df6799fecb8f5e7f1b3a4c2c42361b6e569157d26e93d452f2a0
|
File details
Details for the file telegenicam-1.0.2-cp314-cp314t-win_arm64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp314-cp314t-win_arm64.whl
- Upload date:
- Size: 480.4 kB
- Tags: CPython 3.14t, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9c49977f50be10a82046f50982cbcd30048657a757f26efec336d985f42c036
|
|
| MD5 |
8cf6873e58f83fd9b3956c1badd69fa6
|
|
| BLAKE2b-256 |
ba16c9e2d6d152bd42292d8b90c996c4358f6f6516077a4b2dddd107f6643296
|
File details
Details for the file telegenicam-1.0.2-cp314-cp314t-win_amd64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp314-cp314t-win_amd64.whl
- Upload date:
- Size: 493.8 kB
- Tags: CPython 3.14t, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a9446fc61891a4a56709ba8dd0dad21f7cc210edaabdb4b42cd50d585cd57b8
|
|
| MD5 |
2ff0a250b0e40b586a803f4c2bf35805
|
|
| BLAKE2b-256 |
8ff5083b8b6587e9744330ae366e66564d684aede3265a8cee08f52f33def46f
|
File details
Details for the file telegenicam-1.0.2-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 666.1 kB
- Tags: CPython 3.14t, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d45875eea6ba01f2d24e8499922a314b24c11e85a0a12e9cfe61ea6b52dfd928
|
|
| MD5 |
b464f3bf9e62997f44eba223f9a962de
|
|
| BLAKE2b-256 |
7d7c678ababa58f57f0b717afb974a6132be3a49d220665842c03420a372ba83
|
File details
Details for the file telegenicam-1.0.2-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 668.2 kB
- Tags: CPython 3.14t, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37b0d890a676f58d0c195895f169af71bc43e93473a3582e6b73403299ab1152
|
|
| MD5 |
7b6319433b85ff193cefb95f455a4a1a
|
|
| BLAKE2b-256 |
9a7339a08477d48285c52903fc34944b77da63609de8786567d17328578bd0e4
|
File details
Details for the file telegenicam-1.0.2-cp314-cp314t-macosx_11_0_arm64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp314-cp314t-macosx_11_0_arm64.whl
- Upload date:
- Size: 608.5 kB
- Tags: CPython 3.14t, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c31848df36b292fc926efff789f37d591578b046a9cd88602ca959e976d56b1c
|
|
| MD5 |
18ab9f8b1e5f535e361c728a23c1d0a7
|
|
| BLAKE2b-256 |
537dc84a94b36aa170d16eab62d1d284db1b53d851cbbc78caf822c454df52e1
|
File details
Details for the file telegenicam-1.0.2-cp310-abi3-win_arm64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp310-abi3-win_arm64.whl
- Upload date:
- Size: 487.2 kB
- Tags: CPython 3.10+, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaab388ee5d1b141279d8ec3ae4a768ce4740012ab080d786ce34c440a595ef3
|
|
| MD5 |
ada8303c8ec7142889970d36eb7eed77
|
|
| BLAKE2b-256 |
1e6c3837c7fc3a4bb156b8a6f67bdf8262589e23e7c4d1fbdab4f859495feb40
|
File details
Details for the file telegenicam-1.0.2-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 500.3 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9280a54e48a6ac034fce2d19beaab46158ab5a24df2f7661ce9d1ebc0148b417
|
|
| MD5 |
2eaadcb54094b1077c9a3a35f7162d4d
|
|
| BLAKE2b-256 |
26cb8b6329295188fb44b3021266ceacf10e72148d1c8229728b098a25609291
|
File details
Details for the file telegenicam-1.0.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 675.2 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3081f97d6174df8946c87dce741b1e33d84d5e347839dd0266c103d4a67b7acf
|
|
| MD5 |
c7760e0212b9527e3397956208d8d979
|
|
| BLAKE2b-256 |
3b6c3b48d92f18de24676acae0589c1699aedff9b145a3795181b32b177769f1
|
File details
Details for the file telegenicam-1.0.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 675.8 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c8b885993e8c8bea724deff390356d589bed792813f7c4e2e67c0aa3729491d
|
|
| MD5 |
eac612670c6007af93bfddebabd0f8c1
|
|
| BLAKE2b-256 |
cb64f4787d2fbbd3d783ccf4e658d4f1b312be56566846005bd5e8c1216f005f
|
File details
Details for the file telegenicam-1.0.2-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: telegenicam-1.0.2-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 618.4 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7545225342fe0a8ddba34a627c3a282e3cd5b06e9775f62ff5bdf92899960810
|
|
| MD5 |
8735af509d319140db3012bfaf6628b6
|
|
| BLAKE2b-256 |
711f1fc3c3df1702374d2a056773f3177891d73c9a8edf428fc495495d85be76
|