General ZCL event callbacks receive the qapi_ZB_CL_Event_Data_t struct which contains the header information required to link the data to a physical device, which would work for Attribute reporting a few other response types. The cluster-specific callbacks, however, seem to only contain the event data and no header information to link it to a device. Is there some way to get this information that I am missing?
We are developing a Zigbee hub to control multiple devices, so we need to come up with a solution for this if the qapi does not support it.
Zigbee cluster event questions
Posted: Thu, 2019-10-31 09:06
We support header information of Event callbacks, Kindly refer to "qapi_ZB_CL_General_Receive_Info_t" and "qapi_ZB_CL_Header_t" Structure that represents the information for a ZCL frame header.
In case of custom-specific callbacks you can refer to "qapi_ZB_CL_Custom_Cluster_Command_t" and "qapi_ZB_CL_Header_t" structures.
Kindly refer to "Qapi_zb_cl.h" for more detailed information.
Sending commands out with qapi_ZB_CL_Header_t hasn't been an issue.
As far as I can see, the qapi_ZB_CL_General_Receive_Info_t is only included in qapi_ZB_CL_Event_Data_t. This seems to only be included in callbacks registered through qapi_ZB_CL_Register_Callback, and is only fired for the generic ZCL responses (read/write attribute, reporting, etc) and not for any cluster-specific responses/events.
qapi_ZB_CL_Custom_Cluster_Command_t does seem like it should contain the information that we want. The comment says it is available for any cluster registered through qapi_ZB_CL_Create_Cluster, but that function generates callbacks that have access to a qapi_ZB_CL_*_Event_Data_t struct that only contains event/payload information. I can't actually see anything that references qapi_ZB_CL_Custom_Cluster_Command_t in the code.