Rx3MavConnection

Properties

Link copied to clipboard
@get:CheckReturnValue
abstract val mavFrame: Flowable<MavFrame<out MavMessage<*>>>

A stream of MavFrames.

Link copied to clipboard
@get:CheckReturnValue
abstract val streamState: Flowable<StreamState>

The current state of the connection stream.

Functions

Link copied to clipboard
@CheckReturnValue
abstract fun close(): Completable

Closes the underlying MavConnection and stops the reading process.

Link copied to clipboard
@CheckReturnValue
abstract fun connect(): Completable

Connects the underlying MavConnection and start reading from it. The Completable will receive a completed signal when the connection is created and then the reading process will start as a new task. The current implementation uses the IO Scheduler by default to schedule the tasks.

Link copied to clipboard
@CheckReturnValue
abstract fun <T : MavMessage<T>> sendSignedV2(systemId: UByte, componentId: UByte, payload: T, linkId: UByte, timestamp: UInt, secretKey: ByteArray): Completable

Sends the provided payload wrapped in a signed MAVLink v2 frame.

Link copied to clipboard
@CheckReturnValue
abstract fun <T : MavMessage<T>> sendUnsignedV2(systemId: UByte, componentId: UByte, payload: T): Completable

Sends the provided payload wrapped in an unsigned MAVLink v2 frame.

Link copied to clipboard
@CheckReturnValue
abstract fun <T : MavMessage<T>> sendV1(systemId: UByte, componentId: UByte, payload: T): Completable

Sends the provided payload wrapped in a Mavlink v1 frame.