Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
class AndroidSerialDevicePresence(usbRepository: UsbRepository, processLifecycle: Lifecycle) : SerialDevicePresence

Android implementation of SerialDevicePresence backed by UsbRepository.serialDevices.

Link copied to clipboard
Link copied to clipboard
data class DiscoveredService(val name: String, val hostAddress: String, val port: Int, val txt: Map<String, String> = emptyMap())
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class KermitMqttLogger(baseLogger: Logger = Logger) : MqttLogger

Adapter that implements MqttLogger to send MQTT client logs to Kermit's Logger.

Link copied to clipboard

A broker address this platform has no transport for, as a bare host is in a browser.

Link copied to clipboard
interface MQTTRepository

Interface defining the MQTT interactions used for proxying messages to and from the mesh.

Link copied to clipboard
class MQTTRepositoryImpl(radioConfigRepository: RadioConfigRepository, nodeRepository: NodeRepository, buildConfigProvider: BuildConfigProvider, dispatchers: CoroutineDispatchers) : MQTTRepository
Link copied to clipboard

A root topic holding # or +, which no subscription filter built under it can carry.

Link copied to clipboard
Link copied to clipboard
interface NetworkMonitor
Link copied to clipboard
Link copied to clipboard
class NetworkRepositoryImpl(networkMonitor: NetworkMonitor, serviceDiscovery: ServiceDiscovery, dispatchers: CoroutineDispatchers, processLifecycle: Lifecycle) : NetworkRepository
Link copied to clipboard

Platform-abstracted view of currently-connected serial devices.

Link copied to clipboard
Link copied to clipboard

A helper class to call onChanged when bluetooth is enabled or disabled or when permissions are changed.

Link copied to clipboard
class UsbRepository(application: Application, dispatchers: CoroutineDispatchers, processLifecycle: Lifecycle, usbBroadcastReceiverLazy: Lazy<UsbBroadcastReceiver>, usbManagerLazy: Lazy<UsbManager?>, usbSerialProberLazy: Lazy<UsbSerialProber>)

Repository responsible for maintaining and updating the state of USB connectivity.

Properties

Link copied to clipboard
const val MQTT_KEEPALIVE_SECONDS: Int = 30

Functions

Link copied to clipboard
fun effectiveTlsEnabled(address: String, tlsEnabled: Boolean): Boolean
Link copied to clipboard
fun MqttException.ConnectionRejected.isCredentialRejection(): Boolean

true only for CONNACK reason codes where retrying can never help — the broker examined our credentials or client identity and refused them.

Link copied to clipboard
fun MqttEndpoint.isOpenableHere(): Boolean

Whether this platform's transport opens this: any endpoint, but in a browser only ws:// and wss://.

Link copied to clipboard
actual fun mqttTlsConfig(): TLSConfigBuilder.() -> Unit?

TLS customisation applied to the MQTT transports, or null to keep the platform default trust decision.

expect fun mqttTlsConfig(): TLSConfigBuilder.() -> Unit?

TLS customisation applied to the MQTT transports, or null to keep the platform default trust decision.

actual fun mqttTlsConfig(): TLSConfigBuilder.() -> Unit?

Desktop trusts the JDK cacerts, Apple's TLSConfigBuilder has no trustManager, and a browser page cannot influence TLS trust, so each defers to the platform trust decision.

Link copied to clipboard
expect fun mqttTransportFactory(tls: TLSConfigBuilder.() -> Unit?): MqttTransportFactory

The transport(s) registered for outbound MQTT connections, composed per platform: nonWebMain gets TCP/TLS (the default, tcp:///ssl://) plus WebSocket (ws:///wss://); wasmJs gets WebSocket only — a browser cannot open a raw TCP socket at all (permanent sandbox limitation, not a library gap; mqtt-client-transport-tcp publishes no wasmJs variant at all, confirmed via its Gradle Module Metadata).

actual fun mqttTransportFactory(tls: TLSConfigBuilder.() -> Unit?): MqttTransportFactory

The transport(s) registered for outbound MQTT connections, composed per platform: nonWebMain gets TCP/TLS (the default, tcp:///ssl://) plus WebSocket (ws:///wss://); wasmJs gets WebSocket only — a browser cannot open a raw TCP socket at all (permanent sandbox limitation, not a library gap; mqtt-client-transport-tcp publishes no wasmJs variant at all, confirmed via its Gradle Module Metadata).

Link copied to clipboard
fun resolveEndpoint(rawAddress: String, tlsEnabled: Boolean): MqttEndpoint

Resolve a user-supplied broker address into an MqttEndpoint.