Package-level declarations

Types

Link copied to clipboard

Functions

Link copied to clipboard

A helper function to wrap a MavConnection as a CoroutinesMavConnection. The returned CoroutinesMavConnection uses the provided context to perform the IO operations of reading and sending the messages.

A helper function to wrap a MavConnection as a CoroutinesMavConnection. The returned CoroutinesMavConnection uses the provided context to perform the IO operations of reading and sending the messages. The onFailure callback is invoked when an exception is thrown while reading the messages. This can be used to implement a custom reconnection strategy.

Link copied to clipboard

A wrapper around CoroutinesMavConnection.close that returns true if no exception was thrown and false otherwise.

Link copied to clipboard
suspend fun CoroutinesMavConnection.tryConnect(readerScope: CoroutineScope): Boolean

A wrapper around CoroutinesMavConnection.connect that returns true if no exception was thrown and false otherwise.

Link copied to clipboard
suspend fun <T : MavMessage<T>> CoroutinesMavConnection.trySendSignedV2(systemId: UByte, componentId: UByte, payload: T, linkId: UByte, timestamp: UInt, secretKey: ByteArray): Boolean

A wrapper around CoroutinesMavConnection.sendSignedV2 that returns true if no exception was thrown and false otherwise.

Link copied to clipboard
suspend fun <T : MavMessage<T>> CoroutinesMavConnection.trySendUnsignedV2(systemId: UByte, componentId: UByte, payload: T): Boolean

A wrapper around CoroutinesMavConnection.sendUnsignedV2 that returns true if no exception was thrown and false otherwise.

Link copied to clipboard
suspend fun <T : MavMessage<T>> CoroutinesMavConnection.trySendV1(systemId: UByte, componentId: UByte, payload: T): Boolean

A wrapper around CoroutinesMavConnection.sendV1 that returns true if no exception was thrown and false otherwise.