5.2.6.1. Common APIs and Definitions

This section provides the common part APIs and definitions in ZCL of ESP Zigbee Core.

5.2.6.1.1. Header File

5.2.6.1.2. Unions

union ezb_zcl_attr_variable_t
#include <zcl_type.h>

Union for ZCL attribute variable.

Public Members

uint8_t u8

8-bit unsigned integer.

int8_t s8

8-bit signed integer.

uint16_t u16

16-bit unsigned integer.

int16_t s16

16-bit signed integer.

uint32_t u24

24-bit unsigned integer.

int32_t s24

24-bit signed integer.

uint32_t u32

32-bit unsigned integer.

int32_t s32

32-bit signed integer.

uint64_t u40

40-bit unsigned integer.

int64_t s40

40-bit signed integer.

uint64_t u48

48-bit unsigned integer.

int64_t s48

48-bit signed integer.

uint64_t u56

56-bit unsigned integer.

int64_t s56

56-bit signed integer.

uint64_t u64

64-bit unsigned integer.

int64_t s64

64-bit signed integer.

float f32

32-bit floating point number.

uint32_t crc32

32-bit CRC value.

uint8_t data[8]

8-byte array.

5.2.6.1.3. Macros

EZB_ZCL_ATTR_GLOBAL_CLUSTER_REVISION_ID

Attribute ID for the global ClusterRevision attribute.

EZB_ZCL_ATTR_GLOBAL_ATTRIBUTE_REPORTING_STATUS_ID

Attribute ID for the global AttributeReportingStatus attribute.

EZB_ZCL_UINT24_MAX

24-bit unsigned integer maximum value.

EZB_ZCL_UINT24_MIN

24-bit unsigned integer minimum value.

EZB_ZCL_UINT24_SIZE

24-bit unsigned integer size.

EZB_ZCL_INT24_MAX

24-bit signed integer maximum value.

EZB_ZCL_INT24_MIN

24-bit signed integer minimum value.

EZB_ZCL_INT24_SIZE

24-bit signed integer size.

EZB_ZCL_UINT40_MAX

40-bit unsigned integer maximum value.

EZB_ZCL_UINT40_MIN

40-bit unsigned integer minimum value.

EZB_ZCL_UINT40_SIZE

40-bit unsigned integer size.

EZB_ZCL_INT40_MAX

40-bit signed integer maximum value.

EZB_ZCL_INT40_MIN

40-bit signed integer minimum value.

EZB_ZCL_INT40_SIZE

40-bit signed integer size.

EZB_ZCL_UINT48_MAX

48-bit unsigned integer maximum value.

EZB_ZCL_UINT48_MIN

48-bit unsigned integer minimum value.

EZB_ZCL_UINT48_SIZE

48-bit unsigned integer size.

EZB_ZCL_INT48_MAX

48-bit signed integer maximum value.

EZB_ZCL_INT48_MIN

48-bit signed integer minimum value.

EZB_ZCL_INT48_SIZE

48-bit signed integer size.

EZB_ZCL_UINT56_MAX

56-bit unsigned integer maximum value.

EZB_ZCL_UINT56_MIN

56-bit unsigned integer minimum value.

EZB_ZCL_UINT56_SIZE

56-bit unsigned integer size.

EZB_ZCL_INT56_MAX

56-bit signed integer maximum value.

EZB_ZCL_INT56_MIN

56-bit signed integer minimum value.

EZB_ZCL_INT56_SIZE

56-bit signed integer size.

EZB_ZCL_KEY128_SIZE

128-bit key size.

EZB_ZCL_VALUE_UINT8_FF

ZCL_VALUE_FF for uint8_t.

EZB_ZCL_VALUE_UINT16_FF

ZCL_VALUE_FF for uint16_t.

EZB_ZCL_VALUE_UINT24_FF

ZCL_VALUE_FF for uint24_t.

EZB_ZCL_VALUE_UINT32_FF

ZCL_VALUE_FF for uint32_t.

EZB_ZCL_VALUE_UINT40_FF

ZCL_VALUE_FF for uint40_t.

EZB_ZCL_VALUE_UINT48_FF

ZCL_VALUE_FF for uint48_t.

EZB_ZCL_VALUE_UINT56_FF

ZCL_VALUE_FF for uint56_t.

EZB_ZCL_VALUE_UINT64_FF

ZCL_VALUE_FF for uint64_t.

EZB_ZCL_VALUE_INT8_NaS

ZCL_VALUE_NaS for int8_t.

EZB_ZCL_VALUE_INT16_NaS

ZCL_VALUE_NaS for int16_t.

EZB_ZCL_VALUE_INT24_NaS

ZCL_VALUE_NaS for int24_t.

EZB_ZCL_VALUE_INT32_NaS

ZCL_VALUE_NaS for int32_t.

EZB_ZCL_VALUE_INT40_NaS

ZCL_VALUE_NaS for int40_t.

EZB_ZCL_VALUE_INT48_NaS

ZCL_VALUE_NaS for int48_t.

EZB_ZCL_VALUE_INT56_NaS

ZCL_VALUE_NaS for int56_t.

EZB_ZCL_VALUE_INT64_NaS

ZCL_VALUE_NaS for int64_t.

EZB_ZCL_VALUE_UINT8_NONE

ZCL_VALUE_NONE for uint8_t.

EZB_ZCL_VALUE_UINT16_NONE

ZCL_VALUE_NONE for uint16_t.

EZB_ZCL_VALUE_UINT24_NONE

ZCL_VALUE_NONE for uint24_t.

EZB_ZCL_VALUE_UINT32_NONE

ZCL_VALUE_NONE for uint32_t.

EZB_ZCL_VALUE_UINT40_NONE

ZCL_VALUE_NONE for uint40_t.

EZB_ZCL_VALUE_UINT48_NONE

ZCL_VALUE_NONE for uint48_t.

EZB_ZCL_VALUE_UINT56_NONE

ZCL_VALUE_NONE for uint56_t.

EZB_ZCL_VALUE_UINT64_NONE

ZCL_VALUE_NONE for uint64_t.

EZB_ZCL_VALUE_INT8_NONE

ZCL_VALUE_INT8_NONE for int8_t.

EZB_ZCL_VALUE_INT16_NONE

ZCL_VALUE_INT16_NONE for int16_t.

EZB_ZCL_VALUE_INT24_NONE

ZCL_VALUE_INT24_NONE for int24_t.

EZB_ZCL_VALUE_INT32_NONE

ZCL_VALUE_INT32_NONE for int32_t.

EZB_ZCL_VALUE_INT40_NONE

ZCL_VALUE_INT40_NONE for int40_t.

EZB_ZCL_VALUE_INT48_NONE

ZCL_VALUE_INT48_NONE for int48_t.

EZB_ZCL_VALUE_INT56_NONE

ZCL_VALUE_INT56_NONE for int56_t.

EZB_ZCL_VALUE_INT64_NONE

ZCL_VALUE_INT64_NONE for int64_t.

EZB_ZCL_VALUE_SINGLE_NONE

ZCL_VALUE_SINGLE_NONE for float.

EZB_ZCL_VALUE_DOUBLE_NONE

ZCL_VALUE_DOUBLE_NONE for double.

EZB_ZCL_ATTR_ACCESS_READ_ONLY

Attribute is read only.

EZB_ZCL_ATTR_ACCESS_WRITE_ONLY

Attribute is write only.

EZB_ZCL_ATTR_ACCESS_READ_WRITE

Attribute is readable and writeable.

EZB_ZCL_CUSTOM_CLUSTER_ID_MIN_VAL

Minimum value for custom cluster IDs.

EZB_ZCL_CLUSTER_ID_MIN_CUSTOM

Minimum value for custom cluster IDs.

EZB_ZCL_INVALID_UTC_TIME

Invalid UTC time.

5.2.6.1.4. Type Definitions

typedef enum ezb_zcl_attribute_reporting_status_e ezb_zcl_attribute_reporting_status_t

Enumeration for AttributeReportingStatus.

typedef uint32_t ezb_zcl_uint24_t

24-bit unsigned integer.

typedef int32_t ezb_zcl_int24_t

24-bit signed integer.

typedef uint64_t ezb_zcl_uint40_t

40-bit unsigned integer.

typedef int64_t ezb_zcl_int40_t

40-bit signed integer.

typedef uint64_t ezb_zcl_uint48_t

48-bit unsigned integer.

typedef int64_t ezb_zcl_int48_t

48-bit signed integer.

typedef uint64_t ezb_zcl_uint56_t

56-bit unsigned integer.

typedef int64_t ezb_zcl_int56_t

56-bit signed integer.

