Skip to content

Commit 76d2bcc

Browse files
Vietrzr
authored andcommitted
UIC-3275: Generated files for Application Status Cluster
Relate-to: SiliconLabsSoftware/z-wave-protocol-controller#147 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
1 parent 4ea4074 commit 76d2bcc

29 files changed

+2739
-1
lines changed

applications/dev_ui/dev_gui/zap-generated/src/cluster-types/cluster-type-attributes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//This file is generated automatically. Don't try to change something here.
22
//To add support for new clusters, modify addon-helper.js
33
//To change the stucture of the ClusterTypeAttrs, modify cluster-type-attributes.zapt
4-
4+
55

66
//generate ClusterTypes
77
export let ClusterTypeAttrs: any = {

components/uic_dotdot_mqtt/zap-generated/include/dotdot_mqtt.h

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40803,6 +40803,221 @@ void uic_mqtt_dotdot_unify_humidity_control_publish_supported_commands(
4080340803
void 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

components/uic_dotdot_mqtt/zap-generated/include/dotdot_mqtt_attributes.h

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5173,6 +5173,28 @@ typedef sl_status_t (*uic_mqtt_dotdot_unify_humidity_control_attribute_auto_setp
51735173
uic_mqtt_dotdot_attribute_update_type_t update_type,
51745174
uint8_t auto_setpoint_precision
51755175
);
5176+
// Callback types used by the application_status cluster
5177+
typedef sl_status_t (*uic_mqtt_dotdot_application_status_attribute_busy_status_callback_t)(
5178+
dotdot_unid_t unid,
5179+
dotdot_endpoint_id_t endpoint,
5180+
bool unretained,
5181+
uic_mqtt_dotdot_attribute_update_type_t update_type,
5182+
uint8_t busy_status
5183+
);
5184+
typedef sl_status_t (*uic_mqtt_dotdot_application_status_attribute_wait_time_callback_t)(
5185+
dotdot_unid_t unid,
5186+
dotdot_endpoint_id_t endpoint,
5187+
bool unretained,
5188+
uic_mqtt_dotdot_attribute_update_type_t update_type,
5189+
uint8_t wait_time
5190+
);
5191+
typedef sl_status_t (*uic_mqtt_dotdot_application_status_attribute_reject_status_callback_t)(
5192+
dotdot_unid_t unid,
5193+
dotdot_endpoint_id_t endpoint,
5194+
bool unretained,
5195+
uic_mqtt_dotdot_attribute_update_type_t update_type,
5196+
bool reject_status
5197+
);
51765198

51775199
#ifdef __cplusplus
51785200
extern "C" {
@@ -9941,6 +9963,32 @@ void uic_mqtt_dotdot_unify_humidity_control_attribute_auto_setpoint_scale_callba
99419963
void uic_mqtt_dotdot_unify_humidity_control_attribute_auto_setpoint_precision_callback_set(const uic_mqtt_dotdot_unify_humidity_control_attribute_auto_setpoint_precision_callback_t callback);
99429964

99439965

9966+
/**
9967+
* Initializes the attributes features for the ApplicationStatus cluster,
9968+
* allowing to receive attribute updates from other UNIDs.
9969+
*/
9970+
sl_status_t uic_mqtt_dotdot_application_status_attributes_init();
9971+
9972+
/**
9973+
* Setup callback to be called when a
9974+
* ApplicationStatus/Attributes/busy_status/# is received. Setting
9975+
* this callback will overwrite the previous set callback
9976+
*/
9977+
void uic_mqtt_dotdot_application_status_attribute_busy_status_callback_set(const uic_mqtt_dotdot_application_status_attribute_busy_status_callback_t callback);
9978+
/**
9979+
* Setup callback to be called when a
9980+
* ApplicationStatus/Attributes/wait_time/# is received. Setting
9981+
* this callback will overwrite the previous set callback
9982+
*/
9983+
void uic_mqtt_dotdot_application_status_attribute_wait_time_callback_set(const uic_mqtt_dotdot_application_status_attribute_wait_time_callback_t callback);
9984+
/**
9985+
* Setup callback to be called when a
9986+
* ApplicationStatus/Attributes/reject_status/# is received. Setting
9987+
* this callback will overwrite the previous set callback
9988+
*/
9989+
void uic_mqtt_dotdot_application_status_attribute_reject_status_callback_set(const uic_mqtt_dotdot_application_status_attribute_reject_status_callback_t callback);
9990+
9991+
99449992
#ifdef __cplusplus
99459993
}
99469994
#endif // __cplusplus

components/uic_dotdot_mqtt/zap-generated/include/dotdot_mqtt_generated_commands.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5040,6 +5040,28 @@ void uic_mqtt_dotdot_unify_humidity_control_publish_generated_write_attributes_c
50405040
);
50415041

50425042

5043+
/**
5044+
* @brief Publishes an incoming/generated WriteAttributes command for
5045+
* the ApplicationStatus cluster.
5046+
*
5047+
* Publication will be made at the following topic
5048+
* ucl/by-unid/UNID/epID/ApplicationStatus/GeneratedCommands/WriteAttributes
5049+
*
5050+
* @param unid The UNID of the node that sent us the command.
5051+
*
5052+
* @param endpoint The Endpoint ID of the node that sent us the command.
5053+
*
5054+
* @param attribute_values Values to assign to the attributes
5055+
* @param attribute_list List of attributes that are written
5056+
*/
5057+
void uic_mqtt_dotdot_application_status_publish_generated_write_attributes_command(
5058+
const dotdot_unid_t unid,
5059+
const dotdot_endpoint_id_t endpoint,
5060+
uic_mqtt_dotdot_application_status_state_t attribute_values,
5061+
uic_mqtt_dotdot_application_status_updated_state_t attribute_list
5062+
);
5063+
5064+
50435065
#ifdef __cplusplus
50445066
}
50455067
#endif // __cplusplus

