Skip to content

Commit

Permalink
Merge pull request #20 from hedrosistemas/doc
Browse files Browse the repository at this point in the history
Doc
  • Loading branch information
wjsan authored May 15, 2024
2 parents cb30f4f + fb165ff commit 202d007
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions include/ciot_mqttc.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,42 @@ ciot_err_t ciot_mqttc_subscribe(ciot_mqttc_t self, char *topic, uint8_t qos);
*/
ciot_err_t ciot_mqttc_reset_data_rate(ciot_mqttc_t self);

/**
* @brief Get the configured MQTT topics.
*
* @param self Pointer to the CIOT MQTT client instance.
* @param topics Pointer to the topics configuration structure.
* @return Error code indicating success or failure.
*/
ciot_err_t ciot_mqttc_get_topics(ciot_mqttc_t self, ciot_mqttc_topics_cfg_t *topics);

/**
* @brief Set the MQTT topics configuration.
*
* @param self Pointer to the CIOT MQTT client instance.
* @param topics Pointer to the topics configuration structure.
* @return Error code indicating success or failure.
*/
ciot_err_t ciot_mqttc_set_topics(ciot_mqttc_t self, ciot_mqttc_topics_cfg_t *topics);

/**
* @brief Set the device-to-backend MQTT topic.
*
* @param self Pointer to the CIOT MQTT client instance.
* @param topic Topic for device-to-backend communication.
* @return Error code indicating success or failure.
*/
ciot_err_t ciot_mqttc_set_d2b_topic(ciot_mqttc_t self, char *topic);

/**
* @brief Set the backend-to-device MQTT topic.
*
* @param self Pointer to the CIOT MQTT client instance.
* @param topic Topic for backend-to-device communication.
* @return Error code indicating success or failure.
*/
ciot_err_t ciot_mqttc_set_b2d_topic(ciot_mqttc_t self, char *topic);

#ifdef __cplusplus
}
#endif
Expand Down
1 change: 1 addition & 0 deletions include/types/ciot_msg_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ typedef union __attribute__((packed))
ciot_uart_data_u uart; /**< UART data */
ciot_usb_data_u usb; /**< USB data */
ciot_tcp_data_u tcp; /**< TCP data */
ciot_tcp_data_u eth; /**< ETH data */
ciot_wifi_data_u wifi; /**< WiFi data */
ciot_ble_data_u ble; /**< BLE data */
ciot_ble_scn_data_u ble_scn; /**< BLE SCN data */
Expand Down

0 comments on commit 202d007

Please sign in to comment.