Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Middlewares/ST/STM32_WPAN/zigbee/stack/include/zcl/zcl.alarm.h')
-rw-r--r--Middlewares/ST/STM32_WPAN/zigbee/stack/include/zcl/zcl.alarm.h84
1 files changed, 76 insertions, 8 deletions
diff --git a/Middlewares/ST/STM32_WPAN/zigbee/stack/include/zcl/zcl.alarm.h b/Middlewares/ST/STM32_WPAN/zigbee/stack/include/zcl/zcl.alarm.h
index 0149dfbc6..0eec91ca4 100644
--- a/Middlewares/ST/STM32_WPAN/zigbee/stack/include/zcl/zcl.alarm.h
+++ b/Middlewares/ST/STM32_WPAN/zigbee/stack/include/zcl/zcl.alarm.h
@@ -1,11 +1,17 @@
-/* Copyright [2009 - 2020] Exegin Technologies Limited. All rights reserved. */
+/**
+ * @file zcl.alarm.h
+ * @brief ZCL Alarms cluster header
+ * ZCL 7 section 3.11
+ * ZCL 8 section 3.11
+ * @copyright Copyright [2009 - 2020] Exegin Technologies Limited. All rights reserved.
+ */
#ifndef ZCL_ALARM_H
# define ZCL_ALARM_H
/*--------------------------------------------------------------------------
* DESCRIPTION
- * Interface definition for the ZCL Alarms cluster.
+ * Interface definition for the ZCL Alarms cluster
*--------------------------------------------------------------------------
*/
@@ -46,12 +52,13 @@
* Definitions
*---------------------------------------------------------------
*/
-/* Alarms cluster attribute identifiers. */
+
+/** Alarms Attribute IDs */
enum ZbZclAlarmsAttrT {
- ZCL_ALARM_ATTR_COUNT = 0x0000
+ ZCL_ALARM_ATTR_COUNT = 0x0000 /**< AlarmCount (Optional) */
};
-/* Alarms cluster client commands. */
+/* Alarms cluster client commands */
enum {
ZCL_ALARM_COMMAND_RESET = 0x00,
ZCL_ALARM_COMMAND_RESET_ALL,
@@ -59,7 +66,7 @@ enum {
ZCL_ALARM_COMMAND_RESET_LOG
};
-/* Alarms cluster server commands. */
+/* Alarms cluster server commands */
enum {
ZCL_ALARM_COMMAND_ALARM = 0x00,
ZCL_ALARM_COMMAND_GET_RESPONSE
@@ -70,8 +77,15 @@ enum {
*---------------------------------------------------------------
*/
-/*
- * Callback on Alarm Client Cluster when an alarm is received
+/**
+ * Callback when an alarm is received
+ * @param arg Pointer to application data as provided previously at the time the pointer to this callback function was provided in
+ * initiating API call
+ * @param nwk_addr Short address where the alarm originates
+ * @param endpoint Endpoint where the alarm originates
+ * @param alarm_code Code of the detected alarm condition
+ * @param cluster_id ID of cluster where alarm condition occurred
+ * @return Returns void
*/
typedef void (*ZbZclAlarmClientCallbackT)(void *arg, uint16_t nwk_addr, uint8_t endpoint,
uint8_t alarm_code, uint16_t cluster_id);
@@ -84,25 +98,79 @@ typedef void (*ZbZclAlarmClientCallbackT)(void *arg, uint16_t nwk_addr, uint8_t
/*
* Server Commands
*/
+
+/**
+ * Create a new instance of the Alarms Server cluster
+ * @param zb Zigbee stack instance
+ * @param endpoint Endpoint on which to create cluster
+ * @param logSize Alarm log size
+ * @param time_server Time Server cluster instance
+ * @return Cluster pointer, or NULL if there is an error
+ */
struct ZbZclClusterT * ZbZclAlarmServerAlloc(struct ZigBeeT *zb, uint8_t endpoint,
uint16_t logSize, struct ZbZclClusterT *time_server);
/*
* Client Commands
*/
+
+/**
+ * Create a new instance of the Alarms Client cluster
+ * @param zb Zigbee stack instance
+ * @param endpoint Endpoint on which to create cluster
+ * @param callback Callback function that will be invoked later when an alarm occurs
+ * @param arg Pointer to application data that will later be provided back to the callback function when it is invoked
+ * @return Cluster pointer, or NULL if there is an error
+ */
struct ZbZclClusterT * ZbZclAlarmClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, ZbZclAlarmClientCallbackT callback, void *arg);
+
/*uint8_t ZbZclAlarmClientBind(struct ZbZclClusterT *clusterPtr, uint16_t nwkAddr, uint8_t endpoint);
uint8_t ZbZclAlarmClientBindDiscover(struct ZbZclClusterT *clusterPtr);
*/
+
+/**
+ * Send a Reset Alarm command
+ * @param cluster Cluster instance from which to send this command
+ * @param dst Destination address for request
+ * @param alarm_code Code of the detected alarm condition
+ * @param cluster_id ID of cluster where alarm condition occurred
+ * @param callback Callback function that will be invoked later when response is received
+ * @param arg Pointer to application data that will later be provided back to the callback function when it is invoked
+ * @return ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
+ */
enum ZclStatusCodeT ZbZclAlarmClientResetAlarmReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
uint8_t alarm_code, uint16_t cluster_id, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
+/**
+ * Send a Reset All Alarms command
+ * @param cluster Cluster instance from which to send this command
+ * @param dst Destination address for request
+ * @param callback Callback function that will be invoked later when response is received
+ * @param arg Pointer to application data that will later be provided back to the callback function when it is invoked
+ * @return ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
+ */
enum ZclStatusCodeT ZbZclAlarmClientResetAllAlarmsReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
+/**
+ * Send a Get Alarm command
+ * @param cluster Cluster instance from which to send this command
+ * @param dst Destination address for request
+ * @param callback Callback function that will be invoked later when response is received
+ * @param arg Pointer to application data that will later be provided back to the callback function when it is invoked
+ * @return ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
+ */
enum ZclStatusCodeT ZbZclAlarmClientGetAlarmReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
+/**
+ * Send a Reset Alarm Log command
+ * @param cluster Cluster instance from which to send this command
+ * @param dst Destination address for request
+ * @param callback Callback function that will be invoked later when response is received
+ * @param arg Pointer to application data that will later be provided back to the callback function when it is invoked
+ * @return ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
+ */
enum ZclStatusCodeT ZbZclAlarmClientResetAlarmLogReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);