components/uic_dotdot_mqtt/zap-generated/include/dotdot_mqtt_group_commands.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3741,6 +3741,23 @@ void uic_mqtt_dotdot_by_group_unify_humidity_control_write_attributes_callback_s
37413741

37423742

37433743

3744+
typedef void (*uic_mqtt_dotdot_by_group_application_status_write_attributes_callback_t)(
3745+
const dotdot_group_id_t group_id,
3746+
uic_mqtt_dotdot_application_status_state_t,
3747+
uic_mqtt_dotdot_application_status_updated_state_t
3748+
);
3749+
3750+
/**
3751+
* Setup a callback for WriteAttribute to be called when a
3752+
* ucl/by-group/+/application_status/Commands/WriteAttributes is received.
3753+
* Setting this callback will overwrite any previously set callback.
3754+
*/
3755+
void uic_mqtt_dotdot_by_group_application_status_write_attributes_callback_set(
3756+
const uic_mqtt_dotdot_by_group_application_status_write_attributes_callback_t callback
3757+
);
3758+
3759+
3760+
37443761
#ifdef __cplusplus
37453762
}
37463763
#endif // __cplusplus

components/uic_dotdot_mqtt/zap-generated/include/dotdot_mqtt_helpers.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ char *aox_locator_reporting_mode_get_enum_value_name_c(
5555
uint32_t value, char *result, size_t max_result_size);
5656
/** Get aox_locator_reporting_mode enum representation from string. */
5757
uint32_t aox_locator_reporting_mode_get_enum_value_number_c(const char *str);
58+
#define APPLICATION_STATUS_BUSY_STATUS_ENUM_NAME_AVAILABLE 1
59+
60+
/** Get application_status_busy_status string representation from enum. */
61+
char *application_status_busy_status_get_enum_value_name_c(
62+
uint32_t value, char *result, size_t max_result_size);
63+
/** Get application_status_busy_status enum representation from string. */
64+
uint32_t application_status_busy_status_get_enum_value_number_c(const char *str);
5865
#define ARM_ARM_MODE_ENUM_NAME_AVAILABLE 1
5966

6067
/** Get arm_arm_mode string representation from enum. */

components/uic_dotdot_mqtt/zap-generated/include/dotdot_mqtt_helpers.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,23 @@ std::string aox_locator_reporting_mode_get_enum_value_name(
9898
*/
9999
uint32_t aox_locator_reporting_mode_get_enum_value_number(const std::string &str);
100100

101+
#define APPLICATION_STATUS_BUSY_STATUS_ENUM_NAME_AVAILABLE 1
102+
103+
/**
104+
* @brief Finds the name of a field for the ApplicationStatusBusyStatus enum
105+
*
106+
* @returns A string representation of the value.
107+
*/
108+
std::string application_status_busy_status_get_enum_value_name(
109+
uint32_t value);
110+
111+
/**
112+
* @brief Finds the enum number of a string representation for the ApplicationStatusBusyStatus enum
113+
*
114+
* @returns A number enum value.
115+
*/
116+
uint32_t application_status_busy_status_get_enum_value_number(const std::string &str);
117+
101118
#define ARM_ARM_MODE_ENUM_NAME_AVAILABLE 1
102119

103120
/**

0 commit comments

Comments
 (0)