typedef uint8_t ezb_zcl_status_t

Represents the status of ZCL command, see values of ezb_zcl_status_e .

typedef uint8_t ezb_zcl_cmd_id_t
typedef uint16_t ezb_zcl_attr_id_t

Attribute identifier.

typedef uint8_t ezb_zcl_attr_type_t

Represents the data type of ZCL attribute, see values of ezb_zcl_attr_type_e .

typedef uint8_t ezb_zcl_attr_access_t

Represents the access control flags of ZCL attribute, see values of ezb_zcl_attr_access_e .

typedef uint16_t ezb_zcl_cluster_id_t

Represents the cluster identifier of ZCL cluster .

5.2.6.1.5. Enumerations

enum ezb_zcl_attribute_reporting_status_e

Enumeration for AttributeReportingStatus.

Values:

enumerator EZB_ZCL_AR_STATUS_PENDING

Pending.

enumerator EZB_ZCL_AR_STATUS_COMPLETE

Attribute reporting complete.

enum ezb_zcl_status_e

ZCL status codes. .

These status codes are returned by ZCL operations to indicate success or various error conditions. They follow the Zigbee Cluster Library specification.

Values:

enumerator EZB_ZCL_STATUS_SUCCESS

ZCL Success

enumerator EZB_ZCL_STATUS_FAIL

ZCL Fail

enumerator EZB_ZCL_STATUS_NOT_AUTHORIZED

Server is not authorized to upgrade the client

enumerator EZB_ZCL_STATUS_MALFORMED_CMD

Malformed command

enumerator EZB_ZCL_STATUS_UNSUP_CMD

Unsupported cluster command

enumerator EZB_ZCL_STATUS_INVALID_FIELD

Invalid field

enumerator EZB_ZCL_STATUS_UNSUP_ATTRIB

Unsupported attribute

enumerator EZB_ZCL_STATUS_INVALID_VALUE

Invalid value

enumerator EZB_ZCL_STATUS_READ_ONLY

Read only

enumerator EZB_ZCL_STATUS_INSUFFICIENT_SPACE

Insufficient space

enumerator EZB_ZCL_STATUS_NOT_FOUND

Not found

enumerator EZB_ZCL_STATUS_UNREPORTBLE_ATTRIB

Unreporttable attribute

enumerator EZB_ZCL_STATUS_INVALID_TYPE

Invalid type

enumerator EZB_ZCL_STATUS_INCONSISTENT

Supplied values are inconsistent

enumerator EZB_ZCL_STATUS_ACTION_DENIED

The credentials presented by the device sending the command are not sufficient to perform this action.

enumerator EZB_ZCL_STATUS_TIMEOUT

Timeout

enumerator EZB_ZCL_STATUS_ABORT

Abort

enumerator EZB_ZCL_STATUS_INVALID_IMAGE

Invalid OTA upgrade image

enumerator EZB_ZCL_STATUS_WAIT_FOR_DATA

Server does not have data block available yet

enumerator EZB_ZCL_STATUS_NO_IMAGE_AVAILABLE

No OTA upgrade image available for the client

enumerator EZB_ZCL_STATUS_REQUIRE_MORE_IMAGE

The client still requires more OTA upgrade image files to successfully upgrade.

enumerator EZB_ZCL_STATUS_NOTIFICATION_PENDING

The command has been received and is being processed.

enumerator EZB_ZCL_STATUS_CALIBRATION_ERROR

Calibration error

enumerator EZB_ZCL_STATUS_UNSUPPORTED_CLUSTER

Cluster is not found on the target endpoint

enum ezb_zcl_general_cmd_e

Enumeration of ZCL general command identifiers.

These are the standard ZCL general commands that are available in all clusters. General commands are frame type 0x00 and include attribute operations and discovery.

Values:

enumerator EZB_ZCL_CMD_READ_ATTRIBUTES

Command to read one or more attributes from a cluster.

enumerator EZB_ZCL_CMD_READ_ATTRIBUTES_RESPONSE

Response to a read attributes command.

enumerator EZB_ZCL_CMD_WRITE_ATTRIBUTES

Command to write one or more attributes to a cluster.

enumerator EZB_ZCL_CMD_WRITE_ATTRIBUTES_UNDIVIDED

Command to write multiple attributes atomically.

enumerator EZB_ZCL_CMD_WRITE_ATTRIBUTES_RESPONSE

Response to a write attributes command.

enumerator EZB_ZCL_CMD_WRITE_ATTRIBUTES_NO_RESPONSE

Command to write attributes without requiring a response.

enumerator EZB_ZCL_CMD_CONFIGURE_REPORTING

Command to configure attribute reporting.

enumerator EZB_ZCL_CMD_CONFIGURE_REPORTING_RESPONSE

Response to a configure reporting command.

enumerator EZB_ZCL_CMD_READ_REPORTING_CONFIGURATION

Command to read reporting configuration for attributes.

enumerator EZB_ZCL_CMD_READ_REPORTING_CONFIGURATION_RESPONSE

Response to a read reporting configuration command.

enumerator EZB_ZCL_CMD_REPORT_ATTRIBUTES

Command to report attribute values (unsolicited).

enumerator EZB_ZCL_CMD_DEFAULT_RESPONSE

Default response to any ZCL command.

enumerator EZB_ZCL_CMD_DISCOVER_ATTRIBUTES

Command to discover supported attributes in a cluster.

enumerator EZB_ZCL_CMD_DISCOVER_ATTRIBUTES_RESPONSE

Response to a discover attributes command.

enumerator EZB_ZCL_CMD_READ_ATTRIBUTES_STRUCTURED

Command to read structured attributes (advanced).

enumerator EZB_ZCL_CMD_WRITE_ATTRIBUTES_STRUCTURED

Command to write structured attributes (advanced).

enumerator EZB_ZCL_CMD_WRITE_ATTRIBUTES_STRUCTURED_RESPONSE

Response to a write structured attributes command.

enumerator EZB_ZCL_CMD_DISCOVER_COMMANDS_RECEIVED

Command to discover commands that can be received.

enumerator EZB_ZCL_CMD_DISCOVER_COMMANDS_RECEIVED_RESPONSE

Response to a discover commands received command.

enumerator EZB_ZCL_CMD_DISCOVER_COMMANDS_GENERATED

Command to discover commands that can be generated.

enumerator EZB_ZCL_CMD_DISCOVER_COMMANDS_GENERATED_RESPONSE

Response to a discover commands generated command.

enumerator EZB_ZCL_CMD_DISCOVER_ATTRIBUTES_EXTENDED

Command to discover extended attribute information.

enumerator EZB_ZCL_CMD_DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE

Response to a discover attributes extended command.

enum ezb_zcl_attr_type_e

Enumeration of ZCL attribute data types. .

These types define the data format for ZCL attributes. The types follow the Zigbee Cluster Library specification and include primitive types, strings, arrays, and complex types.

Values:

enumerator EZB_ZCL_ATTR_TYPE_NO_DATA

Null data type.

enumerator EZB_ZCL_ATTR_TYPE_DATA8

8-bit data.

enumerator EZB_ZCL_ATTR_TYPE_DATA16

16-bit data.

enumerator EZB_ZCL_ATTR_TYPE_DATA24

24-bit data.

enumerator EZB_ZCL_ATTR_TYPE_DATA32

32-bit data.

enumerator EZB_ZCL_ATTR_TYPE_DATA40

40-bit data.

enumerator EZB_ZCL_ATTR_TYPE_DATA48

48-bit data.

enumerator EZB_ZCL_ATTR_TYPE_DATA56

56-bit data.

enumerator EZB_ZCL_ATTR_TYPE_DATA64

64-bit data.

enumerator EZB_ZCL_ATTR_TYPE_BOOL

Boolean type.

enumerator EZB_ZCL_ATTR_TYPE_MAP8

8-bit bitmap.

enumerator EZB_ZCL_ATTR_TYPE_MAP16

16-bit bitmap.

enumerator EZB_ZCL_ATTR_TYPE_MAP24

24-bit bitmap.

enumerator EZB_ZCL_ATTR_TYPE_MAP32

32-bit bitmap.

enumerator EZB_ZCL_ATTR_TYPE_MAP40

40-bit bitmap.

enumerator EZB_ZCL_ATTR_TYPE_MAP48

48-bit bitmap.

enumerator EZB_ZCL_ATTR_TYPE_MAP56

56-bit bitmap.

enumerator EZB_ZCL_ATTR_TYPE_MAP64

64-bit bitmap.

enumerator EZB_ZCL_ATTR_TYPE_UINT8

Unsigned 8-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_UINT16

