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#

EmberStatus

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.

EmberStatus
emberAfSendResponseWithCallback(EmberAfMessageSentFunction callback)

Send ZCL response with attached message sent callback.

EmberStatus
emberAfSendMulticast(EmberMulticastId multicastId, EmberApsFrame *apsFrame, uint16_t messageLength, uint8_t *message)

Send multicast.

EmberStatus
emberAfSendMulticastToBindings(EmberApsFrame *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.

EmberStatus
emberAfSendMulticastWithAliasWithCallback(EmberMulticastId multicastId, EmberApsFrame *apsFrame, uint16_t messageLength, uint8_t *message, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback)

Send Multicast with alias with attached message sent callback.

EmberStatus
emberAfSendMulticastWithCallback(EmberMulticastId multicastId, EmberApsFrame *apsFrame, uint16_t messageLength, uint8_t *message, EmberAfMessageSentFunction callback)

Send multicast with attached message sent callback.

EmberStatus
emberAfSendBroadcast(EmberNodeId destination, EmberApsFrame *apsFrame, uint16_t messageLength, uint8_t *message)

Send broadcast.

EmberStatus
emberAfSendBroadcastWithCallback(EmberNodeId destination, EmberApsFrame *apsFrame, uint16_t messageLength, uint8_t *message, EmberAfMessageSentFunction callback)

Send broadcast with attached message sent callback.

EmberStatus
emberAfSendBroadcastWithAliasWithCallback(EmberNodeId destination, EmberApsFrame *apsFrame, uint16_t messageLength, uint8_t *message, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback)

Send broadcast with alias with attached message sent callback.

EmberStatus
emberAfSendUnicast(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame *apsFrame, uint16_t messageLength, uint8_t *message)

Send unicast.

EmberStatus
emberAfSendUnicastWithCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame *apsFrame, uint16_t messageLength, uint8_t *message, EmberAfMessageSentFunction callback)

Send unicast with attached message sent callback.

EmberStatus
emberAfSendUnicastToBindings(EmberApsFrame *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.

EmberStatus
emberAfSendUnicastToBindingsWithCallback(EmberApsFrame *apsFrame, uint16_t messageLength, uint8_t *message, EmberAfMessageSentFunction callback)

emberAfSendUnicastToBindings with attached message sent callback.

EmberStatus
emberAfSendInterPan(EmberPanId panId, const EmberEUI64 destinationLongId, EmberNodeId destinationShortId, EmberMulticastId multicastId, EmberAfClusterId clusterId, EmberAfProfileId profileId, uint16_t messageLength, uint8_t *messageBytes)

Send interpan message.

EmberStatus

Send the command prepared with emberAfFill.... macro.

EmberStatus
emberAfSendCommandUnicastToBindingsWithCallback(EmberAfMessageSentFunction callback)

emberAfSendCommandUnicastToBindings with attached message sent callback.

EmberStatus
emberAfSendCommandMulticast(EmberMulticastId multicastId)

Send the command prepared with emberAfFill.... macro.

EmberStatus
emberAfSendCommandMulticastWithAlias(EmberMulticastId multicastId, EmberNodeId alias, uint8_t sequence)

Send the command prepared with emberAfFill.... macro.

EmberStatus
emberAfSendCommandMulticastWithCallback(EmberMulticastId multicastId, EmberAfMessageSentFunction callback)

emberAfSendCommandMulticast with attached message sent callback.

EmberStatus

Send the command prepared with emberAfFill.... macro.

EmberStatus
emberAfSendCommandUnicast(EmberOutgoingMessageType type, uint16_t indexOrDestination)

Send the command prepared with emberAfFill.... macro.

EmberStatus
emberAfSendCommandUnicastWithCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberAfMessageSentFunction callback)

emberAfSendCommandUnicast with attached message sent callback.

EmberStatus
emberAfSendCommandBroadcast(EmberNodeId destination)

Send the command prepared with emberAfFill.... macro.

EmberStatus
emberAfSendCommandBroadcastWithCallback(EmberNodeId destination, EmberAfMessageSentFunction callback)

