pub struct Client<Tx, CLK, const TIMER_HZ: u32, const RES_CAPACITY: usize, const URC_CAPACITY: usize> where
Tx: Write<u8>,
CLK: Timer<TIMER_HZ>, { /* private fields */ }
Expand description
Client responsible for handling send, receive and timeout from the
userfacing side. The client is decoupled from the ingress-manager through
some spsc queue consumers, where any received responses can be dequeued. The
Client also has an spsc producer, to allow signaling commands like
reset
to the ingress-manager.
Implementations
sourceimpl<Tx, CLK, const TIMER_HZ: u32, const RES_CAPACITY: usize, const URC_CAPACITY: usize> Client<Tx, CLK, TIMER_HZ, RES_CAPACITY, URC_CAPACITY> where
Tx: Write<u8>,
CLK: Timer<TIMER_HZ>,
impl<Tx, CLK, const TIMER_HZ: u32, const RES_CAPACITY: usize, const URC_CAPACITY: usize> Client<Tx, CLK, TIMER_HZ, RES_CAPACITY, URC_CAPACITY> where
Tx: Write<u8>,
CLK: Timer<TIMER_HZ>,
pub fn new(
tx: Tx,
res_c: FrameConsumer<'static, RES_CAPACITY>,
urc_c: FrameConsumer<'static, URC_CAPACITY>,
timer: CLK,
config: Config
) -> Self
Trait Implementations
sourceimpl<Tx, CLK, const TIMER_HZ: u32, const RES_CAPACITY: usize, const URC_CAPACITY: usize> AtatClient for Client<Tx, CLK, TIMER_HZ, RES_CAPACITY, URC_CAPACITY> where
Tx: Write<u8>,
CLK: Timer<TIMER_HZ>,
impl<Tx, CLK, const TIMER_HZ: u32, const RES_CAPACITY: usize, const URC_CAPACITY: usize> AtatClient for Client<Tx, CLK, TIMER_HZ, RES_CAPACITY, URC_CAPACITY> where
Tx: Write<u8>,
CLK: Timer<TIMER_HZ>,
sourcefn send<A: AtatCmd<LEN>, const LEN: usize>(
&mut self,
cmd: &A
) -> Result<A::Response, Error>
fn send<A: AtatCmd<LEN>, const LEN: usize>(
&mut self,
cmd: &A
) -> Result<A::Response, Error>
Send an AT command. Read more
fn peek_urc_with<URC: AtatUrc, F: FnOnce(URC::Response) -> bool>(
&mut self,
f: F
)
sourcefn check_response<A: AtatCmd<LEN>, const LEN: usize>(
&mut self,
cmd: &A
) -> Result<A::Response, Error>
fn check_response<A: AtatCmd<LEN>, const LEN: usize>(
&mut self,
cmd: &A
) -> Result<A::Response, Error>
Check if there are any responses enqueued from the ingress manager. Read more
fn send_retry<A: AtatCmd<LEN>, const LEN: usize>(
&mut self,
cmd: &A
) -> Result<A::Response, Error>
Auto Trait Implementations
impl<Tx, CLK, const TIMER_HZ: u32, const RES_CAPACITY: usize, const URC_CAPACITY: usize> !RefUnwindSafe for Client<Tx, CLK, TIMER_HZ, RES_CAPACITY, URC_CAPACITY>
impl<Tx, CLK, const TIMER_HZ: u32, const RES_CAPACITY: usize, const URC_CAPACITY: usize> Send for Client<Tx, CLK, TIMER_HZ, RES_CAPACITY, URC_CAPACITY> where
CLK: Send,
Tx: Send,
impl<Tx, CLK, const TIMER_HZ: u32, const RES_CAPACITY: usize, const URC_CAPACITY: usize> !Sync for Client<Tx, CLK, TIMER_HZ, RES_CAPACITY, URC_CAPACITY>
impl<Tx, CLK, const TIMER_HZ: u32, const RES_CAPACITY: usize, const URC_CAPACITY: usize> Unpin for Client<Tx, CLK, TIMER_HZ, RES_CAPACITY, URC_CAPACITY> where
CLK: Unpin,
Tx: Unpin,
impl<Tx, CLK, const TIMER_HZ: u32, const RES_CAPACITY: usize, const URC_CAPACITY: usize> !UnwindSafe for Client<Tx, CLK, TIMER_HZ, RES_CAPACITY, URC_CAPACITY>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more