pub struct Transmit { /* private fields */ }Expand description
A HackRF operating in transmit mode.
Implementations§
Source§impl Transmit
impl Transmit
Sourcepub async fn new(
rf: HackRf,
max_transfer_size: usize,
) -> Result<Self, StateChangeError>
pub async fn new( rf: HackRf, max_transfer_size: usize, ) -> Result<Self, StateChangeError>
Switch a HackRF into transmit mode.
Sourcepub fn get_buffer(&self) -> Buffer
pub fn get_buffer(&self) -> Buffer
Get a buffer for holding transmit data.
All buffers have the same capacity, set when transmit is initialized. Actual transmitted data is rounded up to the nearest 256 samples, zero-filling as needed.
Sourcepub fn submit(&mut self, tx: Buffer)
pub fn submit(&mut self, tx: Buffer)
Queue up a transmit transfer.
This will pull from a reusable buffer pool first, and allocate a new buffer if none are available in the pool.
The buffer pool will grow so long as completed buffers aren’t dropped.
Sourcepub async fn next_complete(&mut self) -> Result<(), Error>
pub async fn next_complete(&mut self) -> Result<(), Error>
Wait for a transmit operation to complete
Auto Trait Implementations§
impl Freeze for Transmit
impl !RefUnwindSafe for Transmit
impl Send for Transmit
impl !Sync for Transmit
impl Unpin for Transmit
impl !UnwindSafe for Transmit
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