Unsigned 16-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_UINT24

Unsigned 24-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_UINT32

Unsigned 32-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_UINT40

Unsigned 40-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_UINT48

Unsigned 48-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_UINT56

Unsigned 56-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_UINT64

Unsigned 64-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_INT8

Signed 8-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_INT16

Signed 16-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_INT24

Signed 24-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_INT32

Signed 32-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_INT40

Signed 40-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_INT48

Signed 48-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_INT56

Signed 56-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_INT64

Signed 64-bit integer.

enumerator EZB_ZCL_ATTR_TYPE_ENUM8

8-bit enumeration.

enumerator EZB_ZCL_ATTR_TYPE_ENUM16

16-bit enumeration.

enumerator EZB_ZCL_ATTR_TYPE_SEMI

Semi-precision floating point.

enumerator EZB_ZCL_ATTR_TYPE_SINGLE

Single-precision floating point.

enumerator EZB_ZCL_ATTR_TYPE_DOUBLE

Double-precision floating point.

enumerator EZB_ZCL_ATTR_TYPE_OCTSTR

Octet string.

enumerator EZB_ZCL_ATTR_TYPE_STRING

Character string.

enumerator EZB_ZCL_ATTR_TYPE_OCTSTR16

Long octet string.

enumerator EZB_ZCL_ATTR_TYPE_STRING16

Long character string.

enumerator EZB_ZCL_ATTR_TYPE_ARRAY

Array.

enumerator EZB_ZCL_ATTR_TYPE_ARRAY_DATA16

16-bit array.

enumerator EZB_ZCL_ATTR_TYPE_ARRAY_DATA32

32-bit array.

enumerator EZB_ZCL_ATTR_TYPE_STRUCT

Structure.

enumerator EZB_ZCL_ATTR_TYPE_SET

Set.

enumerator EZB_ZCL_ATTR_TYPE_BAG

Bag.

enumerator EZB_ZCL_ATTR_TYPE_TOD

Time of day.

enumerator EZB_ZCL_ATTR_TYPE_DATE

Date.

enumerator EZB_ZCL_ATTR_TYPE_UTC

UTC time.

enumerator EZB_ZCL_ATTR_TYPE_CLUSTER_ID

Cluster ID.

enumerator EZB_ZCL_ATTR_TYPE_ATTRIBUTE_ID

Attribute ID.

enumerator EZB_ZCL_ATTR_TYPE_BAC_OID

BACnet object identifier.

enumerator EZB_ZCL_ATTR_TYPE_EUI64

IEEE address.

enumerator EZB_ZCL_ATTR_TYPE_KEY128

128-bit security key.

enumerator EZB_ZCL_ATTR_TYPE_INTERNAL

Internal attribute type

enumerator EZB_ZCL_ATTR_TYPE_UNK

Invalid attribute type.

enum ezb_zcl_attr_access_e

Enumeration the bitmask of ZCL attribute access control. .

Values:

enumerator EZB_ZCL_ATTR_ACCESS_READ

Attribute is readable.

enumerator EZB_ZCL_ATTR_ACCESS_WRITE

Attribute is writeable.

enumerator EZB_ZCL_ATTR_ACCESS_REPORTING

Attribute supports reporting.

enumerator EZB_ZCL_ATTR_ACCESS_SCENE

Attribute is used in scene management.

enum ezb_zcl_cluster_id_e

Enumeration of ZCL cluster identifiers.

These identifiers define the standard Zigbee clusters as specified in the Zigbee Cluster Library. Clusters 0x8000-0xFFFF are reserved for custom clusters.

Values:

enumerator EZB_ZCL_CLUSTER_ID_BASIC

Basic cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_POWER_CONFIG

Power configuration cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_DEVICE_TEMP_CONFIG

Device temperature configuration cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_IDENTIFY

Identify cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_GROUPS

Groups cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_SCENES

Scenes cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_ON_OFF

On/Off cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_ON_OFF_SWITCH_CONFIG

On/Off switch configuration cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_LEVEL

Level control cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_ALARMS

Alarms cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_TIME

Time cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_RSSI_LOCATION

RSSI location cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_ANALOG_INPUT

Analog input (basic) cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_ANALOG_OUTPUT

Analog output (basic) cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_ANALOG_VALUE

Analog value (basic) cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_BINARY_INPUT

Binary input (basic) cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_BINARY_OUTPUT

Binary output (basic) cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_BINARY_VALUE

Binary value (basic) cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_MULTISTATE_INPUT

Multistate input (basic) cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_MULTISTATE_OUTPUT

Multistate output (basic) cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_MULTISTATE_VALUE

Multistate value (basic) cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_COMMISSIONING

Commissioning cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_OTA_UPGRADE

Over The Air cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_POLL_CONTROL

Poll control cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_GREEN_POWER

Green Power cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_KEEP_ALIVE

Keep Alive cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_SHADE_CONFIG

Shade configuration cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_DOOR_LOCK

Door lock cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_WINDOW_COVERING

Window covering cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_PUMP_CONFIG_CONTROL

Pump configuration and control cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_THERMOSTAT

Thermostat cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_FAN_CONTROL

Fan control cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_DEHUMIDIFICATION_CONTROL

Dehumidification control cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_THERMOSTAT_UI_CONFIG

Thermostat user interface configuration cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_COLOR_CONTROL

Color control cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_BALLAST_CONFIG

Ballast configuration cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_ILLUMINANCE_MEASUREMENT

Illuminance measurement

enumerator EZB_ZCL_CLUSTER_ID_TEMPERATURE_MEASUREMENT

Temperature measurement

enumerator EZB_ZCL_CLUSTER_ID_PRESSURE_MEASUREMENT

Pressure measurement

enumerator EZB_ZCL_CLUSTER_ID_FLOW_MEASUREMENT

Flow measurement

enumerator EZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT

Relative humidity measurement

enumerator EZB_ZCL_CLUSTER_ID_OCCUPANCY_SENSING

Occupancy sensing

enumerator EZB_ZCL_CLUSTER_ID_PH_MEASUREMENT

pH measurement

enumerator EZB_ZCL_CLUSTER_ID_EC_MEASUREMENT

Electrical conductivity measurement

enumerator EZB_ZCL_CLUSTER_ID_WIND_SPEED_MEASUREMENT

Wind speed measurement

enumerator EZB_ZCL_CLUSTER_ID_CARBON_DIOXIDE_MEASUREMENT

Carbon dioxide measurement

enumerator EZB_ZCL_CLUSTER_ID_PM2_5_MEASUREMENT

PM2.5 measurement

enumerator EZB_ZCL_CLUSTER_ID_IAS_ZONE

IAS zone

enumerator EZB_ZCL_CLUSTER_ID_IAS_ACE

IAS ACE

enumerator EZB_ZCL_CLUSTER_ID_IAS_WD

IAS WD

enumerator EZB_ZCL_CLUSTER_ID_PRICE

Price cluster identifier.

enumerator EZB_ZCL_CLUSTER_ID_DRLC

Demand Response and Load Control cluster identifier

enumerator EZB_ZCL_CLUSTER_ID_METERING

Metering

enumerator EZB_ZCL_CLUSTER_ID_TUNNEL

Tunnel

enumerator EZB_ZCL_CLUSTER_ID_METER_IDENTIFICATION

Meter Identification cluster identifier

enumerator EZB_ZCL_CLUSTER_ID_ELECTRICAL_MEASUREMENT

Electrical measurement

enumerator EZB_ZCL_CLUSTER_ID_DIAGNOSTICS

Home Automation Diagnostics

Touchlink commissioning

5.2.6.1.6. Header File

5.2.6.1.7. Functions

ezb_zcl_status_t ezb_zcl_set_attr_value(uint8_t ep_id, uint16_t cluster_id, uint8_t cluster_role, uint16_t attr_id, uint16_t manuf_code, void *value, bool check_access)

Set the value of a ZCL attribute.

This function updates an attribute in the ZCL data model. If check_access is enabled, the function verifies that the attribute is writable before performing the update.

Parameters:
  • ep_id -- [in] The identifier of the endpoint.

  • cluster_id -- [in] The identifier of the cluster.

  • cluster_role -- [in] The role of the cluster, either EZB_ZCL_CLUSTER_SERVER or EZB_ZCL_CLUSTER_CLIENT.

  • attr_id -- [in] The identifier of the attribute.

  • manuf_code -- [in] The manufacturer code. Use EZB_ZCL_STD_MANUF_CODE for standard attributes.

  • value -- [in] The pointer to the attribute value to be written, the data type must match the attribute definition.

  • check_access -- [in] If true, verifies that the attribute is writable before updating it.

