pub struct U3vStreamBuilder<'a, T: UsbTransfer + 'static> { /* private fields */ }Expand description
Builder for a USB3 Vision U3vFrameStream on a camera’s transport —
the device, as GigE Vision’s StreamBuilder takes the device.
build is synchronous where GigE Vision’s is async:
opening a USB3 Vision stream is a handful of blocking register writes,
with nothing to wait on a socket for, and a program on the blocking API
(ADR-0027) must be able to open one without a runtime (ADR-0032).
Implementations§
Source§impl<'a, T: UsbTransfer + 'static> U3vStreamBuilder<'a, T>
impl<'a, T: UsbTransfer + 'static> U3vStreamBuilder<'a, T>
Sourcepub fn new(device: &'a U3vRegisterIo<T>) -> Self
pub fn new(device: &'a U3vRegisterIo<T>) -> Self
A builder for the stream of the camera behind device, with the
default transfer settings.
Sourcepub fn options(self, options: U3vStreamOptions) -> Self
pub fn options(self, options: U3vStreamOptions) -> Self
The transfer settings and payload size hint.
Sourcepub fn payload_size(self, bytes: u64) -> Self
pub fn payload_size(self, bytes: u64) -> Self
Bytes in one frame, used only when the device’s SIRM leaves its Required Payload Size at 0.
Sourcepub fn max_transfer_size(self, bytes: u32) -> Self
pub fn max_transfer_size(self, bytes: u32) -> Self
The largest payload transfer to ask for.
Sourcepub fn transfers_in_flight(self, transfers: usize) -> Self
pub fn transfers_in_flight(self, transfers: usize) -> Self
How many transfers to keep queued on the stream endpoint.
Sourcepub fn time_sync(self, time_sync: TimeSync) -> Self
pub fn time_sync(self, time_sync: TimeSync) -> Self
Map device timestamps to host time with time_sync.
Sourcepub fn build(self) -> Result<U3vFrameStream, GenicamError>
pub fn build(self) -> Result<U3vFrameStream, GenicamError>
Configure the SIRM, reset the stream endpoint, set StreamEnable, and start reading. The stream clears StreamEnable again when it is closed or dropped.