Logo
Developing with ZBOSS for Zigbee
zb_zcl_ias_zone.h File Reference

Data Structures

struct  zb_zcl_ias_zone_init_test_mode_ha_s
 Structure representsation of Initiate Test Mode - Errata to 05-3520-29 Spec, 1.1.23.2.2.1. More...
 
struct  zb_zcl_ias_zone_status_change_not_s
 Structure representsation of Zone Status Change Notification see ZCL spec 8.2.2.4.1.1. More...
 
struct  zb_zcl_ias_zone_enroll_request_s
 Structure representsation of "Zone Enroll Request" command see ZCL spec 8.2.2.4.1.2. More...
 
struct  zb_zcl_ias_zone_enroll_res_s
 Structure representsation of Enroll response command payload see ZCL spec 8.2.2.3.1.1. More...
 
struct  zb_zcl_ias_zone_status_param_s
 Declare Set/Clear Zone Status bits. More...
 
struct  zb_zcl_ias_zone_notification_param_s
 Structure is used to pass parameters for ZoneStatus notification command. More...
 
struct  zb_zcl_ias_zone_int_ctx_s
 
struct  zb_zcl_ias_zone_enroll_response_value_param_s
 Declare run Enroll Response command for User Application. More...
 
struct  zb_zcl_ias_zone_enroll_response_user_app_schedule_e
 

Macros

#define ZB_ZCL_IAS_ZONE_SET_BITS(buffer, ep, set_bits)
 Set Zone Status bits custom server command. More...
 
#define ZB_ZCL_IAS_ZONE_CLEAR_BITS(buffer, ep, set_bits)
 Clear Zone Status bits custom server command. More...
 
#define ZB_ZCL_IAS_ZONE_ENROLL_RESPONSE_SCHEDULE_USER_APP(buffer, pcmd_info, enroll_response_, zone_id_)
 
#define ZB_ZCL_CLUSTER_ID_IAS_ZONE_SERVER_ROLE_INIT   zb_zcl_ias_zone_init_server
 
#define ZB_ZCL_CLUSTER_ID_IAS_ZONE_CLIENT_ROLE_INIT   zb_zcl_ias_zone_init_client
 

Typedefs

typedef struct zb_zcl_ias_zone_status_param_s zb_zcl_ias_zone_status_param_t
 Declare Set/Clear Zone Status bits. More...
 
typedef struct zb_zcl_ias_zone_notification_param_s zb_zcl_ias_zone_notification_param_t
 Structure is used to pass parameters for ZoneStatus notification command. More...
 
typedef zb_ret_t(* zb_ias_zone_app_callback_t) (zb_uint8_t param, zb_uint16_t general_val)
 
typedef struct zb_zcl_ias_zone_int_ctx_s zb_zcl_ias_zone_int_ctx_t
 
typedef struct zb_zcl_ias_zone_enroll_response_value_param_s zb_zcl_ias_zone_enroll_response_value_param_t
 Declare run Enroll Response command for User Application. More...
 
typedef struct zb_zcl_ias_zone_enroll_response_user_app_schedule_e zb_zcl_ias_zone_enroll_response_user_app_schedule_t
 

Enumerations

enum  zb_zcl_general_cb_params_e { ZB_ZCL_VALID_CIE_ADDR_SET = 1, ZB_ZCL_CURR_ZONE_SENSITIVITY_LEVEL_SET = 2, ZB_ZCL_INIT_TEST_MODE = 3, ZB_ZCL_INIT_NORMAL_MODE = 4 }
 

Functions

void zb_zcl_ias_zone_change_status (zb_uint8_t param)
 
zb_bool_t zb_zcl_ias_zone_set_status (zb_uint8_t ep, zb_uint16_t new_val, zb_uint16_t delay, zb_uint8_t buf_param)
 Use this function to change IAS Zone status. This function will set new value of ZoneStatus and will send Zone status change notification. More...
 
void zb_zcl_ias_zone_register_cb (zb_uint8_t endpoint, zb_callback_t process_result_cb, zb_ias_zone_app_callback_t general_cb)
 Registry callbacks to get status of Zone Status Change Notification command. More...
 
zb_bool_t zb_zcl_ias_zone_check_attr_notify (zb_uint8_t buf_param)
 checks, if Zone Status change notification should be sent and schedules command if it is needed More...
 
void zb_zcl_ias_zone_send_status_change_not (zb_uint8_t param)
 fills in notification command and sends it More...
 
void zb_zcl_ias_zone_check_cie_addr_on_zcl_initialization (zb_uint8_t ep_id)
 checks cie address on zcl initialization More...
 
zb_ret_t zb_zcl_ias_zone_put_cie_address_to_binding_whitelist (zb_uint8_t endpoint)
 puts cie command to binding whitelist table More...
 
void zb_zcl_ias_set_attr_val_post_process (zb_zcl_parsed_hdr_t *cmd_info, zb_uint16_t attr_id, zb_uint8_t *value)
 IAS Zone specific set attribute value postprocessing. More...
 
void zb_zcl_ias_zone_init_server (void)
 
void zb_zcl_ias_zone_init_client (void)
 
zb_bool_t zb_zcl_process_ias_zone_specific_commands (zb_uint8_t param)
 

IAS Zone cluster attributes

#define ZB_ZCL_IAS_ZONE_ZONESTATE_DEF_VALUE   ZB_ZCL_IAS_ZONE_ZONESTATE_NOT_ENROLLED
 IAS Zone ZoneState attribute default value. More...
 
#define ZB_ZCL_IAS_ZONE_CLUSTER_REVISION_DEFAULT   ((zb_uint16_t)0x0002u)
 Default value for IAS Zone cluster revision global attribute. More...
 
#define ZB_ZCL_IAS_ZONE_ZONE_STATUS_DEF_VALUE   0
 IAS Zone ZoneStatus attribute default value. More...
 
#define ZB_ZCL_IAS_ZONE_NUMBER_OF_ZONE_SENSITIVITY_LEVELS_SUPPORTED_MIN_VALUE   ((zb_uint8_t)0x02)
 Min value for NumberOfZoneSensitivityLevelsSupported attribute. More...
 
#define ZB_ZCL_IAS_ZONE_NUMBER_OF_ZONE_SENSITIVITY_LEVELS_SUPPORTED_DEFAULT_VALUE   ZB_ZCL_IAS_ZONE_NUMBER_OF_ZONE_SENSITIVITY_LEVELS_SUPPORTED_MIN_VALUE
 Default value for NumberOfZoneSensitivityLevelsSupported attribute. More...
 
#define ZB_ZCL_IAS_ZONE_CURRENT_ZONE_SENSITIVITY_LEVEL_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for CurrentZoneSensitivityLevel attribute. More...
 
#define ZB_ZCL_IAS_ZONEID_ID_DEF_VALUE   0xff
 IAS Zone ZoneID attribute default value. More...
 
#define ZB_ZCL_DECLARE_IAS_ZONE_ATTRIB_LIST( attr_list, zone_state, zone_type, zone_status, ias_cie_address, cie_short_addr, cie_ep)
 Declare attribute list for IAS Zone cluster - server side. More...
 
#define ZB_ZCL_DECLARE_IAS_ZONE_ATTRIB_LIST_EXT( attr_list, zone_state, zone_type, zone_status, number_of_zone_sens_levels_supported, current_zone_sens_level, ias_cie_address, zone_id, cie_short_addr, cie_ep)
 Declare attribute list for IAS Zone cluster - server side (extended attribute set) More...
 
enum  zb_zcl_ias_zone_attr_e {
  ZB_ZCL_ATTR_IAS_ZONE_ZONESTATE_ID = 0x0000, ZB_ZCL_ATTR_IAS_ZONE_ZONETYPE_ID = 0x0001, ZB_ZCL_ATTR_IAS_ZONE_ZONESTATUS_ID = 0x0002, ZB_ZCL_ATTR_IAS_ZONE_IAS_CIE_ADDRESS_ID = 0x0010,
  ZB_ZCL_ATTR_IAS_ZONE_ZONEID_ID = 0x0011, ZB_ZCL_ATTR_IAS_ZONE_NUMBER_OF_ZONE_SENSITIVITY_LEVELS_SUPPORTED_ID = 0x0012, ZB_ZCL_ATTR_IAS_ZONE_CURRENT_ZONE_SENSITIVITY_LEVEL_ID = 0x0013, ZB_ZCL_ATTR_CUSTOM_ZGP_CALIBRATION = 0x8000,
  ZB_ZCL_ATTR_CUSTOM_ZGP_CLOUD_ACK = 0x8003, ZB_ZCL_ATTR_CUSTOM_CIE_ADDR_IS_SET = 0xE000, ZB_ZCL_ATTR_CUSTOM_CIE_EP = 0xE001, ZB_ZCL_ATTR_CUSTOM_CIE_SHORT_ADDR = 0xE002,
  ZB_ZCL_ATTR_IAS_ZONE_INT_CTX_ID = 0xeffe
}
 IAS Zone cluster attribute identifiers. More...
 
enum  zb_zcl_ias_zone_zonestate_e { ZB_ZCL_IAS_ZONE_ZONESTATE_NOT_ENROLLED = 0, ZB_ZCL_IAS_ZONE_ZONESTATE_ENROLLED = 1 }
 IAS Zone ZoneState value. More...
 
enum  zb_zcl_ias_zone_zonetype_e {
  ZB_ZCL_IAS_ZONE_ZONETYPE_STANDARD_CIE = 0x0000, ZB_ZCL_IAS_ZONE_ZONETYPE_MOTION = 0x000d, ZB_ZCL_IAS_ZONE_ZONETYPE_CONTACT_SWITCH = 0x0015, ZB_ZCL_IAS_ZONE_ZONETYPE_FIRE_SENSOR = 0x0028,
  ZB_ZCL_IAS_ZONE_ZONETYPE_WATER_SENSOR = 0x002a, ZB_ZCL_IAS_ZONE_ZONETYPE_GAS_SENSOR = 0x002b, ZB_ZCL_IAS_ZONE_ZONETYPE_PERSONAL_EMERGENCY = 0x002c, ZB_ZCL_IAS_ZONE_ZONETYPE_VIBRATION_MOVEMENT = 0x002d,
  ZB_ZCL_IAS_ZONE_ZONETYPE_REMOTE_CONTROL = 0x010f, ZB_ZCL_IAS_ZONE_ZONETYPE_KEY_FOB = 0x0115, ZB_ZCL_IAS_ZONE_ZONETYPE_KEYPAD = 0x021d, ZB_ZCL_IAS_ZONE_ZONETYPE_STANDARD_WARNING = 0x0225,
  ZB_ZCL_IAS_ZONE_ZONETYPE_MANUF_SPEC = 0x8000, ZB_ZCL_IAS_ZONE_ZONETYPE_INVALID = 0xffff
}
 IAS Zone ZoneType value. More...
 
enum  zb_zcl_ias_zone_zonestatus_e {
  ZB_ZCL_IAS_ZONE_ZONE_STATUS_ALARM1 = 1 << 0, ZB_ZCL_IAS_ZONE_ZONE_STATUS_ALARM2 = 1 << 1, ZB_ZCL_IAS_ZONE_ZONE_STATUS_TAMPER = 1 << 2, ZB_ZCL_IAS_ZONE_ZONE_STATUS_BATTERY = 1 << 3,
  ZB_ZCL_IAS_ZONE_ZONE_STATUS_SUPERVISION = 1 << 4, ZB_ZCL_IAS_ZONE_ZONE_STATUS_RESTORE = 1 << 5, ZB_ZCL_IAS_ZONE_ZONE_STATUS_TROUBLE = 1 << 6, ZB_ZCL_IAS_ZONE_ZONE_STATUS_AC_MAINS = 1 << 7,
  ZB_ZCL_IAS_ZONE_ZONE_STATUS_TEST = 1 << 8, ZB_ZCL_IAS_ZONE_ZONE_STATUS_BATTERY_DEFECT = 1 << 9
}
 IAS Zone ZoneStatus attribute flags. More...
 

IAS Zone cluster commands

#define ZB_ZCL_IAS_ZONE_GET_INITIATE_TEST_MODE_REQ(data_ptr, buffer, status)
 Macro for getting "Initiate Test Mode" command. More...
 
#define ZB_ZCL_IAS_ZONE_SEND_INITIATE_TEST_MODE_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, cb, test_mode_duration, current_zone_sens_level)
 Initiate Test Mode command. More...
 
#define ZB_ZCL_IAS_ZONE_SEND_INITIATE_NORMAL_OPERATION_MODE_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, cb)
 Initiate Normal Operation Mode command. More...
 
#define ZB_ZCL_IAS_ZONE_SEND_STATUS_CHANGE_NOTIFICATION_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, cb, zone_status, extended_status, zone_id, delay)
 Zone Status Change Notification command. More...
 
#define ZB_ZCL_IAS_ZONE_GET_STATUS_CHANGE_NOTIFICATION_REQ(data_ptr, buffer, status)
 Macro for getting Zone Status Change Notification command. More...
 
