Modules#
EmberZNet API for accessing and setting stack information. See Stack Information for documentation.
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_STACK_INFO_H
#define SILABS_STACK_INFO_H
void emberStackStatusHandler(EmberStatus status);
EmberNetworkStatus emberNetworkState(void);
bool emberStackIsUp(void);
EmberStatus emberWriteNodeData(bool erase);
uint32_t emberMsToNextStackEvent(void);
void emberSetPowerDescriptor(uint16_t descriptor);
#ifdef DOXYGEN_SHOULD_SKIP_THIS
EmberEUI64 emberGetEui64(void);
bool emberIsLocalEui64(EmberEUI64 eui64);
EmberNodeId emberGetNodeId(void);
EmberNodeId emberRadioGetNodeId(void);
void emberSetManufacturerCode(uint16_t code);
void emberSetMaximumIncomingTransferSize(uint16_t size);
void emberSetMaximumOutgoingTransferSize(uint16_t size);
void emberSetDescriptorCapability(uint8_t capability);
#else // Doxygen ignores the following
extern EmberEUI64 emLocalEui64;
#define emberGetEui64() (emLocalEui64)
#define emberIsLocalEui64(eui64) \
(MEMCOMPARE((eui64), emLocalEui64, EUI64_SIZE) == 0)
EmberNodeId emberGetNodeId(void);
EmberNodeId emberRadioGetNodeId(void);
extern uint16_t emManufacturerCode;
extern uint16_t emPowerDescriptor;
extern uint16_t emMaximumIncomingTransferSize;
extern uint16_t emMaximumOutgoingTransferSize;
extern uint8_t emDescriptorCapability;
enum {
EMBER_ROUTE_ERROR_NO_ROUTE_AVAILABLE = 0x00,
EMBER_ROUTE_ERROR_TREE_LINK_FAILURE = 0x01,
EMBER_ROUTE_ERROR_NON_TREE_LINK_FAILURE = 0x02,
EMBER_ROUTE_ERROR_LOW_BATTERY_LEVEL = 0x03,
EMBER_ROUTE_ERROR_NO_ROUTING_CAPACITY = 0x04,
EMBER_ROUTE_ERROR_NO_INDIRECT_CAPACITY = 0x05,
EMBER_ROUTE_ERROR_INDIRECT_TRANSACTION_EXPIRY = 0x06,
EMBER_ROUTE_ERROR_TARGET_DEVICE_UNAVAILABLE = 0x07,
EMBER_ROUTE_ERROR_TARGET_ADDRESS_UNALLOCATED = 0x08,
EMBER_ROUTE_ERROR_PARENT_LINK_FAILURE = 0x09,
EMBER_ROUTE_ERROR_VALIDATE_ROUTE = 0x0A,
EMBER_ROUTE_ERROR_SOURCE_ROUTE_FAILURE = 0x0B,
EMBER_ROUTE_ERROR_MANY_TO_ONE_ROUTE_FAILURE = 0x0C,
EMBER_ROUTE_ERROR_ADDRESS_CONFLICT = 0x0D,
EMBER_ROUTE_ERROR_VERIFY_ADDRESSES = 0x0E,
EMBER_ROUTE_ERROR_PAN_IDENTIFIER_UPDATE = 0x0F,
ZIGBEE_NETWORK_STATUS_NETWORK_ADDRESS_UPDATE = 0x10,
ZIGBEE_NETWORK_STATUS_BAD_FRAME_COUNTER = 0x11,
ZIGBEE_NETWORK_STATUS_BAD_KEY_SEQUENCE_NUMBER = 0x12,
ZIGBEE_NETWORK_STATUS_UNKNOWN_COMMAND = 0x13
};
EmberStatus emberSetBrokenRouteErrorCode(uint8_t errorCode);
#define emberSetManufacturerCode(code) \
(emManufacturerCode = (code))
#define emberSetMaximumIncomingTransferSize(size) \
(emMaximumIncomingTransferSize = (size))
#define emberSetMaximumOutgoingTransferSize(size) \
(emMaximumOutgoingTransferSize = (size))
#define emberSetDescriptorCapability(capability) \
(emDescriptorCapability = (capability))
#endif
EmberStatus emberGetNetworkParameters(EmberNetworkParameters *parameters);
EmberStatus emberGetRadioParameters(uint8_t phyIndex, EmberMultiPhyRadioParameters *parameters);
EmberStatus emberGetNodeType(EmberNodeType *resultLocation);
EmberStatus emberSetRadioChannel(uint8_t channel);
EmberStatus emberSetLogicalAndRadioChannel(uint8_t channel);
uint8_t emberGetRadioChannel(void);
EmberStatus emberSetRadioPower(int8_t power);
int8_t emberGetRadioPower(void);
void *emberGetRailHandle(void);
EmberPanId emberGetPanId(void);
EmberPanId emberRadioGetPanId(void);
EmberStatus emberSetRadioIeee802154CcaMode(uint8_t ccaMode);
void emberGetExtendedPanId(uint8_t *resultLocation);
extern const uint8_t emberStackProfileId[];
typedef struct {
uint16_t profileId;
uint16_t deviceId;
uint8_t deviceVersion;
uint8_t inputClusterCount;
uint8_t outputClusterCount;
} EmberEndpointDescription;
typedef struct {
uint8_t endpoint;
EmberEndpointDescription const * description;
uint16_t const * inputClusterList;
uint16_t const * outputClusterList;
} EmberEndpoint;
extern uint8_t emberEndpointCount;
extern EmberEndpoint emberEndpoints[];
uint8_t emberGetEndpoint(uint8_t index);
bool emberGetEndpointDescription(uint8_t endpoint,
EmberEndpointDescription *result);
uint16_t emberGetEndpointCluster(uint8_t endpoint,
EmberClusterListId listId,
uint8_t listIndex);
#ifdef DOXYGEN_SHOULD_SKIP_THIS
bool emberIsNodeIdValid(EmberNodeId nodeId);
#else
#define emberIsNodeIdValid(nodeId) ((nodeId) < EMBER_DISCOVERY_ACTIVE_NODE_ID)
#endif
EmberNodeId emberLookupNodeIdByEui64(EmberEUI64 eui64);
EmberStatus emberLookupEui64ByNodeId(EmberNodeId nodeId,
EmberEUI64 eui64Return);
void emberCounterHandler(EmberCounterType type, EmberCounterInfo info);
bool emberCounterRequiresPhyIndex(EmberCounterType type);
bool emberCounterRequiresDestinationNodeId(EmberCounterType type);
void emberStackTokenChangedHandler(uint16_t tokenAddress);
bool emberRtosIdleHandler(uint32_t *idleTimeMs);
void emberRtosStackWakeupIsrHandler(void);
EmberStatus emberGetNeighbor(uint8_t index, EmberNeighborTableEntry *result);
EmberStatus emberSetRoutingShortcutThreshold(uint8_t costThresh);
uint8_t emberGetRoutingShortcutThreshold(void);
EmberStatus emberSetInitialNeighborOutgoingCost(uint8_t cost);
uint8_t emberGetInitialNeighborOutgoingCost(void);
void emberResetRejoiningNeighborsFC(bool reset);
bool emberIsResetRejoiningNeighborsFCEnabled(void);
EmberStatus emberGetNeighborFrameCounter(EmberEUI64 nodeEui64,
uint32_t *returnFrameCounter);
EmberStatus emberSetNeighborFrameCounter(EmberEUI64 nodeEui64,
uint32_t frameCounter);
EmberStatus emberGetRouteTableEntry(uint8_t index, EmberRouteTableEntry *result);
uint8_t emberStackProfile(void);
uint8_t emberSecurityLevel(void);
#ifdef DOXYGEN_SHOULD_SKIP_THIS
uint8_t emberTreeDepth(void);
#endif
uint8_t emberNeighborCount(void);
#ifdef DOXYGEN_SHOULD_SKIP_THIS
uint8_t emberRouteTableSize(void);
#else // Doxgyen ignores the following
// The '+ 0' prevents anyone from accidentally assigning to these.
#define emberTreeDepth() (emTreeDepth + 0)
#define emberMaxDepth() (emMaxDepth + 0)
#define emberRouteTableSize() (emRouteTableSize + 0)
extern uint8_t emDefaultSecurityLevel;
extern uint8_t emMaxHops;
extern uint8_t emRouteTableSize;
extern uint8_t emSourceRouteTableSize;
extern uint8_t emMaxDepth; // The maximum tree depth.
extern uint8_t emTreeDepth; // The current depth.
extern uint8_t emEndDeviceConfiguration;
void emberSetStackProfile(uint8_t stackProfile);
void emberSetSecurityLevel(uint8_t securityLevel);
#endif
uint8_t emberNextZigbeeSequenceNumber(void);
uint8_t emberGetMaxNwkRetries(void);
EmberStatus emberSetTxPowerMode(uint16_t txPowerMode);
uint16_t emberGetTxPowerMode(void);
EmberStatus emberSetNodeId(EmberNodeId nodeId);
uint8_t emberGetPhyInterfaceCount(void);
void emberRadioNeedsCalibratingHandler(void);
void sl_mac_calibrate_current_channel(void);
//General connectivity status APIs
void emberSetLongUpTime(bool hasLongUpTime);
void emberSetHubConnectivity(bool connected);
bool emberIsUpTimeLong(void);
bool emberIsHubConnected(void);
EmberStatus emberRadioGetSchedulerPriorities(EmberMultiprotocolPriorities *priorities);
EmberStatus emberRadioSetSchedulerPriorities(const EmberMultiprotocolPriorities *priorities);
EmberStatus emberRadioSetSchedulerSliptime(uint32_t slipTime);
EmberStatus emberRadioGetSchedulerSliptime(uint32_t *slipTime);
EmberStatus emberGetBeaconClassificationParams(EmberBeaconClassificationParams* param);
EmberStatus emberSetBeaconClassificationParams(EmberBeaconClassificationParams* param);
EmberStatus slx_zigbee_routing_set_route_record_policy(sl_zigbee_route_record_policy_type_t policy);
uint8_t slx_zigbee_routing_get_route_record_policy(void);
uint8_t emberGetTokenCount(void);
EmberStatus emberGetTokenInfo(uint8_t index,
EmberTokenInfo *tokenInfo);
EmberStatus emberGetTokenData(uint32_t token,
uint32_t index,
EmberTokenData *tokenData);
EmberStatus emberSetTokenData(uint32_t token,
uint32_t index,
EmberTokenData *tokenData);
#endif // SILABS_STACK_INFO_H
Radio-specific Functions#
Enable boost power mode and/or the alternate transmit path.
Return the current configuration of boost power mode and alternate transmitter output.
Set the short node ID of the node. Notice that it can only be set if the stack is in the INITAL state.
Return the number of PHY interfaces present.
The radio calibration callback function.
Calibrate the current channel. The stack will notify the application of the need for channel calibration via the emberRadioNeedsCalibratingHandler() callback function during emberTick(). This function should only be called from within the context of the emberRadioNeedsCalibratingHandler() callback function. Calibration can take up to 150 ms. Note if this function is called when the radio is off, it will turn the radio on and leave it on.
Set the device uptime to be long or short the uptime is then advertised in the beacons.
Set the hub connectivity to be true or false the hub connectivity is then advertised in the beacons.
Get the current scheduler priorities used for Zigbee multiprotocol operations.
Set the current scheduler priorities used for Zigbee multiprotocol operations.
Set the multiprotocol slip time.
Get the multiprotocol slip time.
Variables#
The application must provide a definition for this variable.
The application must provide a definition for this variable.
If emberEndpointCount is nonzero, the application must provide descriptions for each endpoint.
Functions#
A callback invoked when the status of the stack changes. If the status parameter equals EMBER_NETWORK_UP, the emberGetNetworkParameters() function can be called to get the new network parameters. If any of the parameters are stored in nonvolatile memory by the application, the stored values should be updated.
Return the current join status.
Indicate whether the stack is currently up.
Write node data to the stack token.
Check when the next stack event is scheduled to run.
Set the power descriptor to the specified value. The power descriptor is a dynamic value, therefore this function should be called whenever the value changes.
Return the EUI64 ID of the local node.
Determine whether eui64
is the local node's EUI64 ID.
Return the 16-bit node ID of local node on the current logical network.
Return the 16-bit node ID of local node on the network it is currently tuned on.
Set the manufacturer code to the specified value. The manufacturer code is one of the fields of the node descriptor.
Set the maximum incoming transfer size to the specified value. The maximum incoming transfer size is one of the fields of the node descriptor.
Set the maximum outgoing transfer size to the specified value. The maximum outgoing transfer size is one of the fields of the node descriptor.
Set the descriptor capability field of the node.
Copy the current network parameters into the structure provided by the caller.
Copy the current radio parameters into the structure provided by the caller.
Copy the current node type into the location provided by the caller.
Set the channel to use for sending and receiving messages on the current logical network. For a list of available radio channels, see the technical specification for the RF communication module in your Developer Kit.
Set the current logical and physical channel.
Get the radio channel to which a node is set on the current logical network. The possible return values depend on the radio in use. For a list of available radio channels, see the technical specification for the RF communication module in your Developer Kit.
Set the radio output power at which a node is to operate for the current logical network. Ember radios have discrete power settings. For a list of available power settings, see the technical specification for the RF communication module in your Developer Kit. Note that using this API on a running network will directly impact the established link qualities which the neighboring nodes have with the node on which it is called. This can lead to disruption of existing routes and erratic network behavior. Note that, if the requested power level is not available on a given radio, this function will use the next higher available power level.
Get the radio output power of the current logical network at which a node is operating. Ember radios have discrete power settings. For a list of available power settings, see the technical specification for the RF communication module in your Developer Kit.
Return the RAIL level handle required to make RAIL API calls. Will return NULL if RAIL is not in use.
Return the local node's PAN ID of the current logical network.
Return the local node's PAN ID of the current radio network.
Set the configured 802.15.4 CCA mode in the radio. For a list of CCA modes, please refer to RAIL documentation regarding RAIL_IEEE802154_CcaMode_t.
Fetch a node's 8 byte Extended PAN identifier. If this is called when a device is not currently on a network (see emberNetworkState), the Extended PAN ID returned will be an invalid value.
Retrieve the endpoint number for the index'th endpoint. index
must be less than the value of emberEndpointCount.
Retrieve the endpoint description for the given endpoint.
Retrieve a cluster ID from one of the cluster lists associated with the given endpoint.
Determine whether nodeId
is valid.
Return the node ID that corresponds to the specified EUI64. The node ID is found by searching through all stack tables for the specified EUI64.
Return the EUI64 that corresponds to the specified node ID. The EUI64 is found by searching through all stack tables for the specified node ID.
A callback invoked to inform the application of the occurrence of an event defined by EmberCounterType, for example, transmissions and receptions at different layers of the stack.
A callback invoked to inform the application that a stack token has changed.
A callback to allow the application to manage idling the MCU.
A callback to request the application to wake up the stack task.
Copy a neighbor table entry to the structure that result
points to. Neighbor table entries are stored in ascending order by node ID, with all unused entries at the end of the table. The number of active neighbors can be obtained using emberNeighborCount().
Set the routing shortcut threshold to directly use a neighbor instead of performing routing.
Get the routing shortcut threshold used to separate between directly using a neighbor vs. performing routing.
Set neighbor's initial outgoing link cost.
Get neighbor's initial outgoing link cost.
Indicate whether a rejoining neighbor's incoming FC should be reset.
Check whether resetting the incoming FC for a rejoining neighbor is enabled.
Get the last received frame counter as found in the Network Auxiliary header for the specified neighbor or child.
Set the frame counter for the specified neighbor or child.
Copy a route table entry to the structure that the result
points to. Unused route table entries have a destination of 0xFFFF. The route table size can be obtained via emberRouteTableSize().
Return the stack profile of the network which the node has joined.
Return the security level of the network which the node has joined.
Return the depth of the node in the network.
Return the number of active entries in the neighbor table.
Return the size of the route table.
Increment and returns the Zigbee sequence number.
Get maximum number of NWK retries.
Get current beacon classification parameter settings.
Set current beacon classification parameters.
Set the route record policy.
Get the route record policy.
Get the total count of the tokens configured.
Get information of a token by providing the index.
Get token data by providing the token key and index for the indexed token.
Set token data by providing the token key, index for an indexed token and token data.
Radio-specific Functions Documentation#
emberSetTxPowerMode#
EmberStatus emberSetTxPowerMode (uint16_t txPowerMode)
Enable boost power mode and/or the alternate transmit path.
N/A | txPowerMode | Specifies which transmit power mode options should be activated. This parameter should be set to one of the literal values described in stack/include/ember-types.h. Any power option not specified in the txPowerMode parameter will be deactivated. |
Boost power mode is a high-performance radio mode, which offers increased transmit power and receive sensitivity at the cost of an increase in power consumption. emberInit() calls this function using the power mode and transmitter output settings as specified in the MFG_PHY_CONFIG token (with each bit inverted so that the default token value of 0xffff corresponds to normal power mode and bi-directional RF transmitter output). The application only needs to call emberSetTxPowerMode() to use a power mode or transmitter output setting different than specified in the MFG_PHY_CONFIG token. After the initial call to emberSetTxPowerMode(), the stack will automatically maintain the specified power mode configuration across sleep/wake cycles.
Returns
EMBER_SUCCESS if successful; an error code otherwise.
764
of file stack/include/stack-info.h
emberGetTxPowerMode#
uint16_t emberGetTxPowerMode (void )
Return the current configuration of boost power mode and alternate transmitter output.
N/A |
Returns
The current TX power mode.
771
of file stack/include/stack-info.h
emberSetNodeId#
EmberStatus emberSetNodeId (EmberNodeId nodeId)
Set the short node ID of the node. Notice that it can only be set if the stack is in the INITAL state.
N/A | nodeId | Specifies the short ID to be assigned to the node. |
Returns
EMBER_SUCCESS if successful; an error code otherwise.
780
of file stack/include/stack-info.h
emberGetPhyInterfaceCount#
uint8_t emberGetPhyInterfaceCount (void )
Return the number of PHY interfaces present.
N/A |
Returns
The number of PHY interface(s).
786
of file stack/include/stack-info.h
emberRadioNeedsCalibratingHandler#
void emberRadioNeedsCalibratingHandler (void )
The radio calibration callback function.
N/A |
The Voltage Controlled Oscillator (VCO) can drift with temperature changes. During every call to emberTick(), the stack will check to see if the VCO has drifted. If the VCO has drifted, the stack will call emberRadioNeedsCalibratingHandler() to inform the application that it should perform calibration of the current channel as soon as possible. Calibration can take up to 150 ms. The default callback function implementation provided here performs the calibration immediately. The application can define its own callback by defining ::EMBER_APPLICATION_HAS_CUSTOM_RADIO_CALIBRATION_CALLBACK in its CONFIGURATION_HEADER. It can then failsafe any critical processes or peripherals before calling ::emberCalibrateCurrentChannel(). The application must call ::emberCalibrateCurrentChannel() in response to this callback to maintain expected radio performance.
804
of file stack/include/stack-info.h
sl_mac_calibrate_current_channel#
void sl_mac_calibrate_current_channel (void )
Calibrate the current channel. The stack will notify the application of the need for channel calibration via the emberRadioNeedsCalibratingHandler() callback function during emberTick(). This function should only be called from within the context of the emberRadioNeedsCalibratingHandler() callback function. Calibration can take up to 150 ms. Note if this function is called when the radio is off, it will turn the radio on and leave it on.
N/A |
814
of file stack/include/stack-info.h
emberSetLongUpTime#
void emberSetLongUpTime (bool hasLongUpTime)
Set the device uptime to be long or short the uptime is then advertised in the beacons.
N/A | hasLongUpTime |
821
of file stack/include/stack-info.h
emberSetHubConnectivity#
void emberSetHubConnectivity (bool connected)
Set the hub connectivity to be true or false the hub connectivity is then advertised in the beacons.
N/A | connected |
826
of file stack/include/stack-info.h
emberIsUpTimeLong#
bool emberIsUpTimeLong (void )
N/A |
Returns
True if device uptime is long, false otherwise
830
of file stack/include/stack-info.h
emberIsHubConnected#
bool emberIsHubConnected (void )
N/A |
Returns
True if there is hub connectivity, false otherwise
834
of file stack/include/stack-info.h
emberRadioGetSchedulerPriorities#
EmberStatus emberRadioGetSchedulerPriorities (EmberMultiprotocolPriorities * priorities)
Get the current scheduler priorities used for Zigbee multiprotocol operations.
N/A | priorities | A pointer to a structure to store the current priorities in. This must not be NULL. |
Returns
EMBER_SUCCESS if called in a multiprotocol app and EMBER_INVALID_CALL otherwise.
For more details on what these priorities are and how to use them see UG305, the Dynamic Multiprotocol User Guide.
847
of file stack/include/stack-info.h
emberRadioSetSchedulerPriorities#
EmberStatus emberRadioSetSchedulerPriorities (const EmberMultiprotocolPriorities * priorities)
Set the current scheduler priorities used for Zigbee multiprotocol operations.
N/A | priorities | A pointer to a structure of the new priorities to use. This must not be NULL. |
Returns
EMBER_SUCCESS if called in a multiprotocol app and EMBER_INVALID_CALL otherwise.
For more details on what these priorities are and how to use them see UG305, the Dynamic Multiprotocol User Guide.
860
of file stack/include/stack-info.h
emberRadioSetSchedulerSliptime#
EmberStatus emberRadioSetSchedulerSliptime (uint32_t slipTime)
Set the multiprotocol slip time.
N/A | slipTime | The value to set the slip time to for each transmit. |
Returns
EMBER_SUCCESS if called in a multiprotocol app and EMBER_INVALID_CALL otherwise.
Use this to update the slip time passed to the radio scheduler for each transmit from the PHY layer. The smaller this is set the lower the potential multi-protocol induced latency is, but it makes packets more likely to fail to be transmitted. For more details on slip time see UG305.
873
of file stack/include/stack-info.h
emberRadioGetSchedulerSliptime#
EmberStatus emberRadioGetSchedulerSliptime (uint32_t * slipTime)
Get the multiprotocol slip time.
N/A | slipTime | A pointer to the place to store the current slip time |
Returns
EMBER_SUCCESS if called in a multiprotocol app and EMBER_INVALID_CALL otherwise.
Use this to get the current value of the multiprotocol slip time used for each transmit at the PHY layer. For more details on slip time see UG305.
884
of file stack/include/stack-info.h
Variable Documentation#
emberStackProfileId#
const uint8_t emberStackProfileId[]
The application must provide a definition for this variable.
365
of file stack/include/stack-info.h
emberEndpointCount#
uint8_t emberEndpointCount
The application must provide a definition for this variable.
402
of file stack/include/stack-info.h
emberEndpoints#
EmberEndpoint emberEndpoints[]
If emberEndpointCount is nonzero, the application must provide descriptions for each endpoint.
This can be done either by providing a definition of emberEndpoints or by providing definitions of emberGetEndpoint(), emberGetEndpointDescription() and emberGetEndpointCluster(). Using the array is often simpler, but consumes large amounts of memory if emberEndpointCount is large.
If the application provides definitions for the three functions, it must define EMBER_APPLICATION_HAS_GET_ENDPOINT in its CONFIGURATION_HEADER.
417
of file stack/include/stack-info.h
Function Documentation#
emberStackStatusHandler#
void emberStackStatusHandler (EmberStatus status)
A callback invoked when the status of the stack changes. If the status parameter equals EMBER_NETWORK_UP, the emberGetNetworkParameters() function can be called to get the new network parameters. If any of the parameters are stored in nonvolatile memory by the application, the stored values should be updated.
N/A | status | Stack status. One of the following: |
The application is free to begin messaging after it receives the EMBER_NETWORK_UP status. However, routes discovered immediately after the stack comes up may be suboptimal because the routes are based on the neighbor table's information about two-way links with neighboring nodes, which is obtained from periodic ZigBee Link Status messages. It can take two or three link status exchange periods (of 16 seconds each) before the neighbor table has a good estimate of link quality to neighboring nodes. Therefore, the application may improve the quality of initially discovered routes by waiting after startup to give the neighbor table time to be populated.
64
of file stack/include/stack-info.h
emberNetworkState#
EmberNetworkStatus emberNetworkState (void )
Return the current join status.
N/A |
Returns a value indicating whether the node is joining, joined to, or leaving a network.
Returns
An EmberNetworkStatus value indicating the current join status.
73
of file stack/include/stack-info.h
emberStackIsUp#
bool emberStackIsUp (void )
Indicate whether the stack is currently up.
N/A |
Returns true if the stack is joined to a network and ready to send and receive messages. This reflects only the state of the local node; it does not indicate whether other nodes are able to communicate with this node.
Returns
True if the stack is up, false otherwise.
84
of file stack/include/stack-info.h
emberWriteNodeData#
EmberStatus emberWriteNodeData (bool erase)
Write node data to the stack token.
N/A | erase | Indicates whether the node type should be erased. |
Returns
The status of the operation and an error code if unsuccessful.
92
of file stack/include/stack-info.h
emberMsToNextStackEvent#
uint32_t emberMsToNextStackEvent (void )
Check when the next stack event is scheduled to run.
N/A |
Returns
Returns the number of milliseconds before the next stack event is scheduled to run.
100
of file stack/include/stack-info.h
emberSetPowerDescriptor#
void emberSetPowerDescriptor (uint16_t descriptor)
Set the power descriptor to the specified value. The power descriptor is a dynamic value, therefore this function should be called whenever the value changes.
N/A | descriptor | The new power descriptor for the local node. |
108
of file stack/include/stack-info.h
emberGetEui64#
EmberEUI64 emberGetEui64 (void )
Return the EUI64 ID of the local node.
N/A |
Returns
The 64-bit ID.
115
of file stack/include/stack-info.h
emberIsLocalEui64#
bool emberIsLocalEui64 (EmberEUI64 eui64)
Determine whether eui64
is the local node's EUI64 ID.
N/A | eui64 | An EUI64 ID. |
Returns
True if
eui64
is the local node's ID, otherwise false.
123
of file stack/include/stack-info.h
emberGetNodeId#
EmberNodeId emberGetNodeId (void )
Return the 16-bit node ID of local node on the current logical network.
N/A |
Returns
The 16-bit ID.
130
of file stack/include/stack-info.h
emberRadioGetNodeId#
EmberNodeId emberRadioGetNodeId (void )
Return the 16-bit node ID of local node on the network it is currently tuned on.
N/A |
Returns
The 16-bit ID.
137
of file stack/include/stack-info.h
emberSetManufacturerCode#
void emberSetManufacturerCode (uint16_t code)
Set the manufacturer code to the specified value. The manufacturer code is one of the fields of the node descriptor.
N/A | code | The manufacturer code for the local node. |
144
of file stack/include/stack-info.h
emberSetMaximumIncomingTransferSize#
void emberSetMaximumIncomingTransferSize (uint16_t size)
Set the maximum incoming transfer size to the specified value. The maximum incoming transfer size is one of the fields of the node descriptor.
N/A | size | The maximum incoming transfer size for the local node. |
152
of file stack/include/stack-info.h
emberSetMaximumOutgoingTransferSize#
void emberSetMaximumOutgoingTransferSize (uint16_t size)
Set the maximum outgoing transfer size to the specified value. The maximum outgoing transfer size is one of the fields of the node descriptor.
N/A | size | The maximum outgoing transfer size for the local node. |
160
of file stack/include/stack-info.h
emberSetDescriptorCapability#
void emberSetDescriptorCapability (uint8_t capability)
Set the descriptor capability field of the node.
N/A | capability | The descriptor capability of the local node. |
166
of file stack/include/stack-info.h
emberGetNetworkParameters#
EmberStatus emberGetNetworkParameters (EmberNetworkParameters * parameters)
Copy the current network parameters into the structure provided by the caller.
N/A | parameters | A pointer to an EmberNetworkParameters value into which the current network parameters will be copied. |
Returns
An EmberStatus value indicating the success or failure of the command.
239
of file stack/include/stack-info.h
emberGetRadioParameters#
EmberStatus emberGetRadioParameters (uint8_t phyIndex, EmberMultiPhyRadioParameters * parameters)
Copy the current radio parameters into the structure provided by the caller.
N/A | phyIndex | The index of the PHY interface for radio parameters.
|
N/A | parameters |
Returns
An EmberStatus value indicating the success or failure of the command.
254
of file stack/include/stack-info.h
emberGetNodeType#
EmberStatus emberGetNodeType (EmberNodeType * resultLocation)
Copy the current node type into the location provided by the caller.
N/A | resultLocation | A pointer to an EmberNodeType value into which the current node type will be copied. |
Returns
An EmberStatus value that indicates the success or failure of the command.
265
of file stack/include/stack-info.h
emberSetRadioChannel#
EmberStatus emberSetRadioChannel (uint8_t channel)
Set the channel to use for sending and receiving messages on the current logical network. For a list of available radio channels, see the technical specification for the RF communication module in your Developer Kit.
N/A | channel | The desired radio channel. |
Note: When using this API, all devices on a network must use the same channel.
Returns
An EmberStatus value indicating the success or failure of the command.
280
of file stack/include/stack-info.h
emberSetLogicalAndRadioChannel#
EmberStatus emberSetLogicalAndRadioChannel (uint8_t channel)
Set the current logical and physical channel.
N/A | channel |
285
of file stack/include/stack-info.h
emberGetRadioChannel#
uint8_t emberGetRadioChannel (void )
Get the radio channel to which a node is set on the current logical network. The possible return values depend on the radio in use. For a list of available radio channels, see the technical specification for the RF communication module in your Developer Kit.
N/A |
Returns
The current radio channel.
294
of file stack/include/stack-info.h
emberSetRadioPower#
EmberStatus emberSetRadioPower (int8_t power)
Set the radio output power at which a node is to operate for the current logical network. Ember radios have discrete power settings. For a list of available power settings, see the technical specification for the RF communication module in your Developer Kit. Note that using this API on a running network will directly impact the established link qualities which the neighboring nodes have with the node on which it is called. This can lead to disruption of existing routes and erratic network behavior. Note that, if the requested power level is not available on a given radio, this function will use the next higher available power level.
N/A | power | A desired radio output power, in dBm. |
Returns
An EmberStatus value indicating the success or failure of the command. Failure indicates that the requested power level is out of range.
313
of file stack/include/stack-info.h
emberGetRadioPower#
int8_t emberGetRadioPower (void )
Get the radio output power of the current logical network at which a node is operating. Ember radios have discrete power settings. For a list of available power settings, see the technical specification for the RF communication module in your Developer Kit.
N/A |
Returns
The current radio output power, in dBm.
322
of file stack/include/stack-info.h
emberGetRailHandle#
void* emberGetRailHandle (void )
Return the RAIL level handle required to make RAIL API calls. Will return NULL if RAIL is not in use.
N/A |
Returns
A RAIL handle
329
of file stack/include/stack-info.h
emberGetPanId#
EmberPanId emberGetPanId (void )
Return the local node's PAN ID of the current logical network.
N/A |
Returns
A PAN ID.
335
of file stack/include/stack-info.h
emberRadioGetPanId#
EmberPanId emberRadioGetPanId (void )
Return the local node's PAN ID of the current radio network.
N/A |
Returns
A PAN ID.
341
of file stack/include/stack-info.h
emberSetRadioIeee802154CcaMode#
EmberStatus emberSetRadioIeee802154CcaMode (uint8_t ccaMode)
Set the configured 802.15.4 CCA mode in the radio. For a list of CCA modes, please refer to RAIL documentation regarding RAIL_IEEE802154_CcaMode_t.
N/A | ccaMode | A RAIL_IEEE802154_CcaMode_t value |
Returns
EMBER_SUCCESS upon success, EMBER_ERR_FATAL otherwise.
Note
The default CCA mode for Zigbee is RAIL_IEEE802154_CCA_MODE_RSSI.
As mentioned in the RAIL documentation, on platforms that don't support different CCA modes, a call to this function will do nothing.
356
of file stack/include/stack-info.h
emberGetExtendedPanId#
void emberGetExtendedPanId (uint8_t * resultLocation)
Fetch a node's 8 byte Extended PAN identifier. If this is called when a device is not currently on a network (see emberNetworkState), the Extended PAN ID returned will be an invalid value.
N/A | resultLocation |
362
of file stack/include/stack-info.h
emberGetEndpoint#
uint8_t emberGetEndpoint (uint8_t index)
Retrieve the endpoint number for the index'th endpoint. index
must be less than the value of emberEndpointCount.
N/A | index | The index of an endpoint (as distinct from its endpoint number). This must be less than the value of emberEndpointCount. |
This function is provided by the stack, using the data from emberEndpoints, unless the application defines EMBER_APPLICATION_HAS_GET_ENDPOINT in its CONFIGURATION_HEADER.
Returns
The endpoint number for the index'th endpoint.
432
of file stack/include/stack-info.h
emberGetEndpointDescription#
bool emberGetEndpointDescription (uint8_t endpoint, EmberEndpointDescription * result)
Retrieve the endpoint description for the given endpoint.
N/A | endpoint | The endpoint whose description is to be returned. |
N/A | result | A pointer to the location to which to copy the endpoint description. |
This function is provided by the stack, using the data from emberEndpoints, unless the application defines ::EMBER_APPLICATION_HAS_GET_ENDPOINT in its ::CONFIGURATION_HEADER.
Returns
True if the description was copied to result, or false if the endpoint is not active.
449
of file stack/include/stack-info.h
emberGetEndpointCluster#
uint16_t emberGetEndpointCluster (uint8_t endpoint, EmberClusterListId listId, uint8_t listIndex)
Retrieve a cluster ID from one of the cluster lists associated with the given endpoint.
N/A | endpoint | The endpoint from which the cluster ID is to be read. |
N/A | listId | The list from which the cluster ID is to be read. |
N/A | listIndex | The index of the desired cluster ID in the list. This value must be less than the length of the list. The length can be found in the EmberEndpointDescription for this endpoint. |
This function is provided by the stack, using the data from emberEndpoints, unless the application defines ::EMBER_APPLICATION_HAS_GET_ENDPOINT in its CONFIGURATION_HEADER.
Returns
The cluster ID at position listIndex in the specified endpoint cluster list.
470
of file stack/include/stack-info.h
emberIsNodeIdValid#
bool emberIsNodeIdValid (EmberNodeId nodeId)
Determine whether nodeId
is valid.
N/A | nodeId | A node ID. |
Returns
True if
nodeId
is valid, false otherwise.
481
of file stack/include/stack-info.h
emberLookupNodeIdByEui64#
EmberNodeId emberLookupNodeIdByEui64 (EmberEUI64 eui64)
Return the node ID that corresponds to the specified EUI64. The node ID is found by searching through all stack tables for the specified EUI64.
N/A | eui64 | The EUI64 of the node to look up. |
Returns
The short ID of the node or EMBER_NULL_NODE_ID if the short ID is not known.
495
of file stack/include/stack-info.h
emberLookupEui64ByNodeId#
EmberStatus emberLookupEui64ByNodeId (EmberNodeId nodeId, EmberEUI64 eui64Return)
Return the EUI64 that corresponds to the specified node ID. The EUI64 is found by searching through all stack tables for the specified node ID.
N/A | nodeId | The short ID of the node to look up. |
N/A | eui64Return | The EUI64 of the node is copied here if it is known. |
Returns
An EmberStatus value:
EMBER_SUCCESS - eui64Return has been set to the EUI64 of the node.
EMBER_ERR_FATAL - The EUI64 of the node is not known.
509
of file stack/include/stack-info.h
emberCounterHandler#
void emberCounterHandler (EmberCounterType type, EmberCounterInfo info)
A callback invoked to inform the application of the occurrence of an event defined by EmberCounterType, for example, transmissions and receptions at different layers of the stack.
N/A | type | Type of the event. |
N/A | info | could map to:
|
The application must define ::EMBER_APPLICATION_HAS_COUNTER_HANDLER in its CONFIGURATION_HEADER to use this. This function may be called in ISR context, so processing should be kept to a minimum.
530
of file stack/include/stack-info.h
emberCounterRequiresPhyIndex#
bool emberCounterRequiresPhyIndex (EmberCounterType type)
N/A | type |
531
of file stack/include/stack-info.h
emberCounterRequiresDestinationNodeId#
bool emberCounterRequiresDestinationNodeId (EmberCounterType type)
N/A | type |
532
of file stack/include/stack-info.h
emberStackTokenChangedHandler#
void emberStackTokenChangedHandler (uint16_t tokenAddress)
A callback invoked to inform the application that a stack token has changed.
N/A | tokenAddress | The address of the stack token that has changed. |
539
of file stack/include/stack-info.h
emberRtosIdleHandler#
bool emberRtosIdleHandler (uint32_t * idleTimeMs)
A callback to allow the application to manage idling the MCU.
N/A | idleTimeMs | The time in millisecond the stack is allowed to idle. |
Returns
True if the application is managing idling the MCU, false otherwise. If this function returns false, the stack will manage idling the MCU.
548
of file stack/include/stack-info.h
emberRtosStackWakeupIsrHandler#
void emberRtosStackWakeupIsrHandler (void )
A callback to request the application to wake up the stack task.
N/A |
552
of file stack/include/stack-info.h
emberGetNeighbor#
EmberStatus emberGetNeighbor (uint8_t index, EmberNeighborTableEntry * result)
Copy a neighbor table entry to the structure that result
points to. Neighbor table entries are stored in ascending order by node ID, with all unused entries at the end of the table. The number of active neighbors can be obtained using emberNeighborCount().
N/A | index | The index of a neighbor table entry. |
N/A | result | A pointer to the location to which to copy the neighbor table entry. |
Returns
EMBER_ERR_FATAL if the index is greater or equal to the number of active neighbors, or if the device is an end device. Returns EMBER_SUCCESS otherwise.
569
of file stack/include/stack-info.h
emberSetRoutingShortcutThreshold#
EmberStatus emberSetRoutingShortcutThreshold (uint8_t costThresh)
Set the routing shortcut threshold to directly use a neighbor instead of performing routing.
N/A | costThresh | the routing shortcut value that should be used to directly use a neighbor instead of performing routing. |
Returns
::return EMBER_BAD_ARGUMENT if the costThresh is not 1, 3, 5, 7 Returns EMBER_SUCCESS otherwise.
580
of file stack/include/stack-info.h
emberGetRoutingShortcutThreshold#
uint8_t emberGetRoutingShortcutThreshold (void )
Get the routing shortcut threshold used to separate between directly using a neighbor vs. performing routing.
N/A |
Returns
the routingShortcutThresh which takes one of the following values: 1, 3, 5, or 7.
588
of file stack/include/stack-info.h
emberSetInitialNeighborOutgoingCost#
EmberStatus emberSetInitialNeighborOutgoingCost (uint8_t cost)
Set neighbor's initial outgoing link cost.
N/A | cost | The new default cost. |
Returns
EMBER_BAD_ARGUMENT if the cost is not any of 0, 1, 3, 5, or 7. Returns EMBER_SUCCESS otherwise NOTE: There is no EZSP version of this function yet.
597
of file stack/include/stack-info.h
emberGetInitialNeighborOutgoingCost#
uint8_t emberGetInitialNeighborOutgoingCost (void )
Get neighbor's initial outgoing link cost.
N/A |
Returns
The default cost associated with new neighbor's outgoing links. NOTE: There is no EZSP version of this function yet.
604
of file stack/include/stack-info.h
emberResetRejoiningNeighborsFC#
void emberResetRejoiningNeighborsFC (bool reset)
Indicate whether a rejoining neighbor's incoming FC should be reset.
N/A | reset | True or False. |
Returns
::void NOTE: There is no EZSP version of this function yet.
612
of file stack/include/stack-info.h
emberIsResetRejoiningNeighborsFCEnabled#
bool emberIsResetRejoiningNeighborsFCEnabled (void )
Check whether resetting the incoming FC for a rejoining neighbor is enabled.
N/A |
Returns
::True or False. NOTE: There is no EZSP version of this function yet.
620
of file stack/include/stack-info.h
emberGetNeighborFrameCounter#
EmberStatus emberGetNeighborFrameCounter (EmberEUI64 nodeEui64, uint32_t * returnFrameCounter)
Get the last received frame counter as found in the Network Auxiliary header for the specified neighbor or child.
N/A | nodeEui64 | The neighbor or child EUI to search. |
N/A | returnFrameCounter | The frame counter variable to fill in. |
Returns
EmberStatus depending on whether the frame counter is found in the neighbor or child table.
630
of file stack/include/stack-info.h
emberSetNeighborFrameCounter#
EmberStatus emberSetNeighborFrameCounter (EmberEUI64 nodeEui64, uint32_t frameCounter)
Set the frame counter for the specified neighbor or child.
N/A | nodeEui64 | The neighbor or child EUI to search. |
N/A | frameCounter | The frame counter to set. |
Returns
EmberStatus depending on whether the frame counter is set in the neighbor or child table.
640
of file stack/include/stack-info.h
emberGetRouteTableEntry#
EmberStatus emberGetRouteTableEntry (uint8_t index, EmberRouteTableEntry * result)
Copy a route table entry to the structure that the result
points to. Unused route table entries have a destination of 0xFFFF. The route table size can be obtained via emberRouteTableSize().
N/A | index | The index of a route table entry. |
N/A | result | A pointer to the location to which to copy the route table entry. |
Returns
EMBER_ERR_FATAL if the index is out of range or the device is an end device, and EMBER_SUCCESS otherwise.
656
of file stack/include/stack-info.h
emberStackProfile#
uint8_t emberStackProfile (void )
Return the stack profile of the network which the node has joined.
N/A |
Returns
The stack profile.
663
of file stack/include/stack-info.h
emberSecurityLevel#
uint8_t emberSecurityLevel (void )
Return the security level of the network which the node has joined.
N/A |
Returns
The security level.
670
of file stack/include/stack-info.h
emberTreeDepth#
uint8_t emberTreeDepth (void )
Return the depth of the node in the network.
N/A |
Returns
The current depth.
677
of file stack/include/stack-info.h
emberNeighborCount#
uint8_t emberNeighborCount (void )
Return the number of active entries in the neighbor table.
N/A |
Returns
The number of active entries in the neighbor table.
683
of file stack/include/stack-info.h
emberRouteTableSize#
uint8_t emberRouteTableSize (void )
Return the size of the route table.
N/A |
Returns
The size of the route table.
689
of file stack/include/stack-info.h
emberNextZigbeeSequenceNumber#
uint8_t emberNextZigbeeSequenceNumber (void )
Increment and returns the Zigbee sequence number.
N/A |
Returns
The next Zigbee sequence number.
729
of file stack/include/stack-info.h
emberGetMaxNwkRetries#
uint8_t emberGetMaxNwkRetries (void )
Get maximum number of NWK retries.
N/A |
Returns the maximum number of NWK retries that will be attempted
Returns
uint8_t Max NWK retries
737
of file stack/include/stack-info.h
emberGetBeaconClassificationParams#
EmberStatus emberGetBeaconClassificationParams (EmberBeaconClassificationParams * param)
Get current beacon classification parameter settings.
N/A | param |
889
of file stack/include/stack-info.h
emberSetBeaconClassificationParams#
EmberStatus emberSetBeaconClassificationParams (EmberBeaconClassificationParams * param)
Set current beacon classification parameters.
N/A | param |
893
of file stack/include/stack-info.h
slx_zigbee_routing_set_route_record_policy#
EmberStatus slx_zigbee_routing_set_route_record_policy (sl_zigbee_route_record_policy_type_t policy)
Set the route record policy.
N/A | policy | A pointer to the place to store the current slip time |
Returns
EMBER_SUCCESS if route record policy was successfully set EMBER_BAD_ARGUMENT otherwise.
Use this to set the policy for sending a route record message to a concentrator Note that policies other than the default ROUTE_RECORD_POLICY_ACK_BY_SOURCE_ROUTED_MESSAGE may result in behavior not compliant with the Zigbee specification
905
of file stack/include/stack-info.h
slx_zigbee_routing_get_route_record_policy#
uint8_t slx_zigbee_routing_get_route_record_policy (void )
Get the route record policy.
N/A |
Returns
The route record policy
Use this to get the current value of the route record policy
913
of file stack/include/stack-info.h
emberGetTokenCount#
uint8_t emberGetTokenCount (void )
Get the total count of the tokens configured.
N/A |
Returns
The token count.
Use this to get the number of tokens configured in a node.
921
of file stack/include/stack-info.h
emberGetTokenInfo#
EmberStatus emberGetTokenInfo (uint8_t index, EmberTokenInfo * tokenInfo)
Get information of a token by providing the index.
N/A | index | An index to configured token array that ranges from 0 to emberGetTokenCount() - 1; |
N/A | tokenInfo | A pointer to hold the information in a structure provided by the caller. |
Returns
Status of the call, EMBER_SUCCESS upon success or EMBER_INDEX_OUT_OF_RANGE for bad index.
930
of file stack/include/stack-info.h
emberGetTokenData#
EmberStatus emberGetTokenData (uint32_t token, uint32_t index, EmberTokenData * tokenData)
Get token data by providing the token key and index for the indexed token.
N/A | token | A valid token key, which may be obtained using emberGetTokenInfo. |
N/A | index | An index in case the token is an indexed token, if token is indexed can be obtained from emberGetTokenInfo. |
N/A | tokenData | A pointer pointing to memory storage information, must be allocated and provided by the caller. |
Returns
Status of the call, EMBER_SUCCESS upon success or EMBER_ERR_FATAL for errors.
941
of file stack/include/stack-info.h
emberSetTokenData#
EmberStatus emberSetTokenData (uint32_t token, uint32_t index, EmberTokenData * tokenData)
Set token data by providing the token key, index for an indexed token and token data.
N/A | token | A valid token key, which may be obtained using emberGetTokenInfo. |
N/A | index | An index in case the token is an indexed token, if token is indexed can be obtained from emberGetTokenInfo. |
N/A | tokenData | A pointer pointing to memory storage holding the token data provided by the caller. |
Returns
Status of the call, EMBER_SUCCESS upon success or EMBER_ERR_FATAL for errors.
953
of file stack/include/stack-info.h