Stack Information#
See stack-info.h for source code.
See also config.h.
This documentation was produced from the following software release and build.
SOFTWARE_VERSION | 0x4700 | High byte = release number, low byte = patch number |
---|
This file provides definitions relevant to libraries. A running image may probe information about included libraries using the APIs defined in this section.
See library.h for more information.
Modules#
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 sl_zigbee_radio_needs_calibrating_handler() callback function during sl_zigbee_tick(). This function should only be called from within the context of the sl_zigbee_radio_needs_calibrating_handler() 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.
Get the current scheduler priorities used for Zigbee radio operations.
Set the current scheduler priorities used for Zigbee multiprotocol operations.
Set the multiprotocol slip time.
Get the multiprotocol slip time.
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.
Callback to allow the user configuration of a Multi-MAC end device to update channel mask for the scenario where a rejoin is initiated due to end device timeout event. Based on the Multi-MAC end device configuration this call is expected to update the mask so that the rejoin interface will be selected. As per the SE 1.4 errata, the "Multi-MAC Selection" end device can change the rejoin interface where as the Multi-MAC Joining end devices shall not. This callback may be run in either the stack or application task context depending on where it was called from, so implementations of this should make only thread-safe calls.
Factory reset all configured zigbee tokens.
Set lower MAC CCA threshold.
Get lower MAC ED CCA threshold.
Set lower MAC CSMA config.
Get lower MAC CSMA param.
Variables#
The application must provide a definition for this variable.
The application must provide a definition for this variable.
If sl_zigbee_endpoint_count 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 ::SL_STATUS_NETWORK_UP, the sl_zigbee_get_network_parameters() 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.
Gets the manufacturer code. The manufacturer code is one of the fields of the node descriptor.
Determine whether eui64
is the local node's EUI64 ID.
Set the maximum incoming transfer size, maximum outgoing transfer size, and descriptor capability field of the node. All these being different fields of sl_zigbee_node_descriptor_info_t.
Get the maximum incoming transfer size, maximum outgoing transfer size, and descriptor capability field of the node. All these being different fields of sl_zigbee_node_descriptor_info_t.
Return the EUI64 ID of the local node.
Return the 16-bit node ID of local node on the current logical network.
Copy the current network parameters into the structure provided by the caller.
Copy the current radio parameters into the structure 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.
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 sl_zigbee_network_state), 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 sl_zigbee_endpoint_count.
Retrieve the number of configured endpoints.
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.
Read and clear Zigbee stack counters.
Retrieves Zigbee stack counters.
Clear all Zigbee stack counters.
Reset all Zigbee stack counter thresholds to their default values.
Set the threshold value for a specific Zigbee stack counter.
Checks if a specific Zigbee stack counter requires a PHY index.
Check if a specific Zigbee stack counter requires a destination node ID.
A callback invoked to inform the application that a stack token has changed.
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 sl_zigbee_neighbor_count().
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 sl_zigbee_get_route_table_size().
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 value of the stack compliance revision, as is reflected in the node descriptor
Return the number of active entries in the neighbor table.
Return the size of the route table.
Sets the size of the route table.
Return the size of the source route table.
Sets the size of the source route table.
Set the stack profile of the network.
Set the security level of the network.
Increment and returns the Zigbee sequence number.
Get maximum number of NWK retries.
This indicates the presence, absence, or status of an Ember stack library.
Macros#
named constants for supported stack revisions
Radio-specific Functions Documentation#
sl_802154_set_tx_power_mode#
sl_status_t sl_802154_set_tx_power_mode (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/sl_zigbee_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. sl_zigbee_init() 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 sl_802154_set_tx_power_mode() to use a power mode or transmitter output setting different than specified in the MFG_PHY_CONFIG token. After the initial call to sl_802154_set_tx_power_mode(), the stack will automatically maintain the specified power mode configuration across sleep/wake cycles.
Returns
::SL_STATUS_OK if successful; an error code otherwise.
796
of file stack/include/stack-info.h
sl_802154_get_tx_power_mode#
uint16_t sl_802154_get_tx_power_mode (void )
Return the current configuration of boost power mode and alternate transmitter output.
N/A |
Returns
The current TX power mode.
803
of file stack/include/stack-info.h
sl_zigbee_set_node_id#
sl_status_t sl_zigbee_set_node_id (sl_802154_short_addr_t 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
::SL_STATUS_OK if successful; an error code otherwise.
812
of file stack/include/stack-info.h
sl_zigbee_get_phy_interface_count#
uint8_t sl_zigbee_get_phy_interface_count (void )
Return the number of PHY interfaces present.
N/A |
Returns
The number of PHY interface(s).
818
of file stack/include/stack-info.h
sl_zigbee_radio_needs_calibrating_handler#
void sl_zigbee_radio_needs_calibrating_handler (void )
The radio calibration callback function.
N/A |
The Voltage Controlled Oscillator (VCO) can drift with temperature changes. During every call to sl_zigbee_tick(), the stack will check to see if the VCO has drifted. If the VCO has drifted, the stack will call sl_zigbee_radio_needs_calibrating_handler() 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 ::sl_802154_calibrate_current_channel(). The application must call ::sl_802154_calibrate_current_channel() in response to this callback to maintain expected radio performance.
836
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 sl_zigbee_radio_needs_calibrating_handler() callback function during sl_zigbee_tick(). This function should only be called from within the context of the sl_zigbee_radio_needs_calibrating_handler() 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 |
846
of file stack/include/stack-info.h
sl_802154_radio_get_scheduler_priorities#
sl_status_t sl_802154_radio_get_scheduler_priorities (sl_802154_radio_priorities_t * priorities)
Get the current scheduler priorities used for Zigbee radio operations.
N/A | priorities | A pointer to a structure to store the current priorities in. This must not be NULL. |
Returns
::SL_STATUS_OK if called in a multiprotocol app and ::SL_STATUS_INVALID_STATE otherwise.
For more details on what these priorities are and how to use them see UG305, the Dynamic Multiprotocol User Guide.
861
of file stack/include/stack-info.h
sl_802154_radio_set_scheduler_priorities#
sl_status_t sl_802154_radio_set_scheduler_priorities (const sl_802154_radio_priorities_t * 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
::SL_STATUS_OK if called in a multiprotocol app and ::SL_STATUS_INVALID_STATE otherwise.
For more details on what these priorities are and how to use them see UG305, the Dynamic Multiprotocol User Guide.
874
of file stack/include/stack-info.h
sl_802154_radio_set_scheduler_sliptime#
sl_status_t sl_802154_radio_set_scheduler_sliptime (uint32_t slipTime)
Set the multiprotocol slip time.
N/A | slipTime | The value to set the slip time to for each transmit. |
Returns
::SL_STATUS_OK if called in a multiprotocol app and ::SL_STATUS_INVALID_STATE 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.
887
of file stack/include/stack-info.h
sl_802154_radio_get_scheduler_sliptime#
sl_status_t sl_802154_radio_get_scheduler_sliptime (uint32_t * slipTime)
Get the multiprotocol slip time.
N/A | slipTime | A pointer to the place to store the current slip time |
Returns
::SL_STATUS_OK if called in a multiprotocol app and ::SL_STATUS_INVALID_STATE 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.
900
of file stack/include/stack-info.h
slx_zigbee_routing_set_route_record_policy#
sl_status_t 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
::SL_STATUS_OK if route record policy was successfully set ::SL_STATUS_INVALID_PARAMETER 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
913
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
921
of file stack/include/stack-info.h
sl_zigbee_get_token_count#
uint8_t sl_zigbee_get_token_count (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.
929
of file stack/include/stack-info.h
sl_zigbee_get_token_info#
sl_status_t sl_zigbee_get_token_info (uint8_t index, sl_zigbee_token_info_t * tokenInfo)
Get information of a token by providing the index.
N/A | index | An index to configured token array that ranges from 0 to sl_zigbee_get_token_count() - 1; |
N/A | tokenInfo | A pointer to hold the information in a structure provided by the caller. |
Returns
Status of the call, SL_STATUS_OK upon success or SL_STATUS_INVALID_INDEX for bad index.
940
of file stack/include/stack-info.h
sl_zigbee_get_token_data#
sl_status_t sl_zigbee_get_token_data (uint32_t token, uint32_t index, sl_zigbee_token_data_t * 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 sl_zigbee_get_token_info. |
N/A | index | An index in case the token is an indexed token, if token is indexed can be obtained from sl_zigbee_get_token_info. |
N/A | tokenData | A pointer pointing to memory storage information, must be allocated and provided by the caller. |
Returns
Status of the call, SL_STATUS_OK upon success or SL_STATUS_FAIL for errors.
953
of file stack/include/stack-info.h
sl_zigbee_set_token_data#
sl_status_t sl_zigbee_set_token_data (uint32_t token, uint32_t index, sl_zigbee_token_data_t * 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 sl_zigbee_get_token_info. |
N/A | index | An index in case the token is an indexed token, if token is indexed can be obtained from sl_zigbee_get_token_info. |
N/A | tokenData | A pointer pointing to memory storage holding the token data provided by the caller. |
Returns
Status of the call, SL_STATUS_OK upon success or SL_STATUS_FAIL for errors.
965
of file stack/include/stack-info.h
sl_zigbee_internal_update_multi_mac_rejoin_channel_mask_for_selection_or_joining_device_handler#
uint32_t sl_zigbee_internal_update_multi_mac_rejoin_channel_mask_for_selection_or_joining_device_handler (uint32_t rejoinChannelMask)
Callback to allow the user configuration of a Multi-MAC end device to update channel mask for the scenario where a rejoin is initiated due to end device timeout event. Based on the Multi-MAC end device configuration this call is expected to update the mask so that the rejoin interface will be selected. As per the SE 1.4 errata, the "Multi-MAC Selection" end device can change the rejoin interface where as the Multi-MAC Joining end devices shall not. This callback may be run in either the stack or application task context depending on where it was called from, so implementations of this should make only thread-safe calls.
N/A | rejoinChannelMask | Initial 32-bit channel mask to be used. |
Returns
The 32-bit channel mask to be used based on user input.
982
of file stack/include/stack-info.h
sl_zigbee_token_factory_reset#
void sl_zigbee_token_factory_reset (bool exclude_outgoing_fc, bool exclude_boot_counter)
Factory reset all configured zigbee tokens.
N/A | exclude_outgoing_fc | Exclude network and APS outgoing frame counter tokens |
N/A | exclude_boot_counter | Exclude stack boot counter token |
990
of file stack/include/stack-info.h
sl_mac_set_cca_threshold#
void sl_mac_set_cca_threshold (int8_t threshold)
Set lower MAC CCA threshold.
N/A | threshold | new CCA threshold |
997
of file stack/include/stack-info.h
sl_mac_get_ed_cca_threshold#
int8_t sl_mac_get_ed_cca_threshold (void )
Get lower MAC ED CCA threshold.
N/A |
Returns
ED CCA threshold
1004
of file stack/include/stack-info.h
sl_mac_set_csma_params#
void sl_mac_set_csma_params (sl_mac_csma_parameters_t * csma_params)
Set lower MAC CSMA config.
N/A | csma_params | new CSMA config |
1011
of file stack/include/stack-info.h
sl_mac_get_csma_params#
void sl_mac_get_csma_params (sl_mac_csma_parameters_t * csma_params)
Get lower MAC CSMA param.
N/A | csma_params | a pointer pointing to memory storage information, must be allocated and provided by the caller. |
1020
of file stack/include/stack-info.h
Variable Documentation#
sl_zigbee_stack_profile_id#
const uint8_t sl_zigbee_stack_profile_id[]
The application must provide a definition for this variable.
338
of file stack/include/stack-info.h
endpoint#
uint8_t sl_zigbee_endpoint_t::endpoint
An endpoint of the application on this node.
345
of file stack/include/stack-info.h
description#
sl_zigbee_endpoint_description_t const* sl_zigbee_endpoint_t::description
The endpoint's description.
347
of file stack/include/stack-info.h
inputClusterList#
uint16_t const* sl_zigbee_endpoint_t::inputClusterList
Input clusters the endpoint will accept.
349
of file stack/include/stack-info.h
outputClusterList#
uint16_t const* sl_zigbee_endpoint_t::outputClusterList
Output clusters the endpoint may send.
351
of file stack/include/stack-info.h
sl_zigbee_endpoint_count#
uint8_t sl_zigbee_endpoint_count
The application must provide a definition for this variable.
355
of file stack/include/stack-info.h
sl_zigbee_endpoints#
sl_zigbee_endpoint_t sl_zigbee_endpoints[]
If sl_zigbee_endpoint_count is nonzero, the application must provide descriptions for each endpoint.
This can be done either by providing a definition of sl_zigbee_endpoints or by providing definitions of sl_zigbee_get_endpoint(), sl_zigbee_get_endpoint_description() and sl_zigbee_get_endpoint_cluster(). Using the array is often simpler, but consumes large amounts of memory if sl_zigbee_endpoint_count is large.
If the application provides definitions for the three functions, it must define SL_ZIGBEE_APPLICATION_HAS_GET_ENDPOINT in its CONFIGURATION_HEADER.
370
of file stack/include/stack-info.h
Function Documentation#
sl_zigbee_stack_status_handler#
void sl_zigbee_stack_status_handler (sl_status_t status)
A callback invoked when the status of the stack changes. If the status parameter equals ::SL_STATUS_NETWORK_UP, the sl_zigbee_get_network_parameters() 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 ::SL_STATUS_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.
67
of file stack/include/stack-info.h
sl_zigbee_network_state#
sl_zigbee_network_status_t sl_zigbee_network_state (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 sl_zigbee_network_status_t value indicating the current join status.
76
of file stack/include/stack-info.h
sl_zigbee_stack_is_up#
bool sl_zigbee_stack_is_up (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.
87
of file stack/include/stack-info.h
sl_zigbee_write_node_data#
sl_status_t sl_zigbee_write_node_data (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.
95
of file stack/include/stack-info.h
sl_zigbee_ms_to_next_stack_event#
uint32_t sl_zigbee_ms_to_next_stack_event (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.
103
of file stack/include/stack-info.h
sl_zigbee_set_power_descriptor#
sl_status_t sl_zigbee_set_power_descriptor (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. |
111
of file stack/include/stack-info.h
sl_zigbee_get_manufacturer_code#
uint16_t sl_zigbee_get_manufacturer_code (void )
Gets the manufacturer code. The manufacturer code is one of the fields of the node descriptor.
N/A |
Returns
The manufacturer code for the local node.
118
of file stack/include/stack-info.h
sl_zigbee_is_local_eui64#
bool sl_zigbee_is_local_eui64 (sl_802154_long_addr_t 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.
126
of file stack/include/stack-info.h
sl_zigbee_set_node_descriptor#
sl_status_t sl_zigbee_set_node_descriptor (sl_zigbee_node_descriptor_info_t * descriptor)
Set the maximum incoming transfer size, maximum outgoing transfer size, and descriptor capability field of the node. All these being different fields of sl_zigbee_node_descriptor_info_t.
N/A | descriptor | max_incoming_transfer_size The maximum incoming transfer size for the local node in bytes. A value of 0xFFFF means that this value is not changed. max_outgoing_transfer_size The maximum outgoing transfer size for the local node in bytes. A value of 0xFFFF means that this value is not changed. capability The descriptor capability of the local node < 0xFF |
137
of file stack/include/stack-info.h
sl_zigbee_get_node_descriptor#
sl_status_t sl_zigbee_get_node_descriptor (sl_zigbee_node_descriptor_info_t * descriptor)
Get the maximum incoming transfer size, maximum outgoing transfer size, and descriptor capability field of the node. All these being different fields of sl_zigbee_node_descriptor_info_t.
N/A | descriptor | max_incoming_transfer_size The maximum incoming transfer size for the local node in bytes. max_outgoing_transfer_size The maximum outgoing transfer size for the local node in bytes. capability The descriptor capability of the local node < 0xFF |
Returns
status of whether the pointers were set correctly.
151
of file stack/include/stack-info.h
sl_zigbee_get_eui64#
sl_802154_long_addr_t sl_zigbee_get_eui64 (void )
Return the EUI64 ID of the local node.
N/A |
Returns
The 64-bit ID.
159
of file stack/include/stack-info.h
sl_zigbee_get_node_id#
sl_802154_short_addr_t sl_zigbee_get_node_id (void )
Return the 16-bit node ID of local node on the current logical network.
N/A |
Returns
The 16-bit ID.
166
of file stack/include/stack-info.h
sl_zigbee_get_network_parameters#
sl_status_t sl_zigbee_get_network_parameters (sl_zigbee_node_type_t * node_type, sl_zigbee_network_parameters_t * parameters)
Copy the current network parameters into the structure provided by the caller.
N/A | node_type | A pointer to an sl_zigbee_network_parameters_t value into which the current network parameters will be copied. |
N/A | parameters |
Returns
An ::sl_status_t value indicating the success or failure of the command.
223
of file stack/include/stack-info.h
sl_zigbee_get_radio_parameters#
sl_status_t sl_zigbee_get_radio_parameters (uint8_t phyIndex, sl_zigbee_multi_phy_radio_parameters_t * 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 ::sl_status_t value indicating the success or failure of the command.
241
of file stack/include/stack-info.h
sl_zigbee_set_radio_channel#
sl_status_t sl_zigbee_set_radio_channel (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 ::sl_status_t value indicating the success or failure of the command.
257
of file stack/include/stack-info.h
sl_zigbee_set_logical_and_radio_channel#
sl_status_t sl_zigbee_set_logical_and_radio_channel (uint8_t channel)
Set the current logical and physical channel.
N/A | channel |
262
of file stack/include/stack-info.h
sl_zigbee_get_radio_channel#
uint8_t sl_zigbee_get_radio_channel (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.
271
of file stack/include/stack-info.h
sl_zigbee_set_radio_power#
sl_status_t sl_zigbee_set_radio_power (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 ::sl_status_t value indicating the success or failure of the command. Failure indicates that the requested power level is out of range.
290
of file stack/include/stack-info.h
sl_zigbee_get_radio_power#
int8_t sl_zigbee_get_radio_power (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.
299
of file stack/include/stack-info.h
sl_zigbee_get_rail_handle#
void * sl_zigbee_get_rail_handle (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
306
of file stack/include/stack-info.h
sl_zigbee_get_pan_id#
sl_802154_pan_id_t sl_zigbee_get_pan_id (void )
Return the local node's PAN ID of the current logical network.
N/A |
Returns
A PAN ID.
312
of file stack/include/stack-info.h
sl_zigbee_set_radio_ieee802154_cca_mode#
sl_status_t sl_zigbee_set_radio_ieee802154_cca_mode (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
SL_STATUS_OK upon success, SL_STATUS_FAIL 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.
327
of file stack/include/stack-info.h
sl_zigbee_get_extended_pan_id#
void sl_zigbee_get_extended_pan_id (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 sl_zigbee_network_state), the Extended PAN ID returned will be an invalid value.
N/A | resultLocation |
335
of file stack/include/stack-info.h
sl_zigbee_get_endpoint#
uint8_t sl_zigbee_get_endpoint (uint8_t index)
Retrieve the endpoint number for the index'th endpoint. index
must be less than the value of sl_zigbee_endpoint_count.
N/A | index | The index of an endpoint (as distinct from its endpoint number). This must be less than the value of sl_zigbee_endpoint_count. |
This function is provided by the stack, using the data from sl_zigbee_endpoints, unless the application defines SL_ZIGBEE_APPLICATION_HAS_GET_ENDPOINT in its CONFIGURATION_HEADER.
Returns
The endpoint number for the index'th endpoint.
385
of file stack/include/stack-info.h
sl_zigbee_get_endpoint_count#
uint8_t sl_zigbee_get_endpoint_count (void )
Retrieve the number of configured endpoints.
N/A |
the value of sl_zigbee_endpoint_count.
This function return the number of configured endpoints on SoC, or the number of configured endpoints on Host + on NCP.
Returns
The number of configured endpoint.
396
of file stack/include/stack-info.h
sl_zigbee_get_endpoint_description#
bool sl_zigbee_get_endpoint_description (uint8_t endpoint, sl_zigbee_endpoint_description_t * 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 sl_zigbee_endpoints, unless the application defines ::SL_ZIGBEE_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.
415
of file stack/include/stack-info.h
sl_zigbee_get_endpoint_cluster#
uint16_t sl_zigbee_get_endpoint_cluster (uint8_t endpoint, sl_zigbee_cluster_list_id_t 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 sl_zigbee_endpoint_description_t for this endpoint. |
This function is provided by the stack, using the data from sl_zigbee_endpoints, unless the application defines ::SL_ZIGBEE_APPLICATION_HAS_GET_ENDPOINT in its CONFIGURATION_HEADER.
Returns
The cluster ID at position listIndex in the specified endpoint cluster list.
436
of file stack/include/stack-info.h
sl_zigbee_is_node_id_valid#
bool sl_zigbee_is_node_id_valid (sl_802154_short_addr_t nodeId)
Determine whether nodeId
is valid.
N/A | nodeId | A node ID. |
Returns
True if
nodeId
is valid, false otherwise.
447
of file stack/include/stack-info.h
sl_zigbee_lookup_node_id_by_eui64#
sl_status_t sl_zigbee_lookup_node_id_by_eui64 (sl_802154_long_addr_t eui64, sl_802154_short_addr_t * node_id)
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. |
N/A | node_id | short ID of the node or SL_ZIGBEE_NULL_NODE_ID if the short ID is not known. |
Returns
An ::sl_status_t value:
::SL_STATUS_OK - short ID Return has been set to the short ID of the node; An error code otherwise.
466
of file stack/include/stack-info.h
sl_zigbee_lookup_eui64_by_node_id#
sl_status_t sl_zigbee_lookup_eui64_by_node_id (sl_802154_short_addr_t nodeId, sl_802154_long_addr_t 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 ::sl_status_t value:
::SL_STATUS_OK - eui64Return has been set to the EUI64 of the node.
::SL_STATUS_FAIL - The EUI64 of the node is not known.
484
of file stack/include/stack-info.h
sl_zigbee_read_and_clear_counters#
void sl_zigbee_read_and_clear_counters (uint16_t * counter_array, uint8_t len)
Read and clear Zigbee stack counters.
N/A | counter_array | Pointer to an array where the counter values will be stored. |
N/A | len | The length of the counter_array. |
This function reads and clears the specified Zigbee stack counters. The counter values are stored in the provided counter_array, which should have a length of len. The maximum number of counters that can be read is defined by SL_ZIGBEE_COUNTER_TYPE_COUNT.
Note
This function is used to retrieve the current values of Zigbee stack counters and clear them to zero.
502
of file stack/include/stack-info.h
sl_zigbee_read_counters#
void sl_zigbee_read_counters (uint16_t * counter_array, uint8_t len)
Retrieves Zigbee stack counters.
N/A | counter_array | Pointer to an array where the counter values will be stored. |
N/A | len | The length of the counter_array. |
This function retrieves the values of the specified Zigbee stack counters. The counter values are stored in the provided counter_array, which should have a length of len. The maximum number of counters that can be read is defined by SL_ZIGBEE_COUNTER_TYPE_COUNT.
Note
This function is used to retrieve the current values of Zigbee stack counters without clearing them.
Returns
A list of all counter values ordered according to the sl_zigbee_counter_type_t enumeration.
519
of file stack/include/stack-info.h
sl_zigbee_clear_counters#
sl_status_t sl_zigbee_clear_counters (void )
Clear all Zigbee stack counters.
N/A |
Returns
Status code indicating the success or failure of the operation.
526
of file stack/include/stack-info.h
sl_zigbee_reset_counters_thresholds#
sl_status_t sl_zigbee_reset_counters_thresholds (void )
Reset all Zigbee stack counter thresholds to their default values.
N/A |
Returns
Status code indicating the success or failure of the operation.
533
of file stack/include/stack-info.h
sl_zigbee_set_counter_threshold#
sl_status_t sl_zigbee_set_counter_threshold (sl_zigbee_counter_type_t type, uint16_t threshold)
Set the threshold value for a specific Zigbee stack counter.
N/A | type | The type of the counter. |
N/A | threshold | The threshold value to set. |
Returns
Status code indicating the success or failure of the operation.
542
of file stack/include/stack-info.h
sl_zigbee_counter_requires_phy_index#
bool sl_zigbee_counter_requires_phy_index (sl_zigbee_counter_type_t type)
Checks if a specific Zigbee stack counter requires a PHY index.
N/A | type | The type of the counter. |
Returns
True if the counter requires a PHY index, false otherwise.
550
of file stack/include/stack-info.h
sl_zigbee_counter_requires_destination_node_id#
bool sl_zigbee_counter_requires_destination_node_id (sl_zigbee_counter_type_t type)
Check if a specific Zigbee stack counter requires a destination node ID.
N/A | type | The type of the counter. |
Returns
True if the counter requires a destination node ID, false otherwise.
558
of file stack/include/stack-info.h
sl_zigbee_stack_token_changed_handler#
void sl_zigbee_stack_token_changed_handler (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. |
565
of file stack/include/stack-info.h
sl_zigbee_rtos_stack_wakeup_isr_handler#
void sl_zigbee_rtos_stack_wakeup_isr_handler (void )
A callback to request the application to wake up the stack task.
N/A |
570
of file stack/include/stack-info.h
sl_zigbee_get_neighbor#
sl_status_t sl_zigbee_get_neighbor (uint8_t index, sl_zigbee_neighbor_table_entry_t * 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 sl_zigbee_neighbor_count().
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
::SL_STATUS_FAIL if the index is greater or equal to the number of active neighbors, or if the device is an end device. Returns ::SL_STATUS_OK otherwise.
590
of file stack/include/stack-info.h
sl_zigbee_set_routing_shortcut_threshold#
sl_status_t sl_zigbee_set_routing_shortcut_threshold (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 SL_STATUS_INVALID_PARAMETER if the costThresh is not 1, 3, 5, 7 Returns ::SL_STATUS_OK otherwise.
602
of file stack/include/stack-info.h
sl_zigbee_get_routing_shortcut_threshold#
uint8_t sl_zigbee_get_routing_shortcut_threshold (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.
610
of file stack/include/stack-info.h
sl_zigbee_set_initial_neighbor_outgoing_cost#
sl_status_t sl_zigbee_set_initial_neighbor_outgoing_cost (uint8_t cost)
Set neighbor's initial outgoing link cost.
N/A | cost | The new default cost. |
Returns
::SL_STATUS_INVALID_PARAMETER if the cost is not any of 0, 1, 3, 5, or 7. Returns ::SL_STATUS_OK otherwise NOTE: There is no EZSP version of this function yet.
619
of file stack/include/stack-info.h
sl_zigbee_get_initial_neighbor_outgoing_cost#
uint8_t sl_zigbee_get_initial_neighbor_outgoing_cost (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.
626
of file stack/include/stack-info.h
sl_zigbee_reset_rejoining_neighbors_frame_counter#
void sl_zigbee_reset_rejoining_neighbors_frame_counter (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.
634
of file stack/include/stack-info.h
sl_zigbee_is_reset_rejoining_neighbors_frame_counter_enabled#
bool sl_zigbee_is_reset_rejoining_neighbors_frame_counter_enabled (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.
642
of file stack/include/stack-info.h
sl_zigbee_get_neighbor_frame_counter#
sl_status_t sl_zigbee_get_neighbor_frame_counter (sl_802154_long_addr_t 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
sl_status_t depending on whether the frame counter is found in the neighbor or child table.
654
of file stack/include/stack-info.h
sl_zigbee_set_neighbor_frame_counter#
sl_status_t sl_zigbee_set_neighbor_frame_counter (sl_802154_long_addr_t 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
sl_status_t depending on whether the frame counter is set in the neighbor or child table.
664
of file stack/include/stack-info.h
sl_zigbee_get_route_table_entry#
sl_status_t sl_zigbee_get_route_table_entry (uint8_t index, sl_zigbee_route_table_entry_t * 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 sl_zigbee_get_route_table_size().
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
::SL_STATUS_FAIL if the index is out of range or the device is an end device, and ::SL_STATUS_OK otherwise.
682
of file stack/include/stack-info.h
sl_zigbee_stack_profile#
uint8_t sl_zigbee_stack_profile (void )
Return the stack profile of the network which the node has joined.
N/A |
Returns
The stack profile.
689
of file stack/include/stack-info.h
sl_zigbee_security_level#
uint8_t sl_zigbee_security_level (void )
Return the security level of the network which the node has joined.
N/A |
Returns
The security level.
696
of file stack/include/stack-info.h
sl_zigbee_get_stack_compliance_revision#
uint8_t sl_zigbee_get_stack_compliance_revision (void )
return the value of the stack compliance revision, as is reflected in the node descriptor
N/A |
Returns
integer value of the compliance revision
710
of file stack/include/stack-info.h
sl_zigbee_neighbor_count#
uint8_t sl_zigbee_neighbor_count (void )
Return the number of active entries in the neighbor table.
N/A |
Returns
The number of active entries in the neighbor table.
716
of file stack/include/stack-info.h
sl_zigbee_get_route_table_size#
uint8_t sl_zigbee_get_route_table_size (void )
Return the size of the route table.
N/A |
Returns
The size of the route table.
722
of file stack/include/stack-info.h
sl_zigbee_set_route_table_size#
void sl_zigbee_set_route_table_size (uint8_t size)
Sets the size of the route table.
N/A | size | The size of the route table. |
728
of file stack/include/stack-info.h
sl_zigbee_get_source_route_table_size#
uint8_t sl_zigbee_get_source_route_table_size (void )
Return the size of the source route table.
N/A |
Returns
The size of the source route table.
734
of file stack/include/stack-info.h
sl_zigbee_set_source_route_table_size#
void sl_zigbee_set_source_route_table_size (uint8_t size)
Sets the size of the source route table.
N/A | size | The size of the source route table. |
740
of file stack/include/stack-info.h
sl_zigbee_set_stack_profile#
void sl_zigbee_set_stack_profile (uint8_t stackProfile)
Set the stack profile of the network.
N/A | stackProfile |
748
of file stack/include/stack-info.h
sl_zigbee_set_security_level#
void sl_zigbee_set_security_level (uint8_t securityLevel)
Set the security level of the network.
N/A | securityLevel |
755
of file stack/include/stack-info.h
sl_zigbee_next_zigbee_sequence_number#
uint8_t sl_zigbee_next_zigbee_sequence_number (void )
Increment and returns the Zigbee sequence number.
N/A |
Returns
The next Zigbee sequence number.
761
of file stack/include/stack-info.h
sl_zigbee_get_max_nwk_retries#
uint8_t sl_zigbee_get_max_nwk_retries (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
769
of file stack/include/stack-info.h
sl_zigbee_get_library_status#
enum sl_zigbee_library_status_t enum sl_zigbee_library_id_t sl_zigbee_library_status_t sl_zigbee_get_library_status (sl_zigbee_library_id_t libraryId)
This indicates the presence, absence, or status of an Ember stack library.
N/A | libraryId |
An enumerated list of library identifiers.
This routine takes a library identifier and returns whether the library is enabled or not. See ::sl_zigbee_library_status_t for return codes.
138
of file stack/include/library.h
Macro Definition Documentation#
R21_COMPLIANCE_REVISION#
#define R21_COMPLIANCE_REVISIONValue:
21
named constants for supported stack revisions
700
of file stack/include/stack-info.h
R22_COMPLIANCE_REVISION#
#define R22_COMPLIANCE_REVISIONValue:
22
701
of file stack/include/stack-info.h
R23_COMPLIANCE_REVISION#
#define R23_COMPLIANCE_REVISIONValue:
23
702
of file stack/include/stack-info.h
PRE_R21_COMPLIANCE_REVISION#
#define PRE_R21_COMPLIANCE_REVISIONValue:
0
703
of file stack/include/stack-info.h
SL_ZIGBEE_MAJOR_VERSION#
#define SL_ZIGBEE_MAJOR_VERSIONValue:
8
34
of file stack/config/config.h
SL_ZIGBEE_MINOR_VERSION#
#define SL_ZIGBEE_MINOR_VERSIONValue:
0
35
of file stack/config/config.h
SL_ZIGBEE_PATCH_VERSION#
#define SL_ZIGBEE_PATCH_VERSIONValue:
0
36
of file stack/config/config.h
SL_ZIGBEE_SPECIAL_VERSION#
#define SL_ZIGBEE_SPECIAL_VERSIONValue:
0
37
of file stack/config/config.h
SL_ZIGBEE_BUILD_NUMBER#
#define SL_ZIGBEE_BUILD_NUMBERValue:
0
40
of file stack/config/config.h
SL_ZIGBEE_FULL_VERSION#
#define SL_ZIGBEE_FULL_VERSIONValue:
41
of file stack/config/config.h
SL_ZIGBEE_VERSION_TYPE#
#define SL_ZIGBEE_VERSION_TYPEValue:
SL_ZIGBEE_VERSION_TYPE_GA
46
of file stack/config/config.h
SOFTWARE_VERSION#
#define SOFTWARE_VERSIONValue:
SL_ZIGBEE_FULL_VERSION
Software version. High byte = release number, low byte = patch number.
51
of file stack/config/config.h