MQTTRepositoryImpl

class MQTTRepositoryImpl(radioConfigRepository: RadioConfigRepository, nodeRepository: NodeRepository, buildConfigProvider: BuildConfigProvider, dispatchers: CoroutineDispatchers) : MQTTRepository(source)

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val connectionState: StateFlow<ConnectionState>

Observable MQTT connection lifecycle state (DISCONNECTED → CONNECTING → CONNECTED → RECONNECTING).

Link copied to clipboard
open override val proxyMessageFlow: Flow<MqttClientProxyMessage>

A flow of incoming messages from the subscribed MQTT topics. Connecting/subscribing is initiated when this flow is collected.

Link copied to clipboard
open override val subscriptionRefusal: StateFlow<MqttException.SubscriptionRefused?>

The broker's refusal of one or more topic filters on the current connection, or null when every filter was granted or nothing has been subscribed yet. Cleared when the session ends.

Functions

Link copied to clipboard
open override fun disconnect()

Disconnects the MQTT client and cleans up resources.

Link copied to clipboard
open override fun publish(topic: String, data: ByteArray, retained: Boolean)

Publishes a message to the given MQTT topic.