pub async fn connect_gige_as(
device: &DeviceInfo,
access: Access,
) -> Result<(Camera<GigeRegisterIo>, String), GenicamError>Expand description
Connect to a GigE Vision camera with the given Access, returning the
Camera and the GenICam XML it was built from.
Access::Control claims control privilege, switches PENDING_ACK on
where GVCP Capability says the camera has it, and keeps the privilege
alive until the camera is dropped, which releases it. It fails while
another application holds control. Access::Exclusive does the same
with exclusive access, which also keeps other applications from reading.
Access::Monitor writes nothing at all, so it works alongside an
application holding control, though not one holding exclusive access.
From a current-thread runtime the camera gets a runtime of its own — one worker thread, shut down when the camera is dropped — since a current-thread runtime cannot drive the camera’s socket while its one thread waits in a register read.