RadioInterfaceService

Interface for the low-level radio interface that handles raw byte communication.

Properties

Link copied to clipboard
abstract val connectionState: ERROR CLASS: Symbol not found for StateFlow<ERROR CLASS: Symbol not found for ConnectionState>

Reactive connection state of the radio.

Link copied to clipboard
abstract val currentDeviceAddressFlow: ERROR CLASS: Symbol not found for StateFlow<kotlin/String?>

Flow of the current device address.

Link copied to clipboard
abstract val meshActivity: ERROR CLASS: Symbol not found for SharedFlow<ERROR CLASS: Symbol not found for MeshActivity>

Flow of radio activity events.

Link copied to clipboard
abstract val receivedData: ERROR CLASS: Symbol not found for SharedFlow<kotlin/ByteArray>

Flow of raw data received from the radio.

Link copied to clipboard
abstract val serviceScope: ERROR CLASS: Symbol not found for CoroutineScope

The scope in which interface-related coroutines should run.

Link copied to clipboard
abstract val supportedDeviceTypes: List<ERROR CLASS: Symbol not found for DeviceType>

The device types supported by this platform's radio interface.

Functions

Link copied to clipboard
abstract fun connect()

Initiates the connection to the radio.

Link copied to clipboard
abstract fun getDeviceAddress(): String?

Returns the current device address.

Link copied to clipboard
abstract fun handleFromRadio(bytes: ByteArray)

Called by an interface when it has received raw data from the radio.

Link copied to clipboard
abstract fun isMockInterface(): Boolean

Whether we are currently using a mock interface.

Link copied to clipboard
abstract fun onConnect()

Called by an interface when it has successfully connected.

Link copied to clipboard
abstract fun onDisconnect(isPermanent: Boolean, errorMessage: String? = null)

Called by an interface when it has disconnected.

Link copied to clipboard
abstract fun sendToRadio(bytes: ByteArray)

Sends a raw byte array to the radio.

Link copied to clipboard
abstract fun setDeviceAddress(deviceAddr: String?): Boolean

Sets the device address to connect to.

Link copied to clipboard
abstract fun toInterfaceAddress(interfaceId: ERROR CLASS: Symbol not found for InterfaceId, rest: String): String

Constructs a full radio address for the specific interface type.