Developing with ZBOSS for Zigbee
ZCL IAS WD cluster

Data Structures

struct  zb_zcl_ias_wd_start_warning_s
 Structure representsation Start warning command. ZCL spec 8.4.2.3.1. More...
 
struct  zb_zcl_ias_wd_squawk_s
 Structure representsation Squawk command. ZCL spec 8.4.2.3.2. More...
 

IAS WD cluster attributes

enum  zb_zcl_ias_wd_attr_e { ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_ID = 0x0000 }
 IAS WD cluster attribute identifiers. More...
 
#define ZB_ZCL_IAS_WD_CLUSTER_REVISION_DEFAULT   ((zb_uint16_t)0x0002u)
 Default value for IAS WD cluster revision global attribute.
 
#define ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_DEF_VALUE   240
 Max Duration attribute default value.
 
#define ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_MIN_VALUE   0
 Max Duration attribute minimum value.
 
#define ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_MAX_VALUE   0xfffe
 Max Duration attribute maximum value.
 
#define ZB_ZCL_DECLARE_IAS_WD_ATTRIB_LIST(attr_list, max_duration)
 Declare attribute list for IAS WD cluster - server side. More...
 

IAS WD cluster commands

enum  zb_zcl_ias_wd_cmd_e { ZB_ZCL_CMD_IAS_WD_START_WARNING_ID = 0x00, ZB_ZCL_CMD_IAS_WD_SQUAWK_ID = 0x01 }
 IAS WD cluster command identifiers. More...
 
enum  zb_zcl_ias_wd_warning_mode_e {
  ZB_ZCL_IAS_WD_WARNING_MODE_STOP = 0x00, ZB_ZCL_IAS_WD_WARNING_MODE_BURGLAR = 0x01, ZB_ZCL_IAS_WD_WARNING_MODE_FIRE = 0x02, ZB_ZCL_IAS_WD_WARNING_MODE_EMERGENCY = 0x03,
  ZB_ZCL_IAS_WD_WARNING_MODE_POLICE_PANIC = 0x04, ZB_ZCL_IAS_WD_WARNING_MODE_FIRE_PANIC = 0x05, ZB_ZCL_IAS_WD_WARNING_MODE_EMERGENCY_PANIC = 0x06
}
 Warning Mode Field, see ZCL spec 8.4.2.3.1.2. More...
 
enum  zb_zcl_ias_wd_strobe_e { ZB_ZCL_IAS_WD_STROBE_NO_STROBE = 0x00, ZB_ZCL_IAS_WD_STROBE_USE_STROBE = 0x01 }
 Strobe Field, see ZCL spec 8.4.2.3.1.3. More...
 
enum  zb_zcl_ias_wd_siren_level_e { ZB_ZCL_IAS_WD_SIREN_LEVEL_LOW = 0x00, ZB_ZCL_IAS_WD_SIREN_LEVEL_MEDIUM = 0x01, ZB_ZCL_IAS_WD_SIREN_LEVEL_HIGH = 0x02, ZB_ZCL_IAS_WD_SIREN_LEVEL_VERY_HIGH = 0x03 }
 Siren Level Field, see ZCL spec 8.4.2.3.1.4. More...
 
enum  zb_zcl_ias_wd_strobe_level_e { ZB_ZCL_IAS_WD_STROBE_LEVEL_LOW = 0x00, ZB_ZCL_IAS_WD_STROBE_LEVEL_MEDIUM = 0x01, ZB_ZCL_IAS_WD_STROBE_LEVEL_HIGH = 0x02, ZB_ZCL_IAS_WD_STROBE_LEVEL_VERY_HIGH = 0x03 }
 Strobe Level Field, see ZCL spec 8.4.2.2.1.7. More...
 
enum  zb_zcl_ias_wd_squawk_mode_e { ZB_ZCL_IAS_WD_SQUAWK_MODE_ARMED = 0x00, ZB_ZCL_IAS_WD_SQUAWK_MODE_DISARMED = 0x01 }
 Squawk Mode Field, see ZCL spec 8.4.2.3.2.2. More...
 
