Home/Support/Support Forum/Is the ZCL library thread safe?

Is the ZCL library thread safe?

0 votes
Is the XBee Programmable built-in ZDO/ZCL support thread-safe? Specifically if you define an attribute in
// in zcl_attribute_base_t: /// Pointer to global variable of correct type, set as \c const to allow /// for both const and non-const values. (If \c const, flags should be /// include #ZCL_ATTRIB_FLAG_READONLY.) If NULL, the ZCL stack will /// respond to attempts to read/write with ZCL_STATUS_DEFINED_OUT_OF_BAND. const void FAR *value;

I'm asking in the event that the attribute is say 32 bits. What do I need to do to ensure that it's returned atomically?

One specific example I have is a 32-bit event counter. It can incremented from my foreground (main state machine) or from a GPIO interrupt. When I access it from the foreground state machine I turn some interrupts off first. What I don't really understand (and the root of this question) is interaction and thread safety issues within the ZDO/ZCL code e.g. the "general" handler.

asked Apr 22, 2015 in XBee Programmable Development by wz2b Community Contributor (50 points)

Please log in or register to answer this question.

1 Answer

0 votes
Chris, the ZDO and ZCL stand for Zigbee Device Object and Zigbee Cluster Library. Both of which correspond to the Zigbee standards.

The 32 bits it is referring to are the specific ZDO and ZCL items your application needs to support. It is not referring to a solid state setting.
answered Sep 14, 2015 by mvut Veteran of the Digi Community (15,282 points)