Converts MQTTMail objects into viable MQTT messages so that they can be published.
More...
#include <MQTTMailer.hpp>
Converts MQTTMail objects into viable MQTT messages so that they can be published.
◆ buildMessage()
std::string MQTTMailer::buildMessage |
( |
std::string * |
elements, |
|
|
int |
num_elements |
|
) |
| |
Builds a message.
- Parameters
-
| elements | The elements |
[in] | num_elements | The number elements |
- Returns
- The message.
◆ mailMessage()
void MQTTMailer::mailMessage |
( |
PubSubClient * |
mqtt_client, |
|
|
std::string |
topic, |
|
|
std::string |
message, |
|
|
bool |
serial_debug = true |
|
) |
| |
Publish an MQTT message to a topic hosted by a specific broker.
- Parameters
-
[in] | topic | The topic/destination for the message |
[in] | message | The message in string form |
◆ reconnect()
Attempt to reconnect to MQTT broker every 5 seconds until successful.
- Parameters
-
[in] | mqtt_client | The mqtt client |
The documentation for this class was generated from the following files: