Messaging#

API for the Messaging functionality in the Application Framework.

Messaging description.

This group describes the CLI commands for the Messaging cluster. Listed below is a description of the cluster:

This cluster provides an interface for passing text messages between SE devices.

API#

Send a ZCL response, based on the information that is currently in the outgoing buffer. It is expected that a complete ZCL message is present, including header. The application may use this method directly from within the message handling function and associated callbacks. However, this will result in the response being sent before the APS ACK is sent, which is not ideal.

sl_zigbee_af_send_response_with_cb(sl_zigbee_af_message_sent_function_t callback)

Send ZCL response with attached message sent callback.

sl_zigbee_af_send_multicast(sl_zigbee_multicast_id_t multicastId, sl_802154_short_addr_t alias, uint8_t sequence, sl_zigbee_aps_frame_t *apsFrame, uint16_t messageLength, uint8_t *message)

Send a multicast message to all endpoints that share a specific multicast ID and are within a specified number of hops of the sender.

sl_zigbee_af_send_multicast_to_bindings(sl_zigbee_aps_frame_t *apsFrame, uint16_t messageLength, uint8_t *message)

Multicast the message to the group in the binding table that match the cluster and source endpoint in the APS frame. Note: if the binding table contains many matching entries, calling this API cause a significant amount of network traffic. Care should be taken when considering the effects of broadcasts in a network.

sl_zigbee_af_send_multicast_with_cb(sl_zigbee_multicast_id_t multicastId, sl_802154_short_addr_t alias, uint8_t sequence, sl_zigbee_aps_frame_t *apsFrame, uint16_t messageLength, uint8_t *message, sl_zigbee_af_message_sent_function_t callback)

Send multicast with attached message sent callback.

sl_zigbee_af_send_broadcast(sl_802154_short_addr_t alias, sl_802154_short_addr_t destination, uint8_t sequence, sl_zigbee_aps_frame_t *apsFrame, uint16_t messageLength, uint8_t *message)

Send a broadcast message as per the ZigBee specification.

sl_zigbee_af_send_broadcast_with_cb(sl_802154_short_addr_t destination, sl_zigbee_aps_frame_t *apsFrame, uint16_t messageLength, uint8_t *message, sl_802154_short_addr_t alias, uint8_t sequence, sl_zigbee_af_message_sent_function_t callback)

Send broadcast with attached message sent callback.

sl_zigbee_af_send_unicast(sl_zigbee_outgoing_message_type_t type, uint16_t indexOrDestination, sl_zigbee_aps_frame_t *apsFrame, uint16_t messageLength, uint8_t *message)

Send unicast.

sl_zigbee_af_send_unicast_with_cb(sl_zigbee_outgoing_message_type_t type, uint16_t indexOrDestination, sl_zigbee_aps_frame_t *apsFrame, uint16_t messageLength, uint8_t *message, sl_zigbee_af_message_sent_function_t callback)

Send unicast with attached message sent callback.

sl_zigbee_af_send_unicast_to_bindings(sl_zigbee_aps_frame_t *apsFrame, uint16_t messageLength, uint8_t *message)

Unicast the message to each remote node in the binding table that matches the cluster and source endpoint in the APS frame. Note: if the binding table contains many matching entries, calling this API cause a significant amount of network traffic.

sl_zigbee_af_send_unicast_to_bindings_with_cb(sl_zigbee_aps_frame_t *apsFrame, uint16_t messageLength, uint8_t *message, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_unicast_to_bindings with attached message sent callback.

sl_zigbee_af_send_inter_pan(sl_802154_pan_id_t panId, const sl_802154_long_addr_t destinationLongId, sl_802154_short_addr_t destinationShortId, sl_zigbee_multicast_id_t multicastId, sl_zigbee_af_cluster_id_t clusterId, sl_zigbee_af_profile_id_t profileId, uint16_t messageLength, uint8_t *messageBytes)

Send interpan message.

Send the command prepared with sl_zigbee_af_fill.... macro.

sl_zigbee_af_send_command_unicast_to_bindings_with_cb(sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_command_unicast_to_bindings with attached message sent callback.

sl_zigbee_af_send_command_multicast(sl_zigbee_multicast_id_t multicastId, sl_802154_short_addr_t alias, uint8_t sequence)

Send the command prepared with sl_zigbee_af_fill.... macro.

sl_zigbee_af_send_command_multicast_with_cb(sl_zigbee_multicast_id_t multicastId, sl_802154_short_addr_t alias, uint8_t sequence, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_command_multicast with attached message sent callback.

Send the command prepared with sl_zigbee_af_fill.... macro.

sl_zigbee_af_send_command_unicast(sl_zigbee_outgoing_message_type_t type, uint16_t indexOrDestination)

Send the command prepared with sl_zigbee_af_fill.... macro.

sl_zigbee_af_send_command_unicast_with_cb(sl_zigbee_outgoing_message_type_t type, uint16_t indexOrDestination, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_command_unicast with attached message sent callback.

sl_zigbee_af_send_command_broadcast(sl_802154_short_addr_t destination, sl_802154_short_addr_t alias, uint8_t sequence)

Send the command prepared with sl_zigbee_af_fill.... macro.

sl_zigbee_af_send_command_broadcast_with_cb(sl_802154_short_addr_t destination, sl_802154_short_addr_t alias, uint8_t sequence, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_command_broadcast with attached message sent callback.

sl_zigbee_af_send_command_inter_pan(sl_802154_pan_id_t panId, const sl_802154_long_addr_t destinationLongId, sl_802154_short_addr_t destinationShortId, sl_zigbee_multicast_id_t multicastId, sl_zigbee_af_profile_id_t profileId)

Send the command prepared with sl_zigbee_af_fill.... macro.

sl_zigbee_af_send_default_response(const sl_zigbee_af_cluster_command_t *cmd, sl_zigbee_af_status_t status)

Send a default response to a cluster command.

sl_zigbee_af_send_default_response_with_cb(const sl_zigbee_af_cluster_command_t *cmd, sl_zigbee_af_status_t status, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_default_response with attached message sent callback.

sl_zigbee_af_send_immediate_default_response(sl_zigbee_af_status_t status)

Send a default response to a cluster command using the current command.

sl_zigbee_af_send_immediate_default_response_with_cb(sl_zigbee_af_status_t status, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_immediate_default_response with attached message sent callback.

uint8_t
sl_zigbee_af_maximum_aps_payload_length(sl_zigbee_outgoing_message_type_t type, uint16_t indexOrDestination, sl_zigbee_aps_frame_t *apsFrame)

Return the maximum size of the payload that the Application Support sub-layer will accept for the given message type, destination, and APS frame.

sl_zigbee_aps_frame_t *

Access to client API APS frame.

void
sl_zigbee_af_set_command_endpoints(uint8_t sourceEndpoint, uint8_t destinationEndpoint)

Set the source and destination endpoints in the client API APS frame.

sl_zigbee_af_find_devices_by_profile_and_cluster(sl_802154_short_addr_t target, sl_zigbee_af_profile_id_t profileId, sl_zigbee_af_cluster_id_t clusterId, bool serverCluster, sl_zigbee_af_service_discovery_callback_t *callback)

Find devices in the network with endpoints matching a given profile ID and cluster ID in their descriptors. Target may either be a specific device, or the broadcast address SL_ZIGBEE_RX_ON_WHEN_IDLE_BROADCAST_ADDRESS.

sl_zigbee_af_find_clusters_by_device_and_endpoint(sl_802154_short_addr_t target, uint8_t targetEndpoint, sl_zigbee_af_service_discovery_callback_t *callback)

Find all of the given in and out clusters implemented on a devices given endpoint. Target should only be the short address of a specific device.

sl_zigbee_af_find_ieee_address(sl_802154_short_addr_t shortAddress, sl_zigbee_af_service_discovery_callback_t *callback)

Initiate a discovery for the IEEE address of the specified node ID. This will send a unicast sent to the target node ID.

sl_zigbee_af_find_node_id(sl_802154_long_addr_t longAddress, sl_zigbee_af_service_discovery_callback_t *callback)

Initiate a discovery for the short ID of the specified long address. This will send a broadcast to all RX-on-when-idle devices (non-sleepies).

sl_zigbee_af_find_active_endpoints(sl_802154_short_addr_t target, sl_zigbee_af_service_discovery_callback_t *callback)

Initiate an Active Endpoint request ZDO message to the target node ID.

uint8_t
sl_zigbee_af_add_address_table_entry(sl_802154_long_addr_t longId, sl_802154_short_addr_t shortId)

Add an entry for a remote device to the address table.

sl_zigbee_af_set_address_table_entry(uint8_t index, sl_802154_long_addr_t longId, sl_802154_short_addr_t shortId)

Add an entry for a remote device to the address table at a specific location.

Remove a specific entry from the address table.

sl_zigbee_af_initiate_key_establishment(sl_802154_short_addr_t nodeId, uint8_t endpoint)

Initiate key establishment with a remote node. sl_zigbee_af_key_establishment_cb will be called as events occur and when key establishment completes.

sl_zigbee_af_initiate_inter_pan_key_establishment(sl_802154_pan_id_t panId, const sl_802154_long_addr_t eui64)

Initiate key establishment with a remote node on a different PAN. sl_zigbee_af_inter_pan_key_establishment_cb will be called as events occur and when key establishment completes.

bool

Indicate whether the device is in the process of performing key establishment.

sl_zigbee_af_initiate_partner_link_key_exchange(sl_802154_short_addr_t target, uint8_t endpoint, sl_zigbee_af_partner_link_key_exchange_callback_t *callback)

Initiate partner link key exchange with a remote node.

bool

Use this function to determine if the security profile of the current network was set to Smart Energy. The security profile is configured in AppBuilder. @ return true if the security profile is Smart Energy or false otherwise.

#define

Friendly define for use in discovering client clusters with sl_zigbee_af_find_devices_by_profile_and_cluster().

#define

Friendly define for use in discovering server clusters with sl_zigbee_af_find_devices_by_profile_and_cluster().

#define

Return the current endpoint that is being served.

Macros#

#define

zcl msg disp [messageId:4] [messageControl:1] [startTime:4] [durationInMinutes:2] [message:-1] [optionalExtendedMessageControl:1]

#define

zcl msg cancel [messageId:4] [messageControl:1]

#define

zcl msg disp-protd [messageId:4] [messageControl:1] [startTime:4] [durationInMinutes:2] [message:-1] [optionalExtendedMessageControl:1]

#define

zcl msg x-all [implementationDateTime:4]

#define

zcl msg confirm [messageId:4] [confirmationTime:4] [messageConfirmationControl:1] [messageResponse:-1]

#define

zcl msg get-msg-x [earliestImplementationTime:4]

API Documentation#

sl_zigbee_af_send_response#

sl_status_t sl_zigbee_af_send_response (void )

Send a ZCL response, based on the information that is currently in the outgoing buffer. It is expected that a complete ZCL message is present, including header. The application may use this method directly from within the message handling function and associated callbacks. However, this will result in the response being sent before the APS ACK is sent, which is not ideal.

Parameters
N/A

NOTE: This will overwrite the ZCL sequence number of the message to use the LAST received sequence number.


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

sl_zigbee_af_send_response_with_cb#

sl_status_t sl_zigbee_af_send_response_with_cb (sl_zigbee_af_message_sent_function_t callback)

Send ZCL response with attached message sent callback.

Parameters
N/Acallback

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

sl_zigbee_af_send_multicast#

sl_status_t sl_zigbee_af_send_multicast (sl_zigbee_multicast_id_t multicastId, sl_802154_short_addr_t alias, uint8_t sequence, sl_zigbee_aps_frame_t * apsFrame, uint16_t messageLength, uint8_t * message)

Send a multicast message to all endpoints that share a specific multicast ID and are within a specified number of hops of the sender.

Parameters
N/AmulticastId

The multicastId

N/Aalias

The alias from which to send the multicast. If not needed use SL_ZIGBEE_NULL_NODE_ID

N/Asequence

The aliased NWK sequence number for the message. Only used if there is an alias source.

N/AapsFrame

The aps frame

N/AmessageLength

The mmessageLength

N/Amessage

A message.

Returns


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

sl_zigbee_af_send_multicast_to_bindings#

sl_status_t sl_zigbee_af_send_multicast_to_bindings (sl_zigbee_aps_frame_t * apsFrame, uint16_t messageLength, uint8_t * message)

Multicast the message to the group in the binding table that match the cluster and source endpoint in the APS frame. Note: if the binding table contains many matching entries, calling this API cause a significant amount of network traffic. Care should be taken when considering the effects of broadcasts in a network.

Parameters
N/AapsFrame
N/AmessageLength
N/Amessage

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

sl_zigbee_af_send_multicast_with_cb#

sl_status_t sl_zigbee_af_send_multicast_with_cb (sl_zigbee_multicast_id_t multicastId, sl_802154_short_addr_t alias, uint8_t sequence, sl_zigbee_aps_frame_t * apsFrame, uint16_t messageLength, uint8_t * message, sl_zigbee_af_message_sent_function_t callback)

Send multicast with attached message sent callback.

Parameters
N/AmulticastId
N/Aalias
N/Asequence
N/AapsFrame
N/AmessageLength
N/Amessage
N/Acallback

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

sl_zigbee_af_send_broadcast#

sl_status_t sl_zigbee_af_send_broadcast (sl_802154_short_addr_t alias, sl_802154_short_addr_t destination, uint8_t sequence, sl_zigbee_aps_frame_t * apsFrame, uint16_t messageLength, uint8_t * message)

Send a broadcast message as per the ZigBee specification.

Parameters
N/Aalias

The aliased source from which to send the broadcast. SL_ZIGBEE__NULL_NODE_ID could be used if this is a simple broadcast message, and not aliased/proxied

N/Adestination

The destination to which to send the broadcast. This must be one of three ZigBee broadcast addresses.

N/Asequence

The NWK sequence number for the message, if there is a non-null alias source

N/AapsFrame

The APS frame data to be included in the message.

N/AmessageLength

messageLength

N/Amessage

The actual message to be sent.

The message will be delivered to all nodes within radius hops of the sender. A radius of zero is converted to ::SL_ZIGBEE_MAX_HOPS.

Returns


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

sl_zigbee_af_send_broadcast_with_cb#

sl_status_t sl_zigbee_af_send_broadcast_with_cb (sl_802154_short_addr_t destination, sl_zigbee_aps_frame_t * apsFrame, uint16_t messageLength, uint8_t * message, sl_802154_short_addr_t alias, uint8_t sequence, sl_zigbee_af_message_sent_function_t callback)

Send broadcast with attached message sent callback.

Parameters
N/Adestination
N/AapsFrame
N/AmessageLength
N/Amessage
N/Aalias
N/Asequence
N/Acallback

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

sl_zigbee_af_send_unicast#

sl_status_t sl_zigbee_af_send_unicast (sl_zigbee_outgoing_message_type_t type, uint16_t indexOrDestination, sl_zigbee_aps_frame_t * apsFrame, uint16_t messageLength, uint8_t * message)

Send unicast.

Parameters
N/Atype
N/AindexOrDestination
N/AapsFrame
N/AmessageLength
N/Amessage

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

sl_zigbee_af_send_unicast_with_cb#

sl_status_t sl_zigbee_af_send_unicast_with_cb (sl_zigbee_outgoing_message_type_t type, uint16_t indexOrDestination, sl_zigbee_aps_frame_t * apsFrame, uint16_t messageLength, uint8_t * message, sl_zigbee_af_message_sent_function_t callback)

Send unicast with attached message sent callback.

Parameters
N/Atype
N/AindexOrDestination
N/AapsFrame
N/AmessageLength
N/Amessage
N/Acallback

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

sl_zigbee_af_send_unicast_to_bindings#

sl_status_t sl_zigbee_af_send_unicast_to_bindings (sl_zigbee_aps_frame_t * apsFrame, uint16_t messageLength, uint8_t * message)

Unicast the message to each remote node in the binding table that matches the cluster and source endpoint in the APS frame. Note: if the binding table contains many matching entries, calling this API cause a significant amount of network traffic.

Parameters
N/AapsFrame
N/AmessageLength
N/Amessage

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

sl_zigbee_af_send_unicast_to_bindings_with_cb#

sl_status_t sl_zigbee_af_send_unicast_to_bindings_with_cb (sl_zigbee_aps_frame_t * apsFrame, uint16_t messageLength, uint8_t * message, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_unicast_to_bindings with attached message sent callback.

Parameters
N/AapsFrame
N/AmessageLength
N/Amessage
N/Acallback

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

sl_zigbee_af_send_inter_pan#

sl_status_t sl_zigbee_af_send_inter_pan (sl_802154_pan_id_t panId, const sl_802154_long_addr_t destinationLongId, sl_802154_short_addr_t destinationShortId, sl_zigbee_multicast_id_t multicastId, sl_zigbee_af_cluster_id_t clusterId, sl_zigbee_af_profile_id_t profileId, uint16_t messageLength, uint8_t * messageBytes)

Send interpan message.

Parameters
N/ApanId
N/AdestinationLongId
N/AdestinationShortId
N/AmulticastId
N/AclusterId
N/AprofileId
N/AmessageLength
N/AmessageBytes

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

sl_zigbee_af_send_command_unicast_to_bindings#

sl_status_t sl_zigbee_af_send_command_unicast_to_bindings (void )

Send the command prepared with sl_zigbee_af_fill.... macro.

Parameters
N/A

This function is used to send a command that was previously prepared using the sl_zigbee_af_fill... macros from the client command API. It will be sent as unicast to each remote node in the binding table that matches the cluster and source endpoint in the APS frame. Note: if the binding table contains many matching entries, calling this API cause a significant amount of network traffic.


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

sl_zigbee_af_send_command_unicast_to_bindings_with_cb#

sl_status_t sl_zigbee_af_send_command_unicast_to_bindings_with_cb (sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_command_unicast_to_bindings with attached message sent callback.

Parameters
N/Acallback

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

sl_zigbee_af_send_command_multicast#

sl_status_t sl_zigbee_af_send_command_multicast (sl_zigbee_multicast_id_t multicastId, sl_802154_short_addr_t alias, uint8_t sequence)

Send the command prepared with sl_zigbee_af_fill.... macro.

Parameters
N/AmulticastId
N/Aalias
N/Asequence

This function is used to send a command that was previously prepared using the sl_zigbee_af_fill... macros from the client command API. It will be sent as multicast.


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

sl_zigbee_af_send_command_multicast_with_cb#

sl_status_t sl_zigbee_af_send_command_multicast_with_cb (sl_zigbee_multicast_id_t multicastId, sl_802154_short_addr_t alias, uint8_t sequence, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_command_multicast with attached message sent callback.

Parameters
N/AmulticastId
N/Aalias
N/Asequence
N/Acallback

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

sl_zigbee_af_send_command_multicast_to_bindings#

sl_status_t sl_zigbee_af_send_command_multicast_to_bindings (void )

Send the command prepared with sl_zigbee_af_fill.... macro.

Parameters
N/A

This function is used to send a command that was previously prepared using the sl_zigbee_af_fill... macros from the client command API. It will be sent as multicast to the group specified in the binding table that matches the cluster and source endpoint in the APS frame. Note: if the binding table contains many matching entries, calling this API cause a significant amount of network traffic.


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

sl_zigbee_af_send_command_unicast#

sl_status_t sl_zigbee_af_send_command_unicast (sl_zigbee_outgoing_message_type_t type, uint16_t indexOrDestination)

Send the command prepared with sl_zigbee_af_fill.... macro.

Parameters
N/Atype
N/AindexOrDestination

This function is used to send a command that was previously prepared using the sl_zigbee_af_fill... macros from the client command API. It will be sent as unicast.


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

sl_zigbee_af_send_command_unicast_with_cb#

sl_status_t sl_zigbee_af_send_command_unicast_with_cb (sl_zigbee_outgoing_message_type_t type, uint16_t indexOrDestination, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_command_unicast with attached message sent callback.

Parameters
N/Atype
N/AindexOrDestination
N/Acallback

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

sl_zigbee_af_send_command_broadcast#

sl_status_t sl_zigbee_af_send_command_broadcast (sl_802154_short_addr_t destination, sl_802154_short_addr_t alias, uint8_t sequence)

Send the command prepared with sl_zigbee_af_fill.... macro.

Parameters
N/Adestination
N/Aalias
N/Asequence

This function is used to send a command that was previously prepared using the sl_zigbee_af_fill... macros from the client command API.


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

sl_zigbee_af_send_command_broadcast_with_cb#

sl_status_t sl_zigbee_af_send_command_broadcast_with_cb (sl_802154_short_addr_t destination, sl_802154_short_addr_t alias, uint8_t sequence, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_command_broadcast with attached message sent callback.

Parameters
N/Adestination
N/Aalias
N/Asequence
N/Acallback

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

sl_zigbee_af_send_command_inter_pan#

sl_status_t sl_zigbee_af_send_command_inter_pan (sl_802154_pan_id_t panId, const sl_802154_long_addr_t destinationLongId, sl_802154_short_addr_t destinationShortId, sl_zigbee_multicast_id_t multicastId, sl_zigbee_af_profile_id_t profileId)

Send the command prepared with sl_zigbee_af_fill.... macro.

Parameters
N/ApanId
N/AdestinationLongId
N/AdestinationShortId
N/AmulticastId
N/AprofileId

This function is used to send a command that was previously prepared using the sl_zigbee_af_fill... macros from the client command API. It will be sent via inter-PAN. If destinationLongId is not NULL, the message will be sent to that long address using long addressing mode; otherwise, the message will be sent to destinationShortId using short address mode. IF multicastId is not zero, the message will be sent using multicast mode.


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

sl_zigbee_af_send_default_response#

sl_status_t sl_zigbee_af_send_default_response (const sl_zigbee_af_cluster_command_t * cmd, sl_zigbee_af_status_t status)

Send a default response to a cluster command.

Parameters
N/Acmd

The cluster command to which to respond.

N/Astatus

Status code for the default response command.

This function is used to prepare and send a default response to a cluster command.

Returns

  • An sl_status_t value that indicates the success or failure of sending the response.


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

sl_zigbee_af_send_default_response_with_cb#

sl_status_t sl_zigbee_af_send_default_response_with_cb (const sl_zigbee_af_cluster_command_t * cmd, sl_zigbee_af_status_t status, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_default_response with attached message sent callback.

Parameters
N/Acmd
N/Astatus
N/Acallback

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

sl_zigbee_af_send_immediate_default_response#

sl_status_t sl_zigbee_af_send_immediate_default_response (sl_zigbee_af_status_t status)

Send a default response to a cluster command using the current command.

Parameters
N/Astatus

Status code for the default response command.

This function is used to prepare and send a default response to a cluster command.

Returns

  • An sl_status_t value that indicates the success or failure of sending the response.


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

sl_zigbee_af_send_immediate_default_response_with_cb#

sl_status_t sl_zigbee_af_send_immediate_default_response_with_cb (sl_zigbee_af_status_t status, sl_zigbee_af_message_sent_function_t callback)

sl_zigbee_af_send_immediate_default_response with attached message sent callback.

Parameters
N/Astatus
N/Acallback

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

sl_zigbee_af_maximum_aps_payload_length#

uint8_t sl_zigbee_af_maximum_aps_payload_length (sl_zigbee_outgoing_message_type_t type, uint16_t indexOrDestination, sl_zigbee_aps_frame_t * apsFrame)

Return the maximum size of the payload that the Application Support sub-layer will accept for the given message type, destination, and APS frame.

Parameters
N/Atype

The outgoing message type.

N/AindexOrDestination

Depending on the message type, this is either the sl_802154_short_addr_t of the destination, an index into the address table, an index into the binding table, the multicast identifier, or a broadcast address.

N/AapsFrame

The APS frame for the message.

The size depends on multiple factors, including the security level in use and additional information added to the message to support the various options.

Returns

  • The maximum APS payload length for the given message.


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

sl_zigbee_af_get_command_aps_frame#

sl_zigbee_aps_frame_t * sl_zigbee_af_get_command_aps_frame (void )

Access to client API APS frame.

Parameters
N/A

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

sl_zigbee_af_set_command_endpoints#

void sl_zigbee_af_set_command_endpoints (uint8_t sourceEndpoint, uint8_t destinationEndpoint)

Set the source and destination endpoints in the client API APS frame.

Parameters
N/AsourceEndpoint
N/AdestinationEndpoint

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

sl_zigbee_af_find_devices_by_profile_and_cluster#

sl_status_t sl_zigbee_af_find_devices_by_profile_and_cluster (sl_802154_short_addr_t target, sl_zigbee_af_profile_id_t profileId, sl_zigbee_af_cluster_id_t clusterId, bool serverCluster, sl_zigbee_af_service_discovery_callback_t * callback)

Find devices in the network with endpoints matching a given profile ID and cluster ID in their descriptors. Target may either be a specific device, or the broadcast address SL_ZIGBEE_RX_ON_WHEN_IDLE_BROADCAST_ADDRESS.

Parameters
N/Atarget

The destination node ID for the discovery; either a specific node's ID or SL_ZIGBEE_RX_ON_WHEN_IDLE_BROADCAST_ADDRESS.

N/AprofileId

The application profile for the cluster being discovered.

N/AclusterId

The cluster being discovered.

N/AserverCluster

SL_ZIGBEE_AF_SERVER_CLUSTER_DISCOVERY (true) if discovering servers for the target cluster; SL_ZIGBEE_AF_CLIENT_CLUSTER_DISCOVERY (false) if discovering clients for that cluster.

N/Acallback

Function pointer for the callback function triggered when a match is discovered. (For broadcast discoveries, this is called once per matching node, even if a node has multiple matching endpoints.)

This function initiates a service discovery. Received responses are returned by executing the callback function passed in. For unicast discoveries, the callback will be executed only once. Either the target will return a result or a timeout will occur. For broadcast discoveries, the callback may be called multiple times and after a period of time the discovery will be finished with a final call to the callback.


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

sl_zigbee_af_find_clusters_by_device_and_endpoint#

sl_status_t sl_zigbee_af_find_clusters_by_device_and_endpoint (sl_802154_short_addr_t target, uint8_t targetEndpoint, sl_zigbee_af_service_discovery_callback_t * callback)

Find all of the given in and out clusters implemented on a devices given endpoint. Target should only be the short address of a specific device.

Parameters
N/Atarget

The destination node ID for the discovery. This should be a specific node's ID and should not be a broadcast address.

N/AtargetEndpoint

The endpoint to target with the discovery process.

N/Acallback

Function pointer for the callback function triggered when the discovery is returned.

This function initiates a single service discovery and the response is passed back to the passed callback.


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

sl_zigbee_af_find_ieee_address#

sl_status_t sl_zigbee_af_find_ieee_address (sl_802154_short_addr_t shortAddress, sl_zigbee_af_service_discovery_callback_t * callback)

Initiate a discovery for the IEEE address of the specified node ID. This will send a unicast sent to the target node ID.

Parameters
N/AshortAddress
N/Acallback

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

sl_zigbee_af_find_node_id#

sl_status_t sl_zigbee_af_find_node_id (sl_802154_long_addr_t longAddress, sl_zigbee_af_service_discovery_callback_t * callback)

Initiate a discovery for the short ID of the specified long address. This will send a broadcast to all RX-on-when-idle devices (non-sleepies).

Parameters
N/AlongAddress
N/Acallback

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

sl_zigbee_af_find_active_endpoints#

sl_status_t sl_zigbee_af_find_active_endpoints (sl_802154_short_addr_t target, sl_zigbee_af_service_discovery_callback_t * callback)

Initiate an Active Endpoint request ZDO message to the target node ID.

Parameters
N/Atarget
N/Acallback

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

sl_zigbee_af_add_address_table_entry#

uint8_t sl_zigbee_af_add_address_table_entry (sl_802154_long_addr_t longId, sl_802154_short_addr_t shortId)

Add an entry for a remote device to the address table.

Parameters
N/AlongId

The EUI64 of the remote device.

N/AshortId

The node ID of the remote device or ::SL_ZIGBEE_UNKNOWN_NODE_ID if the node ID is currently unknown.

If the EUI64 already exists in the address table, the index of the existing entry will be returned. Otherwise, a new entry will be created and the new new index will be returned. The framework will remember how many times the returned index has been referenced. When the address table entry is no longer needed, the application should remove its reference by calling sl_zigbee_af_remove_address_table_entry.

Returns

  • The index of the address table entry for this remove device or ::SL_ZIGBEE_NULL_ADDRESS_TABLE_INDEX if an error occurred (e.g., the address table is full).


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

sl_zigbee_af_set_address_table_entry#

sl_status_t sl_zigbee_af_set_address_table_entry (uint8_t index, sl_802154_long_addr_t longId, sl_802154_short_addr_t shortId)

Add an entry for a remote device to the address table at a specific location.

Parameters
N/Aindex

The index of the address table entry.

N/AlongId

The EUI64 of the remote device.

N/AshortId

The node id of the remote device or ::SL_ZIGBEE_UNKNOWN_NODE_ID if the node id is currently unknown.

The framework will remember how many times an address table index has been referenced through sl_zigbee_af_add_address_table_entry. If the reference count for the index passed to this function is not zero, the entry will be not changed. When the address table entry is no longer needed, the application should remove its reference by calling sl_zigbee_af_remove_address_table_entry.

Returns


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

sl_zigbee_af_remove_address_table_entry#

sl_status_t sl_zigbee_af_remove_address_table_entry (uint8_t index)

Remove a specific entry from the address table.

Parameters
N/Aindex

The index of the address table entry.

The framework will remember how many times an address table index has been referenced through sl_zigbee_af_add_address_table_entry and sl_zigbee_af_set_address_table_entry. The address table entry at this index will not actually be removed until its reference count reaches zero.

Returns


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

sl_zigbee_af_initiate_key_establishment#

sl_status_t sl_zigbee_af_initiate_key_establishment (sl_802154_short_addr_t nodeId, uint8_t endpoint)

Initiate key establishment with a remote node. sl_zigbee_af_key_establishment_cb will be called as events occur and when key establishment completes.

Parameters
N/AnodeId

The node ID of the remote device.

N/Aendpoint

The endpoint on the remote device.

Returns

  • SL_STATUS_OK if key establishment was initiated successfully


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

sl_zigbee_af_initiate_inter_pan_key_establishment#

sl_status_t sl_zigbee_af_initiate_inter_pan_key_establishment (sl_802154_pan_id_t panId, const sl_802154_long_addr_t eui64)

Initiate key establishment with a remote node on a different PAN. sl_zigbee_af_inter_pan_key_establishment_cb will be called as events occur and when key establishment completes.

Parameters
N/ApanId

The PAN ID of the remote device.

N/Aeui64

The EUI64 of the remote device.

Returns

  • SL_STATUS_OK if key establishment was initiated successfully


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

sl_zigbee_af_performing_key_establishment#

bool sl_zigbee_af_performing_key_establishment (void )

Indicate whether the device is in the process of performing key establishment.

Parameters
N/A

Returns

  • ::true if key establishment is in progress.


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

sl_zigbee_af_initiate_partner_link_key_exchange#

sl_status_t sl_zigbee_af_initiate_partner_link_key_exchange (sl_802154_short_addr_t target, uint8_t endpoint, sl_zigbee_af_partner_link_key_exchange_callback_t * callback)

Initiate partner link key exchange with a remote node.

Parameters
N/Atarget

The node ID of the remote device.

N/Aendpoint

The key establishment endpoint of the remote device.

N/Acallback

The callback that should be called when the partner link key exchange completes.

Returns

  • SL_STATUS_OK if the partner link key exchange was initiated successfully.


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

sl_zigbee_af_is_current_security_profile_smart_energy#

bool sl_zigbee_af_is_current_security_profile_smart_energy (void )

Use this function to determine if the security profile of the current network was set to Smart Energy. The security profile is configured in AppBuilder. @ return true if the security profile is Smart Energy or false otherwise.

Parameters
N/A

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

SL_ZIGBEE_AF_CLIENT_CLUSTER_DISCOVERY#

#define SL_ZIGBEE_AF_CLIENT_CLUSTER_DISCOVERY
Value:
false

Friendly define for use in discovering client clusters with sl_zigbee_af_find_devices_by_profile_and_cluster().


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

SL_ZIGBEE_AF_SERVER_CLUSTER_DISCOVERY#

#define SL_ZIGBEE_AF_SERVER_CLUSTER_DISCOVERY
Value:
true

Friendly define for use in discovering server clusters with sl_zigbee_af_find_devices_by_profile_and_cluster().


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

sl_zigbee_af_current_endpoint#

#define sl_zigbee_af_current_endpoint
Value:
()

Return the current endpoint that is being served.

The purpose of this macro is mostly to access endpoint that is being served in the command callbacks.


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

Macro Definition Documentation#

EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_DISP#

#define EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_DISP

zcl msg disp [messageId:4] [messageControl:1] [startTime:4] [durationInMinutes:2] [message:-1] [optionalExtendedMessageControl:1]

  • Command description for DisplayMessage

    • messageId - INT32U

    • messageControl - MessagingControlMask [BITMAP8]

    • startTime - UTC_TIME

    • durationInMinutes - INT16U

    • message - CHAR_STRING

    • optionalExtendedMessageControl - MessagingExtendedControlMask [BITMAP8]


Definition at line 1413 of file app/framework/test/headers/cli.doc

EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_CANCEL#

#define EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_CANCEL

zcl msg cancel [messageId:4] [messageControl:1]

  • The CancelMessage command provides the ability to cancel the sending or acceptance of previously sent messages.

    • messageId - INT32U

    • messageControl - MessagingControlMask [BITMAP8]


Definition at line 1420 of file app/framework/test/headers/cli.doc

EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_DISP_PROTD#

#define EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_DISP_PROTD

zcl msg disp-protd [messageId:4] [messageControl:1] [startTime:4] [durationInMinutes:2] [message:-1] [optionalExtendedMessageControl:1]

  • The DisplayProtected Message command is for use with messages that are protected by a password or PIN.

    • messageId - INT32U

    • messageControl - MessagingControlMask [BITMAP8]

    • startTime - UTC_TIME

    • durationInMinutes - INT16U

    • message - CHAR_STRING

    • optionalExtendedMessageControl - MessagingExtendedControlMask [BITMAP8]


Definition at line 1431 of file app/framework/test/headers/cli.doc

EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_X_ALL#

#define EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_X_ALL

zcl msg x-all [implementationDateTime:4]

  • The CancelAllMessages command indicates to a client device that it should cancel all display messages currently held by it.

    • implementationDateTime - UTC_TIME


Definition at line 1437 of file app/framework/test/headers/cli.doc

EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_GET#

#define EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_GET

zcl msg get

  • Command description for GetLastMessage


Definition at line 1442 of file app/framework/test/headers/cli.doc

EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_CONFIRM#

#define EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_CONFIRM

zcl msg confirm [messageId:4] [confirmationTime:4] [messageConfirmationControl:1] [messageResponse:-1]

  • The Message Confirmation command provides an indication that a Utility Customer has acknowledged and/or accepted the contents of a previously sent message. Enhanced Message Confirmation commands shall contain an answer of 'NO', 'YES' and/or a message confirmation string.

    • messageId - INT32U

    • confirmationTime - UTC_TIME

    • messageConfirmationControl - BITMAP8

    • messageResponse - OCTET_STRING


Definition at line 1451 of file app/framework/test/headers/cli.doc

EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_GET_MSG_X#

#define EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_GET_MSG_X

zcl msg get-msg-x [earliestImplementationTime:4]

  • This command initiates the return of the first (and maybe only) Cancel All Messages command held on the associated server, and which has an implementation time equal to or later than the value indicated in the payload.

    • earliestImplementationTime - UTC_TIME


Definition at line 1457 of file app/framework/test/headers/cli.doc