The master include file for the Ember ApplicationFramework API.
License#
Copyright 2018 Silicon Laboratories Inc. www.silabs.com
The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at www.silabs.com/about-us/legal/master-software-license-agreement. This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.
/***************************************************************************/
#ifndef SILABS_AF_API
#define SILABS_AF_API
// Micro and compiler-specific typedefs and macros
#include PLATFORM_HEADER
#ifndef CONFIGURATION_HEADER
#define CONFIGURATION_HEADER "app/framework/util/config.h"
#endif
#include CONFIGURATION_HEADER
#ifdef EZSP_HOST
// Includes needed for ember related functions for the EZSP host
#include "stack/include/error.h"
#include "stack/include/ember-types.h"
#include "stack/include/ember-random-api.h"
#include "app/util/ezsp/ezsp-protocol.h"
#include "app/util/ezsp/ezsp.h"
#include "app/util/ezsp/ezsp-utils.h"
#include "app/util/ezsp/serial-interface.h"
#else
// Includes needed for ember related functions for the SoC
#include "stack/include/ember.h"
#endif // EZSP_HOST
#include "hal/hal.h"
#include "event_queue/event-queue.h"
#include "stack/include/error.h"
#include "af-types.h"
#include "app/framework/util/print.h"
#include "app/framework/util/time-util.h"
#ifdef SL_COMPONENT_CATALOG_PRESENT
#include "sl_component_catalog.h"
#ifdef SL_CATALOG_ZIGBEE_ZCL_FRAMEWORK_CORE_PRESENT
#include "zcl-framework-core-config.h"
#endif // SL_CATALOG_ZIGBEE_ZCL_FRAMEWORK_CORE_PRESENT
#ifdef SL_CATALOG_ZIGBEE_TEST_HARNESS_Z3_PRESENT
extern void emberAfPluginTestHarnessZ3BeaconSendEventHandler(sl_zigbee_event_t * event);
extern void emberAfPluginTestHarnessZ3OpenNetworkEventHandler(sl_zigbee_event_t * event);
extern void emberAfPluginTestHarnessZ3ResetKeyEventHandler(sl_zigbee_event_t * event);
extern void emberAfPluginTestHarnessZ3ZdoSendEventHandler(sl_zigbee_event_t * event);
extern void emberAfPluginTestHarnessZ3ZllStuffEventHandler(sl_zigbee_event_t * event);
#endif //SL_CATALOG_ZIGBEE_TEST_HARNESS_Z3_PRESENT
#endif // SL_COMPONENT_CATALOG_PRESENT
#ifdef UC_BUILD
#include "serial/serial.h"
#include "sl_endianness.h"
// Temporary fix for UC_ALPHA_2, see EMZIGBEE-6782
#include "plugin-component-mappings.h"
#include "af-storage.h"
#include "zap-command.h"
#include "zap-id.h"
#include "zap-type.h"
#include "zap-print.h"
#include "app/framework/util/util.h"
#include "app/framework/util/global-callback.h"
#include "app/framework/util/global-other-callback.h"
#include "app/framework/service-function/sl_service_function.h"
#include "zap-enabled-incoming-commands.h"
#include "zigbee_app_framework_common.h"
#include "app/framework/util/zcl-debug-print.h"
#else // !UC_BUILD
#include "plugin/serial/serial.h"
#include "event_control/event.h"
#include "att-storage.h"
#include "call-command-handler.h"
#include "client-command-macro.h"
#include "callback.h"
#include "af-structs.h"
#include "attribute-type.h"
#include "attribute-id.h"
#include "cluster-id.h"
#include "command-id.h"
#include "enums.h"
#include "print-cluster.h"
#include "af-legacy.h"
#include "debug-printing.h"
#include "app/util/serial/command-interpreter2.h"
#include "app/framework/cli/zcl-cli.h"
#endif // UC_BUILD
#include "app/framework/util/client-api.h"
// TODO: EMZIGBEE-6322 Remove this file when doing the UC_BUILD cleanup works.
#include "app/util/common/uc-temp-macros.h"
// @{
EmberAfAttributeMetadata *emberAfLocateAttributeMetadata(uint8_t endpoint,
EmberAfClusterId clusterId,
EmberAfAttributeId attributeId,
uint8_t mask,
uint16_t manufacturerCode);
#ifdef DOXYGEN_SHOULD_SKIP_THIS
bool emberAfContainsAttribute(uint8_t endpoint,
EmberAfClusterId clusterId,
EmberAfAttributeId attributeId,
uint8_t mask,
uint16_t manufacturerCode);
#else
#define emberAfContainsAttribute(endpoint, clusterId, attributeId, mask, manufacturerCode) \
(emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask, manufacturerCode) != NULL)
#endif
bool emberAfContainsClusterWithMfgCode(uint8_t endpoint, EmberAfClusterId clusterId, uint16_t manufacturerCode);
bool emberAfContainsCluster(uint8_t endpoint, EmberAfClusterId clusterId);
bool emberAfContainsServerWithMfgCode(uint8_t endpoint, EmberAfClusterId clusterId, uint16_t manufacturerCode);
bool emberAfContainsServer(uint8_t endpoint, EmberAfClusterId clusterId);
bool emberAfContainsClientWithMfgCode(uint8_t endpoint, EmberAfClusterId clusterId, uint16_t manufacturerCode);
bool emberAfContainsClient(uint8_t endpoint, EmberAfClusterId clusterId);
EmberAfStatus emberAfWriteAttribute(uint8_t endpoint,
EmberAfClusterId cluster,
EmberAfAttributeId attributeID,
uint8_t mask,
uint8_t* dataPtr,
EmberAfAttributeType dataType);
EmberAfStatus emberAfWriteServerAttribute(uint8_t endpoint,
EmberAfClusterId cluster,
EmberAfAttributeId attributeID,
uint8_t* dataPtr,
EmberAfAttributeType dataType);
EmberAfStatus emberAfWriteClientAttribute(uint8_t endpoint,
EmberAfClusterId cluster,
EmberAfAttributeId attributeID,
uint8_t* dataPtr,
EmberAfAttributeType dataType);
EmberAfStatus emberAfWriteManufacturerSpecificServerAttribute(uint8_t endpoint,
EmberAfClusterId cluster,
EmberAfAttributeId attributeID,
uint16_t manufacturerCode,
uint8_t* dataPtr,
EmberAfAttributeType dataType);
EmberAfStatus emberAfWriteManufacturerSpecificClientAttribute(uint8_t endpoint,
EmberAfClusterId cluster,
EmberAfAttributeId attributeID,
uint16_t manufacturerCode,
uint8_t* dataPtr,
EmberAfAttributeType dataType);
EmberAfStatus emberAfVerifyAttributeWrite(uint8_t endpoint,
EmberAfClusterId cluster,
EmberAfAttributeId attributeID,
uint8_t mask,
uint16_t manufacturerCode,
uint8_t* dataPtr,
EmberAfAttributeType dataType);
EmberAfStatus emberAfReadAttribute(uint8_t endpoint,
EmberAfClusterId cluster,
EmberAfAttributeId attributeID,
uint8_t mask,
uint8_t* dataPtr,
uint8_t readLength,
EmberAfAttributeType* dataType);
EmberAfStatus emberAfReadServerAttribute(uint8_t endpoint,
EmberAfClusterId cluster,
EmberAfAttributeId attributeID,
uint8_t* dataPtr,
uint8_t readLength);
EmberAfStatus emberAfReadClientAttribute(uint8_t endpoint,
EmberAfClusterId cluster,
EmberAfAttributeId attributeID,
uint8_t* dataPtr,
uint8_t readLength);
EmberAfStatus emberAfReadManufacturerSpecificServerAttribute(uint8_t endpoint,
EmberAfClusterId cluster,
EmberAfAttributeId attributeID,
uint16_t manufacturerCode,
uint8_t* dataPtr,
uint8_t readLength);
EmberAfStatus emberAfReadManufacturerSpecificClientAttribute(uint8_t endpoint,
EmberAfClusterId cluster,
EmberAfAttributeId attributeID,
uint16_t manufacturerCode,
uint8_t* dataPtr,
uint8_t readLength);
uint8_t emberAfGetDataSize(uint8_t dataType);
uint8_t emberAfGetOpenNetworkDurationSec(void);
#define emberAfClusterIsManufacturerSpecific(cluster) ((cluster)->clusterId >= 0xFC00u)
#define emberAfAttributeIsReadOnly(metadata) (((metadata)->mask & ATTRIBUTE_MASK_WRITABLE) == 0)
#define emberAfAttributeIsClient(metadata) (((metadata)->mask & ATTRIBUTE_MASK_CLIENT) != 0)
#define emberAfAttributeIsTokenized(metadata) (((metadata)->mask & ATTRIBUTE_MASK_TOKENIZE) != 0)
#define emberAfAttributeIsExternal(metadata) (((metadata)->mask & ATTRIBUTE_MASK_EXTERNAL_STORAGE) != 0)
#define emberAfAttributeIsSingleton(metadata) (((metadata)->mask & ATTRIBUTE_MASK_SINGLETON) != 0)
#define emberAfAttributeIsManufacturerSpecific(metadata) (((metadata)->mask & ATTRIBUTE_MASK_MANUFACTURER_SPECIFIC) != 0)
#define emberAfAttributeSize(metadata) ((metadata)->size)
#if !defined(DOXYGEN_SHOULD_SKIP_THIS)
// master array of all defined endpoints
extern EmberAfDefinedEndpoint emAfEndpoints[];
// Master array of all Zigbee PRO networks.
extern const EmAfZigbeeProNetwork emAfZigbeeProNetworks[];
// The current Zigbee PRO network or NULL.
extern const EmAfZigbeeProNetwork *emAfCurrentZigbeeProNetwork;
// True if the current network is a Zigbee PRO network.
#define emAfProIsCurrentNetwork() (emAfCurrentZigbeeProNetwork != NULL)
#endif
uint8_t emberAfEndpointFromIndex(uint8_t index);
uint8_t emberAfIndexFromEndpoint(uint8_t endpoint);
uint8_t emberAfIndexFromEndpointIncludingDisabledEndpoints(uint8_t endpoint);
uint8_t emberAfFindClusterClientEndpointIndex(uint8_t endpoint, EmberAfClusterId clusterId);
uint8_t emberAfFindClusterServerEndpointIndex(uint8_t endpoint, EmberAfClusterId clusterId);
#define emberAfProfileIdFromIndex(index) (emAfEndpoints[(index)].profileId)
#define emberAfDeviceIdFromIndex(index) (emAfEndpoints[(index)].deviceId)
#define emberAfDeviceVersionFromIndex(index) (emAfEndpoints[(index)].deviceVersion)
#define emberAfNetworkIndexFromEndpointIndex(index) (emAfEndpoints[(index)].networkIndex)
uint8_t emberAfNetworkIndexFromEndpoint(uint8_t endpoint);
#define emberAfPrimaryProfileId() emberAfProfileIdFromIndex(0)
#define emberAfPrimaryEndpoint() (emAfEndpoints[0].endpoint)
uint8_t emberAfEndpointCount(void);
uint8_t emberAfFixedEndpointCount(void);
#if (EMBER_AF_PLUGIN_ZCL_CLUSTER_ENABLE_DISABLE_RUN_TIME == 1)
#if !defined(EMBER_TEST)
bool emberAfClusterEnableDisable(uint8_t endpoint,
EmberAfClusterId clusterId,
EmberAfClusterMask mask,
bool enable);
bool emberAfIsClusterEnabled(uint8_t endpoint,
EmberAfClusterId clusterId,
EmberAfClusterMask mask);
#endif
#endif //EMBER_AF_PLUGIN_ZCL_CLUSTER_ENABLE_DISABLE_RUN_TIME
#ifndef DOXYGEN_SHOULD_SKIP_THIS
enum {
EMBER_AF_DATA_TYPE_ANALOG = 0,
EMBER_AF_DATA_TYPE_DISCRETE = 1,
EMBER_AF_DATA_TYPE_NONE = 2
};
#endif //DOXYGEN_SHOULD_SKIP_THIS
uint8_t emberAfGetAttributeAnalogOrDiscreteType(uint8_t dataType);
bool emberAfIsTypeSigned(EmberAfAttributeType dataType);
uint32_t emberAfGetInt32u(const uint8_t* message, uint16_t currentIndex, uint16_t msgLen);
uint32_t emberAfGetInt24u(const uint8_t* message, uint16_t currentIndex, uint16_t msgLen);
uint16_t emberAfGetInt16u(const uint8_t* message, uint16_t currentIndex, uint16_t msgLen);
uint8_t* emberAfGetString(uint8_t* message, uint16_t currentIndex, uint16_t msgLen);
uint8_t* emberAfGetLongString(uint8_t* message, uint16_t currentIndex, uint16_t msgLen);
/*
* @brief Extract a ZCL Date from the message buffer and returns it
* in the given destination. Returns the number of bytes copied.
*/
uint8_t emberAfGetDate(uint8_t* message, uint16_t currentIndex, uint16_t msgLen, EmberAfDate *destination);
#define emberAfGetInt8u(message, currentIndex, msgLen) message[currentIndex]
#define emberAfCopyInt8u(data, index, x) (data[index] = (x))
void emberAfCopyInt16u(uint8_t *data, uint16_t index, uint16_t x);
void emberAfCopyInt24u(uint8_t *data, uint16_t index, uint32_t x);
void emberAfCopyInt32u(uint8_t *data, uint16_t index, uint32_t x);
/*
* @brief Copy a ZCL string type into a buffer. The size
* parameter should indicate the maximum number of characters to copy to the
* destination buffer not including the length byte.
*/
void emberAfCopyString(uint8_t *dest, uint8_t *src, uint8_t size);
/*
* @brief Copy a ZCL long string into a buffer. The size
* parameter should indicate the maximum number of characters to copy to the
* destination buffer not including the length bytes.
*/
void emberAfCopyLongString(uint8_t *dest, uint8_t *src, uint16_t size);
/*
* @brief Determine the length of a Zigbee Cluster Library string
* (where the first byte is assumed to be the length).
*/
uint8_t emberAfStringLength(const uint8_t *buffer);
/*
* @brief Determine the length of a Zigbee Cluster Library long string.
* (where the first two bytes are assumed to be the length).
*/
uint16_t emberAfLongStringLength(const uint8_t *buffer);
/*
* @brief Determine the size of a Zigbee Cluster Library
* attribute value.
*
* The attribute could be non-string, string, or long string. For strings,
* the size includes the length of the string plus the number of the string's
* length prefix byte(s).
*
* Additionally, checks that the resulting size does not exceed the
* specified buffer size.
*
* @param dataType Zigbee data type
* @param buffer pointer to a buffer containing a string value
* @param bufferSize size of the buffer
*
* @return 0 if dataType is unrecognized or data size exceeds buffer size
*. nonzero for valid data size
*/
uint16_t emberAfAttributeValueSize(EmberAfAttributeType dataType,
const uint8_t *buffer,
const uint16_t bufferSize);
// end of name API // end of attribute-storage
// @{
bool emberAfIsDeviceEnabled(uint8_t endpoint);
bool emberAfIsDeviceIdentifying(uint8_t endpoint);
void emberAfSetDeviceEnabled(uint8_t endpoint, bool enabled);
// end of name API // end of device-control
// @{
void sl_zigbee_common_rtos_wakeup_stack_task(void);
bool emberAfEndpointEnableDisable(uint8_t endpoint, bool enable);
bool emberAfEndpointIndexIsEnabled(uint8_t index);
#define EMBER_AF_NEW_IMAGE_VERIFICATION true
#define EMBER_AF_CONTINUE_IMAGE_VERIFY false
extern const EmberAfOtaImageId emberAfInvalidImageId;
bool emberAfIsThisDataTypeAStringType(EmberAfAttributeType dataType);
bool emberAfIsStringAttributeType(EmberAfAttributeType attributeType);
bool emberAfIsLongStringAttributeType(EmberAfAttributeType attributeType);
#define EMBER_AF_ZCL_SEQUENCE_MASK 0x7Fu
#define EMBER_AF_MESSAGE_TAG_MASK 0x7Fu
uint8_t emberAfNextSequence(void);
uint8_t emberAfGetLastSequenceNumber(void);
int8_t emberAfCompareValues(uint8_t* val1, uint8_t* val2, uint8_t len, bool signedNumber);
void emberAfGetEui64(EmberEUI64 returnEui64);
#ifdef EZSP_HOST
// Normally this is provided by the stack code, but on the host
// it is provided by the application code.
void emberReverseMemCopy(uint8_t* dest, const uint8_t* src, uint16_t length);
#endif // EZSP_HOST
EmberNodeId emberAfGetNodeId(void);
#if defined(DOXYGEN_SHOULD_SKIP_THIS) || defined(EZSP_HOST)
EmberStatus emberAfGenerateRandomKey(EmberKeyData *result);
#else
#define emberAfGenerateRandomKey(result) emberGenerateRandomKey(result)
#endif
EmberPanId emberAfGetPanId(void);
uint8_t emberAfGetRadioChannel(void);
/*
* @brief Return a binding index that matches the current incoming message, if
* known.
*/
uint8_t emberAfGetBindingIndex(void);
/*
* @brief Return an address index that matches the current incoming message,
* if known.
*/
uint8_t emberAfGetAddressIndex(void);
EmberNetworkStatus emberAfNetworkState(void);
EmberStatus emberAfGetNetworkParameters(EmberNodeType *nodeType,
EmberNetworkParameters *parameters);
EmberStatus emberAfGetNodeType(EmberNodeType *nodeType);
#define EMBER_AF_REJOIN_DUE_TO_END_DEVICE_MOVE 0xA0u
#define EMBER_AF_REJOIN_DUE_TO_TC_KEEPALIVE_FAILURE 0xA1u
#define EMBER_AF_REJOIN_DUE_TO_CLI_COMMAND 0xA2u
#define EMBER_AF_REJOIN_DUE_TO_WWAH_CONNECTIVITY_MANAGER 0xA3u
#define EMBER_AF_REJOIN_FIRST_REASON EMBER_AF_REJOIN_DUE_TO_END_DEVICE_MOVE
#define EMBER_AF_REJOIN_LAST_REASON EMBER_AF_REJOIN_DUE_TO_END_DEVICE_MOVE
EmberStatus emberAfPermitJoin(uint8_t duration,
bool broadcastMgmtPermitJoin);
#ifdef DOXYGEN_SHOULD_SKIP_THIS
EmberStatus emberAfBroadcastPermitJoin(uint8_t duration);
#else
#define emberAfBroadcastPermitJoin(duration) \
emberAfPermitJoin((duration), true)
#endif
// end of name API // end of miscellaneous
// @{
#define EMBER_AF_CLIENT_CLUSTER_TICK true
#define EMBER_AF_SERVER_CLUSTER_TICK false
EmberStatus sl_zigbee_zcl_schedule_tick_extended(uint8_t endpoint,
EmberAfClusterId clusterId,
bool isClient,
uint32_t delayMs,
EmberAfEventPollControl pollControl,
EmberAfEventSleepControl sleepControl);
EmberStatus sl_zigbee_zcl_schedule_cluster_tick(uint8_t endpoint,
EmberAfClusterId clusterId,
bool isClient,
uint32_t delayMs,
EmberAfEventSleepControl sleepControl);
EmberStatus sl_zigbee_zcl_schedule_client_tick_extended(uint8_t endpoint,
EmberAfClusterId clusterId,
uint32_t delayMs,
EmberAfEventPollControl pollControl,
EmberAfEventSleepControl sleepControl);
EmberStatus sl_zigbee_zcl_schedule_client_tick(uint8_t endpoint,
EmberAfClusterId clusterId,
uint32_t delayMs);
EmberStatus sl_zigbee_zcl_schedule_server_tick_extended(uint8_t endpoint,
EmberAfClusterId clusterId,
uint32_t delayMs,
EmberAfEventPollControl pollControl,
EmberAfEventSleepControl sleepControl);
EmberStatus sl_zigbee_zcl_schedule_server_tick(uint8_t endpoint,
EmberAfClusterId clusterId,
uint32_t delayMs);
EmberStatus sl_zigbee_zcl_deactivate_cluster_tick(uint8_t endpoint,
EmberAfClusterId clusterId,
bool isClient);
EmberStatus sl_zigbee_zcl_deactivate_client_tick(uint8_t endpoint,
EmberAfClusterId clusterId);
EmberStatus sl_zigbee_zcl_deactivate_server_tick(uint8_t endpoint,
EmberAfClusterId clusterId);
#define emberAfGetCurrentSleepControl() \
emberAfGetCurrentSleepControlCallback()
#define emberAfSetDefaultSleepControl(x) \
emberAfSetDefaultSleepControlCallback(x)
#define emberAfGetDefaultSleepControl() \
emberAfGetDefaultSleepControlCallback()
#if !defined(DOXYGEN_SHOULD_SKIP_THIS)
#define emberAfAddToCurrentAppTasks(x) \
emberAfAddToCurrentAppTasksCallback(x)
#define emberAfRemoveFromCurrentAppTasks(x) \
emberAfRemoveFromCurrentAppTasksCallback(x)
#define emberAfCurrentAppTasks() emberAfGetCurrentAppTasksCallback()
#endif // !DOXYGEN_SHOULD_SKIP_THIS
// end of name API // end of sleep-control
// @{
EmberStatus emberAfSendResponse(void);
EmberStatus emberAfSendResponseWithCallback(EmberAfMessageSentFunction callback);
EmberStatus emberAfSendMulticast(EmberMulticastId multicastId,
EmberApsFrame *apsFrame,
uint16_t messageLength,
uint8_t* message);
EmberStatus emberAfSendMulticastToBindings(EmberApsFrame *apsFrame,
uint16_t messageLength,
uint8_t* message);
EmberStatus emberAfSendMulticastWithAliasWithCallback(EmberMulticastId multicastId,
EmberApsFrame *apsFrame,
uint16_t messageLength,
uint8_t *message,
EmberNodeId alias,
uint8_t sequence,
EmberAfMessageSentFunction callback);
EmberStatus emberAfSendMulticastWithCallback(EmberMulticastId multicastId,
EmberApsFrame *apsFrame,
uint16_t messageLength,
uint8_t* message,
EmberAfMessageSentFunction callback);
EmberStatus emberAfSendBroadcast(EmberNodeId destination,
EmberApsFrame *apsFrame,
uint16_t messageLength,
uint8_t* message);
EmberStatus emberAfSendBroadcastWithCallback(EmberNodeId destination,
EmberApsFrame *apsFrame,
uint16_t messageLength,
uint8_t* message,
EmberAfMessageSentFunction callback);
EmberStatus emberAfSendBroadcastWithAliasWithCallback(EmberNodeId destination,
EmberApsFrame *apsFrame,
uint16_t messageLength,
uint8_t *message,
EmberNodeId alias,
uint8_t sequence,
EmberAfMessageSentFunction callback);
EmberStatus emberAfSendUnicast(EmberOutgoingMessageType type,
uint16_t indexOrDestination,
EmberApsFrame *apsFrame,
uint16_t messageLength,
uint8_t* message);
EmberStatus emberAfSendUnicastWithCallback(EmberOutgoingMessageType type,
uint16_t indexOrDestination,
EmberApsFrame *apsFrame,
uint16_t messageLength,
uint8_t* message,
EmberAfMessageSentFunction callback);
EmberStatus emberAfSendUnicastToBindings(EmberApsFrame *apsFrame,
uint16_t messageLength,
uint8_t* message);
EmberStatus emberAfSendUnicastToBindingsWithCallback(EmberApsFrame *apsFrame,
uint16_t messageLength,
uint8_t* message,
EmberAfMessageSentFunction callback);
EmberStatus emberAfSendInterPan(EmberPanId panId,
const EmberEUI64 destinationLongId,
EmberNodeId destinationShortId,
EmberMulticastId multicastId,
EmberAfClusterId clusterId,
EmberAfProfileId profileId,
uint16_t messageLength,
uint8_t* messageBytes);
EmberStatus emberAfSendEndDeviceBind(uint8_t endpoint);
EmberStatus emberAfSendCommandUnicastToBindings(void);
EmberStatus emberAfSendCommandUnicastToBindingsWithCallback(EmberAfMessageSentFunction callback);
EmberStatus emberAfSendCommandMulticast(EmberMulticastId multicastId);
EmberStatus emberAfSendCommandMulticastWithAlias(EmberMulticastId multicastId, EmberNodeId alias, uint8_t sequence);
EmberStatus emberAfSendCommandMulticastWithCallback(EmberMulticastId multicastId,
EmberAfMessageSentFunction callback);
EmberStatus emberAfSendCommandMulticastToBindings(void);
EmberStatus emberAfSendCommandUnicast(EmberOutgoingMessageType type,
uint16_t indexOrDestination);
EmberStatus emberAfSendCommandUnicastWithCallback(EmberOutgoingMessageType type,
uint16_t indexOrDestination,
EmberAfMessageSentFunction callback);
EmberStatus emberAfSendCommandBroadcast(EmberNodeId destination);
EmberStatus emberAfSendCommandBroadcastWithCallback(EmberNodeId destination,
EmberAfMessageSentFunction callback);
EmberStatus emberAfSendCommandBroadcastWithAliasWithCallback(EmberNodeId destination,
EmberNodeId alias,
uint8_t sequence,
EmberAfMessageSentFunction callback);
EmberStatus emberAfSendCommandBroadcastWithAlias(EmberNodeId destination,
EmberNodeId alias,
uint8_t sequence);
EmberStatus emberAfSendCommandInterPan(EmberPanId panId,
const EmberEUI64 destinationLongId,
EmberNodeId destinationShortId,
EmberMulticastId multicastId,
EmberAfProfileId profileId);
EmberStatus emberAfSendDefaultResponse(const EmberAfClusterCommand *cmd,
EmberAfStatus status);
EmberStatus emberAfSendDefaultResponseWithCallback(const EmberAfClusterCommand *cmd,
EmberAfStatus status,
EmberAfMessageSentFunction callback);
EmberStatus emberAfSendImmediateDefaultResponse(EmberAfStatus status);
EmberStatus emberAfSendImmediateDefaultResponseWithCallback(EmberAfStatus status,
EmberAfMessageSentFunction callback);
uint8_t emberAfMaximumApsPayloadLength(EmberOutgoingMessageType type,
uint16_t indexOrDestination,
EmberApsFrame *apsFrame);
EmberApsFrame *emberAfGetCommandApsFrame(void);
void emberAfSetCommandEndpoints(uint8_t sourceEndpoint, uint8_t destinationEndpoint);
#define EMBER_AF_CLIENT_CLUSTER_DISCOVERY false
#define EMBER_AF_SERVER_CLUSTER_DISCOVERY true
EmberStatus emberAfFindDevicesByProfileAndCluster(EmberNodeId target,
EmberAfProfileId profileId,
EmberAfClusterId clusterId,
bool serverCluster,
EmberAfServiceDiscoveryCallback *callback);
EmberStatus emberAfFindClustersByDeviceAndEndpoint(EmberNodeId target,
uint8_t targetEndpoint,
EmberAfServiceDiscoveryCallback *callback);
EmberStatus emberAfFindIeeeAddress(EmberNodeId shortAddress,
EmberAfServiceDiscoveryCallback *callback);
EmberStatus emberAfFindNodeId(EmberEUI64 longAddress,
EmberAfServiceDiscoveryCallback *callback);
EmberStatus emberAfFindActiveEndpoints(EmberNodeId target,
EmberAfServiceDiscoveryCallback *callback);
uint8_t emberAfAddAddressTableEntry(EmberEUI64 longId, EmberNodeId shortId);
EmberStatus emberAfSetAddressTableEntry(uint8_t index,
EmberEUI64 longId,
EmberNodeId shortId);
EmberStatus emberAfRemoveAddressTableEntry(uint8_t index);
#if !defined(DOXYGEN_SHOULD_SKIP_THIS)
#define emberAfCurrentCommand() (emAfCurrentCommand)
extern EmberAfClusterCommand *emAfCurrentCommand;
#endif
#define emberAfCurrentEndpoint() (emberAfCurrentCommand()->apsFrame->destinationEndpoint)
#ifdef DOXYGEN_SHOULD_SKIP_THIS
EmberStatus emberAfInitiateKeyEstablishment(EmberNodeId nodeId, uint8_t endpoint);
EmberStatus emberAfInitiateInterPanKeyEstablishment(EmberPanId panId,
const EmberEUI64 eui64);
bool emberAfPerformingKeyEstablishment(void);
EmberStatus emberAfInitiatePartnerLinkKeyExchange(EmberNodeId target,
uint8_t endpoint,
EmberAfPartnerLinkKeyExchangeCallback *callback);
#else
#define emberAfInitiateKeyEstablishment(nodeId, endpoint) \
emberAfInitiateKeyEstablishmentCallback(nodeId, endpoint)
#define emberAfInitiateInterPanKeyEstablishment(panId, eui64) \
emberAfInitiateInterPanKeyEstablishmentCallback(panId, eui64)
#define emberAfPerformingKeyEstablishment() \
emberAfPerformingKeyEstablishmentCallback()
#define emberAfInitiatePartnerLinkKeyExchange(target, endpoint, callback) \
emberAfInitiatePartnerLinkKeyExchangeCallback(target, endpoint, callback)
#endif
bool emberAfIsCurrentSecurityProfileSmartEnergy(void);
// end of name API // end of messaging
// @{
#ifdef UC_BUILD
sl_status_t sl_zigbee_subscribe_to_zcl_commands(uint16_t cluster_id,
uint16_t manufacturer_id,
uint8_t direction,
sl_service_function_t service_function);
#endif // UC_BUILD
// end of name API // end of zcl_commands
// Frame control fields (8 bits total)
// Bits 0 and 1 are Frame Type Sub-field
#define ZCL_FRAME_CONTROL_FRAME_TYPE_MASK (BIT(0) | BIT(1))
#define ZCL_CLUSTER_SPECIFIC_COMMAND BIT(0)
#define ZCL_PROFILE_WIDE_COMMAND 0u
#define ZCL_GLOBAL_COMMAND (ZCL_PROFILE_WIDE_COMMAND)
// Bit 2 is Manufacturer Specific Sub-field
#define ZCL_MANUFACTURER_SPECIFIC_MASK BIT(2)
// Bit 3 is Direction Sub-field
#define ZCL_FRAME_CONTROL_DIRECTION_MASK BIT(3)
#define ZCL_FRAME_CONTROL_SERVER_TO_CLIENT BIT(3)
#define ZCL_FRAME_CONTROL_CLIENT_TO_SERVER 0u
// Bit 4 is Disable Default Response Sub-field
#define ZCL_DISABLE_DEFAULT_RESPONSE_MASK BIT(4)
// Bits 5 to 7 are reserved
#define ZCL_DIRECTION_CLIENT_TO_SERVER 0u
#define ZCL_DIRECTION_SERVER_TO_CLIENT 1u
// Packet must be at least 3 bytes for ZCL overhead.
// Frame Control (1-byte)
// Sequence Number (1-byte)
// Command Id (1-byte)
#define EMBER_AF_ZCL_OVERHEAD 3
#define EMBER_AF_ZCL_MANUFACTURER_SPECIFIC_OVERHEAD 5
// Permitted values for emberAfSetFormAndJoinMode
#define FIND_AND_JOIN_MODE_ALLOW_2_4_GHZ BIT(0)
#define FIND_AND_JOIN_MODE_ALLOW_SUB_GHZ BIT(1)
#define FIND_AND_JOIN_MODE_ALLOW_BOTH (FIND_AND_JOIN_MODE_ALLOW_2_4_GHZ | FIND_AND_JOIN_MODE_ALLOW_SUB_GHZ)
// end of zcl-macros
// @{
EmberStatus emberAfFormNetwork(EmberNetworkParameters *parameters);
EmberStatus emberAfJoinNetwork(EmberNetworkParameters *parameters);
#ifdef DOXYGEN_SHOULD_SKIP_THIS
EmberStatus emberAfFindUnusedPanIdAndForm(void);
EmberStatus emberAfStartSearchForJoinableNetwork(void);
#else
#define emberAfFindUnusedPanIdAndForm() emberAfFindUnusedPanIdAndFormCallback()
#define emberAfStartSearchForJoinableNetwork() emberAfStartSearchForJoinableNetworkCallback()
#endif
EmberStatus emberAfPushNetworkIndex(uint8_t networkIndex);
EmberStatus emberAfPushCallbackNetworkIndex(void);
EmberStatus emberAfPushEndpointNetworkIndex(uint8_t endpoint);
EmberStatus emberAfPopNetworkIndex(void);
uint8_t emberAfPrimaryEndpointForNetworkIndex(uint8_t networkIndex);
uint8_t emberAfPrimaryEndpointForCurrentNetworkIndex(void);
#if !defined(DOXYGEN_SHOULD_SKIP_THIS)
EmberStatus emAfInitializeNetworkIndexStack(void);
void emAfAssertNetworkIndexStackIsEmpty(void);
#endif
// end of API // end of network-utility-functions
#if !defined(DOXYGEN_SHOULD_SKIP_THIS)
#if defined(EMBER_TEST)
#define EMBER_TEST_ASSERT(x) assert(x)
#else
#define EMBER_TEST_ASSERT(x)
#endif
#endif
// Note: This is a #define for now but could be a real function call in the future.
#define emberAfMaxPowerLevel() (3)
#if !defined(DOXYGEN_SHOULD_SKIP_THIS)
#ifdef UC_BUILD
// This macro used to be generated by AppBuilder, defining it disables legacy CLI commands.
// Legacy CLI is no longer supported and will eventually be cleaned up (see EMZIGBEE-868),
// until then define this statically.
#define EMBER_AF_GENERATE_CLI
#endif // UC_BUILD
#endif // !DOXYGEN_SHOULD_SKIP_THIS
#endif // SILABS_AF_API
API#
Return true if the cluster is in the manufacturer-specific range.
Return true if the attribute is read only.
Return true if this is a client attribute and false if if it is a server attribute.
Return true if the attribute is saved to a token.
Return true if the attribute is saved in external storage.
Return true if the attribute is a singleton.
Return true if the attribute is manufacturer specific.
Return the size of attribute in bytes.
Take an index of an endpoint and return the profile ID for it.
Take an index of an endpoint and return the device ID for it.
Take an index of an endpoint and return the device version for it.
Take an index of an endpoint and return the network index for it.
Return the primary profile ID.
Return the primary endpoint.
Extract a single byte out of the message.
Copy a uint8_t from variable into buffer.
Indicate a new image verification is taking place.
Indicate the continuation of an image verification already in progress.
The mask applied by emberAfNextSequence when generating ZCL sequence numbers.
The mask applied to generated message tags used by the framework when sending messages via EZSP. Customers who call ezspSend functions directly must use message tags outside this mask.
Return true if the cluster is in the manufacturer-specific range.
Return true if the cluster is in the manufacturer-specific range.
Return true if the cluster is in the manufacturer-specific range.
Return true if the cluster is in the manufacturer-specific range.
Return true if the cluster is in the manufacturer-specific range.
Return true if the cluster is in the manufacturer-specific range.
Friendly define for use in the scheduling or canceling client events with sl_zigbee_zcl_schedule_cluster_tick() and sl_zigbee_zcl_deactivate_cluster_tick().
Friendly define for use in the scheduling or canceling server events with sl_zigbee_zcl_schedule_cluster_tick() and sl_zigbee_zcl_deactivate_cluster_tick().
Retrieve the most restrictive sleep control value for all scheduled events. This function is used by emberAfOkToNap and emberAfOkToHibernate to makes sure that there are no events scheduled, which will keep the device from hibernating or napping.
Set the default sleep control value against which all scheduled event sleep control values will be evaluated. This can be used to keep a device awake for an extended period of time by setting the default to EMBER_AF_STAY_AWAKE and then resetting the value to EMBER_AF_OK_TO_HIBERNATE once the wake period is complete.
Retrieve the default sleep control against which all event sleep control values are evaluated. The default sleep control value is initialized to EMBER_AF_OK_TO_HIBERNATE but can be changed by the application at any time using the emberAfSetDefaultSleepControl() function.
Friendly define for use in discovering client clusters with emberAfFindDevicesByProfileAndCluster().
Friendly define for use in discovering server clusters with emberAfFindDevicesByProfileAndCluster().
Return the current endpoint that is being served.
This variable defines an invalid image ID. It is used to determine if a returned EmberAfOtaImageId is valid or not by passing the data to the function emberAfIsOtaImageIdValid().
Locate attribute metadata.
Return true if the attribute exists.
Return true if an endpoint contains a cluster, checking for mfg code.
Return true if the endpoint contains the ZCL cluster with specified ID.
Return true if the endpoint has a cluster server, checking for the mfg code.
Return true if the endpoint contains the ZCL server with a specified ID.
Return true if the endpoint contains the cluster client.
Return true if the endpoint contains the ZCL client with a specified ID.
Write an attribute performing all checks.
Write a cluster server attribute.
Write a cluster client attribute.
Write a manufacturer-specific server attribute.
Write a manufacturer-specific client attribute.
Test the success of attribute write.
Read the attribute value performing all the checks.
Read the server attribute value performing all the checks.
Read the client attribute value, performing all the checks.
Read the manufacturer-specific server attribute value, performing all checks.
Read the manufacturer-specific client attribute value, performing all checks.
Return the size of the ZCL data in bytes.
Return the number of seconds the network remains open.
Take an index of an endpoint and return the Zigbee endpoint.
Return the network index of a given endpoint.
Return the total number of endpoints (dynamic and pre-compiled).
Return the number of pre-compiled endpoints.
Return the type of the attribute, either ANALOG, DISCRETE, or NONE.
Return true if type is signed, false otherwise.
Extract a 32-bit integer from the message buffer.
Extract a 24-bit integer from the message buffer.
Extract a 16-bit integer from the message buffer.
Extract a ZCL string from the message buffer.
Extract a ZCL long string from the message buffer.
Return true if the cluster is in the manufacturer-specific range.
Copy a uint16_t value into a buffer.
Copy a uint24_t value into a buffer.
Copy a uint32_t value into a buffer.
Return true if the cluster is in the manufacturer-specific range.
Return true if the cluster is in the manufacturer-specific range.
Return true if the cluster is in the manufacturer-specific range.
Return true if the cluster is in the manufacturer-specific range.
Return true if the cluster is in the manufacturer-specific range.
Check whether the endpoint is enabled.
Check whether the endpoint is identifying.
Enable or disable an endpoint.
Set the Zigbee stack task to ready when running on an OS.
Enable/disable endpoints.
Determine if an endpoint at the specified index is enabled or disabled.
Return true if a given ZCL data type is a string type.
Return true if the given attribute type is a string.
Return true if the given attribute type is a long string.
Increment the ZCL sequence number and return the value.
Retrieve the last sequence number that was used.
Compare two values of known length as integers.Simple integer comparison function. Signed integer comparison are supported for numbers with length of 4 (bytes) or less. The integers are in native endianness.
Populate the passed EUI64 with the local EUI64 MAC address.
Return the node ID of the local node.
Generate a random key (link, network, or master).
Return the PAN ID of the local node.
Return the radioChannel of the current network.
Return true if the cluster is in the manufacturer-specific range.
Return true if the cluster is in the manufacturer-specific range.
Return the current network state. This call caches the results on the host to prevent frequent EZSP transactions.
Return the current network parameters.
Return the current node type.
Enable local permit join and optionally broadcast the ZDO Mgmt_Permit_Join_req message. This API can be called from any device type and still return EMBER_SUCCESS. If the API is called from an end device, the permit association bit will just be left off.
Enable local permit join and broadcast the ZDO Mgmt_Permit_Join_req message. This API can be called from any device type and still return EMBER_SUCCESS. If the API is called from an end device, the permit association bit will just be left off.
Schedule a cluster-related event inside the application framework's event mechanism. This function provides a wrapper for the Ember stack event mechanism which allows the cluster code to access its events by their endpoint, cluster ID, and client/server identity. The passed poll and sleep controls allow the cluster to indicate whether it needs to long or short poll and whether it needs to stay awake or if it can sleep.
Schedule a cluster-related event inside the application framework's event mechanism. This function is a wrapper for ::emberAfScheduleTickExtended. The cluster on the given endpoint will be set to long poll if sleepControl is set to EMBER_AF_OK_TO_HIBERNATE or will be set to short poll otherwise. It will stay awake if sleepControl is EMBER_AF_STAY_AWAKE and will sleep otherwise.
Schedule a cluster client event. This function is a wrapper for sl_zigbee_zcl_schedule_tick_extended.
Schedule a cluster client event. This function is a wrapper for sl_zigbee_zcl_schedule_client_tick_extended. It indicates that the cluster client on the given endpoint can long poll and can sleep.
Schedule a cluster server event. This function is a wrapper for sl_zigbee_zcl_schedule_tick_extended.
Schedule a cluster server event. This function is a wrapper for sl_zigbee_zcl_schedule_server_tick_extended. It indicates that the cluster server on the given endpoint can long poll and can sleep.
Deactivate a cluster-related event. This function provides a wrapper for the Ember stack's event mechanism, which allows an event to be accessed by its endpoint, cluster ID, and client/server identity.
Deactivate a cluster client event. This function is a wrapper for sl_zigbee_zcl_deactivate_cluster_tick.
Deactivate a cluster server event. This function is a wrapper for sl_zigbee_zcl_deactivate_cluster_tick.
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.
Send ZCL response with attached message sent callback.
Send multicast.
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.
Send Multicast with alias with attached message sent callback.
Send multicast with attached message sent callback.
Send broadcast.
Send broadcast with attached message sent callback.
Send broadcast with alias with attached message sent callback.
Send unicast.
Send unicast with attached message sent callback.
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.
emberAfSendUnicastToBindings with attached message sent callback.
Send interpan message.
Send end device binding request.
Send the command prepared with emberAfFill.... macro.
emberAfSendCommandUnicastToBindings with attached message sent callback.
Send the command prepared with emberAfFill.... macro.
Send the command prepared with emberAfFill.... macro.
emberAfSendCommandMulticast with attached message sent callback.
Send the command prepared with emberAfFill.... macro.
Send the command prepared with emberAfFill.... macro.
emberAfSendCommandUnicast with attached message sent callback.
Send the command prepared with emberAfFill.... macro.
emberAfSendCommandBroadcast with attached message sent callback.
emberAfSendCommandBroadcast from alias with attached message sent callback.
Send the command prepared with emberAfFill.... macro.
Send the command prepared with emberAfFill.... macro.
Send a default response to a cluster command.
emberAfSendDefaultResponse with attached message sent callback.
Send a default response to a cluster command using the current command.
emberAfSendImmediateDefaultResponse with attached message sent callback.
Return the maximum size of the payload that the Application Support sub-layer will accept for the given message type, destination, and APS frame.
Access to client API APS frame.
Set the source and destination endpoints in the client API APS frame.
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.
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.
Initiate a discovery for the IEEE address of the specified node ID. This will send a unicast sent to the target node ID.
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).
Initiate an Active Endpoint request ZDO message to the target node ID.
Add an entry for a remote device to the address table.
Add an entry for a remote device to the address table at a specific location.
Remove a specific entry from the address table.
Initiate key establishment with a remote node. emberAfKeyEstablishmentCallback will be called as events occur and when key establishment completes.
Initiate key establishment with a remote node on a different PAN. emberAfInterPanKeyEstablishmentCallback will be called as events occur and when key establishment completes.
Indicate whether the device is in the process of performing key establishment.
Initiate partner link key exchange with a remote node.
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.
Runtime subscription to specific incoming ZCL commands.
Form a new network using the specified network parameters.
Associate with the network using the specified network parameters.
Find an unused PAN ID and form a new network.
Find a joinable network and join it.
Set the current network to that of the given index and add it to the stack of networks maintained by the framework. Every call to this API must be paired with a subsequent call to emberAfPopNetworkIndex.
Set the current network to the callback network and adds it to the stack of networks maintained by the framework. Every call to this API must be paired with a subsequent call to emberAfPopNetworkIndex.
Set the current network to that of the given endpoint and adds it to the stack of networks maintained by the framework. Every call to this API must be paired with a subsequent call to emberAfPopNetworkIndex.
Remove the topmost network from the stack of networks maintained by the framework and sets the current network to the new topmost network. Every call to this API must be paired with a prior call to emberAfPushNetworkIndex, emberAfPushCallbackNetworkIndex, or emberAfPushEndpointNetworkIndex.
Return the primary endpoint of the given network index or 0xFF if no endpoints belong to the network.emberAfStatus.
Return the primary endpoint of the current network index or 0xFF if no endpoints belong to the current network.
Macros#
The maximum power level that can be used by the chip.
API Documentation#
emberAfClusterIsManufacturerSpecific#
#define emberAfClusterIsManufacturerSpecificValue:
(cluster)
Return true if the cluster is in the manufacturer-specific range.
549
of file app/framework/include/af.h
emberAfAttributeIsReadOnly#
#define emberAfAttributeIsReadOnlyValue:
(metadata)
Return true if the attribute is read only.
556
of file app/framework/include/af.h
emberAfAttributeIsClient#
#define emberAfAttributeIsClientValue:
(metadata)
Return true if this is a client attribute and false if if it is a server attribute.
564
of file app/framework/include/af.h
emberAfAttributeIsTokenized#
#define emberAfAttributeIsTokenizedValue:
(metadata)
Return true if the attribute is saved to a token.
571
of file app/framework/include/af.h
emberAfAttributeIsExternal#
#define emberAfAttributeIsExternalValue:
(metadata)
Return true if the attribute is saved in external storage.
578
of file app/framework/include/af.h
emberAfAttributeIsSingleton#
#define emberAfAttributeIsSingletonValue:
(metadata)
Return true if the attribute is a singleton.
585
of file app/framework/include/af.h
emberAfAttributeIsManufacturerSpecific#
#define emberAfAttributeIsManufacturerSpecificValue:
(metadata)
Return true if the attribute is manufacturer specific.
592
of file app/framework/include/af.h
emberAfAttributeSize#
#define emberAfAttributeSizeValue:
(metadata)
Return the size of attribute in bytes.
599
of file app/framework/include/af.h
emberAfProfileIdFromIndex#
#define emberAfProfileIdFromIndexValue:
(index)
Take an index of an endpoint and return the profile ID for it.
662
of file app/framework/include/af.h
emberAfDeviceIdFromIndex#
#define emberAfDeviceIdFromIndexValue:
(index)
Take an index of an endpoint and return the device ID for it.
667
of file app/framework/include/af.h
emberAfDeviceVersionFromIndex#
#define emberAfDeviceVersionFromIndexValue:
(index)
Take an index of an endpoint and return the device version for it.
672
of file app/framework/include/af.h
emberAfNetworkIndexFromEndpointIndex#
#define emberAfNetworkIndexFromEndpointIndexValue:
(index)
Take an index of an endpoint and return the network index for it.
677
of file app/framework/include/af.h
emberAfPrimaryProfileId#
#define emberAfPrimaryProfileIdValue:
()
Return the primary profile ID.
Primary profile is the profile of a primary endpoint as defined in AppBuilder.
693
of file app/framework/include/af.h
emberAfPrimaryEndpoint#
#define emberAfPrimaryEndpointValue:
()
Return the primary endpoint.
698
of file app/framework/include/af.h
emberAfGetInt8u#
#define emberAfGetInt8uValue:
(message, currentIndex, msgLen)
Extract a single byte out of the message.
793
of file app/framework/include/af.h
emberAfCopyInt8u#
#define emberAfCopyInt8uValue:
(data, index, x)
Copy a uint8_t from variable into buffer.
798
of file app/framework/include/af.h
EMBER_AF_NEW_IMAGE_VERIFICATION#
#define EMBER_AF_NEW_IMAGE_VERIFICATIONValue:
true
Indicate a new image verification is taking place.
946
of file app/framework/include/af.h
EMBER_AF_CONTINUE_IMAGE_VERIFY#
#define EMBER_AF_CONTINUE_IMAGE_VERIFYValue:
false
Indicate the continuation of an image verification already in progress.
952
of file app/framework/include/af.h
EMBER_AF_ZCL_SEQUENCE_MASK#
#define EMBER_AF_ZCL_SEQUENCE_MASKValue:
0x7Fu
The mask applied by emberAfNextSequence when generating ZCL sequence numbers.
984
of file app/framework/include/af.h
EMBER_AF_MESSAGE_TAG_MASK#
#define EMBER_AF_MESSAGE_TAG_MASKValue:
0x7Fu
The mask applied to generated message tags used by the framework when sending messages via EZSP. Customers who call ezspSend functions directly must use message tags outside this mask.
990
of file app/framework/include/af.h
EMBER_AF_REJOIN_DUE_TO_END_DEVICE_MOVE#
#define EMBER_AF_REJOIN_DUE_TO_END_DEVICE_MOVEValue:
(cluster)
Return true if the cluster is in the manufacturer-specific range.
1092
of file app/framework/include/af.h
EMBER_AF_REJOIN_DUE_TO_TC_KEEPALIVE_FAILURE#
#define EMBER_AF_REJOIN_DUE_TO_TC_KEEPALIVE_FAILUREValue:
(cluster)
Return true if the cluster is in the manufacturer-specific range.
1093
of file app/framework/include/af.h
EMBER_AF_REJOIN_DUE_TO_CLI_COMMAND#
#define EMBER_AF_REJOIN_DUE_TO_CLI_COMMANDValue:
(cluster)
Return true if the cluster is in the manufacturer-specific range.
1094
of file app/framework/include/af.h
EMBER_AF_REJOIN_DUE_TO_WWAH_CONNECTIVITY_MANAGER#
#define EMBER_AF_REJOIN_DUE_TO_WWAH_CONNECTIVITY_MANAGERValue:
(cluster)
Return true if the cluster is in the manufacturer-specific range.
1095
of file app/framework/include/af.h
EMBER_AF_REJOIN_FIRST_REASON#
#define EMBER_AF_REJOIN_FIRST_REASONValue:
(cluster)
Return true if the cluster is in the manufacturer-specific range.
1097
of file app/framework/include/af.h
EMBER_AF_REJOIN_LAST_REASON#
#define EMBER_AF_REJOIN_LAST_REASONValue:
(cluster)
Return true if the cluster is in the manufacturer-specific range.
1098
of file app/framework/include/af.h
EMBER_AF_CLIENT_CLUSTER_TICK#
#define EMBER_AF_CLIENT_CLUSTER_TICKValue:
true
Friendly define for use in the scheduling or canceling client events with sl_zigbee_zcl_schedule_cluster_tick() and sl_zigbee_zcl_deactivate_cluster_tick().
1160
of file app/framework/include/af.h
EMBER_AF_SERVER_CLUSTER_TICK#
#define EMBER_AF_SERVER_CLUSTER_TICKValue:
false
Friendly define for use in the scheduling or canceling server events with sl_zigbee_zcl_schedule_cluster_tick() and sl_zigbee_zcl_deactivate_cluster_tick().
1167
of file app/framework/include/af.h
emberAfGetCurrentSleepControl#
#define emberAfGetCurrentSleepControlValue:
()
Retrieve the most restrictive sleep control value for all scheduled events. This function is used by emberAfOkToNap and emberAfOkToHibernate to makes sure that there are no events scheduled, which will keep the device from hibernating or napping.
Returns
The most restrictive sleep control value for all scheduled events or the value returned by emberAfGetDefaultSleepControl() if no events are currently scheduled. The default sleep control value is initialized to EMBER_AF_OK_TO_HIBERNATE but can be changed at any time using the emberAfSetDefaultSleepControl() function.
1350
of file app/framework/include/af.h
emberAfSetDefaultSleepControl#
#define emberAfSetDefaultSleepControlValue:
(x)
Set the default sleep control value against which all scheduled event sleep control values will be evaluated. This can be used to keep a device awake for an extended period of time by setting the default to EMBER_AF_STAY_AWAKE and then resetting the value to EMBER_AF_OK_TO_HIBERNATE once the wake period is complete.
1362
of file app/framework/include/af.h
emberAfGetDefaultSleepControl#
#define emberAfGetDefaultSleepControlValue:
()
Retrieve the default sleep control against which all event sleep control values are evaluated. The default sleep control value is initialized to EMBER_AF_OK_TO_HIBERNATE but can be changed by the application at any time using the emberAfSetDefaultSleepControl() function.
Returns
The current default sleep control value.
1373
of file app/framework/include/af.h
EMBER_AF_CLIENT_CLUSTER_DISCOVERY#
#define EMBER_AF_CLIENT_CLUSTER_DISCOVERYValue:
false
Friendly define for use in discovering client clusters with emberAfFindDevicesByProfileAndCluster().
1748
of file app/framework/include/af.h
EMBER_AF_SERVER_CLUSTER_DISCOVERY#
#define EMBER_AF_SERVER_CLUSTER_DISCOVERYValue:
true
Friendly define for use in discovering server clusters with emberAfFindDevicesByProfileAndCluster().
1754
of file app/framework/include/af.h
emberAfCurrentEndpoint#
#define emberAfCurrentEndpointValue:
()
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.
1903
of file app/framework/include/af.h
emberAfInvalidImageId#
const EmberAfOtaImageId emberAfInvalidImageId
This variable defines an invalid image ID. It is used to determine if a returned EmberAfOtaImageId is valid or not by passing the data to the function emberAfIsOtaImageIdValid().
960
of file app/framework/include/af.h
emberAfLocateAttributeMetadata#
EmberAfAttributeMetadata* emberAfLocateAttributeMetadata (uint8_t endpoint, EmberAfClusterId clusterId, EmberAfAttributeId attributeId, uint8_t mask, uint16_t manufacturerCode)
Locate attribute metadata.
N/A | endpoint | Zigbee endpoint number. |
N/A | clusterId | Cluster ID of the sought cluster. |
N/A | attributeId | Attribute ID of the sought attribute. |
N/A | mask | CLUSTER_MASK_SERVER or CLUSTER_MASK_CLIENT |
N/A | manufacturerCode | Manufacturer code of the sough attribute. |
This function returns a pointer to the attribute metadata structure or NULL if attribute is not found.
Returns
Returns pointer to the attribute metadata location.
141
of file app/framework/include/af.h
emberAfContainsAttribute#
bool emberAfContainsAttribute (uint8_t endpoint, EmberAfClusterId clusterId, EmberAfAttributeId attributeId, uint8_t mask, uint16_t manufacturerCode)
Return true if the attribute exists.
N/A | endpoint | |
N/A | clusterId | |
N/A | attributeId | |
N/A | mask | |
N/A | manufacturerCode |
149
of file app/framework/include/af.h
emberAfContainsClusterWithMfgCode#
bool emberAfContainsClusterWithMfgCode (uint8_t endpoint, EmberAfClusterId clusterId, uint16_t manufacturerCode)
Return true if an endpoint contains a cluster, checking for mfg code.
N/A | endpoint | Zigbee endpoint number. |
N/A | clusterId | Cluster ID of the sought cluster. |
N/A | manufacturerCode | Manufacturer code of the sought endpoint. |
This function returns true regardless of whether the endpoint contains server, client or both. For standard libraries (when ClusterId < FC00), the manufacturerCode is ignored.
171
of file app/framework/include/af.h
emberAfContainsCluster#
bool emberAfContainsCluster (uint8_t endpoint, EmberAfClusterId clusterId)
Return true if the endpoint contains the ZCL cluster with specified ID.
N/A | endpoint | Zigbee endpoint number. |
N/A | clusterId | Cluster ID of the sought cluster. |
This function returns true regardless of whether the endpoint contains server, client or both in the Zigbee Cluster Library. This wraps emberAfContainsClusterWithMfgCode with manufacturerCode = EMBER_AF_NULL_MANUFACTURER_CODE If this function is used with a manufacturer specific clusterId, it returns the first cluster that it finds in the Cluster table. It does not return any other clusters that share that ID.
187
of file app/framework/include/af.h
emberAfContainsServerWithMfgCode#
bool emberAfContainsServerWithMfgCode (uint8_t endpoint, EmberAfClusterId clusterId, uint16_t manufacturerCode)
Return true if the endpoint has a cluster server, checking for the mfg code.
N/A | endpoint | Zigbee endpoint number. |
N/A | clusterId | Cluster ID of the sought cluster. |
N/A | manufacturerCode | Manufacturer code of the sought cluster. |
This function returns true if the endpoint contains server of a given cluster. For standard libraries (when ClusterId < FC00), the manufacturerCode is ignored.
200
of file app/framework/include/af.h
emberAfContainsServer#
bool emberAfContainsServer (uint8_t endpoint, EmberAfClusterId clusterId)
Return true if the endpoint contains the ZCL server with a specified ID.
N/A | endpoint | Zigbee endpoint number. |
N/A | clusterId | Cluster ID of the sought cluster. |
This function returns true if the endpoint contains server of a given cluster. This wraps emberAfContainsServer with manufacturerCode = EMBER_AF_NULL_MANUFACTURER_CODE If this function is used with a manufacturer specific clusterId, it returns the first cluster that it finds in the Cluster table. It does not return any other clusters that share that ID.
216
of file app/framework/include/af.h
emberAfContainsClientWithMfgCode#
bool emberAfContainsClientWithMfgCode (uint8_t endpoint, EmberAfClusterId clusterId, uint16_t manufacturerCode)
Return true if the endpoint contains the cluster client.
N/A | endpoint | Zigbee endpoint number. |
N/A | clusterId | Cluster ID of the sought cluster. |
N/A | manufacturerCode | Manufacturer code of the sought cluster. |
This function returns true if the endpoint contains client of a given cluster. For standard library clusters (when ClusterId < FC00), the manufacturerCode is ignored.
230
of file app/framework/include/af.h
emberAfContainsClient#
bool emberAfContainsClient (uint8_t endpoint, EmberAfClusterId clusterId)
Return true if the endpoint contains the ZCL client with a specified ID.
N/A | endpoint | Zigbee endpoint number. |
N/A | clusterId | Cluster ID of the sought cluster. |
This function returns true if the endpoint contains client of a given cluster. It wraps emberAfContainsClient with manufacturerCode = EMBER_AF_NULL_MANUFACTURER_CODE If this function is used with a manufacturer-specific clusterId, it returns the first cluster that it finds in the Cluster table. It does not return any other clusters that share that ID.
246
of file app/framework/include/af.h
emberAfWriteAttribute#
EmberAfStatus emberAfWriteAttribute (uint8_t endpoint, EmberAfClusterId cluster, EmberAfAttributeId attributeID, uint8_t mask, uint8_t * dataPtr, EmberAfAttributeType dataType)
Write an attribute performing all checks.
N/A | endpoint | Zigbee endpoint number. |
N/A | cluster | Cluster ID of the sought cluster. |
N/A | attributeID | Attribute ID of the sought attribute. |
N/A | mask | CLUSTER_MASK_SERVER or CLUSTER_MASK_CLIENT. |
N/A | dataPtr | Pointer to the ZCL attribute. |
N/A | dataType | ZCL attribute type. |
This function attempts to write the attribute value from the provided pointer. It only checks that the attribute exists. If it does, it writes the value into the attribute table for the given attribute.
This function does not check if the attribute is writable since the read only / writable characteristic of an attribute only pertains to external devices writing over the air. Because this function is called locally, it assumes that the device knows what it is doing and has permission to perform the given operation.
See Also
emberAfWriteClientAttribute, emberAfWriteServerAttribute, emberAfWriteManufacturerSpecificClientAttribute, emberAfWriteManufacturerSpecificServerAttribute
274
of file app/framework/include/af.h
emberAfWriteServerAttribute#
EmberAfStatus emberAfWriteServerAttribute (uint8_t endpoint, EmberAfClusterId cluster, EmberAfAttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType)
Write a cluster server attribute.
N/A | endpoint | Zigbee endpoint number. |
N/A | cluster | Cluster ID of the sought cluster. |
N/A | attributeID | Attribute ID of the sought attribute. |
N/A | dataPtr | Pointer to the ZCL attribute. |
N/A | dataType | ZCL attribute type. |
This function is the same as emberAfWriteAttribute except that it saves having to pass the cluster mask. This is useful for code saving because the write attribute is used frequently throughout the framework
See Also
emberAfWriteClientAttribute, emberAfWriteManufacturerSpecificClientAttribute, emberAfWriteManufacturerSpecificServerAttribute
299
of file app/framework/include/af.h
emberAfWriteClientAttribute#
EmberAfStatus emberAfWriteClientAttribute (uint8_t endpoint, EmberAfClusterId cluster, EmberAfAttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType)
Write a cluster client attribute.
N/A | endpoint | Zigbee endpoint number. |
N/A | cluster | Cluster ID of the sought cluster. |
N/A | attributeID | Attribute ID of the sought attribute. |
N/A | dataPtr | Pointer to the ZCL attribute. |
N/A | dataType | ZCL attribute type. |
This function is the same as emberAfWriteAttribute except that it saves having to pass the cluster mask. This is useful for code saving because the write attribute is used frequently throughout the framework.
See Also
emberAfWriteServerAttribute, emberAfWriteManufacturerSpecificClientAttribute, emberAfWriteManufacturerSpecificServerAttribute
323
of file app/framework/include/af.h
emberAfWriteManufacturerSpecificServerAttribute#
EmberAfStatus emberAfWriteManufacturerSpecificServerAttribute (uint8_t endpoint, EmberAfClusterId cluster, EmberAfAttributeId attributeID, uint16_t manufacturerCode, uint8_t * dataPtr, EmberAfAttributeType dataType)
Write a manufacturer-specific server attribute.
N/A | endpoint | Zigbee endpoint number. |
N/A | cluster | Cluster ID of the sought cluster. |
N/A | attributeID | Attribute ID of the sought attribute. |
N/A | manufacturerCode | Manufacturer code of the sought cluster. |
N/A | dataPtr | Pointer to the ZCL attribute. |
N/A | dataType | ZCL attribute type. |
This function is the same as emberAfWriteAttribute except that it saves having to pass the cluster mask and allows passing a manufacturer code. This is useful for code saving because the write attribute is used frequently throughout the framework.
See Also
emberAfWriteClientAttribute, emberAfWriteServerAttribute, emberAfWriteManufacturerSpecificClientAttribute
348
of file app/framework/include/af.h
emberAfWriteManufacturerSpecificClientAttribute#
EmberAfStatus emberAfWriteManufacturerSpecificClientAttribute (uint8_t endpoint, EmberAfClusterId cluster, EmberAfAttributeId attributeID, uint16_t manufacturerCode, uint8_t * dataPtr, EmberAfAttributeType dataType)
Write a manufacturer-specific client attribute.
N/A | endpoint | Zigbee endpoint number. |
N/A | cluster | Cluster ID of the sought cluster. |
N/A | attributeID | Attribute ID of the sought attribute. |
N/A | manufacturerCode | Manufacturer code of the sought cluster. |
N/A | dataPtr | Pointer to the ZCL attribute. |
N/A | dataType | ZCL attribute type. |
This function is the same as emberAfWriteAttribute except that it saves having to pass the cluster mask and allows passing of a manufacturer code. This is useful for code saving because the write attribute is used frequently throughout the framework.
See Also
emberAfWriteClientAttribute, emberAfWriteServerAttribute, emberAfWriteManufacturerSpecificServerAttribute
374
of file app/framework/include/af.h
emberAfVerifyAttributeWrite#
EmberAfStatus emberAfVerifyAttributeWrite (uint8_t endpoint, EmberAfClusterId cluster, EmberAfAttributeId attributeID, uint8_t mask, uint16_t manufacturerCode, uint8_t * dataPtr, EmberAfAttributeType dataType)
Test the success of attribute write.
N/A | endpoint | Zigbee endpoint number |
N/A | cluster | Cluster ID of the sought cluster. |
N/A | attributeID | Attribute ID of the sought attribute. |
N/A | mask | CLUSTER_MASK_SERVER or CLUSTER_MASK_CLIENT |
N/A | manufacturerCode | Location where attribute will be written from. |
N/A | dataPtr | ZCL attribute type. |
N/A | dataType |
This function returns success if the attribute write is successful. It does not actually write anything, just validates for read-only and data-type.
395
of file app/framework/include/af.h
emberAfReadAttribute#
EmberAfStatus emberAfReadAttribute (uint8_t endpoint, EmberAfClusterId cluster, EmberAfAttributeId attributeID, uint8_t mask, uint8_t * dataPtr, uint8_t readLength, EmberAfAttributeType * dataType)
Read the attribute value performing all the checks.
N/A | endpoint | Zigbee endpoint number |
N/A | cluster | Cluster ID of the sought cluster. |
N/A | attributeID | Attribute ID of the sought attribute. |
N/A | mask | CLUSTER_MASK_SERVER or CLUSTER_MASK_CLIENT |
N/A | dataPtr | Pointer to the ZCL attribute. |
N/A | readLength | Length of the attribute to be read. |
N/A | dataType | ZCL attribute type. |
This function attempts to read the attribute and store it into the pointer. It also reads the data type. Both dataPtr and dataType may be NULL, signifying that either value or type is not desired.
See Also
emberAfReadClientAttribute, emberAfReadServerAttribute, emberAfReadManufacturerSpecificClientAttribute, emberAfReadManufacturerSpecificServerAttribute
423
of file app/framework/include/af.h
emberAfReadServerAttribute#
EmberAfStatus emberAfReadServerAttribute (uint8_t endpoint, EmberAfClusterId cluster, EmberAfAttributeId attributeID, uint8_t * dataPtr, uint8_t readLength)
Read the server attribute value performing all the checks.
N/A | endpoint | Zigbee endpoint number |
N/A | cluster | Cluster ID of the sought cluster. |
N/A | attributeID | Attribute ID of the sought attribute. |
N/A | dataPtr | Pointer to the server attribute. |
N/A | readLength | Length of the attribute to be read. |
This function attempts to read the attribute and store it into the pointer. It also reads the data type. Both dataPtr and dataType may be NULL, signifying that either value or type is not desired.
See Also
emberAfReadClientAttribute, emberAfReadManufacturerSpecificClientAttribute, emberAfReadManufacturerSpecificServerAttribute
449
of file app/framework/include/af.h
emberAfReadClientAttribute#
EmberAfStatus emberAfReadClientAttribute (uint8_t endpoint, EmberAfClusterId cluster, EmberAfAttributeId attributeID, uint8_t * dataPtr, uint8_t readLength)
Read the client attribute value, performing all the checks.
N/A | endpoint | Zigbee endpoint number |
N/A | cluster | Cluster ID of the sought cluster. |
N/A | attributeID | Attribute ID of the sought attribute. |
N/A | dataPtr | Pointer to the client attribute. |
N/A | readLength | Length of the attribute to be read. |
This function attempts to read the attribute and store it into the pointer. It also reads the data type. Both dataPtr and dataType may be NULL, signifying that either value or type is not desired.
See Also
emberAfReadServerAttribute, emberAfReadManufacturerSpecificClientAttribute, emberAfReadManufacturerSpecificServerAttribute
473
of file app/framework/include/af.h
emberAfReadManufacturerSpecificServerAttribute#
EmberAfStatus emberAfReadManufacturerSpecificServerAttribute (uint8_t endpoint, EmberAfClusterId cluster, EmberAfAttributeId attributeID, uint16_t manufacturerCode, uint8_t * dataPtr, uint8_t readLength)
Read the manufacturer-specific server attribute value, performing all checks.
N/A | endpoint | Zigbee endpoint number |
N/A | cluster | Cluster ID of the sought cluster. |
N/A | attributeID | Attribute ID of the sought attribute. |
N/A | manufacturerCode | Manufacturer code of the sought cluster. |
N/A | dataPtr | Pointer to the server attribute. |
N/A | readLength | Length of the attribute to be read. |
This function attempts to read the attribute and store it into the pointer. It also reads the data type. Both dataPtr and dataType may be NULL, signifying that either value or type is not desired.
See Also
emberAfReadClientAttribute, emberAfReadServerAttribute, emberAfReadManufacturerSpecificClientAttribute
497
of file app/framework/include/af.h
emberAfReadManufacturerSpecificClientAttribute#
EmberAfStatus emberAfReadManufacturerSpecificClientAttribute (uint8_t endpoint, EmberAfClusterId cluster, EmberAfAttributeId attributeID, uint16_t manufacturerCode, uint8_t * dataPtr, uint8_t readLength)
Read the manufacturer-specific client attribute value, performing all checks.
N/A | endpoint | Zigbee endpoint number |
N/A | cluster | Cluster ID of the sought cluster. |
N/A | attributeID | Attribute ID of the sought attribute. |
N/A | manufacturerCode | Manufacturer code of the sought cluster. |
N/A | dataPtr | Pointer to the server attribute. |
N/A | readLength | Length of the attribute to be read. |
This function attempts to read the attribute and store it into the pointer. It also reads the data type. Both dataPtr and dataType may be NULL, signifying that either value or type is not desired.
See Also
emberAfReadClientAttribute, emberAfReadServerAttribute, emberAfReadManufacturerSpecificServerAttribute
522
of file app/framework/include/af.h
emberAfGetDataSize#
uint8_t emberAfGetDataSize (uint8_t dataType)
Return the size of the ZCL data in bytes.
N/A | dataType | ZCL data type |
Returns
Size in bytes or 0 if invalid data type
535
of file app/framework/include/af.h
emberAfGetOpenNetworkDurationSec#
uint8_t emberAfGetOpenNetworkDurationSec (void )
Return the number of seconds the network remains open.
N/A |
Returns
A return value of 0 indicates that the network is closed.
542
of file app/framework/include/af.h
emberAfEndpointFromIndex#
uint8_t emberAfEndpointFromIndex (uint8_t index)
Take an index of an endpoint and return the Zigbee endpoint.
N/A | index | Index of an endpoint. |
Returns
Zigbee endpoint.
621
of file app/framework/include/af.h
emberAfIndexFromEndpoint#
uint8_t emberAfIndexFromEndpoint (uint8_t endpoint)
N/A | endpoint | Zigbee endpoint. |
Return the index of a given endpoint.
Returns
Index of a Zigbee endpoint.
629
of file app/framework/include/af.h
emberAfIndexFromEndpointIncludingDisabledEndpoints#
uint8_t emberAfIndexFromEndpointIncludingDisabledEndpoints (uint8_t endpoint)
N/A | endpoint | Zigbee endpoint. |
Return the index of a given endpoint. It does not ignore disabled endpoints.
Returns
Index of a Zigbee endpoint.
637
of file app/framework/include/af.h
emberAfFindClusterClientEndpointIndex#
uint8_t emberAfFindClusterClientEndpointIndex (uint8_t endpoint, EmberAfClusterId clusterId)
N/A | endpoint | Zigbee endpoint. |
N/A | clusterId | Cluster ID of a sought cluster. |
Return the endpoint index within a given cluster (Client-side), looking only for standard clusters.
Returns
Index of a Zigbee endpoint.
647
of file app/framework/include/af.h
emberAfFindClusterServerEndpointIndex#
uint8_t emberAfFindClusterServerEndpointIndex (uint8_t endpoint, EmberAfClusterId clusterId)
N/A | endpoint | Zigbee endpoint. |
N/A | clusterId | Cluster ID of a sought cluster. |
Return the endpoint index within a given cluster (Server-side), looking only for standard clusters.
Returns
Index of a Zigbee endpoint.
657
of file app/framework/include/af.h
emberAfNetworkIndexFromEndpoint#
uint8_t emberAfNetworkIndexFromEndpoint (uint8_t endpoint)
Return the network index of a given endpoint.
N/A | endpoint | Zigbee endpoint. |
Returns
Network index of a Zigbee endpoint.
685
of file app/framework/include/af.h
emberAfEndpointCount#
uint8_t emberAfEndpointCount (void )
Return the total number of endpoints (dynamic and pre-compiled).
N/A |
703
of file app/framework/include/af.h
emberAfFixedEndpointCount#
uint8_t emberAfFixedEndpointCount (void )
Return the number of pre-compiled endpoints.
N/A |
708
of file app/framework/include/af.h
emberAfGetAttributeAnalogOrDiscreteType#
uint8_t emberAfGetAttributeAnalogOrDiscreteType (uint8_t dataType)
Return the type of the attribute, either ANALOG, DISCRETE, or NONE.
N/A | dataType |
755
of file app/framework/include/af.h
emberAfIsTypeSigned#
bool emberAfIsTypeSigned (EmberAfAttributeType dataType)
Return true if type is signed, false otherwise.
N/A | dataType |
760
of file app/framework/include/af.h
emberAfGetInt32u#
uint32_t emberAfGetInt32u (const uint8_t * message, uint16_t currentIndex, uint16_t msgLen)
Extract a 32-bit integer from the message buffer.
N/A | message | |
N/A | currentIndex | |
N/A | msgLen |
765
of file app/framework/include/af.h
emberAfGetInt24u#
uint32_t emberAfGetInt24u (const uint8_t * message, uint16_t currentIndex, uint16_t msgLen)
Extract a 24-bit integer from the message buffer.
N/A | message | |
N/A | currentIndex | |
N/A | msgLen |
770
of file app/framework/include/af.h
emberAfGetInt16u#
uint16_t emberAfGetInt16u (const uint8_t * message, uint16_t currentIndex, uint16_t msgLen)
Extract a 16-bit integer from the message buffer.
N/A | message | |
N/A | currentIndex | |
N/A | msgLen |
775
of file app/framework/include/af.h
emberAfGetString#
uint8_t* emberAfGetString (uint8_t * message, uint16_t currentIndex, uint16_t msgLen)
Extract a ZCL string from the message buffer.
N/A | message | |
N/A | currentIndex | |
N/A | msgLen |
779
of file app/framework/include/af.h
emberAfGetLongString#
uint8_t* emberAfGetLongString (uint8_t * message, uint16_t currentIndex, uint16_t msgLen)
Extract a ZCL long string from the message buffer.
N/A | message | |
N/A | currentIndex | |
N/A | msgLen |
783
of file app/framework/include/af.h
emberAfGetDate#
uint8_t emberAfGetDate (uint8_t * message, uint16_t currentIndex, uint16_t msgLen, EmberAfDate * destination)
Return true if the cluster is in the manufacturer-specific range.
N/A | message | EmberAfCluster* to consider |
N/A | currentIndex | |
N/A | msgLen | |
N/A | destination |
788
of file app/framework/include/af.h
emberAfCopyInt16u#
void emberAfCopyInt16u (uint8_t * data, uint16_t index, uint16_t x)
Copy a uint16_t value into a buffer.
N/A | data | |
N/A | index | |
N/A | x |
802
of file app/framework/include/af.h
emberAfCopyInt24u#
void emberAfCopyInt24u (uint8_t * data, uint16_t index, uint32_t x)
Copy a uint24_t value into a buffer.
N/A | data | |
N/A | index | |
N/A | x |
806
of file app/framework/include/af.h
emberAfCopyInt32u#
void emberAfCopyInt32u (uint8_t * data, uint16_t index, uint32_t x)
Copy a uint32_t value into a buffer.
N/A | data | |
N/A | index | |
N/A | x |
810
of file app/framework/include/af.h
emberAfCopyString#
void emberAfCopyString (uint8_t * dest, uint8_t * src, uint8_t size)
Return true if the cluster is in the manufacturer-specific range.
N/A | dest | EmberAfCluster* to consider |
N/A | src | |
N/A | size |
816
of file app/framework/include/af.h
emberAfCopyLongString#
void emberAfCopyLongString (uint8_t * dest, uint8_t * src, uint16_t size)
Return true if the cluster is in the manufacturer-specific range.
N/A | dest | EmberAfCluster* to consider |
N/A | src | |
N/A | size |
822
of file app/framework/include/af.h
emberAfStringLength#
uint8_t emberAfStringLength (const uint8_t * buffer)
Return true if the cluster is in the manufacturer-specific range.
N/A | buffer | EmberAfCluster* to consider |
827
of file app/framework/include/af.h
emberAfLongStringLength#
uint16_t emberAfLongStringLength (const uint8_t * buffer)
Return true if the cluster is in the manufacturer-specific range.
N/A | buffer | EmberAfCluster* to consider |
832
of file app/framework/include/af.h
emberAfAttributeValueSize#
uint16_t emberAfAttributeValueSize (EmberAfAttributeType dataType, const uint8_t * buffer, const uint16_t bufferSize)
Return true if the cluster is in the manufacturer-specific range.
N/A | dataType | EmberAfCluster* to consider |
N/A | buffer | |
N/A | bufferSize |
852
of file app/framework/include/af.h
emberAfIsDeviceEnabled#
bool emberAfIsDeviceEnabled (uint8_t endpoint)
Check whether the endpoint is enabled.
N/A | endpoint | Zigbee endpoint number |
This function returns true if device at a given endpoint is enabled. At startup, all endpoints are enabled.
885
of file app/framework/include/af.h
emberAfIsDeviceIdentifying#
bool emberAfIsDeviceIdentifying (uint8_t endpoint)
Check whether the endpoint is identifying.
N/A | endpoint | Zigbee endpoint number |
This function returns true if the device at a given endpoint is identifying.
895
of file app/framework/include/af.h
emberAfSetDeviceEnabled#
void emberAfSetDeviceEnabled (uint8_t endpoint, bool enabled)
Enable or disable an endpoint.
N/A | endpoint | Zigbee endpoint number |
N/A | enabled |
By calling this function, you turn off all processing of incoming traffic for a given endpoint.
905
of file app/framework/include/af.h
sl_zigbee_common_rtos_wakeup_stack_task#
void sl_zigbee_common_rtos_wakeup_stack_task (void )
Set the Zigbee stack task to ready when running on an OS.
N/A |
931
of file app/framework/include/af.h
emberAfEndpointEnableDisable#
bool emberAfEndpointEnableDisable (uint8_t endpoint, bool enable)
Enable/disable endpoints.
N/A | endpoint | |
N/A | enable |
936
of file app/framework/include/af.h
emberAfEndpointIndexIsEnabled#
bool emberAfEndpointIndexIsEnabled (uint8_t index)
Determine if an endpoint at the specified index is enabled or disabled.
N/A | index |
941
of file app/framework/include/af.h
emberAfIsThisDataTypeAStringType#
bool emberAfIsThisDataTypeAStringType (EmberAfAttributeType dataType)
Return true if a given ZCL data type is a string type.
N/A | dataType |
Use this function to perform a different memory operation on a certain attribute because it is a string type. Since ZCL strings carry length as the first byte(s), it is often required to treat them differently than regular data types.
Returns
true if data type is a string.
972
of file app/framework/include/af.h
emberAfIsStringAttributeType#
bool emberAfIsStringAttributeType (EmberAfAttributeType attributeType)
Return true if the given attribute type is a string.
N/A | attributeType |
975
of file app/framework/include/af.h
emberAfIsLongStringAttributeType#
bool emberAfIsLongStringAttributeType (EmberAfAttributeType attributeType)
Return true if the given attribute type is a long string.
N/A | attributeType |
978
of file app/framework/include/af.h
emberAfNextSequence#
uint8_t emberAfNextSequence (void )
Increment the ZCL sequence number and return the value.
N/A |
ZCL messages have sequence numbers so that they can be matched up with other messages in the transaction. To avoid conflicts with sequence numbers generated independently by the application, this API returns sequence numbers with the high bit clear. If the application generates its own sequence numbers, it should use numbers with the high bit set.
Returns
The next ZCL sequence number.
1003
of file app/framework/include/af.h
emberAfGetLastSequenceNumber#
uint8_t emberAfGetLastSequenceNumber (void )
Retrieve the last sequence number that was used.
N/A |
1009
of file app/framework/include/af.h
emberAfCompareValues#
int8_t emberAfCompareValues (uint8_t * val1, uint8_t * val2, uint8_t len, bool signedNumber)
Compare two values of known length as integers.Simple integer comparison function. Signed integer comparison are supported for numbers with length of 4 (bytes) or less. The integers are in native endianness.
N/A | val1 | |
N/A | val2 | |
N/A | len | |
N/A | signedNumber |
Returns
-1, if val1 is smaller 0, if they are the same or if two negative numbers with length greater than 4 is being compared 1, if val2 is smaller.
1024
of file app/framework/include/af.h
emberAfGetEui64#
void emberAfGetEui64 (EmberEUI64 returnEui64)
Populate the passed EUI64 with the local EUI64 MAC address.
N/A | returnEui64 |
1029
of file app/framework/include/af.h
emberAfGetNodeId#
EmberNodeId emberAfGetNodeId (void )
Return the node ID of the local node.
N/A |
1040
of file app/framework/include/af.h
emberAfGenerateRandomKey#
EmberStatus emberAfGenerateRandomKey (EmberKeyData * result)
Generate a random key (link, network, or master).
N/A | result |
1046
of file app/framework/include/af.h
emberAfGetPanId#
EmberPanId emberAfGetPanId (void )
Return the PAN ID of the local node.
N/A |
1054
of file app/framework/include/af.h
emberAfGetRadioChannel#
uint8_t emberAfGetRadioChannel (void )
Return the radioChannel of the current network.
N/A |
1059
of file app/framework/include/af.h
emberAfGetBindingIndex#
uint8_t emberAfGetBindingIndex (void )
Return true if the cluster is in the manufacturer-specific range.
N/A | EmberAfCluster* to consider |
1065
of file app/framework/include/af.h
emberAfGetAddressIndex#
uint8_t emberAfGetAddressIndex (void )
Return true if the cluster is in the manufacturer-specific range.
N/A | EmberAfCluster* to consider |
1071
of file app/framework/include/af.h
emberAfNetworkState#
EmberNetworkStatus emberAfNetworkState (void )
Return the current network state. This call caches the results on the host to prevent frequent EZSP transactions.
N/A |
1077
of file app/framework/include/af.h
emberAfGetNetworkParameters#
EmberStatus emberAfGetNetworkParameters (EmberNodeType * nodeType, EmberNetworkParameters * parameters)
Return the current network parameters.
N/A | nodeType | |
N/A | parameters |
1082
of file app/framework/include/af.h
emberAfGetNodeType#
EmberStatus emberAfGetNodeType (EmberNodeType * nodeType)
Return the current node type.
N/A | nodeType |
1088
of file app/framework/include/af.h
emberAfPermitJoin#
EmberStatus emberAfPermitJoin (uint8_t duration, bool broadcastMgmtPermitJoin)
Enable local permit join and optionally broadcast the ZDO Mgmt_Permit_Join_req message. This API can be called from any device type and still return EMBER_SUCCESS. If the API is called from an end device, the permit association bit will just be left off.
N/A | duration | The duration that the permit join bit will remain on and other devices will be able to join the current network. |
N/A | broadcastMgmtPermitJoin | whether or not to broadcast the ZDO Mgmt_Permit_Join_req message. |
Returns
status of whether or not permit join was enabled.
1113
of file app/framework/include/af.h
emberAfBroadcastPermitJoin#
EmberStatus emberAfBroadcastPermitJoin (uint8_t duration)
Enable local permit join and broadcast the ZDO Mgmt_Permit_Join_req message. This API can be called from any device type and still return EMBER_SUCCESS. If the API is called from an end device, the permit association bit will just be left off.
N/A | duration | The duration that the permit join bit will remain on and other devices will be able to join the current network. |
Returns
status of whether or not permit join was enabled.
1128
of file app/framework/include/af.h
sl_zigbee_zcl_schedule_tick_extended#
EmberStatus sl_zigbee_zcl_schedule_tick_extended (uint8_t endpoint, EmberAfClusterId clusterId, bool isClient, uint32_t delayMs, EmberAfEventPollControl pollControl, EmberAfEventSleepControl sleepControl)
Schedule a cluster-related event inside the application framework's event mechanism. This function provides a wrapper for the Ember stack event mechanism which allows the cluster code to access its events by their endpoint, cluster ID, and client/server identity. The passed poll and sleep controls allow the cluster to indicate whether it needs to long or short poll and whether it needs to stay awake or if it can sleep.
N/A | endpoint | The endpoint of the event to be scheduled. |
N/A | clusterId | The cluster id of the event to be scheduled. |
N/A | isClient | EMBER_AF_CLIENT_CLUSTER_TICK if the event to be scheduled is associated with a client cluster or EMBER_AF_SERVER_CLUSTER_TICK otherwise. |
N/A | delayMs | The number of milliseconds until the event should be called. |
N/A | pollControl | EMBER_AF_SHORT_POLL if the cluster needs to short poll or EMBER_AF_LONG_POLL otherwise. |
N/A | sleepControl | EMBER_AF_STAY_AWAKE if the cluster needs to stay awake or EMBER_AF_OK_TO_SLEEP otherwise. |
Returns
EMBER_SUCCESS if the event was scheduled or an error otherwise.
1191
of file app/framework/include/af.h
sl_zigbee_zcl_schedule_cluster_tick#
EmberStatus sl_zigbee_zcl_schedule_cluster_tick (uint8_t endpoint, EmberAfClusterId clusterId, bool isClient, uint32_t delayMs, EmberAfEventSleepControl sleepControl)
Schedule a cluster-related event inside the application framework's event mechanism. This function is a wrapper for ::emberAfScheduleTickExtended. The cluster on the given endpoint will be set to long poll if sleepControl is set to EMBER_AF_OK_TO_HIBERNATE or will be set to short poll otherwise. It will stay awake if sleepControl is EMBER_AF_STAY_AWAKE and will sleep otherwise.
N/A | endpoint | The endpoint of the event to be scheduled. |
N/A | clusterId | The cluster id of the event to be scheduled. |
N/A | isClient | EMBER_AF_CLIENT_CLUSTER_TICK if the event to be scheduled is associated with a client cluster or EMBER_AF_SERVER_CLUSTER_TICK otherwise. |
N/A | delayMs | The number of milliseconds until the event should be called. |
N/A | sleepControl | the priority of the event, what the processor should be allowed to do in terms of sleeping while the event is active. |
Returns
EMBER_SUCCESS if the event was scheduled or an error otherwise.
1218
of file app/framework/include/af.h
sl_zigbee_zcl_schedule_client_tick_extended#
EmberStatus sl_zigbee_zcl_schedule_client_tick_extended (uint8_t endpoint, EmberAfClusterId clusterId, uint32_t delayMs, EmberAfEventPollControl pollControl, EmberAfEventSleepControl sleepControl)
Schedule a cluster client event. This function is a wrapper for sl_zigbee_zcl_schedule_tick_extended.
N/A | endpoint | The endpoint of the event to be scheduled |
N/A | clusterId | The cluster id of the event to be scheduled |
N/A | delayMs | The number of milliseconds until the event should be called. |
N/A | pollControl | EMBER_AF_SHORT_POLL if the cluster needs to short poll or EMBER_AF_LONG_POLL otherwise. |
N/A | sleepControl | EMBER_AF_STAY_AWAKE if the cluster needs to stay awake or EMBER_AF_OK_TO_SLEEP otherwise. |
Returns
EMBER_SUCCESS if the event was scheduled or an error otherwise.
1238
of file app/framework/include/af.h
sl_zigbee_zcl_schedule_client_tick#
EmberStatus sl_zigbee_zcl_schedule_client_tick (uint8_t endpoint, EmberAfClusterId clusterId, uint32_t delayMs)
Schedule a cluster client event. This function is a wrapper for sl_zigbee_zcl_schedule_client_tick_extended. It indicates that the cluster client on the given endpoint can long poll and can sleep.
N/A | endpoint | The endpoint of the event to be scheduled. |
N/A | clusterId | The cluster id of the event to be scheduled. |
N/A | delayMs | The number of milliseconds until the event should be called. |
Returns
EMBER_SUCCESS if the event was scheduled or an error otherwise.
1255
of file app/framework/include/af.h
sl_zigbee_zcl_schedule_server_tick_extended#
EmberStatus sl_zigbee_zcl_schedule_server_tick_extended (uint8_t endpoint, EmberAfClusterId clusterId, uint32_t delayMs, EmberAfEventPollControl pollControl, EmberAfEventSleepControl sleepControl)
Schedule a cluster server event. This function is a wrapper for sl_zigbee_zcl_schedule_tick_extended.
N/A | endpoint | The endpoint of the event to be scheduled. |
N/A | clusterId | The cluster id of the event to be scheduled. |
N/A | delayMs | The number of milliseconds until the event should be called. |
N/A | pollControl | EMBER_AF_SHORT_POLL if the cluster needs to short poll or EMBER_AF_LONG_POLL otherwise. |
N/A | sleepControl | EMBER_AF_STAY_AWAKE if the cluster needs to stay awake or EMBER_AF_OK_TO_SLEEP otherwise. |
Returns
EMBER_SUCCESS if the event was scheduled or an error otherwise.
1273
of file app/framework/include/af.h
sl_zigbee_zcl_schedule_server_tick#
EmberStatus sl_zigbee_zcl_schedule_server_tick (uint8_t endpoint, EmberAfClusterId clusterId, uint32_t delayMs)
Schedule a cluster server event. This function is a wrapper for sl_zigbee_zcl_schedule_server_tick_extended. It indicates that the cluster server on the given endpoint can long poll and can sleep.
N/A | endpoint | The endpoint of the event to be scheduled |
N/A | clusterId | The cluster id of the event to be scheduled. |
N/A | delayMs | The number of milliseconds until the event should be called. |
Returns
EMBER_SUCCESS if the event was scheduled or an error otherwise.
1290
of file app/framework/include/af.h
sl_zigbee_zcl_deactivate_cluster_tick#
EmberStatus sl_zigbee_zcl_deactivate_cluster_tick (uint8_t endpoint, EmberAfClusterId clusterId, bool isClient)
Deactivate a cluster-related event. This function provides a wrapper for the Ember stack's event mechanism, which allows an event to be accessed by its endpoint, cluster ID, and client/server identity.
N/A | endpoint | The endpoint of the event to be deactivated. |
N/A | clusterId | The cluster id of the event to be deactivated. |
N/A | isClient | EMBER_AF_CLIENT_CLUSTER_TICK if the event to be deactivated is a client cluster EMBER_AF_SERVER_CLUSTER_TICK otherwise. |
Returns
EMBER_SUCCESS if the event was deactivated or an error otherwise.
1308
of file app/framework/include/af.h
sl_zigbee_zcl_deactivate_client_tick#
EmberStatus sl_zigbee_zcl_deactivate_client_tick (uint8_t endpoint, EmberAfClusterId clusterId)
Deactivate a cluster client event. This function is a wrapper for sl_zigbee_zcl_deactivate_cluster_tick.
N/A | endpoint | The endpoint of the event to be deactivated. |
N/A | clusterId | The cluster id of the event to be deactivated. |
Returns
EMBER_SUCCESS if the event was deactivated or an error otherwise.
1321
of file app/framework/include/af.h
sl_zigbee_zcl_deactivate_server_tick#
EmberStatus sl_zigbee_zcl_deactivate_server_tick (uint8_t endpoint, EmberAfClusterId clusterId)
Deactivate a cluster server event. This function is a wrapper for sl_zigbee_zcl_deactivate_cluster_tick.
N/A | endpoint | The endpoint of the event to be deactivated. |
N/A | clusterId | The cluster ID of the event to be deactivated. |
Returns
EMBER_SUCCESS if the event was deactivated or an error otherwise.
1333
of file app/framework/include/af.h
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.
N/A |
NOTE: This will overwrite the ZCL sequence number of the message to use the LAST received sequence number.
1430
of file app/framework/include/af.h
emberAfSendResponseWithCallback#
EmberStatus emberAfSendResponseWithCallback (EmberAfMessageSentFunction callback)
Send ZCL response with attached message sent callback.
N/A | callback |
1435
of file app/framework/include/af.h
emberAfSendMulticast#
EmberStatus emberAfSendMulticast (EmberMulticastId multicastId, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message)
Send multicast.
N/A | multicastId | |
N/A | apsFrame | |
N/A | messageLength | |
N/A | message |
1440
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.
N/A | apsFrame | |
N/A | messageLength | |
N/A | message |
1452
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.
N/A | multicastId | |
N/A | apsFrame | |
N/A | messageLength | |
N/A | message | |
N/A | alias | |
N/A | sequence | |
N/A | callback |
1459
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.
N/A | multicastId | |
N/A | apsFrame | |
N/A | messageLength | |
N/A | message | |
N/A | callback |
1470
of file app/framework/include/af.h
emberAfSendBroadcast#
EmberStatus emberAfSendBroadcast (EmberNodeId destination, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message)
Send broadcast.
N/A | destination | |
N/A | apsFrame | |
N/A | messageLength | |
N/A | message |
1479
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.
N/A | destination | |
N/A | apsFrame | |
N/A | messageLength | |
N/A | message | |
N/A | callback |
1487
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.
N/A | destination | |
N/A | apsFrame | |
N/A | messageLength | |
N/A | message | |
N/A | alias | |
N/A | sequence | |
N/A | callback |
1496
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.
N/A | type | |
N/A | indexOrDestination | |
N/A | apsFrame | |
N/A | messageLength | |
N/A | message |
1507
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.
N/A | type | |
N/A | indexOrDestination | |
N/A | apsFrame | |
N/A | messageLength | |
N/A | message | |
N/A | callback |
1516
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.
N/A | apsFrame | |
N/A | messageLength | |
N/A | message |
1529
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.
N/A | apsFrame | |
N/A | messageLength | |
N/A | message | |
N/A | callback |
1536
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.
N/A | panId | |
N/A | destinationLongId | |
N/A | destinationShortId | |
N/A | multicastId | |
N/A | clusterId | |
N/A | profileId | |
N/A | messageLength | |
N/A | messageBytes |
1544
of file app/framework/include/af.h
emberAfSendEndDeviceBind#
EmberStatus emberAfSendEndDeviceBind (uint8_t endpoint)
Send end device binding request.
N/A | endpoint |
1556
of file app/framework/include/af.h
emberAfSendCommandUnicastToBindings#
EmberStatus emberAfSendCommandUnicastToBindings (void )
Send the command prepared with emberAfFill.... macro.
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.
1568
of file app/framework/include/af.h
emberAfSendCommandUnicastToBindingsWithCallback#
EmberStatus emberAfSendCommandUnicastToBindingsWithCallback (EmberAfMessageSentFunction callback)
emberAfSendCommandUnicastToBindings with attached message sent callback.
N/A | callback |
1573
of file app/framework/include/af.h
emberAfSendCommandMulticast#
EmberStatus emberAfSendCommandMulticast (EmberMulticastId multicastId)
Send the command prepared with emberAfFill.... macro.
N/A | multicastId |
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.
1582
of file app/framework/include/af.h
emberAfSendCommandMulticastWithAlias#
EmberStatus emberAfSendCommandMulticastWithAlias (EmberMulticastId multicastId, EmberNodeId alias, uint8_t sequence)
Send the command prepared with emberAfFill.... macro.
N/A | multicastId | |
N/A | alias | |
N/A | sequence |
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.
1591
of file app/framework/include/af.h
emberAfSendCommandMulticastWithCallback#
EmberStatus emberAfSendCommandMulticastWithCallback (EmberMulticastId multicastId, EmberAfMessageSentFunction callback)
emberAfSendCommandMulticast with attached message sent callback.
N/A | multicastId | |
N/A | callback |
1596
of file app/framework/include/af.h
emberAfSendCommandMulticastToBindings#
EmberStatus emberAfSendCommandMulticastToBindings (void )
Send the command prepared with emberAfFill.... macro.
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.
1609
of file app/framework/include/af.h
emberAfSendCommandUnicast#
EmberStatus emberAfSendCommandUnicast (EmberOutgoingMessageType type, uint16_t indexOrDestination)
Send the command prepared with emberAfFill.... macro.
N/A | type | |
N/A | indexOrDestination |
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.
1617
of file app/framework/include/af.h
emberAfSendCommandUnicastWithCallback#
EmberStatus emberAfSendCommandUnicastWithCallback (EmberOutgoingMessageType type, uint16_t indexOrDestination, EmberAfMessageSentFunction callback)
emberAfSendCommandUnicast with attached message sent callback.
N/A | type | |
N/A | indexOrDestination | |
N/A | callback |
1623
of file app/framework/include/af.h
emberAfSendCommandBroadcast#
EmberStatus emberAfSendCommandBroadcast (EmberNodeId destination)
Send the command prepared with emberAfFill.... macro.
N/A | destination |
This function is used to send a command that was previously prepared using the emberAfFill... macros from the client command API.
1633
of file app/framework/include/af.h
emberAfSendCommandBroadcastWithCallback#
EmberStatus emberAfSendCommandBroadcastWithCallback (EmberNodeId destination, EmberAfMessageSentFunction callback)
emberAfSendCommandBroadcast with attached message sent callback.
N/A | destination | |
N/A | callback |
1638
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.
N/A | destination | |
N/A | alias | |
N/A | sequence | |
N/A | callback |
1644
of file app/framework/include/af.h
emberAfSendCommandBroadcastWithAlias#
EmberStatus emberAfSendCommandBroadcastWithAlias (EmberNodeId destination, EmberNodeId alias, uint8_t sequence)
Send the command prepared with emberAfFill.... macro.
N/A | destination | |
N/A | alias | |
N/A | sequence |
This function is used to send a command that was previously prepared using the emberAfFill... macros from the client command API.
1655
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.
N/A | panId | |
N/A | destinationLongId | |
N/A | destinationShortId | |
N/A | multicastId | |
N/A | profileId |
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.
1668
of file app/framework/include/af.h
emberAfSendDefaultResponse#
EmberStatus emberAfSendDefaultResponse (const EmberAfClusterCommand * cmd, EmberAfStatus status)
Send a default response to a cluster command.
N/A | cmd | The cluster command to which to respond. |
N/A | status | 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.
1685
of file app/framework/include/af.h
emberAfSendDefaultResponseWithCallback#
EmberStatus emberAfSendDefaultResponseWithCallback (const EmberAfClusterCommand * cmd, EmberAfStatus status, EmberAfMessageSentFunction callback)
emberAfSendDefaultResponse with attached message sent callback.
N/A | cmd | |
N/A | status | |
N/A | callback |
1691
of file app/framework/include/af.h
emberAfSendImmediateDefaultResponse#
EmberStatus emberAfSendImmediateDefaultResponse (EmberAfStatus status)
Send a default response to a cluster command using the current command.
N/A | status | 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.
1706
of file app/framework/include/af.h
emberAfSendImmediateDefaultResponseWithCallback#
EmberStatus emberAfSendImmediateDefaultResponseWithCallback (EmberAfStatus status, EmberAfMessageSentFunction callback)
emberAfSendImmediateDefaultResponse with attached message sent callback.
N/A | status | |
N/A | callback |
1711
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.
N/A | type | The outgoing message type. |
N/A | indexOrDestination | 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/A | apsFrame | 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.
1730
of file app/framework/include/af.h
emberAfGetCommandApsFrame#
EmberApsFrame* emberAfGetCommandApsFrame (void )
Access to client API APS frame.
N/A |
1737
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.
N/A | sourceEndpoint | |
N/A | destinationEndpoint |
1742
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.
N/A | target | The destination node ID for the discovery; either a specific node's ID or EMBER_RX_ON_WHEN_IDLE_BROADCAST_ADDRESS. |
N/A | profileId | The application profile for the cluster being discovered. |
N/A | clusterId | The cluster being discovered. |
N/A | serverCluster | 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/A | callback | 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.
1781
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.
N/A | target | The destination node ID for the discovery. This should be a specific node's ID and should not be a broadcast address. |
N/A | targetEndpoint | The endpoint to target with the discovery process. |
N/A | callback | 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.
1801
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.
N/A | shortAddress | |
N/A | callback |
1810
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).
N/A | longAddress | |
N/A | callback |
1818
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.
N/A | target | |
N/A | callback |
1824
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.
N/A | longId | The EUI64 of the remote device. |
N/A | shortId | 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).
1845
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.
N/A | index | The index of the address table entry. |
N/A | longId | The EUI64 of the remote device. |
N/A | shortId | 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.
1867
of file app/framework/include/af.h
emberAfRemoveAddressTableEntry#
EmberStatus emberAfRemoveAddressTableEntry (uint8_t index)
Remove a specific entry from the address table.
N/A | index | 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.
1883
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.
N/A | nodeId | The node ID of the remote device. |
N/A | endpoint | The endpoint on the remote device. |
Returns
::EMBER_SUCCESS if key establishment was initiated successfully
1914
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.
N/A | panId | The PAN ID of the remote device. |
N/A | eui64 | The EUI64 of the remote device. |
Returns
::EMBER_SUCCESS if key establishment was initiated successfully
1924
of file app/framework/include/af.h
emberAfPerformingKeyEstablishment#
bool emberAfPerformingKeyEstablishment (void )
Indicate whether the device is in the process of performing key establishment.
N/A |
Returns
::true if key establishment is in progress.
1932
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.
N/A | target | The node ID of the remote device. |
N/A | endpoint | The key establishment endpoint of the remote device. |
N/A | callback | 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.
1944
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.
N/A |
1963
of file app/framework/include/af.h
sl_zigbee_subscribe_to_zcl_commands#
sl_status_t sl_zigbee_subscribe_to_zcl_commands (uint16_t cluster_id, uint16_t manufacturer_id, uint8_t direction, sl_service_function_t service_function)
Runtime subscription to specific incoming ZCL commands.
N/A | cluster_id | The cluster ID of the ZCL messages to subscribe to. |
N/A | manufacturer_id | The manufacturer ID if any. If not set, a value of 0xFFFF should be passed in. |
N/A | direction | A value of ZCL_DIRECTION_CLIENT_TO_SERVER or ZCL_DIRECTION_SERVER_TO_CLIENT specifying the side (client or server) of the ZCL messages to subscribe to. |
N/A | service_function | A sl_service_function_t function pointer specifying the function to be invoked when an incoming ZCL command matches the criteria specified in this API. |
Returns
A sl_status_t value of:
SL_STATUS_OK - If the subscription was successful.
SL_STATUS_INVALID_PARAMETER - If one or more passed parameters are invalid.
SL_STATUS_ALLOCATION_FAILED - If the system failed to allocate the necessary data structures.
2057
of file app/framework/include/af.h
emberAfFormNetwork#
EmberStatus emberAfFormNetwork (EmberNetworkParameters * parameters)
Form a new network using the specified network parameters.
N/A | parameters | Specification of the new network. |
Returns
An ::EmberStatus value that indicates either the successful formation of the new network or the reason that the network formation failed.
2138
of file app/framework/include/af.h
emberAfJoinNetwork#
EmberStatus emberAfJoinNetwork (EmberNetworkParameters * parameters)
Associate with the network using the specified network parameters.
N/A | parameters | Specification of the network with which the node should associate. |
Returns
An ::EmberStatus value that indicates either that the association process began successfully or the reason for failure.
2148
of file app/framework/include/af.h
emberAfFindUnusedPanIdAndForm#
EmberStatus emberAfFindUnusedPanIdAndForm (void )
Find an unused PAN ID and form a new network.
N/A |
Returns
An ::EmberStatus value that indicates either the process begin successfully or the reason for failure.
2156
of file app/framework/include/af.h
emberAfStartSearchForJoinableNetwork#
EmberStatus emberAfStartSearchForJoinableNetwork (void )
Find a joinable network and join it.
N/A |
Returns
An ::EmberStatus value that indicates either the process begin successfully or the reason for failure.
2162
of file app/framework/include/af.h
emberAfPushNetworkIndex#
EmberStatus emberAfPushNetworkIndex (uint8_t networkIndex)
Set the current network to that of the given index and add it to the stack of networks maintained by the framework. Every call to this API must be paired with a subsequent call to emberAfPopNetworkIndex.
N/A | networkIndex |
2173
of file app/framework/include/af.h
emberAfPushCallbackNetworkIndex#
EmberStatus emberAfPushCallbackNetworkIndex (void )
Set the current network to the callback network and adds it to the stack of networks maintained by the framework. Every call to this API must be paired with a subsequent call to emberAfPopNetworkIndex.
N/A |
2179
of file app/framework/include/af.h
emberAfPushEndpointNetworkIndex#
EmberStatus emberAfPushEndpointNetworkIndex (uint8_t endpoint)
Set the current network to that of the given endpoint and adds it to the stack of networks maintained by the framework. Every call to this API must be paired with a subsequent call to emberAfPopNetworkIndex.
N/A | endpoint |
2185
of file app/framework/include/af.h
emberAfPopNetworkIndex#
EmberStatus emberAfPopNetworkIndex (void )
Remove the topmost network from the stack of networks maintained by the framework and sets the current network to the new topmost network. Every call to this API must be paired with a prior call to emberAfPushNetworkIndex, emberAfPushCallbackNetworkIndex, or emberAfPushEndpointNetworkIndex.
N/A |
2193
of file app/framework/include/af.h
emberAfPrimaryEndpointForNetworkIndex#
uint8_t emberAfPrimaryEndpointForNetworkIndex (uint8_t networkIndex)
Return the primary endpoint of the given network index or 0xFF if no endpoints belong to the network.emberAfStatus.
N/A | networkIndex |
2198
of file app/framework/include/af.h
emberAfPrimaryEndpointForCurrentNetworkIndex#
uint8_t emberAfPrimaryEndpointForCurrentNetworkIndex (void )
Return the primary endpoint of the current network index or 0xFF if no endpoints belong to the current network.
N/A |
2203
of file app/framework/include/af.h
Macro Definition Documentation#
CONFIGURATION_HEADER#
#define CONFIGURATION_HEADERValue:
"app/framework/util/config.h"
25
of file app/framework/include/af.h
ZCL_FRAME_CONTROL_FRAME_TYPE_MASK#
#define ZCL_FRAME_CONTROL_FRAME_TYPE_MASKValue:
(BIT(0) | BIT(1))
2082
of file app/framework/include/af.h
ZCL_CLUSTER_SPECIFIC_COMMAND#
#define ZCL_CLUSTER_SPECIFIC_COMMANDValue:
BIT(0)
2083
of file app/framework/include/af.h
ZCL_PROFILE_WIDE_COMMAND#
#define ZCL_PROFILE_WIDE_COMMANDValue:
0u
2084
of file app/framework/include/af.h
ZCL_GLOBAL_COMMAND#
#define ZCL_GLOBAL_COMMANDValue:
(ZCL_PROFILE_WIDE_COMMAND)
2085
of file app/framework/include/af.h
ZCL_MANUFACTURER_SPECIFIC_MASK#
#define ZCL_MANUFACTURER_SPECIFIC_MASKValue:
BIT(2)
2087
of file app/framework/include/af.h
ZCL_FRAME_CONTROL_DIRECTION_MASK#
#define ZCL_FRAME_CONTROL_DIRECTION_MASKValue:
BIT(3)
2089
of file app/framework/include/af.h
ZCL_FRAME_CONTROL_SERVER_TO_CLIENT#
#define ZCL_FRAME_CONTROL_SERVER_TO_CLIENTValue:
BIT(3)
2090
of file app/framework/include/af.h
ZCL_FRAME_CONTROL_CLIENT_TO_SERVER#
#define ZCL_FRAME_CONTROL_CLIENT_TO_SERVERValue:
0u
2091
of file app/framework/include/af.h
ZCL_DISABLE_DEFAULT_RESPONSE_MASK#
#define ZCL_DISABLE_DEFAULT_RESPONSE_MASKValue:
BIT(4)
2093
of file app/framework/include/af.h
ZCL_DIRECTION_CLIENT_TO_SERVER#
#define ZCL_DIRECTION_CLIENT_TO_SERVERValue:
0u
2096
of file app/framework/include/af.h
ZCL_DIRECTION_SERVER_TO_CLIENT#
#define ZCL_DIRECTION_SERVER_TO_CLIENTValue:
1u
2097
of file app/framework/include/af.h
EMBER_AF_ZCL_OVERHEAD#
#define EMBER_AF_ZCL_OVERHEADValue:
3
2103
of file app/framework/include/af.h
EMBER_AF_ZCL_MANUFACTURER_SPECIFIC_OVERHEAD#
#define EMBER_AF_ZCL_MANUFACTURER_SPECIFIC_OVERHEADValue:
5
2104
of file app/framework/include/af.h
FIND_AND_JOIN_MODE_ALLOW_2_4_GHZ#
#define FIND_AND_JOIN_MODE_ALLOW_2_4_GHZValue:
BIT(0)
2107
of file app/framework/include/af.h
FIND_AND_JOIN_MODE_ALLOW_SUB_GHZ#
#define FIND_AND_JOIN_MODE_ALLOW_SUB_GHZValue:
BIT(1)
2108
of file app/framework/include/af.h
FIND_AND_JOIN_MODE_ALLOW_BOTH#
#define FIND_AND_JOIN_MODE_ALLOW_BOTHValue:
(FIND_AND_JOIN_MODE_ALLOW_2_4_GHZ | FIND_AND_JOIN_MODE_ALLOW_SUB_GHZ)
2109
of file app/framework/include/af.h
emberAfMaxPowerLevel#
#define emberAfMaxPowerLevelValue:
()
The maximum power level that can be used by the chip.
2230
of file app/framework/include/af.h