pub struct QueuedTx<const FRAME: usize = MAX_RESEND_FRAME_LEN> {
pub priority: TxPriority,
pub frame: Vec<u8, FRAME>,
pub receipt: Option<SendReceipt>,
pub identity_id: Option<LocalIdentityId>,
pub sequence: u32,
pub not_before_ms: u64,
pub cad_attempts: u8,
pub forward_deferrals: u8,
}Expand description
One entry in the TxQueue waiting to be transmitted by the Mac coordinator.
Each QueuedTx holds a complete, already-sealed frame ready to hand directly to the
radio driver. The coordinator does not re-seal on retransmit; the frame bytes are the
authoritative on-the-wire representation.
priority— determines service order within the queue. SeeTxPriority.frame— the sealed frame bytes, at mostFRAMEbytes. The coordinator callsradio.transmit(&entry.frame, tx_options).awaitwhen this entry reaches the head of the queue and itsnot_before_mshas elapsed.receipt— for ACK-requested sends, the associatedSendReceiptso the coordinator can update thePendingAckstate after a successful transmit.sequence— a monotonic counter assigned at enqueue time, used to preserve FIFO ordering among entries sharing the same priority.not_before_ms— earliest acceptable transmit time in monotonic milliseconds. Entries with a futurenot_before_msare skipped until the clock advances past it. Used to introduce per-node forwarding delay jitter that reduces collision probability. Zero means transmit immediately.cad_attempts— number of channel-activity-detection retries already consumed on this entry; compared againstMAX_CAD_ATTEMPTSto bound medium contention retries.forward_deferrals— number of times a queued flood-forward has already been deferred after overhearing another copy of the same packet before it transmitted.
Fields§
§priority: TxPriorityPriority class.
frame: Vec<u8, FRAME>Stored frame bytes.
receipt: Option<SendReceipt>Optional receipt associated with the frame.
identity_id: Option<LocalIdentityId>Identity that owns this send; set for identity-originated sends, None for
internally generated frames (MAC ACKs, forwarded frames).
sequence: u32Monotonic sequence number for stable ordering.
not_before_ms: u64Earliest transmission timestamp.
cad_attempts: u8Number of CAD attempts already consumed.
forward_deferrals: u8Number of overheard-repeat deferrals already consumed.
Implementations§
Source§impl<const FRAME: usize> QueuedTx<FRAME>
impl<const FRAME: usize> QueuedTx<FRAME>
Sourcepub fn try_new(
priority: TxPriority,
frame: &[u8],
receipt: Option<SendReceipt>,
identity_id: Option<LocalIdentityId>,
sequence: u32,
) -> Result<Self, CapacityError>
pub fn try_new( priority: TxPriority, frame: &[u8], receipt: Option<SendReceipt>, identity_id: Option<LocalIdentityId>, sequence: u32, ) -> Result<Self, CapacityError>
Create a queue entry ready to send immediately.
Sourcepub fn try_new_with_state(
priority: TxPriority,
frame: &[u8],
receipt: Option<SendReceipt>,
identity_id: Option<LocalIdentityId>,
sequence: u32,
not_before_ms: u64,
cad_attempts: u8,
forward_deferrals: u8,
) -> Result<Self, CapacityError>
pub fn try_new_with_state( priority: TxPriority, frame: &[u8], receipt: Option<SendReceipt>, identity_id: Option<LocalIdentityId>, sequence: u32, not_before_ms: u64, cad_attempts: u8, forward_deferrals: u8, ) -> Result<Self, CapacityError>
Create a queue entry with explicit timer and CAD state.
Trait Implementations§
impl<const FRAME: usize> Eq for QueuedTx<FRAME>
impl<const FRAME: usize> StructuralPartialEq for QueuedTx<FRAME>
Auto Trait Implementations§
impl<const FRAME: usize> Freeze for QueuedTx<FRAME>
impl<const FRAME: usize> RefUnwindSafe for QueuedTx<FRAME>
impl<const FRAME: usize> Send for QueuedTx<FRAME>
impl<const FRAME: usize> Sync for QueuedTx<FRAME>
impl<const FRAME: usize> Unpin for QueuedTx<FRAME>
impl<const FRAME: usize> UnwindSafe for QueuedTx<FRAME>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)