Developing with ZBOSS for Zigbee
|
Data Structures | |
struct | zb_zcl_basic_disable_local_conf_s |
Value structure for "Disable local config" attribute. More... | |
struct | zb_zcl_basic_attrs_s |
Basic cluster attributes. More... | |
Basic cluster attributes | |
enum | zb_zcl_basic_info_attr_e { ZB_ZCL_ATTR_BASIC_ZCL_VERSION_ID = 0x0000, ZB_ZCL_ATTR_BASIC_APPLICATION_VERSION_ID = 0x0001, ZB_ZCL_ATTR_BASIC_STACK_VERSION_ID = 0x0002, ZB_ZCL_ATTR_BASIC_HW_VERSION_ID = 0x0003, ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID = 0x0004, ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID = 0x0005, ZB_ZCL_ATTR_BASIC_DATE_CODE_ID = 0x0006, ZB_ZCL_ATTR_BASIC_POWER_SOURCE_ID = 0x0007, ZB_ZCL_ATTR_BASIC_GENERIC_DEVICE_CLASS_ID = 0x0008, ZB_ZCL_ATTR_BASIC_GENERIC_DEVICE_TYPE_ID = 0x0009, ZB_ZCL_ATTR_BASIC_PRODUCT_CODE_ID = 0x000a, ZB_ZCL_ATTR_BASIC_PRODUCT_URL_ID = 0x000b, ZB_ZCL_ATTR_BASIC_MANUFACTURER_VERSION_DETAILS_ID = 0x000c, ZB_ZCL_ATTR_BASIC_SERIAL_NUMBER_ID = 0x000d, ZB_ZCL_ATTR_BASIC_PRODUCT_LABEL_ID = 0x000e, ZB_ZCL_ATTR_BASIC_SW_BUILD_ID = 0x4000 } |
Basic cluster information attribute set identifiers. More... | |
enum | zb_zcl_basic_settings_attr_e { ZB_ZCL_ATTR_BASIC_LOCATION_DESCRIPTION_ID = 0x0010, ZB_ZCL_ATTR_BASIC_PHYSICAL_ENVIRONMENT_ID = 0x0011, ZB_ZCL_ATTR_BASIC_DEVICE_ENABLED_ID = 0x0012, ZB_ZCL_ATTR_BASIC_ALARM_MASK_ID = 0x0013, ZB_ZCL_ATTR_BASIC_DISABLE_LOCAL_CONFIG_ID = 0x0014 } |
Basic cluster settings attribute set identifiers. More... | |
enum | zb_zcl_basic_power_source_e { ZB_ZCL_BASIC_POWER_SOURCE_UNKNOWN = 0x00, ZB_ZCL_BASIC_POWER_SOURCE_MAINS_SINGLE_PHASE = 0x01, ZB_ZCL_BASIC_POWER_SOURCE_MAINS_THREE_PHASE = 0x02, ZB_ZCL_BASIC_POWER_SOURCE_BATTERY = 0x03, ZB_ZCL_BASIC_POWER_SOURCE_DC_SOURCE = 0x04, ZB_ZCL_BASIC_POWER_SOURCE_EMERGENCY_MAINS_CONST = 0x05, ZB_ZCL_BASIC_POWER_SOURCE_EMERGENCY_MAINS_TRANSF = 0x06 } |
Permitted values for "Power source" attribute. More... | |
enum | zb_zcl_basic_physical_env_e { ZB_ZCL_BASIC_ENV_UNSPECIFIED = 0, ZB_ZCL_BASIC_ENV_UNKNOWN = 0xff } |
Basic permitted values for "Physical environment" attribute. More... | |
enum | zb_zcl_basic_alarm_mask_e { ZB_ZCL_BASIC_ALARM_MASK_HW_FAULT = 0, ZB_ZCL_BASIC_ALARM_MASK_SW_FAULT = 1 } |
Permitted bits for "Alarm mask" attribute. More... | |
typedef struct zb_zcl_basic_disable_local_conf_s | zb_zcl_basic_disable_local_conf_t |
Value structure for "Disable local config" attribute. More... | |
typedef struct zb_zcl_basic_attrs_s | zb_zcl_basic_attrs_t |
Basic cluster attributes. | |
#define | ZB_ZCL_BASIC_CLUSTER_REVISION_DEFAULT ((zb_uint16_t)0x0003u) |
Default value for Basic cluster revision global attribute. | |
#define | ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE ((zb_uint8_t)ZB_ZCL_VERSION) |
Default value for ZCL version attribute. | |
#define | ZB_ZCL_BASIC_APPLICATION_VERSION_DEFAULT_VALUE ((zb_uint8_t)0x00) |
Default value for Application version attribute. | |
#define | ZB_ZCL_BASIC_STACK_VERSION_DEFAULT_VALUE ((zb_uint8_t)0x00) |
Default value for Stack version attribute. | |
#define | ZB_ZCL_BASIC_HW_VERSION_DEFAULT_VALUE ((zb_uint8_t)0x00) |
Default value for Hardware version attribute. | |
#define | ZB_ZCL_BASIC_MANUFACTURER_NAME_DEFAULT_VALUE {0} |
Default value for Manufacturer name attribute. | |
#define | ZB_ZCL_BASIC_MODEL_IDENTIFIER_DEFAULT_VALUE {0} |
Default value for Model identifier attribute. | |
#define | ZB_ZCL_BASIC_DATE_CODE_DEFAULT_VALUE {0} |
Default value for Date code attribute. | |
#define | ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE (ZB_ZCL_BASIC_POWER_SOURCE_UNKNOWN) |
Default value for Power source attribute. | |
#define | ZB_ZCL_BASIC_GENERIC_DEVICE_CLASS_DEFAULT_VALUE ((zb_uint8_t)0xFF) |
Default value for GenericDeviceClass attribute. | |
#define | ZB_ZCL_BASIC_GENERIC_DEVICE_TYPE_DEFAULT_VALUE ((zb_uint8_t)0xFF) |
Default value for GenericDeviceType attribute. | |
#define | ZB_ZCL_BASIC_PRODUCT_CODE_DEFAULT_VALUE {0} |
Default value for ProductCode attribute. | |
#define | ZB_ZCL_BASIC_PRODUCT_URL_DEFAULT_VALUE {0} |
Default value for ProductURL attribute. | |
#define | ZB_ZCL_BASIC_MANUFACTURER_VERSION_DETAILS_DEFAULT_VALUE {0} |
Default value for ManufacturerVersionDetails attribute. | |
#define | ZB_ZCL_BASIC_SERIAL_NUMBER_DEFAULT_VALUE {0} |
Default value for SerialNumber attribute. | |
#define | ZB_ZCL_BASIC_PRODUCT_LABEL_DEFAULT_VALUE {0} |
Default value for ProductLabel attribute. | |
#define | ZB_ZCL_BASIC_LOCATION_DESCRIPTION_DEFAULT_VALUE {0} |
Default value for location description attribute. | |
#define | ZB_ZCL_BASIC_PHYSICAL_ENVIRONMENT_DEFAULT_VALUE (ZB_ZCL_BASIC_ENV_UNSPECIFIED) |
Default value for Physical environment attribute. | |
#define | ZB_ZCL_BASIC_DEVICE_ENABLED_DEFAULT_VALUE ((zb_uint8_t)0x01) |
Default value for Device enabled attribute. | |
#define | ZB_ZCL_BASIC_ALARM_MASK_DEFAULT_VALUE (ZB_ZCL_BASIC_ALARM_MASK_HW_FAULT) |
Default value for Alarm mask attribute. | |
#define | ZB_ZCL_BASIC_DISABLE_LOCAL_CONFIG_DEFAULT_VALUE ((zb_zcl_basic_disable_local_conf_t){0,0,0}) |
Default value for Disable local config attribute. | |
#define | ZB_ZCL_BASIC_SW_BUILD_ID_DEFAULT_VALUE {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} |
Default value for SWBuildId attribute. More... | |
#define | ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST(attr_list, zcl_version, power_source) |
Declare attribute list for Basic cluster. More... | |
#define | ZB_ZCL_DECLARE_BASIC_WITH_DEVICE_ENABLED_ATTRIB_LIST(attr_list, zcl_version, power_source, device_enabled) |
Declare attribute list for Basic cluster. More... | |
#define | ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_EXT( attr_list, zcl_version, app_version, stack_version, hardware_version, manufacturer_name, model_id, date_code, power_source, location_id, ph_env, sw_build_id) |
Declare attribute list for Basic cluster (extended attribute set). More... | |
#define | ZB_ZCL_DECLARE_BASIC_WITH_DEVICE_ENABLED_ATTRIB_LIST_EXT( attr_list, zcl_version, app_version, stack_version, hardware_version, manufacturer_name, model_id, date_code, power_source, location_id, ph_env, sw_build_id, device_enabled) |
Declare attribute list for Basic cluster (extended attribute set). More... | |
#define | ZB_ZCL_CLUSTER_ID_BASIC_MANUFACTURER_NAME_MAX_LEN 32 |
#define | ZB_ZCL_CLUSTER_ID_BASIC_MODEL_IDENTIFIER_MAX_LEN 32 |
#define | ZB_ZCL_DECLARE_BASIC_ATTR_LIST(attr_list, attrs) ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST(attr_list, &attrs.zcl_version, &attrs.power_source) |
Declare attribute list for Basic cluster cluster. More... | |
Alarms cluster commands | |
enum | zb_zcl_basic_cmd_e { ZB_ZCL_CMD_BASIC_RESET_ID = 0x00 } |
Basic cluster command identifiers. More... | |
zb_bool_t | zb_zcl_check_is_device_enabled (zb_uint8_t ep_id, zb_uint8_t cmd_id, zb_uint16_t cluster_id, zb_bool_t is_common_command) |
Check Device Enabled attribute value and should the stack process command or not. More... | |
#define | ZB_ZCL_BASIC_SEND_RESET_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prof_id, dis_default_resp, cb) |
Send Reset to Factory Defaults command. More... | |
#define | ZB_ZCL_RESET_TO_FACTORY_DEFAULTS_USER_APP(buffer, ep, result) |
According to ZCL spec, clause 3.2, Basic cluster contains attributes only. These attributes could be queried with general ZCL commands.
#define ZB_ZCL_BASIC_SEND_RESET_REQ | ( | buffer, | |
addr, | |||
dst_addr_mode, | |||
dst_ep, | |||
ep, | |||
prof_id, | |||
dis_default_resp, | |||
cb | |||
) |
Send Reset to Factory Defaults command.
buffer | to put data to |
addr | - address of the device to send command to |
dst_addr_mode | - addressing mode |
dst_ep | destination endpoint |
ep | - current endpoint |
prof_id | - profile identifier |
dis_default_resp | - "Disable default response" flag |
cb | - callback to call to report send status |
#define ZB_ZCL_BASIC_SW_BUILD_ID_DEFAULT_VALUE {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} |
Default value for SWBuildId attribute.
#define ZB_ZCL_CLUSTER_ID_BASIC_MANUFACTURER_NAME_MAX_LEN 32 |
Maximum length of ManufacturerName string field
#define ZB_ZCL_CLUSTER_ID_BASIC_MODEL_IDENTIFIER_MAX_LEN 32 |
Maximum length of ModelIdentifier string field
#define ZB_ZCL_DECLARE_BASIC_ATTR_LIST | ( | attr_list, | |
attrs | |||
) | ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST(attr_list, &attrs.zcl_version, &attrs.power_source) |
Declare attribute list for Basic cluster cluster.
[in] | attr_list | - attribute list variable name |
[in] | attrs | - variable of zb_zcl_basic_attrs_t type (containing Basic cluster attributes) |
#define ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST | ( | attr_list, | |
zcl_version, | |||
power_source | |||
) |
Declare attribute list for Basic cluster.
attr_list | - attribute list name |
zcl_version | - pointer to variable to store zcl version attribute value |
power_source | - pointer to variable to store power source attribute value |
#define ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_EXT | ( | attr_list, | |
zcl_version, | |||
app_version, | |||
stack_version, | |||
hardware_version, | |||
manufacturer_name, | |||
model_id, | |||
date_code, | |||
power_source, | |||
location_id, | |||
ph_env, | |||
sw_build_id | |||
) |
Declare attribute list for Basic cluster (extended attribute set).
attr_list | [IN] - attribute list name. |
zcl_version | [IN] - pointer to variable storing ZCL version attribute value. |
app_version | [IN] - pointer to the variable storing application version. |
stack_version | [IN] - pointer to the variable storing stack version. |
hardware_version | [IN] - pointer to the variable storing hardware version. |
manufacturer_name | [IN] - pointer to the variable storing manufacturer name. |
model_id | [IN] - pointer to the variable storing model identifier. |
date_code | [IN] - pointer to the variable storing date code. |
power_source | [IN] - pointer to variable storing power source attribute value. |
location_id | [IN] - pointer to variable storing location description attribute value. |
ph_env | [IN] - pointer to variable storing physical environment attribute value. |
sw_build_id | [IN] - pointer to the variable storing software version reference. |
#define ZB_ZCL_DECLARE_BASIC_WITH_DEVICE_ENABLED_ATTRIB_LIST | ( | attr_list, | |
zcl_version, | |||
power_source, | |||
device_enabled | |||
) |
Declare attribute list for Basic cluster.
attr_list | - attribute list name |
zcl_version | - pointer to variable to store zcl version attribute value |
power_source | - pointer to variable to store power source attribute value |
device_enabled | - pointer to variable to store device enabled attribute value |
#define ZB_ZCL_DECLARE_BASIC_WITH_DEVICE_ENABLED_ATTRIB_LIST_EXT | ( | attr_list, | |
zcl_version, | |||
app_version, | |||
stack_version, | |||
hardware_version, | |||
manufacturer_name, | |||
model_id, | |||
date_code, | |||
power_source, | |||
location_id, | |||
ph_env, | |||
sw_build_id, | |||
device_enabled | |||
) |
Declare attribute list for Basic cluster (extended attribute set).
attr_list | [IN] - attribute list name. |
zcl_version | [IN] - pointer to variable storing ZCL version attribute value. |
app_version | [IN] - pointer to the variable storing application version. |
stack_version | [IN] - pointer to the variable storing stack version. |
hardware_version | [IN] - pointer to the variable storing hardware version. |
manufacturer_name | [IN] - pointer to the variable storing manufacturer name. |
model_id | [IN] - pointer to the variable storing model identifier. |
date_code | [IN] - pointer to the variable storing date code. |
power_source | [IN] - pointer to variable storing power source attribute value. |
location_id | [IN] - pointer to variable storing location description attribute value. |
ph_env | [IN] - pointer to variable storing physical environment attribute value. |
sw_build_id | [IN] - pointer to the variable storing software version reference. |
device_enabled | - pointer to the variable storing device enabled reference. |
#define ZB_ZCL_RESET_TO_FACTORY_DEFAULTS_USER_APP | ( | buffer, | |
ep, | |||
result | |||
) |
Call device callback in user application to reset application settings to defaults.
[in] | buffer | - pointer to buffer for callback |
[in] | ep | - current endpoint |
[out] | result | - callback status |
Value structure for "Disable local config" attribute.
enum zb_zcl_basic_cmd_e |
Basic cluster information attribute set identifiers.
Permitted values for "Power source" attribute.
Basic cluster settings attribute set identifiers.
zb_bool_t zb_zcl_check_is_device_enabled | ( | zb_uint8_t | ep_id, |
zb_uint8_t | cmd_id, | ||
zb_uint16_t | cluster_id, | ||
zb_bool_t | is_common_command | ||
) |
Check Device Enabled attribute value and should the stack process command or not.
ep_id | Endpoint ID |
cmd_id | Command ID |
cluster_id | Cluster ID |
is_common_command | Is command common or cluster specific |