Developing with ZBOSS for Zigbee
ZCL Basic cluster

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 atribute 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)
 

Detailed Description

According to ZCL spec, clause 3.2, Basic cluster contains attributes only. These attributes could be queried with general ZCL commands.

Macro Definition Documentation

◆ ZB_ZCL_BASIC_SEND_RESET_REQ

#define ZB_ZCL_BASIC_SEND_RESET_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prof_id,
  dis_default_resp,
  cb 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, dis_default_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), ZB_ZCL_CMD_BASIC_RESET_ID); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prof_id, ZB_ZCL_CLUSTER_ID_BASIC, cb); \
}

Send Reset to Factory Defaults command.

Parameters
bufferto put data to
addr- address of the device to send command to
dst_addr_mode- addressing mode
dst_epdestination endpoint
ep- current endpoint
prof_id- profile identifier
dis_default_resp- "Disable default response" flag
cb- callback to call to report send status

◆ ZB_ZCL_BASIC_SW_BUILD_ID_DEFAULT_VALUE

#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.

Note
Default value supposes that attribute will be stored as Pascal-style string (i. e. length-byte, then content).

◆ ZB_ZCL_CLUSTER_ID_BASIC_MANUFACTURER_NAME_MAX_LEN

#define ZB_ZCL_CLUSTER_ID_BASIC_MANUFACTURER_NAME_MAX_LEN   32

Maximum length of ManufacturerName string field

◆ ZB_ZCL_CLUSTER_ID_BASIC_MODEL_IDENTIFIER_MAX_LEN

#define ZB_ZCL_CLUSTER_ID_BASIC_MODEL_IDENTIFIER_MAX_LEN   32

Maximum length of ModelIdentifier string field

◆ ZB_ZCL_DECLARE_BASIC_ATTR_LIST

#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.

Parameters
[in]attr_list- attribute list variable name
[in]attrs- variable of zb_zcl_basic_attrs_t type (containing Basic cluster attributes)

◆ ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST

#define ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST (   attr_list,
  zcl_version,
  power_source 
)
Value:
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_ZCL_VERSION_ID, (zcl_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_POWER_SOURCE_ID, (power_source)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Basic cluster.

Parameters
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
/* Basic cluster attributes data */
zb_uint8_t g_attr_app_version = 0;
zb_uint8_t g_attr_stack_version = 0;
zb_uint8_t g_attr_hardware_version = 0;
zb_char_t g_attr_manufacturer_name[] = "\x15" "Test manufacture name";
zb_char_t g_attr_model_id[] = "\x03" "1.0";
zb_char_t g_attr_date_code[] = "\x0a" "20130509GP";
zb_char_t g_attr_sw_build_id[] = "\x0f" "111.111.111.111";
zb_char_t g_attr_location_id[] = "\x02" "us";
ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_EXT(basic_attr_list, &g_attr_zcl_version, &g_attr_app_version,
&g_attr_stack_version, &g_attr_hardware_version, &g_attr_manufacturer_name, &g_attr_model_id,
&g_attr_date_code, &g_attr_power_source, &g_attr_location_id, &g_attr_ph_env,
&g_attr_sw_build_id);

◆ ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_EXT

#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 
)
Value:
zb_bool_t device_enable_##attr_list = ZB_TRUE; \
ZB_ZCL_START_DECLARE_ATTRIB_LIST_CLUSTER_REVISION(attr_list, ZB_ZCL_BASIC) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_ZCL_VERSION_ID, (zcl_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_APPLICATION_VERSION_ID, (app_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_STACK_VERSION_ID, (stack_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_HW_VERSION_ID, (hardware_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID, (manufacturer_name))\
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID, (model_id)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_DATE_CODE_ID, (date_code)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_POWER_SOURCE_ID, (power_source)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_SW_BUILD_ID, (sw_build_id)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_DEVICE_ENABLED_ID, \
&(device_enable_##attr_list)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_LOCATION_DESCRIPTION_ID, (location_id)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_PHYSICAL_ENVIRONMENT_ID, (ph_env)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Basic cluster (extended attribute set).

Parameters
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.

◆ ZB_ZCL_DECLARE_BASIC_WITH_DEVICE_ENABLED_ATTRIB_LIST

#define ZB_ZCL_DECLARE_BASIC_WITH_DEVICE_ENABLED_ATTRIB_LIST (   attr_list,
  zcl_version,
  power_source,
  device_enabled 
)
Value:
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_ZCL_VERSION_ID, (zcl_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_POWER_SOURCE_ID, (power_source)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_DEVICE_ENABLED_ID, (device_enabled)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Basic cluster.

Parameters
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

◆ ZB_ZCL_DECLARE_BASIC_WITH_DEVICE_ENABLED_ATTRIB_LIST_EXT

#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 
)
Value:
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_ZCL_VERSION_ID, (zcl_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_APPLICATION_VERSION_ID, (app_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_STACK_VERSION_ID, (stack_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_HW_VERSION_ID, (hardware_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID, (manufacturer_name))\
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID, (model_id)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_DATE_CODE_ID, (date_code)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_POWER_SOURCE_ID, (power_source)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_SW_BUILD_ID, (sw_build_id)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_DEVICE_ENABLED_ID, (device_enabled)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_LOCATION_DESCRIPTION_ID, (location_id)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_BASIC_PHYSICAL_ENVIRONMENT_ID, (ph_env)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Basic cluster (extended attribute set).

Parameters
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.

◆ ZB_ZCL_RESET_TO_FACTORY_DEFAULTS_USER_APP

#define ZB_ZCL_RESET_TO_FACTORY_DEFAULTS_USER_APP (   buffer,
  ep,
  result 
)
Value:
{ \
TRACE_MSG(TRACE_ZCL1, "ZB_ZCL_RESET_TO_FACTORY_DEFAULTS_USER_APP", (FMT__0)); \
if (ZCL_CTX().device_cb) \
{ \
zb_zcl_device_callback_param_t *user_app_data = \
ZB_BUF_GET_PARAM(buffer, zb_zcl_device_callback_param_t); \
user_app_data->device_cb_id = ZB_ZCL_BASIC_RESET_CB_ID; \
user_app_data->endpoint = (ep); \
user_app_data->status = RET_OK; \
(ZCL_CTX().device_cb)(param); \
result = user_app_data->status; \
} \
}

Call device callback in user application to reset application settings to defaults.

Parameters
[in]buffer- pointer to buffer for callback
[in]ep- current endpoint
[out]result- callback status

Typedef Documentation

◆ zb_zcl_basic_disable_local_conf_t

Value structure for "Disable local config" attribute.

See also
ZCL spec, subclause 3.2.2.2.15

Enumeration Type Documentation

◆ zb_zcl_basic_alarm_mask_e

Permitted bits for "Alarm mask" attribute.

See also
ZCL spec, subclause 3.2.2.2.14
Enumerator
ZB_ZCL_BASIC_ALARM_MASK_HW_FAULT 

General hardware fault

ZB_ZCL_BASIC_ALARM_MASK_SW_FAULT 

General software fault

◆ zb_zcl_basic_cmd_e

Basic cluster command identifiers.

See also
ZCL spec, subclause 3.2.2.3
Enumerator
ZB_ZCL_CMD_BASIC_RESET_ID 

"Reset to Factory Defaults" command.

◆ zb_zcl_basic_info_attr_e

Basic cluster information attribute set identifiers.

See also
ZCL spec, subclauses 3.2.2.2.1 to 3.2.2.2.9
Enumerator
ZB_ZCL_ATTR_BASIC_ZCL_VERSION_ID 

ZCL version attribute

ZB_ZCL_ATTR_BASIC_APPLICATION_VERSION_ID 

Application version attribute

ZB_ZCL_ATTR_BASIC_STACK_VERSION_ID 

Stack version attribute

ZB_ZCL_ATTR_BASIC_HW_VERSION_ID 

Hardware version attribute

ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID 

Manufacturer name attribute

ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID 

Model identifier attribute

ZB_ZCL_ATTR_BASIC_DATE_CODE_ID 

Date code attribute

ZB_ZCL_ATTR_BASIC_POWER_SOURCE_ID 

Power source attribute

ZB_ZCL_ATTR_BASIC_GENERIC_DEVICE_CLASS_ID 

The GenericDeviceClass attribute defines the field of application of the GenericDeviceType attribute.

ZB_ZCL_ATTR_BASIC_GENERIC_DEVICE_TYPE_ID 

The GenericDeviceType attribute allows an application to show an icon on a rich user interface (e.g. smartphone app).

ZB_ZCL_ATTR_BASIC_PRODUCT_CODE_ID 

The ProductCode attribute allows an application to specify a code for the product.

ZB_ZCL_ATTR_BASIC_PRODUCT_URL_ID 

The ProductURL attribute specifies a link to a web page containing specific product information.

ZB_ZCL_ATTR_BASIC_MANUFACTURER_VERSION_DETAILS_ID 

Vendor specific human readable (displayable) string representing the versions of one of more program images supported on the device.

ZB_ZCL_ATTR_BASIC_SERIAL_NUMBER_ID 

Vendor specific human readable (displayable) serial number.

ZB_ZCL_ATTR_BASIC_PRODUCT_LABEL_ID 

Vendor specific human readable (displayable) product label.

ZB_ZCL_ATTR_BASIC_SW_BUILD_ID 

Manufacturer-specific reference to the version of the software.

◆ zb_zcl_basic_physical_env_e

Basic permitted values for "Physical environment" attribute.

Note
most of values are profile-specific.
See also
ZCL spec, subclause 3.2.2.2.12
Enumerator
ZB_ZCL_BASIC_ENV_UNSPECIFIED 

Environment unspecified

ZB_ZCL_BASIC_ENV_UNKNOWN 

Environment unknown

◆ zb_zcl_basic_power_source_e

Permitted values for "Power source" attribute.

See also
ZCL spec, subclauses 3.2.2.2.9.
Enumerator
ZB_ZCL_BASIC_POWER_SOURCE_UNKNOWN 

Power source unknown.

ZB_ZCL_BASIC_POWER_SOURCE_MAINS_SINGLE_PHASE 

Single-phase mains.

ZB_ZCL_BASIC_POWER_SOURCE_MAINS_THREE_PHASE 

3-phase mains.

ZB_ZCL_BASIC_POWER_SOURCE_BATTERY 

Battery source.

ZB_ZCL_BASIC_POWER_SOURCE_DC_SOURCE 

DC source.

ZB_ZCL_BASIC_POWER_SOURCE_EMERGENCY_MAINS_CONST 

Emergency mains constantly powered.

ZB_ZCL_BASIC_POWER_SOURCE_EMERGENCY_MAINS_TRANSF 

Emergency mains and transfer switch.

◆ zb_zcl_basic_settings_attr_e

Basic cluster settings attribute set identifiers.

See also
ZCL spec, subclauses 3.2.2.2.10 to 3.2.2.2.15
Enumerator
ZB_ZCL_ATTR_BASIC_LOCATION_DESCRIPTION_ID 

Location description attribute

ZB_ZCL_ATTR_BASIC_PHYSICAL_ENVIRONMENT_ID 

Physical environment attribute

ZB_ZCL_ATTR_BASIC_DEVICE_ENABLED_ID 

Device enabled attribute

ZB_ZCL_ATTR_BASIC_ALARM_MASK_ID 

Alarm mask attribute

ZB_ZCL_ATTR_BASIC_DISABLE_LOCAL_CONFIG_ID 

Disable local config attribute

Function Documentation

◆ zb_zcl_check_is_device_enabled()

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 atribute value and should the stack process command or not.

See also
ZCL spec, subclause 3.2.2.2.18 DeviceEnabled Attribute
Parameters
ep_idEndpoint ID
cmd_idCommand ID
cluster_idCluster ID
is_common_commandIs command common or cluster specific
Returns
ZB_TRUE if command should be processed or sent, ZB_FALSE otherwise
ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_EXT
#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).
Definition: zb_zcl_basic.h:374
ZB_ZCL_ATTR_BASIC_DATE_CODE_ID
@ ZB_ZCL_ATTR_BASIC_DATE_CODE_ID
Definition: zb_zcl_basic.h:61
zb_uint8_t
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:153
ZB_ZCL_ATTR_BASIC_PHYSICAL_ENVIRONMENT_ID
@ ZB_ZCL_ATTR_BASIC_PHYSICAL_ENVIRONMENT_ID
Definition: zb_zcl_basic.h:95
ZB_ZCL_CLUSTER_ID_BASIC
#define ZB_ZCL_CLUSTER_ID_BASIC
Definition: zb_zcl_common.h:205
ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE
#define ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE
Default value for ZCL version attribute.
Definition: zb_zcl_basic.h:161
ZB_ZCL_ATTR_BASIC_SW_BUILD_ID
@ ZB_ZCL_ATTR_BASIC_SW_BUILD_ID
Definition: zb_zcl_basic.h:84
ZB_ZCL_CMD_BASIC_RESET_ID
@ ZB_ZCL_CMD_BASIC_RESET_ID
Definition: zb_zcl_basic.h:490
ZCL_CTX
#define ZCL_CTX()
Definition: zboss_api_zcl.h:2515
zb_bool_t
zb_uint8_t zb_bool_t
General purpose boolean type. For C90, 'zb_bool_t' is an alias of 'zb_uint8_t'. For C99,...
Definition: zb_types.h:371
ZB_ZCL_GET_SEQ_NUM
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1438
ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID
@ ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID
Definition: zb_zcl_basic.h:57
ZB_TRUE
#define ZB_TRUE
Definition: zb_types.h:375
ZB_ZCL_ATTR_BASIC_APPLICATION_VERSION_ID
@ ZB_ZCL_ATTR_BASIC_APPLICATION_VERSION_ID
Definition: zb_zcl_basic.h:51
zb_char_t
char zb_char_t
Project-local char type.
Definition: zb_types.h:149
ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID
@ ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID
Definition: zb_zcl_basic.h:59
ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE
#define ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE
Default value for Power source attribute.
Definition: zb_zcl_basic.h:182
ZB_ZCL_ATTR_BASIC_LOCATION_DESCRIPTION_ID
@ ZB_ZCL_ATTR_BASIC_LOCATION_DESCRIPTION_ID
Definition: zb_zcl_basic.h:93
ZB_ZCL_START_DECLARE_ATTRIB_LIST_CLUSTER_REVISION
#define ZB_ZCL_START_DECLARE_ATTRIB_LIST_CLUSTER_REVISION(attrs_desc_name, cluster_name)
Start declaration of attributes list with cluster revision.
Definition: zb_zcl_common.h:785
zb_zcl_device_callback_param_s
Data for Device user application callback. This structure has receive to User application callback (s...
Definition: zboss_api_zcl.h:1804
RET_OK
#define RET_OK
Error codes for non-void stack functions. In general, function can return OK, BLOCKED or some error....
Definition: zb_errors.h:78
ZB_ZCL_BASIC_ENV_UNSPECIFIED
@ ZB_ZCL_BASIC_ENV_UNSPECIFIED
Definition: zb_zcl_basic.h:128
ZB_ZCL_ATTR_BASIC_HW_VERSION_ID
@ ZB_ZCL_ATTR_BASIC_HW_VERSION_ID
Definition: zb_zcl_basic.h:55
ZB_ZCL_ATTR_BASIC_ZCL_VERSION_ID
@ ZB_ZCL_ATTR_BASIC_ZCL_VERSION_ID
Definition: zb_zcl_basic.h:49
ZB_ZCL_ATTR_BASIC_STACK_VERSION_ID
@ ZB_ZCL_ATTR_BASIC_STACK_VERSION_ID
Definition: zb_zcl_basic.h:53
ZB_ZCL_ATTR_BASIC_POWER_SOURCE_ID
@ ZB_ZCL_ATTR_BASIC_POWER_SOURCE_ID
Definition: zb_zcl_basic.h:63
ZB_ZCL_BASIC_RESET_CB_ID
@ ZB_ZCL_BASIC_RESET_CB_ID
Definition: zboss_api_zcl.h:617
ZB_ZCL_ATTR_BASIC_DEVICE_ENABLED_ID
@ ZB_ZCL_ATTR_BASIC_DEVICE_ENABLED_ID
Definition: zb_zcl_basic.h:97