@@ -40803,6 +40803,221 @@ void uic_mqtt_dotdot_unify_humidity_control_publish_supported_commands(
4080340803void uic_mqtt_dotdot_unify_humidity_control_publish_empty_supported_commands(
4080440804 const dotdot_unid_t unid
4080540805 ,dotdot_endpoint_id_t endpoint);
40806+ // Callback types used by the application_status cluster
40807+
40808+ typedef struct {
40809+ uint8_t busy_status;
40810+ uint8_t wait_time;
40811+ bool reject_status;
40812+ } uic_mqtt_dotdot_application_status_state_t;
40813+
40814+ typedef struct {
40815+ bool busy_status;
40816+ bool wait_time;
40817+ bool reject_status;
40818+ } uic_mqtt_dotdot_application_status_updated_state_t;
40819+
40820+ typedef sl_status_t (*uic_mqtt_dotdot_application_status_write_attributes_callback_t)(
40821+ const dotdot_unid_t unid,
40822+ const dotdot_endpoint_id_t endpoint,
40823+ uic_mqtt_dotdot_callback_call_type_t call_type,
40824+ uic_mqtt_dotdot_application_status_state_t,
40825+ uic_mqtt_dotdot_application_status_updated_state_t
40826+ );
40827+
40828+ typedef sl_status_t (*uic_mqtt_dotdot_application_status_force_read_attributes_callback_t)(
40829+ const dotdot_unid_t unid,
40830+ const dotdot_endpoint_id_t endpoint,
40831+ uic_mqtt_dotdot_callback_call_type_t call_type,
40832+ uic_mqtt_dotdot_application_status_updated_state_t
40833+ );
40834+
40835+
40836+
40837+
40838+ /**
40839+ * @brief Setup a callback for WriteAttribute to be called when a
40840+ * +/application_status/Commands/WriteAttributes is received.
40841+ *
40842+ * Setting this callback will not overwrite the previous set callback
40843+ * @param callback Function to be called on command reception
40844+ */
40845+ void uic_mqtt_dotdot_set_application_status_write_attributes_callback(
40846+ const uic_mqtt_dotdot_application_status_write_attributes_callback_t callback
40847+ );
40848+ /**
40849+ * @brief Unsets a callback for WriteAttribute to be called when a
40850+ * +/application_status/Commands/WriteAttributes is received.
40851+ * @param callback Function to be no longer called on command reception
40852+ */
40853+ void uic_mqtt_dotdot_unset_application_status_write_attributes_callback(
40854+ const uic_mqtt_dotdot_application_status_write_attributes_callback_t callback
40855+ );
40856+ /**
40857+ * @brief Clears all callbacks registered for when
40858+ * +/application_status/Commands/WriteAttributes is received.
40859+ */
40860+ void uic_mqtt_dotdot_clear_application_status_write_attributes_callbacks();
40861+
40862+ /**
40863+ * @brief Setup a callback for ForceReadAttributes to be called when a
40864+ * +/application_status/Commands/ForceReadAttributes is received.
40865+ *
40866+ * Setting this callback will not overwrite the previous set callback
40867+ * @param callback Function to be called on command reception
40868+ */
40869+ void uic_mqtt_dotdot_set_application_status_force_read_attributes_callback(
40870+ const uic_mqtt_dotdot_application_status_force_read_attributes_callback_t callback
40871+ );
40872+ /**
40873+ * @brief Unsets a callback for ForceReadAttributes to be called when a
40874+ * +/application_status/Commands/ForceReadAttributes is received.
40875+ *
40876+ * @param callback Function to be no longer called on command reception
40877+ */
40878+ void uic_mqtt_dotdot_unset_application_status_force_read_attributes_callback(
40879+ const uic_mqtt_dotdot_application_status_force_read_attributes_callback_t callback
40880+ );
40881+ /**
40882+ * @brief Clears all callbacks registered for when
40883+ * +/application_status/Commands/ForceReadAttributes is received.
40884+ */
40885+ void uic_mqtt_dotdot_clear_application_status_force_read_attributes_callbacks();
40886+
40887+ /**
40888+ * @brief Publish the attribute; ApplicationStatus/Attributes/BusyStatus
40889+ *
40890+ * @param base_topic topic prefix to publish, /busy_status
40891+ * will be appended
40892+ * @param value Value to publish
40893+ * @param publish_type Whether to publish as Desired, Reported, or Both.
40894+ *
40895+ * @returns SL_STATUS_OK on success
40896+ */
40897+ sl_status_t uic_mqtt_dotdot_application_status_busy_status_publish(
40898+ const char *base_topic,
40899+ uint8_t value,
40900+ uic_mqtt_dotdot_attribute_publish_type_t publish_type
40901+ );
40902+
40903+ /**
40904+ * @brief Unretains a published attribute; ApplicationStatus/Attributes/BusyStatus
40905+ *
40906+ * @param base_topic topic prefix to publish, /busy_status
40907+ * will be appended
40908+ * @param publish_type Whether to publish as Desired, Reported, or Both.
40909+ *
40910+ * @returns SL_STATUS_OK on success
40911+ */
40912+ sl_status_t uic_mqtt_dotdot_application_status_busy_status_unretain(
40913+ const char *base_topic,
40914+ uic_mqtt_dotdot_attribute_publish_type_t publish_type
40915+ );
40916+
40917+ /**
40918+ * @brief Publish the attribute; ApplicationStatus/Attributes/WaitTime
40919+ *
40920+ * @param base_topic topic prefix to publish, /wait_time
40921+ * will be appended
40922+ * @param value Value to publish
40923+ * @param publish_type Whether to publish as Desired, Reported, or Both.
40924+ *
40925+ * @returns SL_STATUS_OK on success
40926+ */
40927+ sl_status_t uic_mqtt_dotdot_application_status_wait_time_publish(
40928+ const char *base_topic,
40929+ uint8_t value,
40930+ uic_mqtt_dotdot_attribute_publish_type_t publish_type
40931+ );
40932+
40933+ /**
40934+ * @brief Unretains a published attribute; ApplicationStatus/Attributes/WaitTime
40935+ *
40936+ * @param base_topic topic prefix to publish, /wait_time
40937+ * will be appended
40938+ * @param publish_type Whether to publish as Desired, Reported, or Both.
40939+ *
40940+ * @returns SL_STATUS_OK on success
40941+ */
40942+ sl_status_t uic_mqtt_dotdot_application_status_wait_time_unretain(
40943+ const char *base_topic,
40944+ uic_mqtt_dotdot_attribute_publish_type_t publish_type
40945+ );
40946+
40947+ /**
40948+ * @brief Publish the attribute; ApplicationStatus/Attributes/RejectStatus
40949+ *
40950+ * @param base_topic topic prefix to publish, /reject_status
40951+ * will be appended
40952+ * @param value Value to publish
40953+ * @param publish_type Whether to publish as Desired, Reported, or Both.
40954+ *
40955+ * @returns SL_STATUS_OK on success
40956+ */
40957+ sl_status_t uic_mqtt_dotdot_application_status_reject_status_publish(
40958+ const char *base_topic,
40959+ bool value,
40960+ uic_mqtt_dotdot_attribute_publish_type_t publish_type
40961+ );
40962+
40963+ /**
40964+ * @brief Unretains a published attribute; ApplicationStatus/Attributes/RejectStatus
40965+ *
40966+ * @param base_topic topic prefix to publish, /reject_status
40967+ * will be appended
40968+ * @param publish_type Whether to publish as Desired, Reported, or Both.
40969+ *
40970+ * @returns SL_STATUS_OK on success
40971+ */
40972+ sl_status_t uic_mqtt_dotdot_application_status_reject_status_unretain(
40973+ const char *base_topic,
40974+ uic_mqtt_dotdot_attribute_publish_type_t publish_type
40975+ );
40976+
40977+
40978+ /**
40979+ * @brief Publish the ApplicationStatus/ClusterRevision attribute
40980+ *
40981+ * @param base_topic topic prefix to publish, /ApplicationStatus/Attributes/ClusterRevision
40982+ * will be appended.
40983+ * @param value Value to publish.
40984+ */
40985+ void uic_mqtt_dotdot_application_status_publish_cluster_revision(const char* base_topic, uint16_t value);
40986+
40987+ /**
40988+ * @brief Unretain a publication to ApplicationStatus/ClusterRevision attribute
40989+ *
40990+ * @param base_topic topic prefix to publish, /ApplicationStatus/Attributes/ClusterRevision
40991+ * will be appended.
40992+ */
40993+ void uic_mqtt_dotdot_application_status_unretain_cluster_revision(const char* base_topic);
40994+
40995+ /**
40996+ * @brief Publish the SupportedCommands for UNID/EndPoint for the ApplicationStatus Cluster
40997+ *
40998+ * This function will iterate over all Commands in the ApplicationStatus Cluster and
40999+ * call all registered callback functions with UNID/endpoint, and
41000+ * callback_type = UIC_MQTT_DOTDOT_CALLBACK_TYPE_SUPPORT_CHECK.
41001+ * All Cluster Command callback functions that return SL_STATUS_OK
41002+ * will be added to the list of supported commands and published.
41003+ *
41004+ * @param unid
41005+ * @param endpoint
41006+ */
41007+ void uic_mqtt_dotdot_application_status_publish_supported_commands(
41008+ const dotdot_unid_t unid,
41009+ dotdot_endpoint_id_t endpoint);
41010+
41011+ /**
41012+ * @brief Publish an empty array of SupportedCommands for UNID/EndPoint for
41013+ * the ApplicationStatus Cluster
41014+ *
41015+ * @param unid
41016+ * @param endpoint )
41017+ */
41018+ void uic_mqtt_dotdot_application_status_publish_empty_supported_commands(
41019+ const dotdot_unid_t unid
41020+ ,dotdot_endpoint_id_t endpoint);
4080641021
4080741022/**
4080841023 * @brief Publish the SupportedCommands for UNID/EndPoint
0 commit comments