Miscellaneous#

API for the Miscellaneous functionality in the Application Framework.

Miscellaneous description.

API#

This variable defines an invalid image ID. It is used to determine if a returned sl_zigbee_af_ota_image_id_t is valid or not by passing the data to the function sl_zigbee_af_is_ota_image_id_valid().

void

Set the Zigbee stack task to ready when running on an OS.

bool
sl_zigbee_af_endpoint_enable_disable(uint8_t endpoint, bool enable)

Enable/disable endpoints.

bool

Determine if an endpoint at the specified index is enabled or disabled.

bool
sl_zigbee_af_is_this_data_type_a_string_type(sl_zigbee_af_attribute_type_t dataType)

Return true if a given ZCL data type is a string type.

bool
sl_zigbee_af_is_string_attribute_type(sl_zigbee_af_attribute_type_t attributeType)

Return true if the given attribute type is a string.

bool
sl_zigbee_af_is_long_string_attribute_type(sl_zigbee_af_attribute_type_t attributeType)

Return true if the given attribute type is a long string.

uint8_t

Increment the ZCL sequence number and return the value.

uint8_t

Retrieve the last sequence number that was used.

int8_t
sl_zigbee_af_compare_values(uint8_t *val1, uint8_t *val2, uint8_t len, bool signedNumber)

Compare two values of known length as integers.Simple integer comparison function. Signed integer comparison are supported for numbers with length of 4 (bytes) or less. The integers are in native endianness.

void
sl_zigbee_af_get_eui64(sl_802154_long_addr_t returnEui64)

Populate the passed EUI64 with the local EUI64 MAC address.

sl_802154_short_addr_t

Return the node ID of the local node.

sl_zigbee_af_generate_random_key(sl_zigbee_key_data_t *result)

Generate a random key (link, network, or master).

sl_802154_pan_id_t

Return the PAN ID of the local node.

uint8_t

Return the radioChannel of the current network.

sl_zigbee_network_status_t

Return the current network state. This call caches the results on the host to prevent frequent EZSP transactions.

sl_zigbee_af_get_network_parameters(sl_zigbee_node_type_t *nodeType, sl_zigbee_network_parameters_t *parameters)

Return the current network parameters.

sl_zigbee_af_get_node_type(sl_zigbee_node_type_t *nodeType)

Return the current node type.

sl_zigbee_af_permit_join(uint8_t duration, bool broadcastMgmtPermitJoin)

Enable local permit join and optionally broadcast the ZDO Mgmt_Permit_Join_req message. This API can be called from any device type and still return SL_STATUS_OK. If the API is called from an end device, the permit association bit will just be left off.

Enable local permit join and broadcast the ZDO Mgmt_Permit_Join_req message. This API can be called from any device type and still return SL_STATUS_OK. If the API is called from an end device, the permit association bit will just be left off.

void

Acquire the app framework mutex (for RTOS builds). This should be done if code run from outside of the app framework (callback) context in RTOS builds needs to call app framework APIs, as interactions between app framework and other application tasks are not otherwise designed to be thread-safe. Note that APIs relating to app framework events are included in this category of app framework APIs (so thread-safe interactions with the event queue from other tasks require the acquisition of this lock).

void

Release the app framework mutex (for RTOS builds), allowing other application tasks (like the app framework task) waiting on this mutex to run. This should be done once the application code has finished its calls to app framework data or APIs.

#define

Indicate a new image verification is taking place.

#define

Indicate the continuation of an image verification already in progress.

#define

The mask applied by sl_zigbee_af_next_sequence when generating ZCL sequence numbers.

#define

The mask applied to generated message tags used by the framework when sending messages via EZSP. Customers who call ezspSend functions directly must use message tags outside this mask.

#define

Return true if the cluster is in the manufacturer-specific range.

#define

Return true if the cluster is in the manufacturer-specific range.

#define

Return true if the cluster is in the manufacturer-specific range.

#define

Return true if the cluster is in the manufacturer-specific range.

#define

Return true if the cluster is in the manufacturer-specific range.

#define

Return true if the cluster is in the manufacturer-specific range.

API Documentation#

sl_zigbee_af_invalid_image_id#

const sl_zigbee_af_ota_image_id_t sl_zigbee_af_invalid_image_id

This variable defines an invalid image ID. It is used to determine if a returned sl_zigbee_af_ota_image_id_t is valid or not by passing the data to the function sl_zigbee_af_is_ota_image_id_valid().


Definition at line 981 of file app/framework/include/af.h

sl_zigbee_wakeup_common_task#

void sl_zigbee_wakeup_common_task (void )

Set the Zigbee stack task to ready when running on an OS.

Parameters
N/A

Definition at line 952 of file app/framework/include/af.h

sl_zigbee_af_endpoint_enable_disable#

bool sl_zigbee_af_endpoint_enable_disable (uint8_t endpoint, bool enable)

Enable/disable endpoints.

Parameters
N/Aendpoint
N/Aenable

Definition at line 957 of file app/framework/include/af.h

sl_zigbee_af_endpoint_index_is_enabled#

