RadioTransport

Interface for hardware transports (BLE, Serial, TCP, etc.) that handles raw byte communication. This is the KMP-compatible replacement for the legacy Android-specific IRadioInterface.

Functions

Link copied to clipboard
abstract suspend fun close()

Closes the connection to the device.

Link copied to clipboard
abstract fun handleSendToRadio(p: ByteArray)

Sends a raw byte array to the radio hardware.

Link copied to clipboard
open fun keepAlive()

If we think we are connected, but we don't hear anything from the device, we might be in a zombie state. This function can be implemented by transports to see if we are really connected.

Link copied to clipboard
open fun start()

Initializes the transport after construction. Called by the factory once the transport has been fully created.