220 mosquitto_publish(my_mosq, &mqtt_mid_sent, topic, 0, NULL, mqtt_qos, retain); |
220 mosquitto_publish(my_mosq, &mqtt_mid_sent, topic, 0, NULL, mqtt_qos, retain); |
221 } |
221 } |
222 |
222 |
223 |
223 |
224 |
224 |
|
225 void mqtt_publish(char *topic, char *payload) |
|
226 { |
|
227 mosquitto_publish(mosq, &mqtt_mid_sent, topic, strlen(payload), payload, mqtt_qos, false); |
|
228 } |
|
229 |
|
230 |
|
231 |
225 void publishNData(bool birth, int flag) |
232 void publishNData(bool birth, int flag) |
226 { |
233 { |
227 char *topic = NULL, *payload = NULL; |
234 char *topic = NULL, *payload = NULL; |
228 struct utsname ubuf; |
235 struct utsname ubuf; |
229 bool comma = false; |
236 bool comma = false; |