pub struct Camera<T: RegisterIo> { /* private fields */ }Expand description
Camera facade combining a nodemap with a transport implementing RegisterIo.
Implementations§
Source§impl<T: RegisterIo> Camera<T>
impl<T: RegisterIo> Camera<T>
Sourcepub fn new(transport: T, nodemap: NodeMap) -> Self
pub fn new(transport: T, nodemap: NodeMap) -> Self
Create a new camera wrapper from a transport and a nodemap.
Sourcepub fn transport_mut(&mut self) -> &mut T
pub fn transport_mut(&mut self) -> &mut T
Return a mutable reference to the underlying transport.
Sourcepub fn nodemap_mut(&mut self) -> &mut NodeMap
pub fn nodemap_mut(&mut self) -> &mut NodeMap
Mutable access to the nodemap.
Sourcepub fn enum_entries(&self, name: &str) -> Result<Vec<String>, GenicamError>
pub fn enum_entries(&self, name: &str) -> Result<Vec<String>, GenicamError>
List available entries for an enumeration feature.
Sourcepub fn get(&self, name: &str) -> Result<String, GenicamError>
pub fn get(&self, name: &str) -> Result<String, GenicamError>
Retrieve a feature value as a string using the nodemap type to format it.
Sourcepub fn set(&mut self, name: &str, value: &str) -> Result<(), GenicamError>
pub fn set(&mut self, name: &str, value: &str) -> Result<(), GenicamError>
Set a feature value using a string representation.
Sourcepub fn set_exposure_time_us(&mut self, value: f64) -> Result<(), GenicamError>
pub fn set_exposure_time_us(&mut self, value: f64) -> Result<(), GenicamError>
Convenience wrapper for exposure time features expressed in microseconds.
Sourcepub fn set_gain_db(&mut self, value: f64) -> Result<(), GenicamError>
pub fn set_gain_db(&mut self, value: f64) -> Result<(), GenicamError>
Convenience wrapper for gain features expressed in decibel.
Sourcepub async fn time_calibrate(
&mut self,
samples: usize,
interval_ms: u64,
) -> Result<(), GenicamError>
pub async fn time_calibrate( &mut self, samples: usize, interval_ms: u64, ) -> Result<(), GenicamError>
Capture device/host timestamp pairs and fit a mapping model.
Sourcepub fn map_dev_ts(&self, dev_ticks: u64) -> SystemTime
pub fn map_dev_ts(&self, dev_ticks: u64) -> SystemTime
Map device tick counters to host time using the fitted model.
Sourcepub fn time_reset(&mut self) -> Result<(), GenicamError>
pub fn time_reset(&mut self) -> Result<(), GenicamError>
Reset the device timestamp counter when supported by the camera.
Sourcepub fn acquisition_start(&mut self) -> Result<(), GenicamError>
pub fn acquisition_start(&mut self) -> Result<(), GenicamError>
Trigger acquisition start via the SFNC command feature.
Sourcepub fn acquisition_stop(&mut self) -> Result<(), GenicamError>
pub fn acquisition_stop(&mut self) -> Result<(), GenicamError>
Trigger acquisition stop via the SFNC command feature.
Sourcepub fn configure_chunks(
&mut self,
cfg: &ChunkConfig,
) -> Result<(), GenicamError>
pub fn configure_chunks( &mut self, cfg: &ChunkConfig, ) -> Result<(), GenicamError>
Configure chunk mode and enable the requested selectors.
Sourcepub async fn configure_events(
&mut self,
local_ip: Ipv4Addr,
port: u16,
enable_ids: &[&str],
) -> Result<(), GenicamError>
pub async fn configure_events( &mut self, local_ip: Ipv4Addr, port: u16, enable_ids: &[&str], ) -> Result<(), GenicamError>
Configure the GVCP message channel and enable delivery of the requested events.
Sourcepub fn configure_stream_multicast(
&mut self,
stream_idx: u32,
group: Ipv4Addr,
port: u16,
) -> Result<(), GenicamError>
pub fn configure_stream_multicast( &mut self, stream_idx: u32, group: Ipv4Addr, port: u16, ) -> Result<(), GenicamError>
Configure the stream channel for multicast delivery.
Sourcepub async fn open_event_stream(
&self,
local_ip: Ipv4Addr,
port: u16,
) -> Result<EventStream, GenicamError>
pub async fn open_event_stream( &self, local_ip: Ipv4Addr, port: u16, ) -> Result<EventStream, GenicamError>
Open a GVCP event stream bound to the provided local endpoint.