bool sl_zigbee_af_endpoint_index_is_enabled (uint8_t index)

Determine if an endpoint at the specified index is enabled or disabled.

Parameters
N/Aindex

Definition at line 962 of file app/framework/include/af.h

sl_zigbee_af_is_this_data_type_a_string_type#

bool sl_zigbee_af_is_this_data_type_a_string_type (sl_zigbee_af_attribute_type_t dataType)

Return true if a given ZCL data type is a string type.

Parameters
N/AdataType

Use this function to perform a different memory operation on a certain attribute because it is a string type. Since ZCL strings carry length as the first byte(s), it is often required to treat them differently than regular data types.

Returns

  • true if data type is a string.


Definition at line 993 of file app/framework/include/af.h

sl_zigbee_af_is_string_attribute_type#

bool sl_zigbee_af_is_string_attribute_type (sl_zigbee_af_attribute_type_t attributeType)

Return true if the given attribute type is a string.

Parameters
N/AattributeType

Definition at line 996 of file app/framework/include/af.h

sl_zigbee_af_is_long_string_attribute_type#

bool sl_zigbee_af_is_long_string_attribute_type (sl_zigbee_af_attribute_type_t attributeType)

Return true if the given attribute type is a long string.

Parameters
N/AattributeType

Definition at line 999 of file app/framework/include/af.h

sl_zigbee_af_next_sequence#

uint8_t sl_zigbee_af_next_sequence (void )

Increment the ZCL sequence number and return the value.

Parameters
N/A

ZCL messages have sequence numbers so that they can be matched up with other messages in the transaction. To avoid conflicts with sequence numbers generated independently by the application, this API returns sequence numbers with the high bit clear. If the application generates its own sequence numbers, it should use numbers with the high bit set.

Returns

  • The next ZCL sequence number.


Definition at line 1024 of file app/framework/include/af.h

sl_zigbee_af_get_last_sequence_number#

uint8_t sl_zigbee_af_get_last_sequence_number (void )

Retrieve the last sequence number that was used.

Parameters
N/A

Definition at line 1030 of file app/framework/include/af.h

sl_zigbee_af_compare_values#

int8_t sl_zigbee_af_compare_values (uint8_t * val1, uint8_t * val2, uint8_t len, bool signedNumber)

Compare two values of known length as integers.Simple integer comparison function. Signed integer comparison are supported for numbers with length of 4 (bytes) or less. The integers are in native endianness.

Parameters
N/Aval1
N/Aval2
N/Alen
N/AsignedNumber

Returns

  • -1, if val1 is smaller 0, if they are the same or if two negative numbers with length greater than 4 is being compared 1, if val2 is smaller.


Definition at line 1045 of file app/framework/include/af.h

sl_zigbee_af_get_eui64#

void sl_zigbee_af_get_eui64 (sl_802154_long_addr_t returnEui64)

Populate the passed EUI64 with the local EUI64 MAC address.

Parameters
N/AreturnEui64

Definition at line 1050 of file app/framework/include/af.h

sl_zigbee_af_get_node_id#

sl_802154_short_addr_t sl_zigbee_af_get_node_id (void )

Return the node ID of the local node.

Parameters
N/A

Definition at line 1068 of file app/framework/include/af.h

sl_zigbee_af_generate_random_key#

sl_status_t sl_zigbee_af_generate_random_key (sl_zigbee_key_data_t * result)

Generate a random key (link, network, or master).

Parameters
N/Aresult

Definition at line 1074 of file app/framework/include/af.h

sl_zigbee_af_get_pan_id#

sl_802154_pan_id_t sl_zigbee_af_get_pan_id (void )

Return the PAN ID of the local node.

Parameters
N/A

Definition at line 1082 of file app/framework/include/af.h

sl_zigbee_af_get_radio_channel#

uint8_t sl_zigbee_af_get_radio_channel (void )

Return the radioChannel of the current network.

Parameters
N/A

Definition at line 1087 of file app/framework/include/af.h

sl_zigbee_af_network_state#

sl_zigbee_network_status_t sl_zigbee_af_network_state (void )

Return the current network state. This call caches the results on the host to prevent frequent EZSP transactions.

Parameters
N/A

Definition at line 1093 of file app/framework/include/af.h

sl_zigbee_af_get_network_parameters#

sl_status_t sl_zigbee_af_get_network_parameters (sl_zigbee_node_type_t * nodeType, sl_zigbee_network_parameters_t * parameters)

Return the current network parameters.

Parameters
N/AnodeType
N/Aparameters

Definition at line 1098 of file app/framework/include/af.h

sl_zigbee_af_get_node_type#

sl_status_t sl_zigbee_af_get_node_type (sl_zigbee_node_type_t * nodeType)

Return the current node type.

Parameters
N/AnodeType

Definition at line 1104 of file app/framework/include/af.h

sl_zigbee_af_permit_join#

sl_status_t sl_zigbee_af_permit_join (uint8_t duration, bool broadcastMgmtPermitJoin)

Enable local permit join and optionally broadcast the ZDO Mgmt_Permit_Join_req message. This API can be called from any device type and still return SL_STATUS_OK. If the API is called from an end device, the permit association bit will just be left off.

