• MqttChannel
  • MqttChannel Class

    Represents a isolated channel between a device and aplugin on the nymea internal MQTT broker More...

    Header: #include <MqttChannel>
    Inherits:
    Inherited By:

    Public Functions

    MqttChannel(QObject * parent = nullptr)
    virtual ~MqttChannel()
    virtual QString clientId() const = 0
    virtual QString password() const = 0
    virtual void publish(const QString & topic, const QByteArray & payload) = 0
    virtual QHostAddress serverAddress() const = 0
    virtual quint16 serverPort() const = 0
    virtual QString topicPrefix() const = 0
    virtual QString username() const = 0

    Signals

    void clientConnected(MqttChannel * channel)
    void clientDisconnected(MqttChannel * channel)
    void publishReceived(MqttChannel * channel, const QString & topic, const QByteArray & payload)

    Detailed Description

    Represents a isolated channel between a device and aplugin on the nymea internal MQTT broker

    The MQTT channel class holds the required data to connect to the nymea internal MQTT broker.

    Member Function Documentation

    MqttChannel::MqttChannel(QObject * parent = nullptr)

    [virtual] MqttChannel::~MqttChannel()

    [signal] void MqttChannel::clientConnected(MqttChannel * channel)

    [signal] void MqttChannel::clientDisconnected(MqttChannel * channel)

    [pure virtual] QString MqttChannel::clientId() const

    [pure virtual] QString MqttChannel::password() const

    [pure virtual] void MqttChannel::publish(const QString & topic, const QByteArray & payload)

    [signal] void MqttChannel::publishReceived(MqttChannel * channel, const QString & topic, const QByteArray & payload)

    [pure virtual] QHostAddress MqttChannel::serverAddress() const

    [pure virtual] quint16 MqttChannel::serverPort() const

    [pure virtual] QString MqttChannel::topicPrefix() const

    [pure virtual] QString MqttChannel::username() const