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 EmberAfOtaImageId is valid or not. This is done by passing the data to the function emberAfIsOtaImageIdValid().

void

When running on an OS, this API sets the Zigbee stack task to ready.

bool
emberAfEndpointEnableDisable(uint8_t endpoint, bool enable)

Enable/disable endpoints.

bool

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

bool
emberAfIsThisDataTypeAStringType(EmberAfAttributeType dataType)

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

bool
emberAfIsStringAttributeType(EmberAfAttributeType attributeType)

Return true if the given attribute type is a string.

bool
emberAfIsLongStringAttributeType(EmberAfAttributeType attributeType)

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

uint8_t

Increment the ZCL sequence number and returns the value.

uint8_t

Retrieve the last sequence number that was used.

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

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

void
emberAfGetEui64(EmberEUI64 returnEui64)

Populate the passed EUI64 with the local EUI64 MAC address.

EmberNodeId

Return the node ID of the local node.

EmberStatus
emberAfGenerateRandomKey(EmberKeyData *result)

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

EmberPanId

Return the PAN ID of the local node.

uint8_t

Return the radioChannel of the current network.

uint8_t

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

uint8_t

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

EmberNetworkStatus

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

EmberStatus
emberAfGetNetworkParameters(EmberNodeType *nodeType, EmberNetworkParameters *parameters)

Return the current network parameters.

EmberStatus
emberAfGetNodeType(EmberNodeType *nodeType)

Returns the current node type.

EmberStatus
emberAfPermitJoin(uint8_t duration, bool broadcastMgmtPermitJoin)

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

EmberStatus
emberAfBroadcastPermitJoin(uint8_t duration)

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

#define
EMBER_AF_NEW_IMAGE_VERIFICATION true

Indicate a new image verification is taking place.

#define
EMBER_AF_CONTINUE_IMAGE_VERIFY false

Indicate the continuation of an image verification already in progress.

#define
EMBER_AF_ZCL_SEQUENCE_MASK 0x7Fu

The mask applied by emberAfNextSequence when generating ZCL sequence numbers.

#define
EMBER_AF_MESSAGE_TAG_MASK 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.

#define
EMBER_AF_REJOIN_DUE_TO_END_DEVICE_MOVE (cluster)

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

#define
EMBER_AF_REJOIN_DUE_TO_TC_KEEPALIVE_FAILURE (cluster)

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

#define
EMBER_AF_REJOIN_DUE_TO_CLI_COMMAND (cluster)

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

#define
EMBER_AF_REJOIN_DUE_TO_WWAH_CONNECTIVITY_MANAGER (cluster)

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

#define
EMBER_AF_REJOIN_FIRST_REASON (cluster)

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

#define
EMBER_AF_REJOIN_LAST_REASON (cluster)

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

API Documentation#

emberAfInvalidImageId#

const EmberAfOtaImageId emberAfInvalidImageId

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


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

sl_zigbee_common_rtos_wakeup_stack_task#

void sl_zigbee_common_rtos_wakeup_stack_task (void )

When running on an OS, this API sets the Zigbee stack task to ready.

Parameters
TypeDirectionArgument NameDescription
voidN/A

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

emberAfEndpointEnableDisable#

bool emberAfEndpointEnableDisable (uint8_t endpoint, bool enable)

Enable/disable endpoints.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Aendpoint
boolN/Aenable

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

emberAfEndpointIndexIsEnabled#

bool emberAfEndpointIndexIsEnabled (uint8_t index)

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

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Aindex

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

emberAfIsThisDataTypeAStringType#

bool emberAfIsThisDataTypeAStringType (EmberAfAttributeType dataType)

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

Parameters
TypeDirectionArgument NameDescription
EmberAfAttributeTypeN/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 925 of file app/framework/include/af.h

emberAfIsStringAttributeType#

bool emberAfIsStringAttributeType (EmberAfAttributeType attributeType)

Return true if the given attribute type is a string.

Parameters
TypeDirectionArgument NameDescription
EmberAfAttributeTypeN/AattributeType

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

emberAfIsLongStringAttributeType#

bool emberAfIsLongStringAttributeType (EmberAfAttributeType attributeType)

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

Parameters
TypeDirectionArgument NameDescription
EmberAfAttributeTypeN/AattributeType

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

emberAfNextSequence#

uint8_t emberAfNextSequence (void )

Increment the ZCL sequence number and returns the value.

Parameters
TypeDirectionArgument NameDescription
voidN/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 956 of file app/framework/include/af.h

emberAfGetLastSequenceNumber#

uint8_t emberAfGetLastSequenceNumber (void )

Retrieve the last sequence number that was used.

Parameters
TypeDirectionArgument NameDescription
voidN/A

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

emberAfCompareValues#

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

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

Parameters
TypeDirectionArgument NameDescription
uint8_t *N/Aval1
uint8_t *N/Aval2
uint8_tN/Alen
boolN/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 976 of file app/framework/include/af.h

emberAfGetEui64#

void emberAfGetEui64 (EmberEUI64 returnEui64)

Populate the passed EUI64 with the local EUI64 MAC address.

Parameters
TypeDirectionArgument NameDescription
EmberEUI64N/AreturnEui64

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

emberAfGetNodeId#

EmberNodeId emberAfGetNodeId (void )

Return the node ID of the local node.

Parameters
TypeDirectionArgument NameDescription
voidN/A

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

emberAfGenerateRandomKey#

EmberStatus emberAfGenerateRandomKey (EmberKeyData * result)

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

Parameters
TypeDirectionArgument NameDescription
EmberKeyData *N/Aresult

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

emberAfGetPanId#

EmberPanId emberAfGetPanId (void )

Return the PAN ID of the local node.

Parameters
TypeDirectionArgument NameDescription
voidN/A

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

emberAfGetRadioChannel#

uint8_t emberAfGetRadioChannel (void )

Return the radioChannel of the current network.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Get this node's radio channel for the current network.


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

emberAfGetBindingIndex#

uint8_t emberAfGetBindingIndex (void )

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

Parameters
TypeDirectionArgument NameDescription
voidN/A

EmberAfCluster* to consider


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

emberAfGetAddressIndex#

uint8_t emberAfGetAddressIndex (void )

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

Parameters
TypeDirectionArgument NameDescription
voidN/A

EmberAfCluster* to consider


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

emberAfNetworkState#

EmberNetworkStatus emberAfNetworkState (void )

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

Parameters
TypeDirectionArgument NameDescription
voidN/A

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

emberAfGetNetworkParameters#

EmberStatus emberAfGetNetworkParameters (EmberNodeType * nodeType, EmberNetworkParameters * parameters)

Return the current network parameters.

Parameters
TypeDirectionArgument NameDescription
EmberNodeType *N/AnodeType
EmberNetworkParameters *N/Aparameters

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

emberAfGetNodeType#

EmberStatus emberAfGetNodeType (EmberNodeType * nodeType)

Returns the current node type.

Parameters
TypeDirectionArgument NameDescription
EmberNodeType *N/AnodeType

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

emberAfPermitJoin#

EmberStatus emberAfPermitJoin (uint8_t duration, bool broadcastMgmtPermitJoin)

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

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Aduration

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

boolN/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 1070 of file app/framework/include/af.h

emberAfBroadcastPermitJoin#

EmberStatus emberAfBroadcastPermitJoin (uint8_t duration)

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

Parameters
TypeDirectionArgument NameDescription
uint8_tN/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 1085 of file app/framework/include/af.h