#include <sMQTTBroker.h>
|
| bool | init (unsigned short port, bool checkWifiConnection=false) |
| |
| void | update () |
| |
| void | publish (const std::string &topic, const std::string &payload, unsigned char qos=0, bool retain=false) |
| |
|
void | restart () |
| | restart WIFI server
|
| |
| virtual bool | onEvent (sMQTTEvent *event)=0 |
| | receive event from broker More...
|
| |
|
unsigned long | getRetainedTopicCount () |
| | receive retained topic count
|
| |
| std::string | getRetaiedTopicName (unsigned long index) |
| | receive topic name by index More...
|
| |
◆ getRetaiedTopicName()
| std::string sMQTTBroker::getRetaiedTopicName |
( |
unsigned long |
index | ) |
|
receive topic name by index
- Parameters
-
◆ init()
| bool sMQTTBroker::init |
( |
unsigned short |
port, |
|
|
bool |
checkWifiConnection = false |
|
) |
| |
setup broker
- Parameters
-
| port | set listen port |
| checkWifiConnection | enable/disable notify wifi connection in onEvent |
◆ onEvent()
| virtual bool sMQTTBroker::onEvent |
( |
sMQTTEvent * |
event | ) |
|
|
pure virtual |
◆ publish()
| void sMQTTBroker::publish |
( |
const std::string & |
topic, |
|
|
const std::string & |
payload, |
|
|
unsigned char |
qos = 0, |
|
|
bool |
retain = false |
|
) |
| |
publish message
- Parameters
-
| topic | name of topic |
| payload | |
| qos | |
| retain | |
◆ update()
| void sMQTTBroker::update |
( |
| ) |
|
The documentation for this class was generated from the following files: