diff -r 70c99c2084dc -r e52d11b8f252 main/task_mqtt.c --- a/main/task_mqtt.c Tue Nov 26 11:55:46 2019 +0100 +++ b/main/task_mqtt.c Fri Nov 29 14:26:37 2019 +0100 @@ -54,6 +54,10 @@ +/** + * @brief Generate the mqtt payload header. + * @return Allocated character string with the header. + */ char *payload_header(void) { char *tmp, buf[128]; @@ -71,6 +75,11 @@ +/** + * @brief Generate the mqtt topic base part. + * @param msgtype The message type part of the topic. + * @return The topic string allocated in memory. + */ char *topic_base(char *msgtype) { char *tmp; @@ -84,6 +93,11 @@ +/** + * @brief The mqtt generic publish function. + * @param topic The topic of the mqtt message. + * @param payload The payload of the mqtt message. + */ void publisher(char *topic, char *payload) { /* @@ -104,6 +118,11 @@ +/** + * @brief Generate json data for the given unit. + * @param i The unit record number. + * @return The json string allocated in memory. + */ char *unit_data(int i) { char *payload = NULL;