Skip to main content

Crate viva_fake_gige

Crate viva_fake_gige 

Source
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§

FakeCamera
Handle to a running fake GigE Vision camera.
FakeCameraBuilder
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