StreamTransport

abstract class StreamTransport(callback: RadioTransportCallback, scope: CoroutineScope) : RadioTransport(source)

An interface that assumes we are talking to a meshtastic device over some sort of stream connection (serial or TCP probably).

Delegates framing logic to StreamFrameCodec from core:network.

Inheritors

Constructors

Link copied to clipboard
constructor(callback: RadioTransportCallback, scope: CoroutineScope)

Functions

Link copied to clipboard
open suspend override fun close()
Link copied to clipboard
open fun flushBytes()

Flushes buffered bytes to the underlying stream. No-op by default.

Link copied to clipboard
open override fun handleSendToRadio(p: ByteArray)
Link copied to clipboard
open fun keepAlive()
Link copied to clipboard
abstract fun sendBytes(p: ByteArray)

Writes raw bytes to the underlying stream (serial port, TCP socket, etc.).

Link copied to clipboard
open fun start()