pub struct GigeDevice { /* private fields */ }Expand description
GVCP device handle.
Implementations§
Source§impl GigeDevice
impl GigeDevice
Sourcepub async fn open(addr: SocketAddr) -> Result<Self, GigeError>
pub async fn open(addr: SocketAddr) -> Result<Self, GigeError>
Connect to a device GVCP endpoint.
Sourcepub fn remote_addr(&self) -> SocketAddr
pub fn remote_addr(&self) -> SocketAddr
Return the remote GVCP socket address associated with this device.
Sourcepub async fn read_mem(
&mut self,
addr: u64,
len: usize,
) -> Result<Vec<u8>, GigeError>
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.
Sourcepub async fn write_mem(
&mut self,
addr: u64,
data: &[u8],
) -> Result<(), GigeError>
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.
Sourcepub async fn set_message_destination(
&mut self,
ip: Ipv4Addr,
port: u16,
) -> Result<(), GigeError>
pub async fn set_message_destination( &mut self, ip: Ipv4Addr, port: u16, ) -> Result<(), GigeError>
Configure the message channel destination address/port.
Sourcepub async fn set_stream_destination(
&mut self,
channel: u32,
ip: Ipv4Addr,
port: u16,
) -> Result<(), GigeError>
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.
Sourcepub async fn set_stream_packet_size(
&mut self,
channel: u32,
packet_size: u32,
) -> Result<(), GigeError>
pub async fn set_stream_packet_size( &mut self, channel: u32, packet_size: u32, ) -> Result<(), GigeError>
Configure the packet size for the stream channel.
Sourcepub async fn set_stream_packet_delay(
&mut self,
channel: u32,
packet_delay: u32,
) -> Result<(), GigeError>
pub async fn set_stream_packet_delay( &mut self, channel: u32, packet_delay: u32, ) -> Result<(), GigeError>
Configure the packet delay (GevSCPD).
Sourcepub async fn negotiate_stream(
&mut self,
channel: u32,
iface: &Iface,
port: u16,
target_mtu: Option<u32>,
) -> Result<StreamParams, GigeError>
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.
Auto Trait Implementations§
impl !Freeze for GigeDevice
impl RefUnwindSafe for GigeDevice
impl Send for GigeDevice
impl Sync for GigeDevice
impl Unpin for GigeDevice
impl UnwindSafe for GigeDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more