Skip to main content

StreamOptions

Struct StreamOptions 

Source
pub struct StreamOptions { /* private fields */ }
Expand description

How Camera::open_stream sets up a GigE stream. The defaults: the interface the operating system routes to the camera, unicast to a port the operating system picks, the camera’s own packet size (path-probed, ADR-0021) and packet delay, packet resend when the camera supports it, and a receive buffer the engine sizes from the frame.

Implementations§

Source§

impl StreamOptions

Source

pub fn monitor() -> Self

Watch a multicast stream another application configured: claim nothing, write nothing, read the group, port and packet size from the camera’s stream channel registers, join the group and receive. Never asks for lost packets.

The camera must already stream to a multicast group; one streaming unicast to another host cannot be watched. Works on a camera opened with Access::Monitor and on one this application controls.

Source

pub fn new() -> Self

The defaults.

Source

pub fn iface(self, iface: Iface) -> Self

Receive on this interface instead of the one routed to the camera.

Source

pub fn packet_size(self, size: u32) -> Self

Write this GevSCPSPacketSize, a ceiling for the path probe (StreamBuilder::packet_size).

Source

pub fn auto_packet_size(self) -> Self

Set the packet size from the interface MTU, then probe (StreamBuilder::auto_packet_size).

Source

pub fn multicast(self, group: Ipv4Addr) -> Self

Have the camera stream to a multicast group, and join it.

Source

pub fn destination_port(self, port: u16) -> Self

Receive on this UDP port, for a firewall that admits only it (StreamBuilder::destination_port). By default the operating system picks a free one.

Source

pub fn packet_delay(self, delay: Duration) -> Self

Have the camera wait delay between packets (StreamBuilder::packet_delay). By default GevSCPD is left alone.

Source

pub fn resend(self, policy: ResendPolicy) -> Self

Whether to ask the camera for lost packets (default ResendPolicy::Auto).

Source

pub fn rcvbuf_bytes(self, bytes: usize) -> Self

Ask for this SO_RCVBUF instead of letting the engine size it from the frame (max(4 MiB, 2 × PayloadSize)).

Source

pub fn payload_size(self, bytes: usize) -> Self

The camera’s PayloadSize: the exact size of every frame buffer (FrameStream::set_payload_size), in place before the first frame. Camera::open_stream reads it from the camera itself; GigeRegisterIo::open_stream, which has no node map to read it with, sizes each frame from its leader without it.

Trait Implementations§

Source§

impl Clone for StreamOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StreamOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StreamOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more