Returns:

ZCL status code on success, or error code otherwise.

uint16_t ezb_zcl_get_attr_value_size(ezb_zcl_attr_type_t attr_type, const void *attr_value)

Get the size of a ZCL attribute value.

This function calculates the size in bytes of an attribute value based on its data type. For variable-length types (strings, arrays), the attr_value pointer SHALL NOT be NULL.

Parameters:
  • attr_type -- [in] The type of the attribute. See ezb_zcl_attr_type_t.

  • attr_value -- [in] The pointer to the attribute value.

Returns:

The size of the attribute value in bytes.

bool ezb_zcl_write_attr_value(uint8_t *buffer, const void *value, ezb_zcl_attr_type_t value_type)

Write attribute value into a buffer.

Parameters:
  • buffer -- [out] The pointer to the buffer where the attribute value is written.

  • value -- [in] The pointer to the attribute value to be written.

  • value_type -- [in] The type of the attribute value. See ezb_zcl_attr_type_t.

Returns:

true if the value is written successfully, false otherwise.

bool ezb_zcl_read_attr_value(void *value, const uint8_t *buffer, ezb_zcl_attr_type_t value_type)

Read the attribute value from the buffer.

Parameters:
  • value -- [out] The pointer to the attribute value.

  • buffer -- [in] The pointer to the buffer to read the attribute value.

  • value_type -- [in] The type of the attribute value. See ezb_zcl_attr_type_t.

Returns:

true if the value is read successfully, false otherwise.

bool ezb_zcl_attr_type_is_analog(ezb_zcl_attr_type_t attr_type)

Check if an attribute type is analog (numeric, continuous).

Analog attributes can have reporting thresholds (delta values) configured.

Parameters:

attr_type -- [in] The type of the attribute. See ezb_zcl_attr_type_t.

Returns:

true if the attribute is analog, false otherwise.

bool ezb_zcl_attr_type_is_composite(ezb_zcl_attr_type_t attr_type)

Check if an attribute type is composite (variable-length).

Composite attributes have variable length and include strings, arrays, structures, sets, and bags.

Parameters:

attr_type -- [in] The type of the attribute. See ezb_zcl_attr_type_t.

Returns:

true if the attribute is composite, false otherwise.

bool ezb_zcl_attr_type_is_discrete(ezb_zcl_attr_type_t attr_type)

Check if an attribute type is discrete (fixed-length).

Discrete attributes have a fixed length and include integers, booleans, and enumerations.

Parameters:

attr_type -- [in] The type of the attribute. See ezb_zcl_attr_type_t.

Returns:

true if the attribute is discrete, false otherwise.

bool ezb_zcl_attr_is_reportable(ezb_zcl_attr_desc_t attr_desc)

Check if an attribute supports reporting.

This function checks if the attribute has the reporting access flag set, indicating it can be configured for automatic attribute reporting.

Parameters:

attr_desc -- [in] The description of the attribute.

Returns:

true if the attribute supports reporting, false otherwise.

5.2.6.1.8. Structures

struct ezb_zcl_attribute_s

Structure representing a Zigbee attribute.

Public Members

uint16_t id

Identifier of the attribute.

uint8_t type

Type of the attribute, see ezb_zcl_attr_type_t.

uint16_t size

Size of the attribute value in bytes.

void *value

Pointer to the attribute value buffer. Must be valid for the specified size.

struct ezb_zcl_attribute_s data

Information of the attribute.

struct ezb_zcl_cmd_ctrl_s

Structure for the command control of ZCL command.

Public Members

ezb_address_t dst_addr

Destination address.

uint8_t dst_ep

Identifier of the destination endpoint.

uint8_t src_ep

Identifier of the source endpoint.

uint16_t cluster_id

Identifier of the cluster.

uint16_t manuf_code

Manufacturer code (only used if manuf_specific is 1). Use EZB_ZCL_STD_MANUF_CODE for the standard commands.

uint8_t manuf_specific

Manufacturer-specific, 1 if the command is manufacturer-specific, 0 otherwise.

uint8_t direction

Command direction: 1 to client, 0 to server.

uint8_t dis_default_rsp

Disable default response, 1 to disable the default response, 0 to enable.

struct ezb_zcl_cmd_ctrl_s fc

Frame control flags.

ezb_zcl_cmd_cnf_ctx_t cnf_ctx

Context of the confirmation callback, triggered when the command transmission completes.

struct ezb_zcl_cluster_cmd_ctrl_s

Structure for the command control of ZCL cluster-specific command.

Public Members

ezb_address_t dst_addr

Destination address.

uint8_t dst_ep

Identifier of the destination endpoint.

uint8_t src_ep

Identifier of the source endpoint.

bool dis_default_rsp

Disable default response: true to disable, false to enable.

ezb_zcl_cmd_cnf_ctx_t cnf_ctx

Context of the confirmation callback, triggered when the command transmission completes.

struct ezb_zcl_cmd_fc_s

Structure for the frame control of ZCL command.

Public Members

uint8_t frame_type

Type of the frame, either EZB_ZCL_FRAME_TYPE_COMMON or EZB_ZCL_FRAME_TYPE_CLUSTER_SPECIFIC.

uint8_t manuf_spec

Manufacturer specific, 1 if the command is manufacturer-specific, 0 otherwise.

uint8_t direction

Command direction: 1 to client, 0 to server.

uint8_t disable_def_resp

Disable default response, 1 to disable the default response, 0 to enable.

uint8_t reserved

Reserved bits.

struct ezb_zcl_cmd_hdr_s

Structure containing information about a received ZCL command.

Public Members

ezb_address_t src_addr

Source address of the received command.

ezb_address_t dst_addr

Destination address of the received command.

uint8_t src_ep

Identifier of the source endpoint.

uint8_t dst_ep

Identifier of the destination endpoint.

uint16_t cluster_id

Identifier of the cluster.

uint16_t profile_id

Identifier of the application profile.

uint8_t fc

Frame control of header of the received command.

uint16_t manuf_code

Manufacturer code.

uint8_t tsn

Transaction sequence number.

int8_t rssi

Received signal strength indicator in dBm.

uint8_t cmd_id

Identifier of the command.

struct ezb_zcl_message_info_s

Structure containing common information for Zigbee device callbacks.

Public Members

ezb_zcl_status_t status

Status of the message processing. See ezb_zcl_status_t.

uint8_t dst_ep

Identifier of the destination endpoint.

uint16_t cluster_id

Identifier of the cluster.

uint8_t cluster_role

Role of the cluster, either EZB_ZCL_CLUSTER_SERVER or EZB_ZCL_CLUSTER_CLIENT.

struct ezb_zcl_set_attr_value_message_s

Set attribute value callback message structure.

Public Members

ezb_zcl_message_info_t info

Common Zigbee device callback information.

ezb_zcl_attribute_t attribute

Attribute to be updated.

struct ezb_zcl_set_attr_value_message_s in

Input parameters parsed from the request.

ezb_zcl_status_t result

Result of the attribute update operation.

struct ezb_zcl_set_attr_value_message_s out

Output result returned to the Zigbee stack.

struct ezb_zcl_manuf_spec_cmd_message_s

Structure for manufacturer-specific command message.

Public Members

ezb_zcl_message_info_t info

Common Zigbee device callback information.

const ezb_zcl_cmd_hdr_t *header

ZCL command header information, see ezb_zcl_cmd_hdr_s.

uint16_t payload_size

Size of the payload.

uint8_t *payload

Pointer to the payload.

struct ezb_zcl_manuf_spec_cmd_message_s in

Input parameters parsed from the request.

ezb_zcl_status_t result

Result of the set attribute operation.

struct ezb_zcl_manuf_spec_cmd_message_s out

Output result returned to the Zigbee stack.

5.2.6.1.9. Macros

EZB_ZCL_CMD_FC_GET_FRAME_TYPE(fc)

Get the frame type of a ZCL command frame control.

EZB_ZCL_CMD_FC_SET_FRAME_TYPE(fc, type)

Set the frame type of a ZCL command frame control.

EZB_ZCL_CMD_FC_IS_MANUF_SPEC(fc)

Check if the ZCL command frame control is manufacturer specific.

EZB_ZCL_CMD_FC_SET_MANUF_SPEC(fc)

Set the manufacturer specific of a ZCL command frame control.

EZB_ZCL_CMD_FC_CLR_MANUF_SPEC(fc)

Clear the manufacturer specific of a ZCL command frame control.

EZB_ZCL_CMD_FC_IS_TO_CLI_DIRECTION(fc)

Check if the ZCL command frame control is to client.

