Skip to main content

AGW

Struct AGW 

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

AGW connection.

Implementations§

Source§

impl AGW

Source

pub fn new(addr: &str) -> Result<AGW>

Create AGW connection to ip:port.

§Errors

If connecting to the server fails.

Source

pub fn version(&mut self) -> Result<(u16, u16)>

Get the version of the AGW endpoint.

§Errors

If the underlying connection fails.

Source

pub fn frames_outstanding(&mut self, port: Port) -> Result<usize>

Get the number of outstanding frames on a port.

Source

pub fn port_info(&mut self) -> Result<PortInfo>

Get some port info for the AGW endpoint.

§Errors

If the underlying connection fails.

Source

pub fn port_cap(&mut self, port: Port) -> Result<PortCaps>

Get port capabilities of the AGW “port”.

§Errors

If the underlying connection fails.

Source

pub fn unproto( &mut self, port: Port, pid: Pid, src: &Call, dst: &Call, data: &[u8], ) -> Result<()>

Send UI packet.

§Errors

If the underlying connection fails.

Source

pub fn register_callsign( &mut self, port: Port, pid: Pid, src: &Call, ) -> Result<()>

Register callsign.

The specs say that registering the callsign is mandatory. Direwolf doesn’t seem to care, but there it is.

Presumably needed for incoming connection, but incoming connections are not tested yet.

§Errors

If underlying connection fails.

Source

pub fn connect<'a>( &'a mut self, port: Port, pid: Pid, src: &Call, dst: &Call, via: &[Call], ) -> Result<Connection<'a>>

Create a new connection.

§Errors

If the underlying connection fails.

Auto Trait Implementations§

§

impl Freeze for AGW

§

impl RefUnwindSafe for AGW

§

impl Send for AGW

§

impl !Sync for AGW

§

impl Unpin for AGW

§

impl UnsafeUnpin for AGW

§

impl UnwindSafe for AGW

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.

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.