Expand description
In-process fake GigE Vision camera for testing and demos.
This crate provides a simulated GigE Vision camera that speaks real GVCP/GVSP protocols over UDP on localhost. It is intended for integration testing and demonstrations without requiring physical camera hardware or external tools like aravis.
§Example
use viva_fake_gige::FakeCamera;
let camera = FakeCamera::builder()
.width(640)
.height(480)
.fps(30)
.bind_ip([127, 0, 0, 1].into())
.build()
.await
.expect("failed to start fake camera");
// Camera is now discoverable on the configured port.
// Use viva_genicam::gige::discover() to find it.
// When done:
camera.stop().await;Modules§
- registers
- In-memory bootstrap register map and embedded GenApi XML.
Structs§
- Fake
Camera - Handle to a running fake GigE Vision camera.
- Fake
Camera Builder - Builder for configuring and starting a fake GigE Vision camera.
Constants§
- FAKE_
DEVICE_ KEY - Action keys the fake accepts. A command whose keys do not match is ignored without an acknowledgement, which is how a real device behaves — the command is broadcast to every camera on the subnet and only the addressed group acts.
- FAKE_
GROUP_ KEY - Group key the fake belongs to.
- FAKE_
GROUP_ MASK - Group mask bits the fake responds to.
- FAKE_
MAC - MAC address the fake camera reports. Public so tests can assert the exact bytes rather than merely that a MAC is present (ADR-0019).
- FAKE_
MANUFACTURER - Manufacturer name reported in the Discovery ACK.
- FAKE_
MODEL - Model name reported in the Discovery ACK.
- FAKE_
SERIAL - Serial number reported in the Discovery ACK.
- FAKE_
USER_ NAME - User-defined name reported in the Discovery ACK.
- FAKE_
VERSION - Device version reported in the Discovery ACK.
- MONO8
- PFNC pixel format codes.
- RGB8