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
EMBER_AF_CLIENT_CLUSTER_DISCOVERY false

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

#define
EMBER_AF_SERVER_CLUSTER_DISCOVERY true

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

#define
emberAfCurrentEndpoint ()

Return the current endpoint that is being served.

Macros#

#define
EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_DISP

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

#define
EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_CANCEL

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

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

#define
EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_X_ALL

zcl msg x-all [implementationDateTime:4]

#define
EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_GET

zcl msg get

#define
EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_CONFIRM

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

#define
EMBER_AF_DOXYGEN_CLI_COMMAND_MESSAGING_GET_MSG_X

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
TypeDirectionArgument NameDescription
voidN/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
TypeDirectionArgument NameDescription
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberMulticastIdN/AmulticastId
EmberApsFrame *N/AapsFrame
uint16_tN/AmessageLength
uint8_t *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
TypeDirectionArgument NameDescription
EmberApsFrame *N/AapsFrame
uint16_tN/AmessageLength
uint8_t *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
TypeDirectionArgument NameDescription
EmberMulticastIdN/AmulticastId
EmberApsFrame *N/AapsFrame
uint16_tN/AmessageLength
uint8_t *N/Amessage
EmberNodeIdN/Aalias
uint8_tN/Asequence
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberMulticastIdN/AmulticastId
EmberApsFrame *N/AapsFrame
uint16_tN/AmessageLength
uint8_t *N/Amessage
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberNodeIdN/Adestination
EmberApsFrame *N/AapsFrame
uint16_tN/AmessageLength
uint8_t *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
TypeDirectionArgument NameDescription
EmberNodeIdN/Adestination
EmberApsFrame *N/AapsFrame
uint16_tN/AmessageLength
uint8_t *N/Amessage
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberNodeIdN/Adestination
EmberApsFrame *N/AapsFrame
uint16_tN/AmessageLength
uint8_t *N/Amessage
EmberNodeIdN/Aalias
uint8_tN/Asequence
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberOutgoingMessageTypeN/Atype
uint16_tN/AindexOrDestination
EmberApsFrame *N/AapsFrame
uint16_tN/AmessageLength
uint8_t *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
TypeDirectionArgument NameDescription
EmberOutgoingMessageTypeN/Atype
uint16_tN/AindexOrDestination
EmberApsFrame *N/AapsFrame
uint16_tN/AmessageLength
uint8_t *N/Amessage
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberApsFrame *N/AapsFrame
uint16_tN/AmessageLength
uint8_t *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
TypeDirectionArgument NameDescription
EmberApsFrame *N/AapsFrame
uint16_tN/AmessageLength
uint8_t *N/Amessage
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberPanIdN/ApanId
const EmberEUI64N/AdestinationLongId
EmberNodeIdN/AdestinationShortId
EmberMulticastIdN/AmulticastId
EmberAfClusterIdN/AclusterId
EmberAfProfileIdN/AprofileId
uint16_tN/AmessageLength
uint8_t *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
TypeDirectionArgument NameDescription
voidN/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
TypeDirectionArgument NameDescription
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberMulticastIdN/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
TypeDirectionArgument NameDescription
EmberMulticastIdN/AmulticastId
EmberNodeIdN/Aalias
uint8_tN/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
TypeDirectionArgument NameDescription
EmberMulticastIdN/AmulticastId
EmberAfMessageSentFunctionN/Acallback

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

emberAfSendCommandMulticastToBindings#

EmberStatus emberAfSendCommandMulticastToBindings (void )

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

Parameters
TypeDirectionArgument NameDescription
voidN/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
TypeDirectionArgument NameDescription
EmberOutgoingMessageTypeN/Atype
uint16_tN/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
TypeDirectionArgument NameDescription
EmberOutgoingMessageTypeN/Atype
uint16_tN/AindexOrDestination
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberNodeIdN/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
TypeDirectionArgument NameDescription
EmberNodeIdN/Adestination
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberNodeIdN/Adestination
EmberNodeIdN/Aalias
uint8_tN/Asequence
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberNodeIdN/Adestination
EmberNodeIdN/Aalias
uint8_tN/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
TypeDirectionArgument NameDescription
EmberPanIdN/ApanId
const EmberEUI64N/AdestinationLongId
EmberNodeIdN/AdestinationShortId
EmberMulticastIdN/AmulticastId
EmberAfProfileIdN/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
TypeDirectionArgument NameDescription
const EmberAfClusterCommand *N/Acmd

The cluster command to which to respond.

EmberAfStatusN/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
TypeDirectionArgument NameDescription
const EmberAfClusterCommand *N/Acmd
EmberAfStatusN/Astatus
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberAfStatusN/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
TypeDirectionArgument NameDescription
EmberAfStatusN/Astatus
EmberAfMessageSentFunctionN/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
TypeDirectionArgument NameDescription
EmberOutgoingMessageTypeN/Atype

The outgoing message type.

uint16_tN/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.

EmberApsFrame *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
TypeDirectionArgument NameDescription
voidN/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
TypeDirectionArgument NameDescription
uint8_tN/AsourceEndpoint
uint8_tN/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
TypeDirectionArgument NameDescription
EmberNodeIdN/Atarget

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

EmberAfProfileIdN/AprofileId

The application profile for the cluster being discovered.

EmberAfClusterIdN/AclusterId

The cluster being discovered.

boolN/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.

EmberAfServiceDiscoveryCallback *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
TypeDirectionArgument NameDescription
EmberNodeIdN/Atarget

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

uint8_tN/AtargetEndpoint

The endpoint to target with the discovery process.

EmberAfServiceDiscoveryCallback *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
TypeDirectionArgument NameDescription
EmberNodeIdN/AshortAddress
EmberAfServiceDiscoveryCallback *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
TypeDirectionArgument NameDescription
EmberEUI64N/AlongAddress
EmberAfServiceDiscoveryCallback *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
TypeDirectionArgument NameDescription
EmberNodeIdN/Atarget
EmberAfServiceDiscoveryCallback *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
TypeDirectionArgument NameDescription
EmberEUI64N/AlongId

The EUI64 of the remote device.

EmberNodeIdN/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
TypeDirectionArgument NameDescription
uint8_tN/Aindex

The index of the address table entry.

EmberEUI64N/AlongId

The EUI64 of the remote device.

EmberNodeIdN/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
TypeDirectionArgument NameDescription
uint8_tN/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
TypeDirectionArgument NameDescription
EmberNodeIdN/AnodeId

The node ID of the remote device.

uint8_tN/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
TypeDirectionArgument NameDescription
EmberPanIdN/ApanId

The PAN ID of the remote device.

const EmberEUI64N/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
TypeDirectionArgument NameDescription
voidN/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
TypeDirectionArgument NameDescription
EmberNodeIdN/Atarget

The node ID of the remote device.

uint8_tN/Aendpoint

The key establishment endpoint of the remote device.

EmberAfPartnerLinkKeyExchangeCallback *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
TypeDirectionArgument NameDescription
voidN/A

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