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

#include "stack/include/sl_zigbee_types.h"
#include "lower-mac-common.h"

void sl_zigbee_stack_status_handler(sl_status_t status);

sl_zigbee_network_status_t sl_zigbee_network_state(void);

bool sl_zigbee_stack_is_up(void);

sl_status_t sl_zigbee_write_node_data(bool erase);

uint32_t sl_zigbee_ms_to_next_stack_event(void);

sl_status_t sl_zigbee_set_power_descriptor(uint16_t descriptor);

uint16_t sl_zigbee_get_manufacturer_code(void);

bool sl_zigbee_is_local_eui64(sl_802154_long_addr_t eui64);

sl_status_t sl_zigbee_set_node_descriptor(sl_zigbee_node_descriptor_info_t *descriptor);

sl_status_t sl_zigbee_get_node_descriptor(sl_zigbee_node_descriptor_info_t *descriptor);

#ifdef DOXYGEN_SHOULD_SKIP_THIS

sl_802154_long_addr_t sl_zigbee_get_eui64(void);

sl_802154_short_addr_t sl_zigbee_get_node_id(void);

sl_802154_short_addr_t sl_zigbee_radio_get_node_id(void);

#else   // Doxygen ignores the following
uint8_t* sl_zigbee_get_eui64(void);
sl_802154_short_addr_t sl_zigbee_get_node_id(void);

enum {
  SL_ZIGBEE_ROUTE_ERROR_NO_ROUTE_AVAILABLE    = 0x00,
  SL_ZIGBEE_ROUTE_ERROR_TREE_LINK_FAILURE     = 0x01,
  SL_ZIGBEE_ROUTE_ERROR_NON_TREE_LINK_FAILURE = 0x02,
  SL_ZIGBEE_ROUTE_ERROR_LOW_BATTERY_LEVEL     = 0x03,
  SL_ZIGBEE_ROUTE_ERROR_NO_ROUTING_CAPACITY   = 0x04,
  SL_ZIGBEE_ROUTE_ERROR_NO_INDIRECT_CAPACITY  = 0x05,
  SL_ZIGBEE_ROUTE_ERROR_INDIRECT_TRANSACTION_EXPIRY = 0x06,
  SL_ZIGBEE_ROUTE_ERROR_TARGET_DEVICE_UNAVAILABLE = 0x07,
  SL_ZIGBEE_ROUTE_ERROR_TARGET_ADDRESS_UNALLOCATED = 0x08,
  SL_ZIGBEE_ROUTE_ERROR_PARENT_LINK_FAILURE   = 0x09,
  SL_ZIGBEE_ROUTE_ERROR_VALIDATE_ROUTE        = 0x0A,
  SL_ZIGBEE_ROUTE_ERROR_SOURCE_ROUTE_FAILURE  = 0x0B,
  SL_ZIGBEE_ROUTE_ERROR_MANY_TO_ONE_ROUTE_FAILURE = 0x0C,
  SL_ZIGBEE_ROUTE_ERROR_ADDRESS_CONFLICT      = 0x0D,
  SL_ZIGBEE_ROUTE_ERROR_VERIFY_ADDRESSES      = 0x0E,
  SL_ZIGBEE_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
};

sl_status_t sl_zigbee_set_broken_route_error_code(uint8_t errorCode);

#endif

sl_status_t sl_zigbee_get_network_parameters(sl_zigbee_node_type_t *node_type,
                                             sl_zigbee_network_parameters_t *parameters);

sl_status_t sl_zigbee_get_radio_parameters(uint8_t phyIndex,
                                           sl_zigbee_multi_phy_radio_parameters_t *parameters);

sl_status_t sl_zigbee_set_radio_channel(uint8_t channel);

sl_status_t sl_zigbee_set_logical_and_radio_channel(uint8_t channel);

uint8_t sl_zigbee_get_radio_channel(void);

sl_status_t sl_zigbee_set_radio_power(int8_t power);

int8_t sl_zigbee_get_radio_power(void);

void *sl_zigbee_get_rail_handle(void);

sl_802154_pan_id_t sl_zigbee_get_pan_id(void);

