pub async fn connect_gige(
device: &DeviceInfo,
) -> Result<Camera<GigeRegisterIo>, GenicamError>Expand description
Connect to a GigE Vision camera and return a fully configured Camera.
This convenience function handles all connection boilerplate:
- Opens a GVCP control connection to the device
- Fetches and parses the GenApi XML from the camera
- Builds the nodemap
- Creates the transport adapter
§Example
ⓘ
use std::time::Duration;
use viva_genicam::{gige, connect_gige};
let devices = gige::discover(Duration::from_millis(500)).await?;
let device = devices.into_iter().next().expect("no camera found");
let mut camera = connect_gige(&device).await?;
camera.set("ExposureTime", "5000")?;