PacketHandler

Interface for handling the transmission of packets to the radio and managing the packet queue.

Functions

Link copied to clipboard
abstract fun handleQueueStatus(queueStatus: QueueStatus)

Processes queue status updates from the radio.

Link copied to clipboard
abstract fun removeResponse(dataRequestId: Int, complete: Boolean)

Removes a pending response for a request.

Link copied to clipboard
abstract fun sendToRadio(packet: MeshPacket)

Adds a mesh packet to the queue for sending.

abstract fun sendToRadio(p: ToRadio)

Sends a command/packet directly to the radio.

Link copied to clipboard
abstract suspend fun sendToRadioAndAwait(packet: MeshPacket): Boolean

Adds a mesh packet to the queue and suspends until the radio acknowledges it via QueueStatus.

Link copied to clipboard
abstract fun stopPacketQueue()

Stops the packet queue.