sl_status_t sl_zigbee_set_radio_ieee802154_cca_mode(uint8_t ccaMode);

void sl_zigbee_get_extended_pan_id(uint8_t *resultLocation);

extern const uint8_t sl_zigbee_stack_profile_id[];

typedef struct {
  uint8_t endpoint;
  sl_zigbee_endpoint_description_t const * description;
  uint16_t const * inputClusterList;
  uint16_t const * outputClusterList;
} sl_zigbee_endpoint_t;

extern uint8_t sl_zigbee_endpoint_count;

extern sl_zigbee_endpoint_t sl_zigbee_endpoints[];

uint8_t sl_zigbee_get_endpoint(uint8_t index);

uint8_t sl_zigbee_get_endpoint_count(void);

bool sl_zigbee_get_endpoint_description(uint8_t endpoint,
                                        sl_zigbee_endpoint_description_t *result);

uint16_t sl_zigbee_get_endpoint_cluster(uint8_t endpoint,
                                        sl_zigbee_cluster_list_id_t listId,
                                        uint8_t listIndex);

#ifdef DOXYGEN_SHOULD_SKIP_THIS
bool sl_zigbee_is_node_id_valid(sl_802154_short_addr_t nodeId);
#else
#define sl_zigbee_is_node_id_valid(nodeId) ((nodeId) < SL_ZIGBEE_DISCOVERY_ACTIVE_NODE_ID)
#endif

sl_status_t sl_zigbee_lookup_node_id_by_eui64(sl_802154_long_addr_t eui64,
                                              sl_802154_short_addr_t *node_id);

sl_status_t sl_zigbee_lookup_eui64_by_node_id(sl_802154_short_addr_t nodeId,
                                              sl_802154_long_addr_t eui64Return);

void sl_zigbee_read_and_clear_counters(uint16_t *counter_array, uint8_t len);

void sl_zigbee_read_counters(uint16_t *counter_array, uint8_t len);

sl_status_t sl_zigbee_clear_counters(void);

sl_status_t sl_zigbee_reset_counters_thresholds(void);

sl_status_t sl_zigbee_set_counter_threshold(sl_zigbee_counter_type_t type, uint16_t threshold);

bool sl_zigbee_counter_requires_phy_index(sl_zigbee_counter_type_t type);

bool sl_zigbee_counter_requires_destination_node_id(sl_zigbee_counter_type_t type);

void sl_zigbee_stack_token_changed_handler(uint16_t tokenAddress);

#ifndef ZNET_HEADER_SCRIPT
void sl_zigbee_rtos_stack_wakeup_isr_handler(void);
#endif

sl_status_t sl_zigbee_get_neighbor(uint8_t index,
                                   sl_zigbee_neighbor_table_entry_t *result);

sl_status_t sl_zigbee_set_routing_shortcut_threshold(uint8_t costThresh);

uint8_t sl_zigbee_get_routing_shortcut_threshold(void);

sl_status_t sl_zigbee_set_initial_neighbor_outgoing_cost(uint8_t cost);

uint8_t sl_zigbee_get_initial_neighbor_outgoing_cost(void);

void sl_zigbee_reset_rejoining_neighbors_frame_counter(bool reset);

bool sl_zigbee_is_reset_rejoining_neighbors_frame_counter_enabled(void);

sl_status_t sl_zigbee_get_neighbor_frame_counter(sl_802154_long_addr_t nodeEui64,
                                                 uint32_t *returnFrameCounter);

sl_status_t sl_zigbee_set_neighbor_frame_counter(sl_802154_long_addr_t nodeEui64,
                                                 uint32_t frameCounter);

sl_status_t sl_zigbee_get_route_table_entry(uint8_t index, sl_zigbee_route_table_entry_t *result);

uint8_t sl_zigbee_stack_profile(void);

uint8_t sl_zigbee_security_level(void);


#define R21_COMPLIANCE_REVISION       21
#define R22_COMPLIANCE_REVISION       22
#define R23_COMPLIANCE_REVISION       23
#define PRE_R21_COMPLIANCE_REVISION   0

uint8_t sl_zigbee_get_stack_compliance_revision(void);

uint8_t sl_zigbee_neighbor_count(void);

uint8_t sl_zigbee_get_route_table_size(void);

void sl_zigbee_set_route_table_size(uint8_t size);

uint8_t sl_zigbee_get_source_route_table_size(void);

void sl_zigbee_set_source_route_table_size(uint8_t size);

void sl_zigbee_set_stack_profile(uint8_t stackProfile);

void sl_zigbee_set_security_level(uint8_t securityLevel);

uint8_t sl_zigbee_next_zigbee_sequence_number(void);

uint8_t sl_zigbee_get_max_nwk_retries(void);


sl_status_t sl_802154_set_tx_power_mode(uint16_t txPowerMode);

uint16_t sl_802154_get_tx_power_mode(void);

sl_status_t sl_zigbee_set_node_id(sl_802154_short_addr_t nodeId);

uint8_t sl_zigbee_get_phy_interface_count(void);

void sl_zigbee_radio_needs_calibrating_handler(void);

void sl_mac_calibrate_current_channel(void);

sl_status_t sl_802154_radio_get_scheduler_priorities(sl_zigbee_multiprotocol_priorities_t *priorities);

sl_status_t sl_802154_radio_set_scheduler_priorities(const sl_zigbee_multiprotocol_priorities_t *priorities);

sl_status_t sl_802154_radio_set_scheduler_sliptime(uint32_t slipTime);

sl_status_t sl_802154_radio_get_scheduler_sliptime(uint32_t *slipTime);

sl_status_t 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 sl_zigbee_get_token_count(void);

sl_status_t sl_zigbee_get_token_info(uint8_t index,
                                     sl_zigbee_token_info_t *tokenInfo);
sl_status_t sl_zigbee_get_token_data(uint32_t token,
                                     uint32_t index,
                                     sl_zigbee_token_data_t *tokenData);
sl_status_t sl_zigbee_set_token_data(uint32_t token,
                                     uint32_t index,
                                     sl_zigbee_token_data_t *tokenData);

uint32_t sl_zigbee_internal_update_multi_mac_rejoin_channel_mask_for_selection_or_joining_device_handler(uint32_t rejoinChannelMask);

void sl_zigbee_token_factory_reset(bool exclude_outgoing_fc, bool exclude_boot_counter);

void sl_mac_set_cca_threshold(int8_t threshold);

int8_t sl_mac_get_ed_cca_threshold(void);

void sl_mac_set_csma_params(sl_mac_csma_parameters_t *csma_params);

void sl_mac_get_csma_params(sl_mac_csma_parameters_t *csma_params);

#endif // SILABS_STACK_INFO_H

Modules#

sl_zigbee_endpoint_t

Radio-specific Functions#

sl_status_t
sl_802154_set_tx_power_mode(uint16_t txPowerMode)

Enable boost power mode and/or the alternate transmit path.

uint16_t

Return the current configuration of boost power mode and alternate transmitter output.

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.

uint8_t

Return the number of PHY interfaces present.

void

The radio calibration callback function.

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.

sl_status_t
sl_802154_radio_get_scheduler_priorities(sl_zigbee_multiprotocol_priorities_t *priorities)

Get the current scheduler priorities used for Zigbee multiprotocol operations.

sl_status_t
sl_802154_radio_set_scheduler_priorities(const sl_zigbee_multiprotocol_priorities_t *priorities)

Set the current scheduler priorities used for Zigbee multiprotocol operations.

sl_status_t

Set the multiprotocol slip time.

sl_status_t

Get the multiprotocol slip time.

sl_status_t
slx_zigbee_routing_set_route_record_policy(sl_zigbee_route_record_policy_type_t policy)

Set the route record policy.

uint8_t

Get the route record policy.

uint8_t

Get the total count of the tokens configured.

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.

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.

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.

uint32_t

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.

void
sl_zigbee_token_factory_reset(bool exclude_outgoing_fc, bool exclude_boot_counter)

Factory reset all configured zigbee tokens.

void
sl_mac_set_cca_threshold(int8_t threshold)

Set lower MAC CCA threshold.

int8_t

Get lower MAC ED CCA threshold.

void
sl_mac_set_csma_params(sl_mac_csma_parameters_t *csma_params)

Set lower MAC CSMA config.

void
sl_mac_get_csma_params(sl_mac_csma_parameters_t *csma_params)

Get lower MAC CSMA param.

Macros#

#define

named constants for supported stack revisions

Variables#

const uint8_t

The application must provide a definition for this variable.

uint8_t

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#

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.

Return the current join status.

bool

Indicate whether the stack is currently up.

sl_status_t

Write node data to the stack token.

uint32_t

Check when the next stack event is scheduled to run.

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.

uint16_t

Gets the manufacturer code. The manufacturer code is one of the fields of the node descriptor.

bool
sl_zigbee_is_local_eui64(sl_802154_long_addr_t eui64)

Determine whether eui64 is the local node's EUI64 ID.

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.

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.

sl_802154_long_addr_t

Return the EUI64 ID of the local node.

sl_802154_short_addr_t

Return the 16-bit node ID of local node on the current logical network.

sl_802154_short_addr_t

Return the 16-bit node ID of local node on the network it is currently tuned on.

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.

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.

sl_status_t

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.

sl_status_t

Set the current logical and physical channel.

uint8_t

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.

sl_status_t

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.

int8_t

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.

void *

Return the RAIL level handle required to make RAIL API calls. Will return NULL if RAIL is not in use.

sl_802154_pan_id_t

Return the local node's PAN ID of the current logical network.

sl_status_t

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.

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.

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.

uint8_t

Retrieve the number of configured endpoints.

bool
sl_zigbee_get_endpoint_description(uint8_t endpoint, sl_zigbee_endpoint_description_t *result)

Retrieve the endpoint description for the given endpoint.

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.

bool
sl_zigbee_is_node_id_valid(sl_802154_short_addr_t nodeId)

Determine whether nodeId is valid.

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.

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.

void
sl_zigbee_read_and_clear_counters(uint16_t *counter_array, uint8_t len)

Read and clear Zigbee stack counters.

void
sl_zigbee_read_counters(uint16_t *counter_array, uint8_t len)

Retrieves Zigbee stack counters.

sl_status_t

Clear all Zigbee stack counters.

sl_status_t

Reset all Zigbee stack counter thresholds to their default values.

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.

bool
sl_zigbee_counter_requires_phy_index(sl_zigbee_counter_type_t type)

Checks if a specific Zigbee stack counter requires a PHY index.

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.

void

A callback invoked to inform the application that a stack token has changed.

void

A callback to request the application to wake up the stack task.

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().

sl_status_t

Set the routing shortcut threshold to directly use a neighbor instead of performing routing.

uint8_t

Get the routing shortcut threshold used to separate between directly using a neighbor vs. performing routing.

sl_status_t

Set neighbor's initial outgoing link cost.

uint8_t

Get neighbor's initial outgoing link cost.

void

Indicate whether a rejoining neighbor's incoming FC should be reset.

bool

Check whether resetting the incoming FC for a rejoining neighbor is enabled.

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.

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.

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().

uint8_t

Return the stack profile of the network which the node has joined.

uint8_t

Return the security level of the network which the node has joined.

uint8_t

return the value of the stack compliance revision, as is reflected in the node descriptor

uint8_t

Return the number of active entries in the neighbor table.

uint8_t

Return the size of the route table.

void

Sets the size of the route table.

uint8_t

Return the size of the source route table.

void

Sets the size of the source route table.

void
sl_zigbee_set_stack_profile(uint8_t stackProfile)

Set the stack profile of the network.

void
sl_zigbee_set_security_level(uint8_t securityLevel)

Set the security level of the network.

uint8_t

Increment and returns the Zigbee sequence number.

uint8_t

Get maximum number of NWK retries.

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.

Parameters
N/AtxPowerMode

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.


Definition at line 803 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.

Parameters
N/A

Returns

  • The current TX power mode.


Definition at line 810 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.

Parameters
N/AnodeId

Specifies the short ID to be assigned to the node.

Returns

  • ::SL_STATUS_OK if successful; an error code otherwise.