enum  zb_zcl_ias_wd_squawk_strobe_e { ZB_ZCL_IAS_WD_SQUAWK_STROBE_NO_STROBE = 0x00, ZB_ZCL_IAS_WD_SQUAWK_STROBE_USE_STROBE = 0x01 }
 Strobe Field, see ZCL spec 8.4.2.3.2.3. More...
 
enum  zb_zcl_ias_wd_squawk_level_e { ZB_ZCL_IAS_WD_SQUAWK_LEVEL_LOW = 0x00, ZB_ZCL_IAS_WD_SQUAWK_LEVEL_MEDIUM = 0x01, ZB_ZCL_IAS_WD_SQUAWK_LEVEL_HIGH = 0x02, ZB_ZCL_IAS_WD_SQUAWK_LEVEL_VERY_HIGH = 0x03 }
 Squawk level Field, see ZCL spec 8.4.2.3.2.4. More...
 
typedef struct zb_zcl_ias_wd_start_warning_s zb_zcl_ias_wd_start_warning_t
 Structure representsation Start warning command. ZCL spec 8.4.2.3.1.
 
typedef struct zb_zcl_ias_wd_squawk_s zb_zcl_ias_wd_squawk_t
 Structure representsation Squawk command. ZCL spec 8.4.2.3.2.
 
#define ZB_ZCL_IAS_WD_GET_WARNING_MODE(status)   (((status) >> 4) & 0x0f)
 Get Warning Mode from payload Start warning command.
 
#define ZB_ZCL_IAS_WD_GET_STROBE(status)   (((status) >> 2) & 0x03)
 Get Strobe from payload Start warning command.
 
#define ZB_ZCL_IAS_WD_GET_SIREN_LEVEL(status)   ((status) & 0x03)
 Get Siren level from payload Start warning command.
 
#define ZB_ZCL_IAS_WD_MAKE_START_WARNING_STATUS(warning_mode, strobe, siren_level)   (((siren_level) & 0x03) | (((strobe) & 0x03) << 2) | (((warning_mode) & 0x0f) << 4))
 Make Status field Start warning command from Warning Mode, Strobe and Siren Level.
 
#define ZB_ZCL_IAS_WD_STROBE_DUTY_CYCLE_DEFAULT_VALUE   0
 Strobe Duty Cycle default value.
 
#define ZB_ZCL_IAS_WD_STROBE_DUTY_CYCLE_MAX_VALUE   100
 Strobe Duty Cycle maximum value.
 
#define ZB_ZCL_IAS_WD_SEND_START_WARNING_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, status, duration, strobe_duty_cycle, strobe_level)
 Start warning command. ZCL spec 8.4.2.3.1. More...
 
#define ZB_ZCL_IAS_WD_GET_START_WARNING_REQ(data_ptr, buffer, status)
 Macro for getting Start warning command. ZCL spec 8.4.2.3.1. More...
 
#define ZB_ZCL_IAS_WD_GET_SQUAWK_MODE(status)   (((status) >> 4) & 0x0f)
 Get Squawk Mode from payload Squawk command.
 
#define ZB_ZCL_IAS_WD_GET_SQUAWK_STROBE(status)   (((status) >> 3) & 0x01)
 Get Squawk Strobe from payload Squawk command.
 
#define ZB_ZCL_IAS_WD_GET_SQUAWK_LEVEL(status)   ((status) & 0x03)
 Get Squawk Level from payload Squawk command.
 
#define ZB_ZCL_IAS_WD_MAKE_SQUAWK_STATUS(mode, strobe, level)   (((level) & 0x03) | (((strobe) & 0x01) << 3) | (((mode) & 0x0f) << 4))
 Make Status field Squawk command from Squawk mode, Strobe and Squawk level.
 
#define ZB_ZCL_IAS_WD_SEND_SQUAWK_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, status)
 Squawk command. ZCL spec 8.4.2.3.2. More...
 
#define ZB_ZCL_IAS_WD_GET_SQUAWK_REQ(data_ptr, buffer, status)
 Macro for getting Squawk command. ZCL spec 8.4.2.3.2. More...
 

Detailed Description

IAS WD cluster definitions

Macro Definition Documentation

◆ ZB_ZCL_DECLARE_IAS_WD_ATTRIB_LIST

