Wi-SUN Stack API#
Wi-SUN Stack API is based on requests from the application to the stack and events from the stack to the application.
Requests are made using function calls, where a function call either performs the required action immediately or initiates an internal operation within the stack, which terminates with an event. All events contain a status code, indicating the result of the requested operation. Events are also used by the stack to notify the application of any important information, such as the state of the connection.
The application is expected to override sl_wisun_on_event() to handle events from the stack. Because all events share a common header, the function may be implemented as a switch statement. The event-specific data can be accessed through the sl_wisun_evt_t::evt union.
void sl_wisun_on_event(sl_wisun_evt_t *evt)
{
switch (evt->header.id) {
case SL_WISUN_MSG_CONNECTED_IND_ID:
handle_connected_event(evt->evt.connected);
break;
default:
break;
}
}
The API is thread-safe, which means can be called from multiple RTOS tasks. The stack guarantees that only a single request is executed at a time and that requests are handled in the order they were made. Event callback is executed in a different context than the request, so the API functions may be called from the event callback.
Modules#
Callbacks#
Callback handler for a single event.
Functions#
Initiate a connection to a Wi-SUN network.
Read an IP address.
Disconnect from the Wi-SUN network.
Set a trusted certificate used to verify the authentication server certificate.
Set the device certificate used to authenticate to the authentication server.
Set the private key of the device certificate.
Read a set of statistics.
Set the maximum TX power.
Set a mask of operating channels.
Set a mask of operating channels.
Add a MAC address to the list of allowed addresses.
Add a MAC address to the list of denied addresses.
Get the current join state.
Clear the credential cache.
Get the current device MAC address in use.
Set the device MAC address to be used.
Reset a set of statistics in the stack.
Get the number of RPL neighbors (parents and children).
Get a list of RPL neighbor (parents and children) MAC addresses.
Get information about a RPL neighbor (parent or child).
Set unicast settings.
Set the private key of the device certificate.
Set the regional regulation.
Set the thresholds for transmission duration level event.
Set the async transmission fragmentation parameters.
Enable an algorithm that trades off unicast communication reliability for latency.
Set the device type.
Set the mode switch configuration.
Set the PHY mode switch configuration.
Configure the FFN parameter set.
Set the POM-IE configuration.
Get the POM-IE configuration.
Get the Wi-SUN stack version.
Configure the LFN parameter set.
Set the maximum number of LFN children.
Set the PTI state.
Trigger the transmission of a frame (FAN Discovery, RPL).
Set the security state.
Get the Wi-SUN network information.
Get RPL information.
Get the mask of channels excluded from channel plan.
Callbacks Documentation#
sl_wisun_on_event#
void sl_wisun_on_event (sl_wisun_evt_t * evt)
Callback handler for a single event.
N/A | evt | The event to be handled |
This function is called when the stack sends an event to the application. The application can declare its own version this function to customize event handling. The default implementation discards all events.
See Also
98
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
Function Documentation#
sl_wisun_join#
sl_status_t sl_wisun_join (const uint8_t * name, sl_wisun_phy_config_t * phy_config)
Initiate a connection to a Wi-SUN network.
[in] | name | Name of the Wi-SUN network as a zero-terminated string |
[in] | phy_config | Pointer to PHY configuration |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function initiates connection to a Wi-SUN network. Completion of the request is indicated with a SL_WISUN_MSG_CONNECTED_IND_ID event.
114
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_ip_address#
sl_status_t sl_wisun_get_ip_address (sl_wisun_ip_address_type_t address_type, in6_addr_t * address)
Read an IP address.
[in] | address_type | Type of the IP address to read
|
[out] | address | IP address to read |
Returns
SL_STATUS_OK if successful, an error code otherwise.
128
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_disconnect#
sl_status_t sl_wisun_disconnect ()
Disconnect from the Wi-SUN network.
Returns
SL_STATUS_OK if successful, an error code otherwise
This function disconnects an active connection or cancels an ongoing connection attempt.
139
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_trusted_certificate#
sl_status_t sl_wisun_set_trusted_certificate (uint16_t certificate_options, uint16_t certificate_length, const uint8_t * certificate)
Set a trusted certificate used to verify the authentication server certificate.
[in] | certificate_options | Options for the certificate
|
[in] | certificate_length | Size of the certificate data |
[in] | certificate | Pointer to the certificate data |
Returns
SL_STATUS_OK if successful, an error code otherwise
153
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_device_certificate#
sl_status_t sl_wisun_set_device_certificate (uint16_t certificate_options, uint16_t certificate_length, const uint8_t * certificate)
Set the device certificate used to authenticate to the authentication server.
[in] | certificate_options | Options for the certificate.
|
[in] | certificate_length | Size of the certificate data |
[in] | certificate | Pointer to the certificate data |
Returns
SL_STATUS_OK if successful, an error code otherwise
170
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_device_private_key#
sl_status_t sl_wisun_set_device_private_key (uint16_t key_options, uint16_t key_length, const uint8_t * key)
Set the private key of the device certificate.
[in] | key_options | Options for the private key
|
[in] | key_length | Size of the private key data |
[in] | key | Pointer to the private key data |
Returns
SL_STATUS_OK if successful, an error code otherwise
184
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_statistics#
sl_status_t sl_wisun_get_statistics (sl_wisun_statistics_type_t statistics_type, sl_wisun_statistics_t * statistics)
Read a set of statistics.
[in] | statistics_type | Type of statistics to read
|
[out] | statistics | Set of statistics read |
Returns
SL_STATUS_OK if successful, an error code otherwise.
This function reads a set of statistics from the stack. Statistics are cumulative and reset when a connection is initiated or by calling sl_wisun_reset_statistics().
206
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_tx_power#
sl_status_t sl_wisun_set_tx_power (int8_t tx_power)
Set the maximum TX power.
[in] | tx_power | TX power in dBm |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets the maximum TX power. The device may use a lower value based on internal decision making or hardware limitations but will never exceed the given value.
219
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_allowed_channel_mask#
sl_status_t sl_wisun_set_allowed_channel_mask (const sl_wisun_channel_mask_t * channel_mask)
Set a mask of operating channels.
[in] | channel_mask | Mask of operating channels |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets a mask of channels the device is allowed to operate in for unicast frequency hopping. By default, all channels in the channel plan are allowed. The mask can only be used to further restrict the channels. Channels outside the channel plan or channels internally excluded are ignored. This mask will be used in the following connections.
Warnings
By comparison to the Wi-SUN FAN specification, the channel mask logic is inverted. The specification references a mask of excluded channels.
237
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_channel_mask#
sl_status_t sl_wisun_set_channel_mask (const sl_wisun_channel_mask_t * channel_mask)
Set a mask of operating channels.
[in] | channel_mask | Mask of operating channels |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets a mask of channels the device is allowed to operate in for unicast frequency hopping. By default, all channels in the channel plan are allowed. The mask can only be used to further restrict the channels. Channels outside the channel plan or channels internally excluded are ignored. This mask will be used in the following connections.
251
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_allow_mac_address#
sl_status_t sl_wisun_allow_mac_address (const sl_wisun_mac_address_t * address)
Add a MAC address to the list of allowed addresses.
[in] | address | MAC address
|
Returns
SL_STATUS_OK if successful, an error code otherwise
This function adds a MAC address to the list of allowed addresses. When the first address is added to the list, the list of denied addresses is cleared and the device will start preventing communication with any device whose MAC address does not match any of addresses on the list. By default, all MAC addresses are allowed. Up to 10 MAC addresses may be added to the list. The access list affects only directly connected nodes such as parents, children, and neighbors.
269
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_deny_mac_address#
sl_status_t sl_wisun_deny_mac_address (const sl_wisun_mac_address_t * address)
Add a MAC address to the list of denied addresses.
[in] | address | MAC address
|
Returns
SL_STATUS_OK if successful, an error code otherwise
This function adds a MAC address to the list of denied addresses. When the first address is added to the list, the list of allowed addresses is cleared and the device will start preventing communication with any device whose MAC address matches any of the addresses on the list. By default, all MAC addresses are allowed. Up to 10 MAC addresses may be added to the list. The access list affects only directly connected nodes such as parents, children, and neighbors.
287
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_join_state#
sl_status_t sl_wisun_get_join_state (sl_wisun_join_state_t * join_state)
Get the current join state.
[out] | join_state | Join state |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function retrieves the current state of the connection process. The function can only be used once a connection has been initiated.
298
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_clear_credential_cache#
sl_status_t sl_wisun_clear_credential_cache ()
Clear the credential cache.
Returns
SL_STATUS_OK if successful, an error code otherwise
This function clears the cached authentication credentials stored in non-volatile storage. The function is intended for test purposes. Note that clearing the credential cache may prevent the node from reconnecting to the same parent until the corresponding cache entry has expired on the parent.
310
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_mac_address#
sl_status_t sl_wisun_get_mac_address (sl_wisun_mac_address_t * address)
Get the current device MAC address in use.
[out] | address | MAC address |
Returns
SL_STATUS_OK if successful, an error code otherwise
318
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_mac_address#
sl_status_t sl_wisun_set_mac_address (const sl_wisun_mac_address_t * address)
Set the device MAC address to be used.
[in] | address | MAC address |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets the MAC address for use in the following connections. By default, the device will use the built-in unique device MAC address. The address is reset to the built-in value upon power up.
330
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_reset_statistics#
sl_status_t sl_wisun_reset_statistics (sl_wisun_statistics_type_t statistics_type)
Reset a set of statistics in the stack.
[in] | statistics_type | Type of statistics to reset
|
Returns
SL_STATUS_OK if successful, an error code otherwise.
343
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_neighbor_count#
sl_status_t sl_wisun_get_neighbor_count (uint8_t * neighbor_count)
Get the number of RPL neighbors (parents and children).
[out] | neighbor_count | Number of neighbors |
Returns
SL_STATUS_OK if successful, an error code otherwise
351
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_neighbors#
sl_status_t sl_wisun_get_neighbors (uint8_t * neighbor_count, sl_wisun_mac_address_t * neighbor_mac_addresses)
Get a list of RPL neighbor (parents and children) MAC addresses.
[inout] | neighbor_count | Maximum number of neighbors to read on input, number of neighbors read on output |
[out] | neighbor_mac_addresses | Pointer to memory where to store neighbor MAC addresses |
Returns
SL_STATUS_OK if successful, an error code otherwise
362
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_neighbor_info#
sl_status_t sl_wisun_get_neighbor_info (const sl_wisun_mac_address_t * neighbor_mac_address, sl_wisun_neighbor_info_t * neighbor_info)
Get information about a RPL neighbor (parent or child).
[in] | neighbor_mac_address | Pointer to neighbor MAC address |
[out] | neighbor_info | Pointer to where the read information is stored |
Returns
SL_STATUS_OK if successful, an error code otherwise
372
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_unicast_settings#
sl_status_t sl_wisun_set_unicast_settings (uint8_t dwell_interval_ms)
Set unicast settings.
[in] | dwell_interval_ms | Unicast Dwell Interval (15-255 ms) |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets the parameters for unicast channel hopping to be used in the following connections. The Unicast Dwell Interval specifies the duration which the node will listen to a channel within its listening schedule. The default value is 255 ms.
386
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_device_private_key_id#
sl_status_t sl_wisun_set_device_private_key_id (uint32_t key_id)
Set the private key of the device certificate.
[in] | key_id | Key ID of the private key |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets the device private key using a key identifier, referencing a key stored in PSA cryptography module. The corresponding device certificate must still be set using sl_wisun_set_device_certificate(). The stored key must have correct PSA key attributes, see the Wi-SUN FAN Security Concepts and Design Considerations document for details.
401
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_regulation#
sl_status_t sl_wisun_set_regulation (sl_wisun_regulation_t regulation)
Set the regional regulation.
[in] | regulation | Regional regulation |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets the regional regulation for use in the following connections. The selected regional regulation will impact both the Wi-SUN stack performance and its behavior. See regulation standards for details. No regulation is set by default.
414
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_regulation_tx_thresholds#
sl_status_t sl_wisun_set_regulation_tx_thresholds (int8_t warning_threshold, int8_t alert_threshold)
Set the thresholds for transmission duration level event.
[in] | warning_threshold | Warning threshold in percent or -1 to disable |
[in] | alert_threshold | Alert threshold in percent or -1 to disable |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets the thresholds for transmission duration level event. When set and when a regional regulation is enabled using sl_wisun_set_regulation(), a SL_WISUN_MSG_REGULATION_TX_LEVEL_IND_ID event is sent when one of the configured thresholds is exceeded. This can be used by the application to prevent exceeding the total transmission duration allowed in the regional regulation. Thresholds are defined as a percentage of the maximum transmission duration permitted by the regional regulation.
431
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_advert_fragment_duration#
sl_status_t sl_wisun_set_advert_fragment_duration (uint32_t fragment_duration_ms)
Set the async transmission fragmentation parameters.
[in] | fragment_duration_ms | Max duration of a fragment in ms (min 500 ms) |
Returns
SL_STATUS_OK if successful, an error code otherwise
Async transmissions, such as Wi-SUN PAN advertisement packets, are sent to every allowed operating channel and may therefore block broadcast and unicast traffic. This impact can be reduced by splitting the channel list into fragments based on the maximum transmission duration and by forcing a delay between the fragments, allowing other traffic to occur. This function sets the maximum duration of a PA, PAS, PC, and PCS advertisement period fragments. A small value trades off longer connection times for shorter latencies. Setting the duration to SL_WISUN_ADVERT_FRAGMENT_DISABLE disables async transmission fragmentation.
By default, the maximum fragment duration is set to 500 ms.
452
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_unicast_tx_mode#
sl_status_t sl_wisun_set_unicast_tx_mode (uint8_t mode)
Enable an algorithm that trades off unicast communication reliability for latency.
[in] | mode | Transmission mode to use
|
Returns
SL_STATUS_OK if successful, an error code otherwise
Enable an algorithm that trades off unicast communication reliability for latency. The mechanism is only effective when all the neighbors are enabled. Enabling this option is detrimental when used with unaware Wi-SUN devices.
467
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_device_type#
sl_status_t sl_wisun_set_device_type (sl_wisun_device_type_t device_type)
Set the device type.
[in] | device_type | Type of the device |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets the operational mode of the node.
477
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_config_mode_switch#
sl_status_t sl_wisun_config_mode_switch (uint8_t mode, uint8_t phy_mode_id, const sl_wisun_mac_address_t * neighbor_address, bool reserved)
Set the mode switch configuration.
[in] | mode | Mode switch configuration of the neighbor. If set to SL_WISUN_MODE_SWITCH_DEFAULT, the configuration of the neighbor is reset back to the default mode switch behavior. |
[in] | phy_mode_id | PhyModeId to use when mode is set to SL_WISUN_MODE_SWITCH_ENABLED, ignored otherwise. |
[in] | neighbor_address | MAC address of the neighbor to configure. If set to sl_wisun_broadcast_mac, configures the default mode switch behavior for all non-configured neighbors. |
[in] | reserved | Reserved for future use, set to false. |
Returns
SL_STATUS_OK if successful, an error code otherwise
495
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_mode_switch#
sl_status_t sl_wisun_set_mode_switch (uint8_t mode, uint8_t phy_mode_id, const sl_wisun_mac_address_t * neighbor_address)
Set the PHY mode switch configuration.
[in] | mode | Mode switch configuration of the neighbor. If set to SL_WISUN_MODE_SWITCH_DEFAULT, the configuration of the neighbor is reset back to the default mode switch behavior. |
[in] | phy_mode_id | PhyModeId to use when mode is set to SL_WISUN_MODE_SWITCH_ENABLED, ignored otherwise. |
[in] | neighbor_address | MAC address of the neighbor to configure. If set to sl_wisun_broadcast_mac, configures the default mode switch behavior for all non-configured neighbors. |
Returns
SL_STATUS_OK if successful, an error code otherwise
515
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_connection_parameters#
sl_status_t sl_wisun_set_connection_parameters (const sl_wisun_connection_params_t * params)
Configure the FFN parameter set.
[in] | params | Parameter set to use |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets the FFN parameter set. These parameters impact connection time, bandwidth usage, and latency. Use of a predefined parameter set is recommended (Predefined FFN parameter sets). The function must be called before initiating a connection.
530
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_pom_ie#
sl_status_t sl_wisun_set_pom_ie (uint8_t phy_mode_id_count, uint8_t phy_mode_ids, uint8_t is_mdr_command_capable)
Set the POM-IE configuration.
[in] | phy_mode_id_count | Number of PhyModeId to configure |
[in] | phy_mode_ids | List of phy_mode_id_count PhyModeId. It must contain the base operating mode. |
[in] | is_mdr_command_capable | Indicate if the device supports MAC mode switch. Feature currently unsupported, must be set to 0. |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets the PHY operating mode information advertised to neighboring nodes. By default the PhyModeId list contains the first fifteen PhyModeId listed in radio multi-PHY configuration, MAC mode switch is disabled.
546
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_pom_ie#
sl_status_t sl_wisun_get_pom_ie (uint8_t * phy_mode_id_count, uint8_t * phy_mode_ids, uint8_t * is_mdr_command_capable)
Get the POM-IE configuration.
[out] | phy_mode_id_count | Number of PhyModeId retrieved |
[out] | phy_mode_ids | List of phy_mode_id_count PhyModeId. Caller must allocate space for at least SL_WISUN_MAX_PHY_MODE_ID_COUNT entries. |
[out] | is_mdr_command_capable | Set to 1 if the device supports MAC mode switch, 0 otherwise |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function retrieves the PHY operating mode information advertised to neighboring nodes.
563
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_stack_version#
sl_status_t sl_wisun_get_stack_version (uint8_t * major, uint8_t * minor, uint8_t * patch, uint16_t * build)
Get the Wi-SUN stack version.
[out] | major | Wi-SUN stack version major |
[out] | minor | Wi-SUN stack version minor |
[out] | patch | Wi-SUN stack version patch |
[out] | build | Build number, set to 0 in public versions |
Returns
SL_STATUS_OK if successful, an error code otherwise
576
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_lfn_parameters#
sl_status_t sl_wisun_set_lfn_parameters (const sl_wisun_lfn_params_t * params)
Configure the LFN parameter set.
[in] | params | Parameter set to use |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets the LFN parameter set. These parameters impact connection time, bandwidth usage, power consumption, and latency. Use of a predefined parameter set is recommended (Predefined LFN parameter sets). The function must be called before initiating a connection.
593
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_lfn_support#
sl_status_t sl_wisun_set_lfn_support (uint8_t lfn_limit)
Set the maximum number of LFN children.
[in] | lfn_limit | Maximum number of LFN children [0, 10] |
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets the maximum number of LFN children this node can parent.
604
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_pti_state#
sl_status_t sl_wisun_set_pti_state (bool pti_state)
Set the PTI state.
[in] | pti_state | PTI state
|
Returns
SL_STATUS_OK if successful, an error code otherwise
This function sets Packet Trace Interface (PTI) state. PTI is enabled by default.
617
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_trigger_frame#
sl_status_t sl_wisun_trigger_frame (sl_wisun_frame_type_t frame_type)
Trigger the transmission of a frame (FAN Discovery, RPL).
[in] | frame_type | Type of frame |
Returns
SL_STATUS_OK if successful, an error code otherwise
No frame is transmitted if the associated Trickle timer is not started, if exists.
628
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_set_security_state#
sl_status_t sl_wisun_set_security_state (uint32_t security_state)
Set the security state.
[in] | security_state | Security state
|
Returns
SL_STATUS_OK if successful, an error code otherwise
637
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_network_info#
sl_status_t sl_wisun_get_network_info (sl_wisun_network_info_t * network_info)
Get the Wi-SUN network information.
[out] | network_info | Pointer to network information |
Returns
SL_STATUS_OK if successful, an error code otherwise
645
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_rpl_info#
sl_status_t sl_wisun_get_rpl_info (sl_wisun_rpl_info_t * rpl_info)
Get RPL information.
[out] | rpl_info | Pointer to RPL information |
Returns
SL_STATUS_OK if successful, an error code otherwise
653
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h
sl_wisun_get_excluded_channel_mask#
sl_status_t sl_wisun_get_excluded_channel_mask (sl_wisun_channel_mask_type_t type, sl_wisun_channel_mask_t * channel_mask, uint8_t * channel_count)
Get the mask of channels excluded from channel plan.
[in] | type | Type of channel mask |
[out] | channel_mask | Pointer to mask |
[out] | channel_count | Number of channels in mask |
Returns
SL_STATUS_OK if successful, an error code otherwise
663
of file /mnt/raid/workspaces/ws.Mae4JfP9d/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_api.h