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 fun requestNeighborInfo(requestId: Int, destNum: Int)

Requests neighbor info from a specific node.

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

Requests the position of a specific node.

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

Requests telemetry from a specific node.

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

Requests a traceroute to a specific node.

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

Requests user info from a specific node.

Link copied to clipboard
abstract 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 fun sendData(p: DataPacket)

Sends a data packet to the mesh.

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

Sends our current position to the mesh.

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

Sets a fixed position for a node.