#define ZB_ZCL_DECLARE_IAS_WD_ATTRIB_LIST (   attr_list,
  max_duration 
)
Value:
ZB_ZCL_START_DECLARE_ATTRIB_LIST_CLUSTER_REVISION(attr_list, ZB_ZCL_IAS_WD) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_ID, (max_duration)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for IAS WD cluster - server side.

Parameters
attr_list- attribute list name
max_duration- pointer to variable to store Max Duration attribute

◆ ZB_ZCL_IAS_WD_GET_SQUAWK_REQ

#define ZB_ZCL_IAS_WD_GET_SQUAWK_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
if (zb_buf_len((buffer)) < sizeof(zb_zcl_ias_wd_squawk_t)) \
{ \
} \
else \
{ \
zb_zcl_ias_wd_squawk_t *src_ptr = \
(data_ptr)->status = src_ptr->status; \
} \
}

Macro for getting Squawk command. ZCL spec 8.4.2.3.2.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_ias_wd_squawk_s.
buffercontaining the packet (by pointer).
status- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_IAS_WD_GET_START_WARNING_REQ

#define ZB_ZCL_IAS_WD_GET_START_WARNING_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
if (zb_buf_len((buffer)) < sizeof(zb_zcl_ias_wd_start_warning_t)) \
{ \
} \
else \
{ \
zb_zcl_ias_wd_start_warning_t *src_ptr = \
(data_ptr)->status = src_ptr->status; \
ZB_HTOLE16(&((data_ptr)->duration), &(src_ptr->duration)); \
(data_ptr)->strobe_duty_cycle = src_ptr->strobe_duty_cycle; \
(data_ptr)->strobe_level = src_ptr->strobe_level; \
} \
}

Macro for getting Start warning command. ZCL spec 8.4.2.3.1.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_ias_wd_start_warning_s.
buffercontaining the packet (by pointer).
status- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_IAS_WD_SEND_SQUAWK_REQ

#define ZB_ZCL_IAS_WD_SEND_SQUAWK_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  status 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Squawk command. ZCL spec 8.4.2.3.2.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback for getting command send status
status- Status, see zb_zcl_ias_wd_squawk_s

◆ ZB_ZCL_IAS_WD_SEND_START_WARNING_REQ

#define ZB_ZCL_IAS_WD_SEND_START_WARNING_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  status,
  duration,
  strobe_duty_cycle,
  strobe_level 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (duration)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (strobe_duty_cycle)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (strobe_level)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Start warning command. ZCL spec 8.4.2.3.1.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback for getting command send status
status- Status - enum flags Warning mode, Strobe and Siren Level
duration- Warning duration
strobe_duty_cycle- Strobe Duty Cycle
strobe_level- Strobe Level, see zb_zcl_ias_wd_strobe_level_e

Enumeration Type Documentation

◆ zb_zcl_ias_wd_attr_e

IAS WD cluster attribute identifiers.

See also
ZCL spec, IAS WD Cluster 8.4.2.2
Enumerator
ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_ID 

Max Duration attribute, ZCL spec 8.4.2.2.1.

◆ zb_zcl_ias_wd_cmd_e

IAS WD cluster command identifiers.

See also
ZCL spec, IAS WD Cluster, 8.4.2.3
Enumerator
ZB_ZCL_CMD_IAS_WD_START_WARNING_ID 

Start warning command. ZCL spec 8.4.2.3.1

ZB_ZCL_CMD_IAS_WD_SQUAWK_ID 

Squawk command. ZCL spec 8.4.2.3.2

◆ zb_zcl_ias_wd_siren_level_e

Siren Level Field, see ZCL spec 8.4.2.3.1.4.

Enumerator
ZB_ZCL_IAS_WD_SIREN_LEVEL_LOW 

Low level sound

ZB_ZCL_IAS_WD_SIREN_LEVEL_MEDIUM 

Medium level sound

ZB_ZCL_IAS_WD_SIREN_LEVEL_HIGH 

High level sound

ZB_ZCL_IAS_WD_SIREN_LEVEL_VERY_HIGH 

Very high level sound

◆ zb_zcl_ias_wd_squawk_level_e

Squawk level Field, see ZCL spec 8.4.2.3.2.4.

Enumerator
ZB_ZCL_IAS_WD_SQUAWK_LEVEL_LOW 

