GigeDevice

Struct GigeDevice 

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

GVCP device handle.

Implementations§

Source§

impl GigeDevice

Source

pub async fn open(addr: SocketAddr) -> Result<Self, GigeError>

Connect to a device GVCP endpoint.

Source

pub fn remote_addr(&self) -> SocketAddr

Return the remote GVCP socket address associated with this device.

Source

pub async fn read_mem( &mut self, addr: u64, len: usize, ) -> Result<Vec<u8>, GigeError>

Read a block of memory from the remote device with chunking and retries.

Source

pub async fn write_mem( &mut self, addr: u64, data: &[u8], ) -> Result<(), GigeError>

Write a block of memory to the remote device with chunking and retries.

Source

pub async fn set_message_destination( &mut self, ip: Ipv4Addr, port: u16, ) -> Result<(), GigeError>

Configure the message channel destination address/port.

Source

pub async fn set_stream_destination( &mut self, channel: u32, ip: Ipv4Addr, port: u16, ) -> Result<(), GigeError>

Configure the GVSP host destination for the provided channel.

Source

pub async fn set_stream_packet_size( &mut self, channel: u32, packet_size: u32, ) -> Result<(), GigeError>

Configure the packet size for the stream channel.

Source

pub async fn set_stream_packet_delay( &mut self, channel: u32, packet_delay: u32, ) -> Result<(), GigeError>

Configure the packet delay (GevSCPD).

Source

pub async fn negotiate_stream( &mut self, channel: u32, iface: &Iface, port: u16, target_mtu: Option<u32>, ) -> Result<StreamParams, GigeError>

Negotiate GVSP parameters with the device given the host interface.

Source

pub async fn enable_event_raw( &mut self, id: u16, on: bool, ) -> Result<(), GigeError>

Enable or disable delivery of the provided event identifier.

Source

pub async fn request_resend( &mut self, block_id: u16, first_packet: u16, last_packet: u16, ) -> Result<(), GigeError>

Request resend of a packet range for the provided block identifier.

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
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.

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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