CommandSender

Interface for sending commands and packets to the mesh network.

Functions

Link copied to clipboard
abstract fun generatePacketId(): Int

Generates a new unique packet ID.

Link copied to clipboard
abstract fun getCachedChannelSet(): ChannelSet

Returns the cached channel set.

Link copied to clipboard
abstract fun getCachedLocalConfig(): LocalConfig

Returns the cached local configuration.

Link copied to clipboard
abstract fun getCurrentPacketId(): Long

Returns the current packet ID.

Link copied to clipboard
abstract suspend fun requestNeighborInfo(requestId: Int, destNum: Int)

Requests neighbor info from a specific node.

Link copied to clipboard
abstract suspend fun requestPosition(destNum: Int, currentPosition: Position)

Requests the position of a specific node.

Link copied to clipboard
abstract suspend fun requestTelemetry(requestId: Int, destNum: Int, typeValue: Int)

Requests telemetry from a specific node.

Link copied to clipboard
abstract suspend fun requestTraceroute(requestId: Int, destNum: Int)

Requests a traceroute to a specific node.

Link copied to clipboard
abstract suspend fun requestUserInfo(destNum: Int)

Requests user info from a specific node.

Link copied to clipboard
abstract suspend fun sendAdmin(destNum: Int, requestId: Int = generatePacketId(), wantResponse: Boolean = false, initFn: () -> AdminMessage)

Sends an admin message to a specific node.

Link copied to clipboard
abstract suspend fun sendAdminAwait(destNum: Int, requestId: Int = generatePacketId(), wantResponse: Boolean = false, initFn: () -> AdminMessage): Boolean

Sends an admin message and suspends until the radio acknowledges it.

Link copied to clipboard
abstract suspend fun sendData(p: DataPacket)

Sends a data packet to the mesh.

Link copied to clipboard
abstract fun sendLockdownPassphrase(passphrase: String, boots: Int = 0, hours: Int = 0, maxSessionSeconds: Int = 0, disable: Boolean = false)

Sends a lockdown passphrase to authenticate with a locked device.

Link copied to clipboard
abstract fun sendLockNow()

Sends a Lock Now command to immediately lock a locked-firmware device.

Link copied to clipboard
abstract suspend fun sendPosition(pos: Position, destNum: Int? = null, wantResponse: Boolean = false)

Sends our current position to the mesh.

Link copied to clipboard
abstract suspend fun setFixedPosition(destNum: Int, pos: Position)

Sets a fixed position for a node.