EZB_ZCL_CMD_FC_SET_DIRECTION(fc)

Set the direction of a ZCL command frame control.

EZB_ZCL_CMD_FC_CLR_DIRECTION(fc)

Clear the direction of a ZCL command frame control.

EZB_ZCL_CMD_FC_IS_DIS_DEFAULT_RSP(fc)

Check if the ZCL command frame control is disable default response.

EZB_ZCL_CMD_FC_SET_DIS_DEFAULT_RSP(fc)

Set the disable default response of a ZCL command frame control.

EZB_ZCL_CMD_FC_CLR_DIS_DEFAULT_RSP(fc)

Clear the disable default response of a ZCL command frame control.

5.2.6.1.10. Type Definitions

typedef ezb_af_user_cnf_t ezb_zcl_cmd_cnf_t

Structure for ZCL command confirmation.

typedef ezb_af_user_cnf_ctx_t ezb_zcl_cmd_cnf_ctx_t

Context for ZCL command confirmation callback.

typedef struct ezb_zcl_attribute_s ezb_zcl_attribute_t

Structure representing a Zigbee attribute.

typedef struct ezb_zcl_cmd_ctrl_s ezb_zcl_cmd_ctrl_t

Structure for the command control of ZCL command.

typedef struct ezb_zcl_cluster_cmd_ctrl_s ezb_zcl_cluster_cmd_ctrl_t

Structure for the command control of ZCL cluster-specific command.

typedef struct ezb_zcl_cmd_fc_s ezb_zcl_cmd_fc_t

Structure for the frame control of ZCL command.

typedef struct ezb_zcl_cmd_hdr_s ezb_zcl_cmd_hdr_t

Structure containing information about a received ZCL command.

typedef struct ezb_zcl_message_info_s ezb_zcl_message_info_t

Structure containing common information for Zigbee device callbacks.

typedef struct ezb_zcl_set_attr_value_message_s ezb_zcl_set_attr_value_message_t

Set attribute value callback message structure.

typedef struct ezb_zcl_manuf_spec_cmd_message_s ezb_zcl_manuf_spec_cmd_message_t

Structure for manufacturer-specific command message.

5.2.6.1.11. Header File

5.2.6.1.12. Functions

void ezb_zcl_core_action_handler_register(ezb_zcl_core_action_callback_t cb)

Register a ZCL core action callback handler.

This function registers a callback handler that will be invoked when ZCL commands are received or responses are received. Only one callback handler can be registered at a time. Register NULL to unregister the current handler.

Parameters:

cb -- [in] The function pointer to the action callback handler, or NULL to unregister.

void ezb_zcl_raw_command_handler_register(ezb_zcl_raw_frame_callback_t cb)

Register a ZCL raw frame callback handler.

This function registers a callback handler that will be invoked when a raw ZCL frame is received. Only one callback handler can be registered at a time. Register NULL to unregister the current handler.

Parameters:

cb -- [in] The function pointer to the raw frame callback handler, or NULL to unregister.

5.2.6.1.13. Structures

struct ezb_zcl_raw_frame_s

A raw received ZCL frame.

Public Members

ezb_zcl_cmd_hdr_t *header

Header of the raw ZCL frame. See ezb_zcl_cmd_hdr_s.

uint16_t payload_length

Length of the payload of the raw ZCL frame.

uint8_t *payload

Pointer to the payload of the raw ZCL frame.

5.2.6.1.14. Type Definitions

typedef uint32_t ezb_zcl_core_action_callback_id_t

The type of the ZCL core action callback identifier. .

typedef struct ezb_zcl_raw_frame_s ezb_zcl_raw_frame_t

A raw received ZCL frame.

typedef void (*ezb_zcl_core_action_callback_t)(ezb_zcl_core_action_callback_id_t callback_id, void *message)

A callback for ZCL core action, triggered when ZCL command needs to be notified to the application.

This callback is invoked by the ZCL stack when a command is received or a response is received for a previously sent command. The message structure type depends on the callback_id parameter.

Param callback_id:

[in] The action callback identifier. See ezb_zcl_core_action_callback_id_e.

Param message:

[inout] Message data. The structure type depends on callback_id.

typedef bool (*ezb_zcl_raw_frame_callback_t)(const ezb_zcl_raw_frame_t *raw_frame)

A callback for ZCL raw frame, triggered when a raw ZCL frame is received.

This callback is invoked by the ZCL stack when a raw ZCL frame is received. The callback is used to notify the application about the raw ZCL frame.

Param raw_frame:

[in] The pointer to the raw ZCL frame.

Return:

true if the raw ZCL frame is processed successfully and the stack should drop this frame, false otherwise.

5.2.6.1.15. Enumerations

enum ezb_zcl_core_action_callback_id_e

Enumeration for ZCL Core Action Callback Identifier .

This enumeration defines the identifiers for various ZCL core action callbacks, when specific ZCL events are triggered or command request/response are received. The callback registered by ezb_zcl_core_action_handler_register() will be triggered with these identifiers and the corresponding message structure type.

Values:

enumerator EZB_ZCL_CORE_SET_ATTR_VALUE_CB_ID

A callback ID triggered when an application-related attribute is changed. see ezb_zcl_set_attr_value_message_s.

enumerator EZB_ZCL_CORE_READ_ATTR_RSP_CB_ID

A callback ID triggered when a ZCL general ReadAttribute response is received. see ezb_zcl_cmd_read_attr_rsp_message_s.

enumerator EZB_ZCL_CORE_WRITE_ATTR_RSP_CB_ID

A callback ID triggered when a ZCL general WriteAttribute response is received. see ezb_zcl_cmd_write_attr_rsp_message_s.

enumerator EZB_ZCL_CORE_CONFIG_REPORT_RSP_CB_ID

A callback ID triggered when a ZCL general ConfigureReporting response is received. see ezb_zcl_cmd_config_report_rsp_message_s.

enumerator EZB_ZCL_CORE_READ_REPORT_CONFIG_RSP_CB_ID

A callback ID triggered when a ZCL general ReadReportingConfiguration response is received. see ezb_zcl_cmd_read_report_config_rsp_message_s.

enumerator EZB_ZCL_CORE_REPORT_ATTR_CB_ID

A callback ID triggered when a ZCL General ReportAttribute command is received. see ezb_zcl_cmd_report_attr_message_s.

enumerator EZB_ZCL_CORE_DISC_ATTR_RSP_CB_ID

A callback ID triggered when a ZCL general DiscoverAttributes response is received. see ezb_zcl_cmd_discover_attributes_rsp_message_s.

enumerator EZB_ZCL_CORE_DISC_CMD_RSP_CB_ID

A callback ID triggered when a ZCL general Discover response is received. see ezb_zcl_cmd_discover_commands_rsp_message_s.

enumerator EZB_ZCL_CORE_DEFAULT_RSP_CB_ID

A callback ID triggered when a ZCL general DefaultResponse response is received. see ezb_zcl_cmd_default_rsp_message_s.

enumerator EZB_ZCL_CORE_MANUF_SPEC_CMD_CB_ID

A callback ID triggered when a ZCL command is received with Manufacturer-Specific code. see ezb_zcl_manuf_spec_cmd_message_s.

enumerator EZB_ZCL_CORE_IDENTIFY_QUERY_RSP_CB_ID

A callback ID triggered when a ZCL Identify IdentifyQueryResponse command is received. see ezb_zcl_identify_query_rsp_message_s.

enumerator EZB_ZCL_CORE_IDENTIFY_EFFECT_CB_ID

A callback ID triggered when a ZCL Identify IdentifyEffect command is received. see ezb_zcl_identify_effect_message_s.

enumerator EZB_ZCL_CORE_BASIC_RESET_TO_FACTORY_DEFAULT_CB_ID

A callback ID triggered when a ZCL Basic ResetToFactoryDefault command is received. see ezb_zcl_basic_reset_factory_default_message_s.

enumerator EZB_ZCL_CORE_ON_OFF_OFF_WITH_EFFECT_CB_ID

A callback ID triggered when a ZCL ON_OFF OffWithEffect command is received. see ezb_zcl_on_off_off_with_effect_message_s.

enumerator EZB_ZCL_CORE_GROUPS_ADD_GROUP_RSP_CB_ID

A callback ID triggered when a ZCL Groups AddGroup command is received. see ezb_zcl_groups_add_group_rsp_message_s.

enumerator EZB_ZCL_CORE_GROUPS_VIEW_GROUP_RSP_CB_ID

A callback ID triggered when a ZCL Groups ViewGroup command is received. see ezb_zcl_groups_view_group_rsp_message_s.