Definition at line 819 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.

Parameters
N/A

Returns

  • The number of PHY interface(s).


Definition at line 825 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.

Parameters
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.


Definition at line 843 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.

Parameters
N/A

Definition at line 853 of file stack/include/stack-info.h

sl_802154_radio_get_scheduler_priorities#

sl_status_t sl_802154_radio_get_scheduler_priorities (sl_zigbee_multiprotocol_priorities_t * priorities)

Get the current scheduler priorities used for Zigbee multiprotocol operations.

Parameters
N/Apriorities

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.


Definition at line 868 of file stack/include/stack-info.h

sl_802154_radio_set_scheduler_priorities#

sl_status_t sl_802154_radio_set_scheduler_priorities (const sl_zigbee_multiprotocol_priorities_t * priorities)

Set the current scheduler priorities used for Zigbee multiprotocol operations.

Parameters
N/Apriorities

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.


Definition at line 881 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.

Parameters
N/AslipTime

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.


Definition at line 894 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.

Parameters
N/AslipTime

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.


Definition at line 907 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.

Parameters
N/Apolicy

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


Definition at line 920 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.

Parameters
N/A

Returns

  • The route record policy

Use this to get the current value of the route record policy


Definition at line 928 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.

Parameters
N/A

Returns

  • The token count.

Use this to get the number of tokens configured in a node.


Definition at line 936 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.

Parameters
N/Aindex

An index to configured token array that ranges from 0 to sl_zigbee_get_token_count() - 1;

N/AtokenInfo

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.


Definition at line 947 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.

Parameters
N/Atoken

A valid token key, which may be obtained using sl_zigbee_get_token_info.

N/Aindex

An index in case the token is an indexed token, if token is indexed can be obtained from sl_zigbee_get_token_info.

N/AtokenData

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.


Definition at line 960 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.

Parameters
N/Atoken

A valid token key, which may be obtained using sl_zigbee_get_token_info.

N/Aindex

An index in case the token is an indexed token, if token is indexed can be obtained from sl_zigbee_get_token_info.

N/AtokenData

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.


Definition at line 972 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.

Parameters
N/ArejoinChannelMask

Initial 32-bit channel mask to be used.

Returns

  • The 32-bit channel mask to be used based on user input.


Definition at line 989 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.

Parameters
N/Aexclude_outgoing_fc

Exclude network and APS outgoing frame counter tokens

N/Aexclude_boot_counter

Exclude stack boot counter token


Definition at line 997 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.

Parameters
N/Athreshold

new CCA threshold


Definition at line 1004 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.

Parameters
N/A

Returns

  • ED CCA threshold


Definition at line 1011 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.

Parameters
N/Acsma_params

new CSMA config


Definition at line 1018 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.

Parameters
N/Acsma_params

a pointer pointing to memory storage information, must be allocated and provided by the caller.


Definition at line 1027 of file stack/include/stack-info.h

Macro Definition Documentation#

R21_COMPLIANCE_REVISION#

#define R21_COMPLIANCE_REVISION
Value:
21

named constants for supported stack revisions


Definition at line 707 of file stack/include/stack-info.h

R22_COMPLIANCE_REVISION#

#define R22_COMPLIANCE_REVISION
Value:
22

Definition at line 708 of file stack/include/stack-info.h

R23_COMPLIANCE_REVISION#

#define R23_COMPLIANCE_REVISION
Value:
23

Definition at line 709 of file stack/include/stack-info.h

PRE_R21_COMPLIANCE_REVISION#

#define PRE_R21_COMPLIANCE_REVISION
Value:
0

Definition at line 710 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.


Definition at line 345 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.


Definition at line 362 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.


Definition at line 377 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.

Parameters
N/Astatus