Low level sound

ZB_ZCL_IAS_WD_SQUAWK_LEVEL_MEDIUM 

Medium level sound

ZB_ZCL_IAS_WD_SQUAWK_LEVEL_HIGH 

High level sound

ZB_ZCL_IAS_WD_SQUAWK_LEVEL_VERY_HIGH 

Very High level sound

◆ zb_zcl_ias_wd_squawk_mode_e

Squawk Mode Field, see ZCL spec 8.4.2.3.2.2.

Enumerator
ZB_ZCL_IAS_WD_SQUAWK_MODE_ARMED 

Notification sound for "System is armed"

ZB_ZCL_IAS_WD_SQUAWK_MODE_DISARMED 

Notification sound for "System is disarmed"

◆ zb_zcl_ias_wd_squawk_strobe_e

Strobe Field, see ZCL spec 8.4.2.3.2.3.

Enumerator
ZB_ZCL_IAS_WD_SQUAWK_STROBE_NO_STROBE 

No strobe

ZB_ZCL_IAS_WD_SQUAWK_STROBE_USE_STROBE 

Use strobe blink in parallel to squawk

◆ zb_zcl_ias_wd_strobe_e

Strobe Field, see ZCL spec 8.4.2.3.1.3.

Enumerator
ZB_ZCL_IAS_WD_STROBE_NO_STROBE 

No strobe

ZB_ZCL_IAS_WD_STROBE_USE_STROBE 

Use strobe in parallel to warning

◆ zb_zcl_ias_wd_strobe_level_e

Strobe Level Field, see ZCL spec 8.4.2.2.1.7.

Enumerator
ZB_ZCL_IAS_WD_STROBE_LEVEL_LOW 

Low level strobe

ZB_ZCL_IAS_WD_STROBE_LEVEL_MEDIUM 

Medium level strobe

ZB_ZCL_IAS_WD_STROBE_LEVEL_HIGH 

High level strobe

ZB_ZCL_IAS_WD_STROBE_LEVEL_VERY_HIGH 

Very high level strobe

◆ zb_zcl_ias_wd_warning_mode_e

Warning Mode Field, see ZCL spec 8.4.2.3.1.2.

Enumerator
ZB_ZCL_IAS_WD_WARNING_MODE_STOP 

Stop

ZB_ZCL_IAS_WD_WARNING_MODE_BURGLAR 

Burglar

ZB_ZCL_IAS_WD_WARNING_MODE_FIRE 

Fire

ZB_ZCL_IAS_WD_WARNING_MODE_EMERGENCY 

Emergency

ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_ID
@ ZB_ZCL_ATTR_IAS_WD_MAX_DURATION_ID
Max Duration attribute, ZCL spec 8.4.2.2.1.
Definition: zb_zcl_ias_wd.h:53
zb_zcl_ias_wd_squawk_s
Structure representsation Squawk command. ZCL spec 8.4.2.3.2.
Definition: zb_zcl_ias_wd.h:310
ZB_ZCL_GET_SEQ_NUM
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1468
zb_buf_begin
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:354
ZB_ZCL_PARSE_STATUS_SUCCESS
@ ZB_ZCL_PARSE_STATUS_SUCCESS
Definition: zb_zcl_common.h:336
ZB_ZCL_CMD_IAS_WD_START_WARNING_ID
@ ZB_ZCL_CMD_IAS_WD_START_WARNING_ID
Definition: zb_zcl_ias_wd.h:112
ZB_ZCL_CMD_IAS_WD_SQUAWK_ID
@ ZB_ZCL_CMD_IAS_WD_SQUAWK_ID
Definition: zb_zcl_ias_wd.h:113
ZB_ZCL_PARSE_STATUS_FAILURE
@ ZB_ZCL_PARSE_STATUS_FAILURE
Definition: zb_zcl_common.h:337
ZB_ZCL_CLUSTER_ID_IAS_WD
#define ZB_ZCL_CLUSTER_ID_IAS_WD
Definition: zb_zcl_common.h:267
zb_buf_len
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:372
zb_zcl_ias_wd_start_warning_s
Structure representsation Start warning command. ZCL spec 8.4.2.3.1.
Definition: zb_zcl_ias_wd.h:189