Return codes and extended error handling

When a ZigBee PRO API function is called, a code is normally returned on completion of the function to indicate the outcome. This code is taken from one of the following:

An extended error handling mechanism can be optionally implemented which allows more detail to be obtained about certain errors that can occur during function execution. The particular errors are:

  • 0xA3: zps_APL_APS_E_ILLEGAL_REQUEST

  • 0xA6: zps_APL_APS_E_INVALID_PARAMETER

  • 0xC2: zps_NWK_ENUM_INVALID_REQUEST

The extended error codes are listed and described in Section 11.2.5.

In order to implement the extended error handling mechanism, you must register a callback function using the function zps_vExtendedStatusSetCallback(). This registration function must be called before invoking the first API function for which extended error handling is required. The registered callback function will then be invoked during execution of the API function if one of the above errors occurs. The callback function will return an extended error code (from those listed in Section11.2.5) but the API function will return only the basic error code.

Parent topic:Application coding with ZigBee PRO APIs