Parameters
N/Aduration

The duration that the permit join bit will remain on and other devices will be able to join the current network.

N/AbroadcastMgmtPermitJoin

whether or not to broadcast the ZDO Mgmt_Permit_Join_req message.

Returns

  • status of whether or not permit join was enabled.


Definition at line 1129 of file app/framework/include/af.h

sl_zigbee_af_broadcast_permit_join#

sl_status_t sl_zigbee_af_broadcast_permit_join (uint8_t duration)

Enable local permit join and broadcast the ZDO Mgmt_Permit_Join_req message. This API can be called from any device type and still return SL_STATUS_OK. If the API is called from an end device, the permit association bit will just be left off.

Parameters
N/Aduration

The duration that the permit join bit will remain on and other devices will be able to join the current network.

Returns

  • status of whether or not permit join was enabled.


Definition at line 1144 of file app/framework/include/af.h

sl_zigbee_af_acquire_lock#

void sl_zigbee_af_acquire_lock (void )

Acquire the app framework mutex (for RTOS builds). This should be done if code run from outside of the app framework (callback) context in RTOS builds needs to call app framework APIs, as interactions between app framework and other application tasks are not otherwise designed to be thread-safe. Note that APIs relating to app framework events are included in this category of app framework APIs (so thread-safe interactions with the event queue from other tasks require the acquisition of this lock).

Parameters
N/A

Definition at line 1160 of file app/framework/include/af.h

sl_zigbee_af_release_lock#

void sl_zigbee_af_release_lock (void )

Release the app framework mutex (for RTOS builds), allowing other application tasks (like the app framework task) waiting on this mutex to run. This should be done once the application code has finished its calls to app framework data or APIs.

Parameters
N/A

Definition at line 1168 of file app/framework/include/af.h

SL_ZIGBEE_AF_NEW_IMAGE_VERIFICATION#

#define SL_ZIGBEE_AF_NEW_IMAGE_VERIFICATION
Value:
true

Indicate a new image verification is taking place.


Definition at line 967 of file app/framework/include/af.h

SL_ZIGBEE_AF_CONTINUE_IMAGE_VERIFY#

#define SL_ZIGBEE_AF_CONTINUE_IMAGE_VERIFY
Value:
false

Indicate the continuation of an image verification already in progress.


Definition at line 973 of file app/framework/include/af.h

SL_ZIGBEE_AF_ZCL_SEQUENCE_MASK#

#define SL_ZIGBEE_AF_ZCL_SEQUENCE_MASK
Value:
0x7Fu

The mask applied by sl_zigbee_af_next_sequence when generating ZCL sequence numbers.


Definition at line 1005 of file app/framework/include/af.h

SL_ZIGBEE_AF_MESSAGE_TAG_MASK#

#define SL_ZIGBEE_AF_MESSAGE_TAG_MASK
Value:
0x7Fu

The mask applied to generated message tags used by the framework when sending messages via EZSP. Customers who call ezspSend functions directly must use message tags outside this mask.


Definition at line 1011 of file app/framework/include/af.h

SL_ZIGBEE_AF_REJOIN_DUE_TO_END_DEVICE_MOVE#

#define SL_ZIGBEE_AF_REJOIN_DUE_TO_END_DEVICE_MOVE
Value:
(cluster)

Return true if the cluster is in the manufacturer-specific range.


Definition at line 1108 of file app/framework/include/af.h

SL_ZIGBEE_AF_REJOIN_DUE_TO_TC_KEEPALIVE_FAILURE#

#define SL_ZIGBEE_AF_REJOIN_DUE_TO_TC_KEEPALIVE_FAILURE
Value:
(cluster)

Return true if the cluster is in the manufacturer-specific range.


Definition at line 1109 of file app/framework/include/af.h

SL_ZIGBEE_AF_REJOIN_DUE_TO_CLI_COMMAND#

#define SL_ZIGBEE_AF_REJOIN_DUE_TO_CLI_COMMAND
Value:
(cluster)

Return true if the cluster is in the manufacturer-specific range.


Definition at line 1110 of file app/framework/include/af.h

SL_ZIGBEE_AF_REJOIN_DUE_TO_WWAH_CONNECTIVITY_MANAGER#

#define SL_ZIGBEE_AF_REJOIN_DUE_TO_WWAH_CONNECTIVITY_MANAGER
Value:
(cluster)

Return true if the cluster is in the manufacturer-specific range.


Definition at line 1111 of file app/framework/include/af.h

SL_ZIGBEE_AF_REJOIN_FIRST_REASON#

#define SL_ZIGBEE_AF_REJOIN_FIRST_REASON
Value:
(cluster)

Return true if the cluster is in the manufacturer-specific range.


Definition at line 1113 of file app/framework/include/af.h

SL_ZIGBEE_AF_REJOIN_LAST_REASON#

#define SL_ZIGBEE_AF_REJOIN_LAST_REASON
Value:
(cluster)

Return true if the cluster is in the manufacturer-specific range.


Definition at line 1114 of file app/framework/include/af.h