enumerator EZB_ZCL_CORE_GROUPS_GET_GROUP_MEMBERSHIP_RSP_CB_ID

A callback ID triggered when a ZCL Groups GetGroupMembership command is received. see ezb_zcl_groups_get_group_membership_rsp_message_s.

enumerator EZB_ZCL_CORE_GROUPS_REMOVE_GROUP_RSP_CB_ID

A callback ID triggered when a ZCL Groups RemoveGroup command is received. see ezb_zcl_groups_remove_group_rsp_message_s.

enumerator EZB_ZCL_CORE_SCENES_OPERATE_SCENE_RSP_CB_ID

A callback ID triggered when a ZCL Scenes OperateScene command is received. see ezb_zcl_scenes_operate_scene_rsp_message_s.

enumerator EZB_ZCL_CORE_SCENES_VIEW_SCENE_RSP_CB_ID

A callback ID triggered when a ZCL Scenes ViewScene command is received. see ezb_zcl_scenes_view_scene_rsp_message_s.

enumerator EZB_ZCL_CORE_SCENES_GET_SCENE_MEMBERSHIP_RSP_CB_ID

A callback ID triggered when a ZCL Scenes GetSceneMembership command is received. see ezb_zcl_scenes_get_scene_membership_rsp_message_s.

enumerator EZB_ZCL_CORE_SCENES_STORE_SCENE_CB_ID

A callback ID triggered when a ZCL Scenes StoreScene command is received. see ezb_zcl_scenes_store_scene_message_s.

enumerator EZB_ZCL_CORE_SCENES_RECALL_SCENE_CB_ID

A callback ID triggered when a ZCL Scenes RecallScene command is received. see ezb_zcl_scenes_recall_scene_message_s.

enumerator EZB_ZCL_CORE_DOOR_LOCK_LOCK_DOOR_CB_ID

A callback ID triggered when a ZCL DoorLock Lock command is received. see ezb_zcl_door_lock_lock_door_message_s.

enumerator EZB_ZCL_CORE_DOOR_LOCK_UNLOCK_DOOR_CB_ID

A callback ID triggered when a ZCL DoorLock Unlock command is received. see ezb_zcl_door_lock_unlock_door_message_t.

enumerator EZB_ZCL_CORE_DOOR_LOCK_LOCK_DOOR_RSP_CB_ID

A callback ID triggered when a ZCL DoorLock LockResponse command is received. see ezb_zcl_door_lock_lock_door_rsp_message_s.

enumerator EZB_ZCL_CORE_DOOR_LOCK_UNLOCK_DOOR_RSP_CB_ID

A callback ID triggered when a ZCL DoorLock UnlockResponse command is received. see ezb_zcl_door_lock_unlock_door_rsp_message_t.

enumerator EZB_ZCL_CORE_WINDOW_COVERING_MOVEMENT_CB_ID

A callback ID triggered when a ZCL WindowCovering Movement command is received. see ezb_zcl_window_covering_movement_message_s.

enumerator EZB_ZCL_CORE_COLOR_CONTROL_COLOR_MODE_CHANGE_CB_ID

A callback ID triggered when a ZCL ColorControl ColorModeChange command is received. see ezb_zcl_color_control_color_mode_change_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_ARM_CB_ID

A callback ID triggered when a ZCL IAS ACE Arm command is received. see ezb_zcl_ias_ace_arm_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_BYPASS_CB_ID

A callback ID triggered when a ZCL IAS ACE Bypass command is received. see ezb_zcl_ias_ace_bypass_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_EMERGENCY_CB_ID

A callback ID triggered when a ZCL IAS ACE Emergency command is received. see ezb_zcl_ias_ace_emergency_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_FIRE_CB_ID

A callback ID triggered when a ZCL IAS ACE Fire command is received. see ezb_zcl_ias_ace_emergency_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_PANIC_CB_ID

A callback ID triggered when a ZCL IAS ACE Panic command is received. see ezb_zcl_ias_ace_emergency_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_GET_PANEL_STATUS_CB_ID

A callback ID triggered when a ZCL IAS ACE GetPanelStatus command is received. see ezb_zcl_ias_ace_get_panel_status_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_GET_ZONE_STATUS_CB_ID

A callback ID triggered when a ZCL IAS ACE GetZoneStatus command is received. see ezb_zcl_ias_ace_get_zone_status_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_ARM_RSP_CB_ID

A callback ID triggered when a ZCL IAS ACE ArmResponse command is received. see ezb_zcl_ias_ace_arm_rsp_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_GET_ZONE_ID_MAP_RSP_CB_ID

A callback ID triggered when a ZCL IAS ACE GetZoneIdMapResponse command is received. see ezb_zcl_ias_ace_get_zone_id_map_rsp_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_GET_ZONE_INFO_RSP_CB_ID

A callback ID triggered when a ZCL IAS ACE GetZoneInfoResponse command is received. see ezb_zcl_ias_ace_get_zone_info_rsp_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_ZONE_STATUS_CHANGED_CB_ID

A callback ID triggered when a ZCL IAS ACE ZoneStatusChanged command is received. see ezb_zcl_ias_ace_zone_status_changed_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_PANEL_STATUS_CHANGED_CB_ID

A callback ID triggered when a ZCL IAS ACE PanelStatusChanged command is received. see ezb_zcl_ias_ace_panel_status_changed_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_GET_PANEL_STATUS_RSP_CB_ID

A callback ID triggered when a ZCL IAS ACE GetPanelStatusResponse command is received. see ezb_zcl_ias_ace_get_panel_status_rsp_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_SET_BYPASSED_ZONE_LIST_RSP_CB_ID

A callback ID triggered when a ZCL IAS ACE SetBypassedZoneListResponse command is received. see ezb_zcl_ias_ace_set_bypassed_zone_list_rsp_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_BYPASS_RSP_CB_ID

A callback ID triggered when a ZCL IAS ACE BypassResponse command is received. see ezb_zcl_ias_ace_bypass_rsp_message_s.

enumerator EZB_ZCL_CORE_IAS_ACE_GET_ZONE_STATUS_RSP_CB_ID

A callback ID triggered when a ZCL IAS ACE GetZoneStatusResponse command is received. see ezb_zcl_ias_ace_get_zone_status_rsp_message_s.

enumerator EZB_ZCL_CORE_IAS_WD_START_WARNING_CB_ID

A callback ID triggered when a ZCL IAS WD StartWarning command is received. see ezb_zcl_ias_wd_start_warning_message_s.

enumerator EZB_ZCL_CORE_IAS_WD_SQUAWK_CB_ID

A callback ID triggered when a ZCL IAS WD Squawk command is received. see ezb_zcl_ias_wd_squawk_message_s.

enumerator EZB_ZCL_CORE_IAS_ZONE_INIT_TEST_MODE_CB_ID

A callback ID triggered when a ZCL IAS Zone InitiateTestMode command is received. see ezb_zcl_ias_zone_initiate_test_mode_message_s.

enumerator EZB_ZCL_CORE_IAS_ZONE_INIT_NORMAL_MODE_CB_ID

A callback ID triggered when a ZCL IAS Zone InitiateNormalMode command is received. see ezb_zcl_ias_zone_initiate_normal_mode_message_s.

enumerator EZB_ZCL_CORE_IAS_ZONE_ENROLL_CB_ID

A callback ID triggered when a ZCL IAS Zone EnrollRequest command is received. see ezb_zcl_ias_zone_enroll_req_message_s.

enumerator EZB_ZCL_CORE_IAS_ZONE_ENROLL_RSP_CB_ID

A callback ID triggered when a ZCL IAS Zone EnrollResponse command is received. see ezb_zcl_ias_zone_enroll_rsp_message_s.

enumerator EZB_ZCL_CORE_IAS_ZONE_STATUS_CHANGE_NOTIF_CB_ID

A callback ID triggered when a ZCL IAS Zone StatusChangeNotification command is received. see ezb_zcl_ias_zone_status_change_notif_message_s.

enumerator EZB_ZCL_CORE_ALARMS_ALARM_CB_ID

A callback ID triggered when a ZCL Alarms Alarm command is received. see ezb_zcl_alarms_alarm_cmd_message_s.

enumerator EZB_ZCL_CORE_ALARMS_GET_ALARM_RSP_CB_ID

A callback ID triggered when a ZCL Alarms GetAlarmResponse command is received. see ezb_zcl_alarms_get_alarm_rsp_message_s.

enumerator EZB_ZCL_CORE_ALARMS_RESET_ALARM_CB_ID

A callback ID triggered when a ZCL Alarms ResetAlarm command is received. see ezb_zcl_alarms_reset_alarm_message_s.

