Zigbee Application Framework API and Directory Structure#
The Zigbee Application Framework’s API declarations are provided in app/framework/include/af.h. The Application Framework API Reference is provided with your installation as well as online at Zigbee Application Framework.
APIs for getting information about endpoints and attributes are included in app/framework/util/attribute-storage.h. For instance, to determine if an endpoint contains a certain attribute, use the function emberAfContainsAttribute()
. It returns a Boolean indicating if the requested attribute and cluster are implemented on the specific endpoint.
Directories named in this section are found in the Simplicity Studio Zigbee protocol SDK folder (<SDK location>*protocol|zigbee*) as follows:
app/framework: All the Zigbee Application Framework code is in app/framework. Major portions of the code have been broken out into their own directories.
app/framework/common: Zigbee Application Framework common code that provide basic infrastructure for every Zigbee application, such as seamless integration with OS, integration with the Power Manager, application-level event system APIs, implementation of stack handlers and corresponding application and component dispatching.
app/framework/cli: Code related to the Zigbee Application Framework’s implementation of the CLI.
app/framework/include: All of the external APIs for the Zigbee Application Framework. This directory mirrors the use of the include directory in the stack. It is intended to be the single location for all externally-facing application interfaces.
app/framework/plugin, app/framework/plugin-host, app/framework/plugin-soc: All application framework component code resides here, including all the Silicon Labs ZCL cluster implementations.
app/projects/: Includes all sample application projects that use the Zigbee Application Framework. You can open these sample projects within Project Configurator by starting a new project.
app/framework/security: All utility code related to Zigbee security.
app/framework/util: Includes message processing and any other utility code used by the Zigbee Application Framework. This directory contains the most important features of the Zigbee Application Framework. Attribute storage files that manage attributes for multiple endpoint support are included in this directory. In addition, the API used for accessing, reading, and writing attributes is included in the attribute-table.h, and attribute-storage.h files.
<SDK location>|app|zcl Includes configuration and template files used by Project Configurator. When you point Project Configurator at a stack installation, it looks into this directory to load XML descriptions of the most current ZCL implementation as of the release of that stack. You may load your custom cluster .xml files into your project by clicking Add Custom ZCL in Zigbee Cluster Configurator.