#define ZB_ZCL_IAS_ZONE_SEND_ZONE_ENROLL_REQUEST_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, cb, zone_type, manufacturer_code)
 Zone "Zone Enroll Request" command, see ZCL spec 8.2.2.4.2. More...
 
#define ZB_ZCL_IAS_ZONE_GET_ZONE_ENROLL_REQUEST_REQ(data_ptr, buffer, status)
 Macro for getting Zone Status Change Notification command, see ZCL spec 8.2.2.4.1. More...
 
#define ZB_ZCL_IAS_ZONE_SEND_ZONE_ENROLL_RES( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, code, zone_id)
 Send "Zone Enroll response" command, see ZCL spec 8.2.2.3.1. More...
 
#define ZB_ZCL_IAS_ZONE_SEND_ZONE_ENROLL_RES_EXT( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, code, zone_id, seq)
 Send "Zone Enroll response with add parameters - sequency" command, see ZCL spec 8.2.2.3.1. More...
 
#define ZB_ZCL_IAS_ZONE_GET_ZONE_ENROLL_RES(data_ptr, buffer, status)
 Macro for getting "Zone Enroll response" command. More...
 
enum  zb_zcl_ias_zone_cmd_e { ZB_ZCL_CMD_IAS_ZONE_ZONE_ENROLL_RESPONSE_ID = 0x00, ZB_ZCL_CMD_IAS_ZONE_INITIATE_NORMAL_OPERATION_MODE_ID = 0x01, ZB_ZCL_CMD_IAS_ZONE_INITIATE_TEST_MODE_ID = 0x02 }
 IAS Zone cluster command identifiers. More...
 
enum  zb_zcl_ias_zone_resp_cmd_e { ZB_ZCL_CMD_IAS_ZONE_ZONE_STATUS_CHANGE_NOT_ID = 0x00, ZB_ZCL_CMD_IAS_ZONE_ZONE_ENROLL_REQUEST_ID = 0x01 }
 IAS Zone cluster response command identifiers. More...
 
enum  zb_zcl_ias_zone_enroll_responce_code_e { ZB_ZCL_IAS_ZONE_ENROLL_RESPONCE_CODE_SUCCESS = 0x00, ZB_ZCL_IAS_ZONE_ENROLL_RESPONCE_CODE_NOT_SUPPORTED = 0x01, ZB_ZCL_IAS_ZONE_ENROLL_RESPONCE_CODE_NO_ENROLL = 0x02, ZB_ZCL_IAS_ZONE_ENROLL_RESPONCE_CODE_TOO_MANY_ZONES = 0x03 }
 Values of the Enroll Response Code see ZCL spec 8.2.2.3.1.1. More...
 
typedef struct zb_zcl_ias_zone_init_test_mode_ha_s zb_zcl_ias_zone_init_test_mode_t
 Structure representsation of Initiate Test Mode - Errata to 05-3520-29 Spec, 1.1.23.2.2.1. More...
 
typedef struct zb_zcl_ias_zone_status_change_not_s zb_zcl_ias_zone_status_change_not_t
 Structure representsation of Zone Status Change Notification see ZCL spec 8.2.2.4.1.1. More...
 
typedef struct zb_zcl_ias_zone_enroll_request_s zb_zcl_ias_zone_enroll_request_t
 Structure representsation of "Zone Enroll Request" command see ZCL spec 8.2.2.4.1.2. More...
 
typedef struct zb_zcl_ias_zone_enroll_res_s zb_zcl_ias_zone_enroll_res_t
 Structure representsation of Enroll response command payload see ZCL spec 8.2.2.3.1.1. More...
 

Macro Definition Documentation

§ ZB_ZCL_CLUSTER_ID_IAS_ZONE_CLIENT_ROLE_INIT

#define ZB_ZCL_CLUSTER_ID_IAS_ZONE_CLIENT_ROLE_INIT   zb_zcl_ias_zone_init_client

§ ZB_ZCL_CLUSTER_ID_IAS_ZONE_SERVER_ROLE_INIT

#define ZB_ZCL_CLUSTER_ID_IAS_ZONE_SERVER_ROLE_INIT   zb_zcl_ias_zone_init_server

Function Documentation

§ zb_zcl_ias_zone_init_client()

void zb_zcl_ias_zone_init_client ( void  )

§ zb_zcl_ias_zone_init_server()

void zb_zcl_ias_zone_init_server ( void  )

§ zb_zcl_process_ias_zone_specific_commands()

zb_bool_t zb_zcl_process_ias_zone_specific_commands ( zb_uint8_t  param)