enumerator EZB_ZCL_CORE_ALARMS_RESET_ALL_ALARMS_CB_ID

A callback ID triggered when a ZCL Alarms ResetAllAlarms command is received. see ezb_zcl_alarms_reset_all_alarms_message_s.

enumerator EZB_ZCL_CORE_THERMOSTAT_SETPOINT_CB_ID

A callback ID triggered when a ZCL Thermostat Setpoint command is received. see ezb_zcl_thermostat_setpoint_message_s.

enumerator EZB_ZCL_CORE_THERMOSTAT_SET_WEEKLY_SCHEDULE_CB_ID

A callback ID triggered when a ZCL Thermostat SetWeeklySchedule command is received. see ezb_zcl_thermostat_set_weekly_schedule_message_s.

enumerator EZB_ZCL_CORE_THERMOSTAT_GET_WEEKLY_SCHEDULE_RSP_CB_ID

A callback ID triggered when a ZCL Thermostat GetWeeklyScheduleResponse command is received. see ezb_zcl_thermostat_get_weekly_schedule_rsp_message_s.

enumerator EZB_ZCL_CORE_OTA_UPGRADE_CLIENT_PROGRESS_CB_ID

A callback ID triggered when a ZCL OTA Upgrade Client Progress command is received. see ezb_zcl_ota_upgrade_client_progress_message_s.

enumerator EZB_ZCL_CORE_OTA_UPGRADE_QUERY_NEXT_IMAGE_RSP_CB_ID

A callback ID triggered when a ZCL OTA Upgrade QueryNextImageResponse command is received. see ezb_zcl_ota_upgrade_query_next_image_rsp_message_s.

enumerator EZB_ZCL_CORE_OTA_UPGRADE_SERVER_PROGRESS_CB_ID

A callback ID triggered when a ZCL OTA Upgrade Server Progress command is received. see ezb_zcl_ota_upgrade_server_progress_message_s.

enumerator EZB_ZCL_CORE_POLL_CONTROL_CHECK_IN_CB_ID

A callback ID triggered when a ZCL PollControl CheckIn command is received. see ezb_zcl_poll_control_check_in_message_s.

enumerator EZB_ZCL_CORE_ELECTRICAL_MEASUREMENT_GET_PROF_INFO_CB_ID

A callback ID triggered when a ZCL ElectricalMeasurement GetProfileInfo command is received. see ezb_zcl_electrical_measurement_get_prof_info_message_s.

enumerator EZB_ZCL_CORE_ELECTRICAL_MEASUREMENT_GET_MEAS_PROF_CB_ID

A callback ID triggered when a ZCL ElectricalMeasurement GetMeasurementProfile command is received. see ezb_zcl_electrical_measurement_get_meas_prof_message_s.

enumerator EZB_ZCL_CORE_ELECTRICAL_MEASUREMENT_GET_PROF_INFO_RSP_CB_ID

A callback ID triggered when a ZCL ElectricalMeasurement GetProfileInfoResponse command is received. see ezb_zcl_electrical_measurement_get_prof_info_rsp_message_s.

enumerator EZB_ZCL_CORE_ELECTRICAL_MEASUREMENT_GET_MEAS_PROF_RSP_CB_ID

A callback ID triggered when a ZCL ElectricalMeasurement GetMeasurementProfileResponse command is received. GetMeasurementProfileResponse command is received. see ezb_zcl_electrical_measurement_get_meas_prof_rsp_message_s.

enumerator EZB_ZCL_CORE_METERING_GET_PROFILE_CB_ID

A callback ID triggered when a ZCL Metering GetProfile command is received. see ezb_zcl_metering_get_profile_req_message_s.

enumerator EZB_ZCL_CORE_METERING_GET_PROFILE_RSP_CB_ID

A callback ID triggered when a ZCL Metering GetProfileResponse command is received. see ezb_zcl_metering_get_profile_rsp_message_s.

enumerator EZB_ZCL_CORE_METERING_REQUEST_FAST_POLL_MODE_CB_ID

A callback ID triggered when a ZCL Metering RequestFastPollMode command is received. see ezb_zcl_metering_request_fast_poll_mode_req_message_s.

enumerator EZB_ZCL_CORE_METERING_REQUEST_FAST_POLL_MODE_RSP_CB_ID

A callback ID triggered when a ZCL Metering RequestFastPollModeResponse command is received. see ezb_zcl_metering_request_fast_poll_mode_rsp_message_s.

enumerator EZB_ZCL_CORE_METERING_GET_SNAPSHOT_CB_ID

A callback ID triggered when a ZCL Metering GetSnapshot command is received. see ezb_zcl_metering_get_snapshot_req_message_s.

enumerator EZB_ZCL_CORE_METERING_PUBLISH_SNAPSHOT_CB_ID

A callback ID triggered when a ZCL Metering PublishSnapshot command is received. see ezb_zcl_metering_publish_snapshot_command_message_s.

enumerator EZB_ZCL_CORE_METERING_GET_SAMPLED_DATA_CB_ID

A callback ID triggered when a ZCL Metering GetSampledData command is received. see ezb_zcl_metering_get_sampled_data_req_message_s.

enumerator EZB_ZCL_CORE_METERING_GET_SAMPLED_DATA_RSP_CB_ID

A callback ID triggered when a ZCL Metering GetSampledDataResponse command is received. see ezb_zcl_metering_get_sampled_data_rsp_message_s.

enumerator EZB_ZCL_CORE_PRICE_GET_CURRENT_PRICE_CB_ID

A callback ID triggered when a ZCL Price GetCurrentPrice command is received. see ezb_zcl_price_get_current_price_message_s.

enumerator EZB_ZCL_CORE_PRICE_GET_SCHEDULED_PRICES_CB_ID

A callback ID triggered when a ZCL Price GetScheduledPrices command is received. see ezb_zcl_price_get_scheduled_prices_message_s.

enumerator EZB_ZCL_CORE_PRICE_GET_TIER_LABELS_CB_ID

A callback ID triggered when a ZCL Price GetTierLabels command is received. see ezb_zcl_price_get_tier_labels_message_s.

enumerator EZB_ZCL_CORE_PRICE_PRICE_ACK_CB_ID

A callback ID triggered when a ZCL Price PriceAck command is received. see ezb_zcl_price_price_ack_message_s.

enumerator EZB_ZCL_CORE_PRICE_PUBLISH_PRICE_CB_ID

A callback ID triggered when a ZCL Price PublishPrice command is received. see ezb_zcl_price_publish_price_message_s.

enumerator EZB_ZCL_CORE_PRICE_PUBLISH_TIER_LABELS_CB_ID

A callback ID triggered when a ZCL Price PublishTierLabels command is received. see ezb_zcl_price_publish_tier_labels_message_s.

A callback ID triggered when a ZCL Touchlink EpInfo command is received. see ezb_zcl_touchlink_ep_info_message_s.

A callback ID triggered when a ZCL Touchlink GetGroupIdsResponse command is received. see ezb_zcl_touchlink_get_group_ids_rsp_message_s.

A callback ID triggered when a ZCL Touchlink GetEndpointListResponse command is received. see ezb_zcl_touchlink_get_ep_list_rsp_message_s.

enumerator EZB_ZCL_CORE_CB_ID_END

The end of the ZCL core action callback IDs.

5.2.6.1.16. Header File

5.2.6.1.17. Functions

ezb_zcl_cluster_desc_t ezb_zcl_get_cluster_desc(uint8_t ep_id, uint16_t cluster_id, uint8_t role)

Get a cluster descriptor for a given endpoint, cluster, and role.

This function retrieves the cluster descriptor for a specific cluster on an endpoint. The cluster must have been previously added to the endpoint.

Parameters:
  • ep_id -- [in] The identifier of the endpoint to search in.

  • cluster_id -- [in] The identifier of the cluster to search for.

  • role -- [in] The role of the cluster to search for, either EZB_ZCL_CLUSTER_SERVER or EZB_ZCL_CLUSTER_CLIENT.

Returns:

The matching cluster descriptor, or EZB_INVALID_ZCL_CLUSTER_DESC if not found.

void ezb_zcl_free_cluster_desc(ezb_zcl_cluster_desc_t cluster_desc)

Free a Zigbee cluster descriptor.

This function frees the memory allocated for a cluster descriptor and all associated attribute descriptors.

Parameters:

cluster_desc -- [in] Cluster descriptor to free.

uint16_t ezb_zcl_cluster_desc_get_id(ezb_zcl_cluster_desc_t cluster_desc)

Get the cluster ID of a Zigbee cluster descriptor.

Parameters:

cluster_desc -- [in] The cluster descriptor.

Returns:

