Developing with ZBOSS for Zigbee
Configurable ZBOSS memory sizes

With ZBOSS configurable memory feature SDK user can configure some internal ZBOSS memory sizes at application compile time. More...

Macros

#define ZB_CONFIG_ROLE_ZC
 
#define ZB_CONFIG_ROLE_ZED
 
#define ZB_CONFIG_ROLE_ZR
 
#define ZB_CONFIG_OVERALL_NETWORK_SIZE   200U
 
#define ZB_CONFIG_HIGH_TRAFFIC
 
#define ZB_CONFIG_APPLICATION_COMPLEX
 
#define ZB_CONFIG_MODERATE_TRAFFIC
 
#define ZB_CONFIG_APPLICATION_MODERATE
 
#define ZB_CONFIG_LIGHT_TRAFFIC
 
#define ZB_CONFIG_APPLICATION_SIMPLE
 

Detailed Description

With ZBOSS configurable memory feature SDK user can configure some internal ZBOSS memory sizes at application compile time.

Normally sizes of all ZBOSS internal data structures are fixed during ZBOSS library build, so user of the SDK is not able to change them.

To configure memory sizes, an application must include into one of its source files one of memory configuration pre-sets: zb_mem_config_max.h, zb_mem_config_med.h or zb_mem_config_min.h. It is also possible for application to create its own pre-set basing on values from some of zb_mem_config_xxx.h.

Example:

#define ZB_TRACE_FILE_ID 40244
#include "zboss_api.h"
#include "zb_led_button.h"
#include "zb_on_off_switch.h"
/* Insert that include before any code or declaration. */
#ifdef ZB_CONFIGURABLE_MEM
#include "zb_mem_config_max.h"
#endif
/* Next define clusters, attributes etc. */

If user does not configure memory sizes, default parameters defined in zb_vendor.h at ZBOSS library compile time will be used. There are separate default parameters sets for ZC/ZR and ZED libraries.

There are currently 4 settings in memory configuration defined in zb_mem_config_xxx.h:

That 4 settings defines optimal storage parameters values. User still can fine-tune storage constants. To do so clone some zb_mem_config_xxx.h file and re-define constants after including of zb_mem_config_common.h. Note that manual setting of the storage parameters may destabilize ZBOSS and must be done with care only if SDK user exactly knows which parameter can be changed and in which diapason.

Macro Definition Documentation

◆ ZB_CONFIG_APPLICATION_COMPLEX

#define ZB_CONFIG_APPLICATION_COMPLEX

Complex user's application at that device: complex relations to other devices.

◆ ZB_CONFIG_APPLICATION_MODERATE

#define ZB_CONFIG_APPLICATION_MODERATE

Medium user's application complexity at that device: medium relations to other devices.

◆ ZB_CONFIG_APPLICATION_SIMPLE

#define ZB_CONFIG_APPLICATION_SIMPLE

Simple user's application at that device: not too many relations to other devices.

◆ ZB_CONFIG_HIGH_TRAFFIC

#define ZB_CONFIG_HIGH_TRAFFIC

High routing and application traffic from/to that device.

◆ ZB_CONFIG_LIGHT_TRAFFIC

#define ZB_CONFIG_LIGHT_TRAFFIC

Light routing and application traffic from/to that device.

◆ ZB_CONFIG_MODERATE_TRAFFIC

#define ZB_CONFIG_MODERATE_TRAFFIC

Medium routing and application traffic from/to that device.

◆ ZB_CONFIG_OVERALL_NETWORK_SIZE

#define ZB_CONFIG_OVERALL_NETWORK_SIZE   200U

Max total number of devices in Zigbee network.

From 2 to 200.

◆ ZB_CONFIG_ROLE_ZC

#define ZB_CONFIG_ROLE_ZC

Configure memory sizes for ZC device role

◆ ZB_CONFIG_ROLE_ZED

#define ZB_CONFIG_ROLE_ZED

Configure memory sizes for ZED device role

◆ ZB_CONFIG_ROLE_ZR

#define ZB_CONFIG_ROLE_ZR

Configure memory sizes for ZR device role