Stack status. One of the following:

  • ::SL_STATUS_NETWORK_UP

  • ::SL_STATUS_NETWORK_DOWN

  • ::SL_STATUS_NOT_JOINED

  • ::SL_STATUS_ZIGBEE_MOVE_FAILED

  • ::EMBER_CANNOT_JOIN_AS_ROUTER

  • ::SL_STATUS_ZIGBEE_NODE_ID_CHANGED

  • ::SL_STATUS_ZIGBEE_PAN_ID_CHANGED

  • ::SL_STATUS_ZIGBEE_CHANNEL_CHANGED

  • ::SL_STATUS_ZIGBEE_NETWORK_OPENED

  • ::SL_STATUS_ZIGBEE_NETWORK_CLOSED

  • ::SL_STATUS_NO_BEACONS

  • ::SL_STATUS_ZIGBEE_RECEIVED_KEY_IN_THE_CLEAR

  • ::SL_STATUS_ZIGBEE_NO_NETWORK_KEY_RECEIVED

  • ::SL_STATUS_ZIGBEE_NO_LINK_KEY_RECEIVED

  • ::SL_STATUS_ZIGBEE_PRECONFIGURED_KEY_REQUIRED

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.


Definition at line 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.

Parameters
N/A

Returns a value indicating whether the node is joining, joined to, or leaving a network.

Returns


Definition at line 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.

Parameters
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.


Definition at line 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.

Parameters
N/Aerase

Indicates whether the node type should be erased.

Returns

  • The status of the operation and an error code if unsuccessful.


Definition at line 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.

Parameters
N/A

Returns

  • Returns the number of milliseconds before the next stack event is scheduled to run.


Definition at line 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.

Parameters
N/Adescriptor

The new power descriptor for the local node.


Definition at line 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.

Parameters
N/A

Returns

  • The manufacturer code for the local node.


Definition at line 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.

Parameters
N/Aeui64

An EUI64 ID.

Returns

  • True if eui64 is the local node's ID, otherwise false.


Definition at line 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.

Parameters
N/Adescriptor

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


Definition at line 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.

Parameters
N/Adescriptor

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.


Definition at line 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.

Parameters
N/A

Returns

  • The 64-bit ID.


Definition at line 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.

Parameters
N/A

Returns

  • The 16-bit ID.


Definition at line 166 of file stack/include/stack-info.h

sl_zigbee_radio_get_node_id#

sl_802154_short_addr_t sl_zigbee_radio_get_node_id (void )

Return the 16-bit node ID of local node on the network it is currently tuned on.

Parameters
N/A

Returns

  • The 16-bit ID.


Definition at line 173 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.

Parameters
N/Anode_type

A pointer to an sl_zigbee_network_parameters_t value into which the current network parameters will be copied.

N/Aparameters

Returns

  • An ::sl_status_t value indicating the success or failure of the command.


Definition at line 230 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.

Parameters
N/AphyIndex

The index of the PHY interface for radio parameters.

  • For 2.4 or SubGHz only (switched) device, index will be ignored.

  • For simultaneous dual radio, returns radio parameters based on the provided PHY index. parameters A pointer to an sl_zigbee_multi_phy_radio_parameters_t value into which the current radio parameters will be copied.

N/Aparameters

Returns

  • An ::sl_status_t value indicating the success or failure of the command.


Definition at line 248 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.

Parameters
N/Achannel

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.


Definition at line 264 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.

Parameters
N/Achannel

Definition at line 269 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.

Parameters
N/A

Returns

  • The current radio channel.


Definition at line 278 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.

Parameters
N/Apower

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.


Definition at line 297 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.

Parameters
N/A

Returns

  • The current radio output power, in dBm.


Definition at line 306 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.

Parameters
N/A

Returns

  • A RAIL handle


Definition at line 313 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.

Parameters
N/A

Returns

  • A PAN ID.


Definition at line 319 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.

Parameters
N/AccaMode

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.


Definition at line 334 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.

Parameters
N/AresultLocation

Definition at line 342 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.

Parameters
N/Aindex

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.


Definition at line 392 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.

Parameters
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.


Definition at line 403 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.

Parameters
N/Aendpoint

The endpoint whose description is to be returned.

N/Aresult

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.


Definition at line 422 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.

Parameters
N/Aendpoint

The endpoint from which the cluster ID is to be read.

N/AlistId

The list from which the cluster ID is to be read.

N/AlistIndex

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.


Definition at line 443 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.

Parameters
N/AnodeId

A node ID.