The identifier of the cluster.

uint8_t ezb_zcl_cluster_desc_get_role(ezb_zcl_cluster_desc_t cluster_desc)

Get the cluster role of a Zigbee cluster descriptor.

Parameters:

cluster_desc -- [in] The cluster descriptor.

Returns:

Role of the cluster, either EZB_ZCL_CLUSTER_SERVER or EZB_ZCL_CLUSTER_CLIENT, or 0xFF if invalid.

uint16_t ezb_zcl_cluster_desc_get_manuf_code(ezb_zcl_cluster_desc_t cluster_desc)

Get the manufacturer code of a Zigbee cluster descriptor.

Parameters:

cluster_desc -- [in] The cluster descriptor.

Returns:

The manufacturer code.

ezb_zcl_attr_desc_t ezb_zcl_get_attr_desc(uint8_t ep_id, uint16_t cluster_id, uint8_t role, uint16_t attr_id, uint16_t manuf_code)

Get the matching attribute descriptor.

This function searches for an attribute descriptor matching the specified criteria. For manufacturer-specific attributes, the manuf_code must match exactly.

Parameters:
  • ep_id -- [in] The identifier of the endpoint to search in.

  • cluster_id -- [in] The identifier of the cluster to search in.

  • role -- [in] The role of the cluster to search for, either EZB_ZCL_CLUSTER_SERVER or EZB_ZCL_CLUSTER_CLIENT.

  • attr_id -- [in] The identifier of the attribute to search for.

  • manuf_code -- [in] The manufacturer code to search for. Use EZB_ZCL_STD_MANUF_CODE for standard attributes.

Returns:

The matching attribute descriptor on success, EZB_INVALID_ZCL_ATTR_DESC if attribute is not found.

uint16_t ezb_zcl_attr_desc_get_id(ezb_zcl_attr_desc_t attr_desc)

Get the attribute ID of a Zigbee attribute descriptor.

Parameters:

attr_desc -- [in] The attribute descriptor.

Returns:

The identifier of the attribute.

uint16_t ezb_zcl_attr_desc_get_value_size(ezb_zcl_attr_desc_t attr_desc)

Get the value size of a Zigbee attribute descriptor.

Parameters:

attr_desc -- [in] The attribute descriptor.

Returns:

The size of the attribute value in bytes.

ezb_err_t ezb_zcl_attr_desc_get_value(ezb_zcl_attr_desc_t attr_desc, void *value)

Get the value pointer of a Zigbee attribute descriptor.

Parameters:
  • attr_desc -- [in] The attribute descriptor.

  • value -- [out] The pointer to the buffer where the attribute value will be copied.

Returns:

The error code. See ezb_err_t.

ezb_err_t ezb_zcl_attr_desc_set_value(ezb_zcl_attr_desc_t attr_desc, const void *value)

Set the value of a Zigbee attribute descriptor.

Parameters:
  • attr_desc -- [in] The attribute descriptor.

  • value -- [in] The pointer to the value to be set to the attribute.

Returns:

The error code. See ezb_err_t.

ezb_zcl_attr_type_t ezb_zcl_attr_desc_get_type(ezb_zcl_attr_desc_t attr_desc)

Get the data type of a Zigbee attribute descriptor.

Parameters:

attr_desc -- [in] The attribute descriptor.

Returns:

The type of the attribute. See ezb_zcl_attr_type_t.

ezb_zcl_attr_access_t ezb_zcl_attr_desc_get_access(ezb_zcl_attr_desc_t attr_desc)

Get the access control flags of a Zigbee attribute descriptor.

Parameters:

attr_desc -- [in] The attribute descriptor.

Returns:

The access control flags. See ezb_zcl_attr_access_t.

ezb_err_t ezb_zcl_attr_desc_set_access(ezb_zcl_attr_desc_t attr_desc, ezb_zcl_attr_access_t access)

Set the access control flags of a Zigbee attribute descriptor.

Parameters:
  • attr_desc -- [in] The attribute descriptor.

  • access -- [in] The access control flags. See ezb_zcl_attr_access_t.

Returns:

The error code. See ezb_err_t.

uint16_t ezb_zcl_attr_desc_get_manuf_code(ezb_zcl_attr_desc_t attr_desc)

Get the manufacturer code of a Zigbee attribute descriptor.

Parameters:

attr_desc -- [in] The attribute descriptor.

Returns:

The manufacturer code.

ezb_err_t ezb_zcl_attr_desc_set_manuf_code(ezb_zcl_attr_desc_t attr_desc, uint16_t manuf_code)

Set the manufacturer code of a Zigbee attribute descriptor.

Parameters:
  • attr_desc -- [in] The attribute descriptor.

  • manuf_code -- [in] The manufacturer code to set.

Returns:

The error code. See ezb_err_t.

ezb_zcl_attr_desc_t ezb_zcl_cluster_get_attr_desc(const ezb_zcl_cluster_desc_t cluster_desc, uint16_t attr_id, uint16_t manuf_code)

Get an attribute descriptor from a cluster descriptor.

Parameters:
  • cluster_desc -- [in] The cluster descriptor to search in.

  • attr_id -- [in] The attribute identifier to search for.

  • manuf_code -- [in] The manufacturer code to search for.

Returns:

The matching attribute descriptor on success, EZB_INVALID_ZCL_ATTR_DESC if attribute is not found.

ezb_zcl_attr_desc_t ezb_zcl_create_attr_desc(uint16_t id, uint8_t type, uint8_t access, uint16_t manuf_code, const void *data_p)

Create a Zigbee attribute descriptor.

This function allocates and initializes a new attribute descriptor structure.

Parameters:
  • id -- [in] The attribute identifier.

  • type -- [in] The attribute type.

  • access -- [in] The attribute access control.

  • manuf_code -- [in] The manufacturer code if manufacturer-specific.

  • data_p -- [in] The pointer to the attribute data.

Returns:

The created attribute descriptor, or EZB_INVALID_ZCL_ATTR_DESC if failed.

void ezb_zcl_free_attr_desc(ezb_zcl_attr_desc_t attr_desc)

Free a Zigbee attribute descriptor.

This function frees the memory allocated for a attribute descriptor.

Parameters:

attr_desc -- [in] The attribute descriptor to free.

ezb_err_t ezb_zcl_cluster_add_attr_desc(ezb_zcl_cluster_desc_t cluster_desc, ezb_zcl_attr_desc_t attr_desc)

Add an attribute descriptor to a Zigbee cluster descriptor.

Parameters:
  • cluster_desc -- [in] The cluster descriptor.

  • attr_desc -- [in] The attribute descriptor to be added to cluster_desc.

Returns:

The error code. See ezb_err_t.

ezb_zcl_attr_desc_t ezb_zcl_cluster_remove_attr_desc(ezb_zcl_cluster_desc_t cluster_desc, uint16_t attr_id, uint16_t manuf_code)

Remove an attribute descriptor from a Zigbee cluster descriptor.

Parameters:
  • cluster_desc -- [in] The cluster descriptor.

  • attr_id -- [in] The attribute identifier is used to identify the attribute to remove.

  • manuf_code -- [in] The manufacturer code is used to identify the manufacturer of the attribute to remove.

Returns:

The removed attribute descriptor, or EZB_INVALID_ZCL_ATTR_DESC if not found.

ezb_err_t ezb_zcl_cluster_desc_add_manuf_attr(ezb_zcl_cluster_desc_t cluster_desc, uint16_t attr_id, uint8_t attr_type, uint8_t attr_access, uint16_t manuf_code, const void *value)

Add a manufacturer-specific attribute to a Zigbee cluster descriptor.

Parameters:
  • cluster_desc -- [in] The cluster descriptor.

  • attr_id -- [in] The identifier of the attribute.

  • attr_type -- [in] The type of the attribute. See ezb_zcl_attr_type_t.

  • attr_access -- [in] The access control flags of the attribute. See ezb_zcl_attr_access_t.

  • manuf_code -- [in] The manufacturer code for the attribute.

  • value -- [in] The pointer to the attribute value.

Returns:

The error code. See ezb_err_t.

ezb_zcl_attr_desc_t ezb_zcl_cluster_get_next_attr_desc(const ezb_zcl_cluster_desc_t cluster_desc, const ezb_zcl_attr_desc_t attr_desc)

Get the next attribute descriptor in a Zigbee cluster descriptor.

Parameters:
  • cluster_desc -- [in] The cluster descriptor to search in.

  • attr_desc -- [in] The attribute descriptor to start the search from.

Returns:

The next attribute descriptor, or EZB_INVALID_ZCL_ATTR_DESC if no more attributes are found.