emberAfSendCommandBroadcast with attached message sent callback.

EmberStatus
emberAfSendCommandBroadcastWithAliasWithCallback(EmberNodeId destination, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback)

emberAfSendCommandBroadcast from alias with attached message sent callback.

EmberStatus
emberAfSendCommandBroadcastWithAlias(EmberNodeId destination, EmberNodeId alias, uint8_t sequence)

Send the command prepared with emberAfFill.... macro.

EmberStatus
emberAfSendCommandInterPan(EmberPanId panId, const EmberEUI64 destinationLongId, EmberNodeId destinationShortId, EmberMulticastId multicastId, EmberAfProfileId profileId)

Send the command prepared with emberAfFill.... macro.

EmberStatus
emberAfSendDefaultResponse(const EmberAfClusterCommand *cmd, EmberAfStatus status)

Send a default response to a cluster command.

EmberStatus
emberAfSendDefaultResponseWithCallback(const EmberAfClusterCommand *cmd, EmberAfStatus status, EmberAfMessageSentFunction callback)

emberAfSendDefaultResponse with attached message sent callback.

EmberStatus

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

EmberStatus
emberAfSendImmediateDefaultResponseWithCallback(EmberAfStatus status, EmberAfMessageSentFunction callback)

emberAfSendImmediateDefaultResponse with attached message sent callback.