Returns

  • True if nodeId is valid, false otherwise.


Definition at line 454 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.

Parameters
N/Aeui64

The EUI64 of the node to look up.

N/Anode_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.


Definition at line 473 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.

Parameters
N/AnodeId

The short ID of the node to look up.

N/Aeui64Return

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.


Definition at line 491 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.

Parameters
N/Acounter_array

Pointer to an array where the counter values will be stored.

N/Alen

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.


Definition at line 509 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.

Parameters
N/Acounter_array

Pointer to an array where the counter values will be stored.

N/Alen

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.


Definition at line 526 of file stack/include/stack-info.h

sl_zigbee_clear_counters#

sl_status_t sl_zigbee_clear_counters (void )

Clear all Zigbee stack counters.

Parameters
N/A

Returns

  • Status code indicating the success or failure of the operation.


Definition at line 533 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.

Parameters
N/A

Returns

  • Status code indicating the success or failure of the operation.


Definition at line 540 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.

Parameters
N/Atype

The type of the counter.

N/Athreshold

The threshold value to set.

Returns

  • Status code indicating the success or failure of the operation.


Definition at line 549 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.

Parameters
N/Atype

The type of the counter.

Returns

  • True if the counter requires a PHY index, false otherwise.


Definition at line 557 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.

Parameters
N/Atype

The type of the counter.

Returns

  • True if the counter requires a destination node ID, false otherwise.


Definition at line 565 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.

Parameters
N/AtokenAddress

The address of the stack token that has changed.


Definition at line 572 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.

Parameters
N/A

Definition at line 577 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().

Parameters
N/Aindex

The index of a neighbor table entry.

N/Aresult

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.


Definition at line 597 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.

Parameters
N/AcostThresh

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.


Definition at line 609 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.

Parameters
N/A

Returns

  • the routingShortcutThresh which takes one of the following values: 1, 3, 5, or 7.


Definition at line 617 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.

Parameters
N/Acost

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.


Definition at line 626 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.

Parameters
N/A

Returns

  • The default cost associated with new neighbor's outgoing links. NOTE: There is no EZSP version of this function yet.


Definition at line 633 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.

Parameters
N/Areset

True or False.

Returns

  • ::void NOTE: There is no EZSP version of this function yet.


Definition at line 641 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.

Parameters
N/A

Returns

  • ::True or False. NOTE: There is no EZSP version of this function yet.


Definition at line 649 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.

Parameters
N/AnodeEui64

The neighbor or child EUI to search.

N/AreturnFrameCounter

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.


Definition at line 661 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.

Parameters
N/AnodeEui64

The neighbor or child EUI to search.

N/AframeCounter

The frame counter to set.

Returns

  • sl_status_t depending on whether the frame counter is set in the neighbor or child table.


Definition at line 671 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().

Parameters
N/Aindex

The index of a route table entry.

N/Aresult

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.


Definition at line 689 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.

Parameters
N/A

Returns

  • The stack profile.


Definition at line 696 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.

Parameters
N/A

Returns

  • The security level.


Definition at line 703 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

Parameters
N/A

Returns

  • integer value of the compliance revision


Definition at line 717 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.

Parameters
N/A

Returns

  • The number of active entries in the neighbor table.


Definition at line 723 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.

Parameters
N/A

Returns

  • The size of the route table.


Definition at line 729 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.

Parameters
N/Asize

The size of the route table.


Definition at line 735 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.

Parameters
N/A

Returns

  • The size of the source route table.


Definition at line 741 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.

Parameters
N/Asize

The size of the source route table.


Definition at line 747 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.

Parameters
N/AstackProfile

or SL_ZIGBEE_STACK_PROFILE_ZIGBEE_PRO.


Definition at line 755 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.

Parameters
N/AsecurityLevel

or SL_ZIGBEE_SECURITY_LEVEL_Z3.


Definition at line 762 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.

Parameters
N/A

Returns

  • The next Zigbee sequence number.


Definition at line 768 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.

Parameters
N/A

Returns the maximum number of NWK retries that will be attempted

Returns

  • uint8_t Max NWK retries


Definition at line 776 of file stack/include/stack-info.h