diff --git a/include/ciot_mqttc.h b/include/ciot_mqttc.h index c29d19c..756788a 100644 --- a/include/ciot_mqttc.h +++ b/include/ciot_mqttc.h @@ -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 diff --git a/include/types/ciot_msg_types.h b/include/types/ciot_msg_types.h index 2273c35..4c9fc03 100644 --- a/include/types/ciot_msg_types.h +++ b/include/types/ciot_msg_types.h @@ -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 */