uint8_t
emberAfMaximumApsPayloadLength(EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame *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.

EmberApsFrame *

Access to client API APS frame.

void
emberAfSetCommandEndpoints(uint8_t sourceEndpoint, uint8_t destinationEndpoint)

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

EmberStatus
emberAfFindDevicesByProfileAndCluster(EmberNodeId target, EmberAfProfileId profileId, EmberAfClusterId clusterId, bool serverCluster, EmberAfServiceDiscoveryCallback *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 EMBER_RX_ON_WHEN_IDLE_BROADCAST_ADDRESS.

EmberStatus
emberAfFindClustersByDeviceAndEndpoint(EmberNodeId target, uint8_t targetEndpoint, EmberAfServiceDiscoveryCallback *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.

EmberStatus
emberAfFindIeeeAddress(EmberNodeId shortAddress, EmberAfServiceDiscoveryCallback *callback)

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

EmberStatus
emberAfFindNodeId(EmberEUI64 longAddress, EmberAfServiceDiscoveryCallback *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).

EmberStatus
emberAfFindActiveEndpoints(EmberNodeId target, EmberAfServiceDiscoveryCallback *callback)

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

uint8_t
emberAfAddAddressTableEntry(EmberEUI64 longId, EmberNodeId shortId)

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

EmberStatus
emberAfSetAddressTableEntry(uint8_t index, EmberEUI64 longId, EmberNodeId shortId)

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

EmberStatus

Remove a specific entry from the address table.

EmberStatus
emberAfInitiateKeyEstablishment(EmberNodeId nodeId, uint8_t endpoint)

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

EmberStatus
emberAfInitiateInterPanKeyEstablishment(EmberPanId panId, const EmberEUI64 eui64)

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

bool

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

EmberStatus
emberAfInitiatePartnerLinkKeyExchange(EmberNodeId target, uint8_t endpoint, EmberAfPartnerLinkKeyExchangeCallback *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 emberAfFindDevicesByProfileAndCluster().

#define

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

#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#

emberAfSendResponse#

EmberStatus emberAfSendResponse (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 1433 of file app/framework/include/af.h

emberAfSendResponseWithCallback#

EmberStatus emberAfSendResponseWithCallback (EmberAfMessageSentFunction callback)

Send ZCL response with attached message sent callback.

Parameters
N/Acallback

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

emberAfSendMulticast#

EmberStatus emberAfSendMulticast (EmberMulticastId multicastId, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message)

Send multicast.

Parameters
N/AmulticastId
N/AapsFrame
N/AmessageLength
N/Amessage

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

emberAfSendMulticastToBindings#

EmberStatus emberAfSendMulticastToBindings (EmberApsFrame * 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 1455 of file app/framework/include/af.h

emberAfSendMulticastWithAliasWithCallback#

EmberStatus emberAfSendMulticastWithAliasWithCallback (EmberMulticastId multicastId, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback)

Send Multicast with alias with attached message sent callback.

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

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

emberAfSendMulticastWithCallback#

EmberStatus emberAfSendMulticastWithCallback (EmberMulticastId multicastId, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, EmberAfMessageSentFunction callback)

Send multicast with attached message sent callback.

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

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

emberAfSendBroadcast#

EmberStatus emberAfSendBroadcast (EmberNodeId destination, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message)

Send broadcast.

Parameters
N/Adestination
N/AapsFrame
N/AmessageLength
N/Amessage

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

emberAfSendBroadcastWithCallback#

EmberStatus emberAfSendBroadcastWithCallback (EmberNodeId destination, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, EmberAfMessageSentFunction callback)

Send broadcast with attached message sent callback.

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

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

emberAfSendBroadcastWithAliasWithCallback#

EmberStatus emberAfSendBroadcastWithAliasWithCallback (EmberNodeId destination, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback)

Send broadcast with alias with attached message sent callback.

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

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

emberAfSendUnicast#

EmberStatus emberAfSendUnicast (EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message)

Send unicast.

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

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

emberAfSendUnicastWithCallback#

EmberStatus emberAfSendUnicastWithCallback (EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, EmberAfMessageSentFunction callback)

Send unicast with attached message sent callback.

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

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

emberAfSendUnicastToBindings#

EmberStatus emberAfSendUnicastToBindings (EmberApsFrame * 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 1532 of file app/framework/include/af.h

emberAfSendUnicastToBindingsWithCallback#

EmberStatus emberAfSendUnicastToBindingsWithCallback (EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, EmberAfMessageSentFunction callback)

emberAfSendUnicastToBindings with attached message sent callback.

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

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

emberAfSendInterPan#

EmberStatus emberAfSendInterPan (EmberPanId panId, const EmberEUI64 destinationLongId, EmberNodeId destinationShortId, EmberMulticastId multicastId, EmberAfClusterId clusterId, EmberAfProfileId 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 1547 of file app/framework/include/af.h

emberAfSendCommandUnicastToBindings#

EmberStatus emberAfSendCommandUnicastToBindings (void )

Send the command prepared with emberAfFill.... macro.

Parameters
N/A

This function is used to send a command that was previously prepared using the emberAfFill... 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 1566 of file app/framework/include/af.h

emberAfSendCommandUnicastToBindingsWithCallback#

EmberStatus emberAfSendCommandUnicastToBindingsWithCallback (EmberAfMessageSentFunction callback)

emberAfSendCommandUnicastToBindings with attached message sent callback.

Parameters
N/Acallback

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

emberAfSendCommandMulticast#

EmberStatus emberAfSendCommandMulticast (EmberMulticastId multicastId)

Send the command prepared with emberAfFill.... macro.

Parameters
N/AmulticastId

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


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

emberAfSendCommandMulticastWithAlias#

EmberStatus emberAfSendCommandMulticastWithAlias (EmberMulticastId multicastId, EmberNodeId alias, uint8_t sequence)

Send the command prepared with emberAfFill.... macro.

Parameters
N/AmulticastId
N/Aalias
N/Asequence

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


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

emberAfSendCommandMulticastWithCallback#

EmberStatus emberAfSendCommandMulticastWithCallback (EmberMulticastId multicastId, EmberAfMessageSentFunction callback)

emberAfSendCommandMulticast with attached message sent callback.

Parameters
N/AmulticastId
N/Acallback

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

emberAfSendCommandMulticastToBindings#

EmberStatus emberAfSendCommandMulticastToBindings (void )

Send the command prepared with emberAfFill.... macro.

Parameters
N/A

This function is used to send a command that was previously prepared using the emberAfFill... 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 1607 of file app/framework/include/af.h

emberAfSendCommandUnicast#

EmberStatus emberAfSendCommandUnicast (EmberOutgoingMessageType type, uint16_t indexOrDestination)

Send the command prepared with emberAfFill.... macro.

Parameters
N/Atype
N/AindexOrDestination

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


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

emberAfSendCommandUnicastWithCallback#

EmberStatus emberAfSendCommandUnicastWithCallback (EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberAfMessageSentFunction callback)

emberAfSendCommandUnicast with attached message sent callback.

Parameters
N/Atype
N/AindexOrDestination
N/Acallback

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

emberAfSendCommandBroadcast#

EmberStatus emberAfSendCommandBroadcast (EmberNodeId destination)

Send the command prepared with emberAfFill.... macro.

Parameters
N/Adestination

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


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

emberAfSendCommandBroadcastWithCallback#

EmberStatus emberAfSendCommandBroadcastWithCallback (EmberNodeId destination, EmberAfMessageSentFunction callback)

emberAfSendCommandBroadcast with attached message sent callback.

Parameters
N/Adestination
N/Acallback

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

emberAfSendCommandBroadcastWithAliasWithCallback#

EmberStatus emberAfSendCommandBroadcastWithAliasWithCallback (EmberNodeId destination, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback)

emberAfSendCommandBroadcast from alias with attached message sent callback.

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

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

emberAfSendCommandBroadcastWithAlias#

EmberStatus emberAfSendCommandBroadcastWithAlias (EmberNodeId destination, EmberNodeId alias, uint8_t sequence)

Send the command prepared with emberAfFill.... macro.

Parameters
N/Adestination
N/Aalias
N/Asequence

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


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

emberAfSendCommandInterPan#

EmberStatus emberAfSendCommandInterPan (EmberPanId panId, const EmberEUI64 destinationLongId, EmberNodeId destinationShortId, EmberMulticastId multicastId, EmberAfProfileId profileId)

Send the command prepared with emberAfFill.... 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 emberAfFill... 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 1666 of file app/framework/include/af.h

emberAfSendDefaultResponse#

EmberStatus emberAfSendDefaultResponse (const EmberAfClusterCommand * cmd, EmberAfStatus 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 ::EmberStatus value that indicates the success or failure of sending the response.


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

emberAfSendDefaultResponseWithCallback#

EmberStatus emberAfSendDefaultResponseWithCallback (const EmberAfClusterCommand * cmd, EmberAfStatus status, EmberAfMessageSentFunction callback)

emberAfSendDefaultResponse with attached message sent callback.

Parameters
N/Acmd
N/Astatus
N/Acallback

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

emberAfSendImmediateDefaultResponse#

EmberStatus emberAfSendImmediateDefaultResponse (EmberAfStatus 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 ::EmberStatus value that indicates the success or failure of sending the response.


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

emberAfSendImmediateDefaultResponseWithCallback#

EmberStatus emberAfSendImmediateDefaultResponseWithCallback (EmberAfStatus status, EmberAfMessageSentFunction callback)

emberAfSendImmediateDefaultResponse with attached message sent callback.

Parameters
N/Astatus
N/Acallback

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

emberAfMaximumApsPayloadLength#

uint8_t emberAfMaximumApsPayloadLength (EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberApsFrame * 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 EmberNodeId 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 1728 of file app/framework/include/af.h

emberAfGetCommandApsFrame#

EmberApsFrame * emberAfGetCommandApsFrame (void )

Access to client API APS frame.

Parameters
N/A

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

emberAfSetCommandEndpoints#

void emberAfSetCommandEndpoints (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 1740 of file app/framework/include/af.h

emberAfFindDevicesByProfileAndCluster#

EmberStatus emberAfFindDevicesByProfileAndCluster (EmberNodeId target, EmberAfProfileId profileId, EmberAfClusterId clusterId, bool serverCluster, EmberAfServiceDiscoveryCallback * 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 EMBER_RX_ON_WHEN_IDLE_BROADCAST_ADDRESS.

Parameters
N/Atarget

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

N/AprofileId

The application profile for the cluster being discovered.

N/AclusterId

The cluster being discovered.

N/AserverCluster

EMBER_AF_SERVER_CLUSTER_DISCOVERY (true) if discovering servers for the target cluster; EMBER_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 1779 of file app/framework/include/af.h

emberAfFindClustersByDeviceAndEndpoint#

EmberStatus emberAfFindClustersByDeviceAndEndpoint (EmberNodeId target, uint8_t targetEndpoint, EmberAfServiceDiscoveryCallback * 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 1799 of file app/framework/include/af.h

emberAfFindIeeeAddress#

EmberStatus emberAfFindIeeeAddress (EmberNodeId shortAddress, EmberAfServiceDiscoveryCallback * 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 1808 of file app/framework/include/af.h

emberAfFindNodeId#

EmberStatus emberAfFindNodeId (EmberEUI64 longAddress, EmberAfServiceDiscoveryCallback * 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 1816 of file app/framework/include/af.h

emberAfFindActiveEndpoints#

EmberStatus emberAfFindActiveEndpoints (EmberNodeId target, EmberAfServiceDiscoveryCallback * callback)

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

Parameters
N/Atarget
N/Acallback

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

emberAfAddAddressTableEntry#

uint8_t emberAfAddAddressTableEntry (EmberEUI64 longId, EmberNodeId 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 ::EMBER_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 emberAfRemoveAddressTableEntry.

Returns

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


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

emberAfSetAddressTableEntry#

EmberStatus emberAfSetAddressTableEntry (uint8_t index, EmberEUI64 longId, EmberNodeId 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 ::EMBER_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 emberAfAddAddressTableEntry. 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 emberAfRemoveAddressTableEntry.

Returns

  • ::EMBER_SUCCESS if the address table entry was successfully set, ::EMBER_ADDRESS_TABLE_ENTRY_IS_ACTIVE if any messages are being sent using the existing entry at that index or the entry is still referenced in the framework, or ::EMBER_ADDRESS_TABLE_INDEX_OUT_OF_RANGE if the index is out of range.


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

emberAfRemoveAddressTableEntry#

EmberStatus emberAfRemoveAddressTableEntry (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 emberAfAddAddressTableEntry and emberAfSetAddressTableEntry. The address table entry at this index will not actually be removed until its reference count reaches zero.

Returns

  • ::EMBER_SUCCESS if the address table entry was successfully removed or ::EMBER_ADDRESS_TABLE_INDEX_OUT_OF_RANGE if the index is out of range.


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

emberAfInitiateKeyEstablishment#

EmberStatus emberAfInitiateKeyEstablishment (EmberNodeId nodeId, uint8_t endpoint)

Initiate key establishment with a remote node. emberAfKeyEstablishmentCallback 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

  • ::EMBER_SUCCESS if key establishment was initiated successfully


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

emberAfInitiateInterPanKeyEstablishment#

EmberStatus emberAfInitiateInterPanKeyEstablishment (EmberPanId panId, const EmberEUI64 eui64)

Initiate key establishment with a remote node on a different PAN. emberAfInterPanKeyEstablishmentCallback 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

  • ::EMBER_SUCCESS if key establishment was initiated successfully


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

emberAfPerformingKeyEstablishment#

bool emberAfPerformingKeyEstablishment (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 1930 of file app/framework/include/af.h

emberAfInitiatePartnerLinkKeyExchange#

EmberStatus emberAfInitiatePartnerLinkKeyExchange (EmberNodeId target, uint8_t endpoint, EmberAfPartnerLinkKeyExchangeCallback * 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

  • ::EMBER_SUCCESS if the partner link key exchange was initiated successfully.


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

emberAfIsCurrentSecurityProfileSmartEnergy#

bool emberAfIsCurrentSecurityProfileSmartEnergy (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 1961 of file app/framework/include/af.h

EMBER_AF_CLIENT_CLUSTER_DISCOVERY#

#define EMBER_AF_CLIENT_CLUSTER_DISCOVERY
Value:
false

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


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

EMBER_AF_SERVER_CLUSTER_DISCOVERY#

#define EMBER_AF_SERVER_CLUSTER_DISCOVERY
Value:
true

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


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

emberAfCurrentEndpoint#

#define emberAfCurrentEndpoint
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 1901 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