Modules#

Application Core API type definitions

Application Core#

The Application Core component aims at providing utilities common to most Wi-SUN applications. Following this objective, the component offers the following features:

  • A Wi-SUN connection helper function app_wisun_network_connect(). This function configures the network size setting, the TX output power, the certificates, and keys. The last function action is to start the catual Wi-SUN connection process. The app_wisun_network_is_connected() function provides a simple connection status getter too.

  • Event handlers for basic Wi-SUN network events. The component includes the basic event handler implementations.

  • Available addresses. Retrieve known IPv6 addresses with the app_wisun_get_current_addresses() function.

  • Error Getter. app_wisun_core_get_error() function for getting status of the Stack API calls.

To use the component in your application, add it to your project and initialize it with app_wisun_core_init().

#

void

Wait for the connection.

void

Connect and wait for connection.

bool

Network is connected.

Functions#

void

Initialize Wi-SUN application core.

bool
app_wisun_core_get_error(app_core_error_state_flag_t flag)

Get application core error.

void

Connect to the Wi-SUN network.

void
app_wisun_get_current_addresses(current_addr_t *const dest_addresses)

Get current addresses .

undefined Documentation#

app_wisun_wait_for_connection#

void app_wisun_wait_for_connection (void )

Wait for the connection.

Parameters
N/A

This function doesn't call the app_wisun_network_connect() function. The function provides a delay loop with optional heart beat printing till the connection state has not been changed.


Definition at line 92 of file C:/silabs/wisun_gsdk/app/wisun/component/app_core/sl_wisun_app_core_util.h

app_wisun_connect_and_wait#

void app_wisun_connect_and_wait (void )

Connect and wait for connection.

Parameters
N/A

The function calls app_wisun_network_connect() function and app_wisun_wait_for_connection() function. It can be useful at the beginning of application thread.


Definition at line 100 of file C:/silabs/wisun_gsdk/app/wisun/component/app_core/sl_wisun_app_core_util.h

app_wisun_network_is_connected#

bool app_wisun_network_is_connected (void )

Network is connected.

Parameters
N/A

Wrapper function of join state getter Returns

  • true Connected

  • false Not connected


Definition at line 108 of file C:/silabs/wisun_gsdk/app/wisun/component/app_core/sl_wisun_app_core_util.h

Function Documentation#

app_wisun_core_init#

void app_wisun_core_init (void )

Initialize Wi-SUN application core.

Parameters
N/A

Initializing mutex, socket handler and set Wi-SUN settings.


Definition at line 107 of file C:/silabs/wisun_gsdk/app/wisun/component/app_core/sl_wisun_app_core.h

app_wisun_core_get_error#

bool app_wisun_core_get_error (app_core_error_state_flag_t flag)

Get application core error.

Parameters
[in]flag

is the indicator of the error

The function retrieves the application core error status based on flag


Definition at line 115 of file C:/silabs/wisun_gsdk/app/wisun/component/app_core/sl_wisun_app_core.h

app_wisun_network_connect#

void app_wisun_network_connect (void )

Connect to the Wi-SUN network.

Parameters
N/A

Network initialization and connection. The function initializes the network with parameters (Network name, TX Power, Network size, etc.) by the stored settings in NVM if the settings component is added to the project, otherwise with the default settings.


Definition at line 126 of file C:/silabs/wisun_gsdk/app/wisun/component/app_core/sl_wisun_app_core.h

app_wisun_get_current_addresses#

void app_wisun_get_current_addresses (current_addr_t *const dest_addresses)

Get current addresses .

Parameters
[out]dest_addresses

Destination

Copy cached addresses into destination.


Definition at line 133 of file C:/silabs/wisun_gsdk/app/wisun/component/app_core/sl_wisun_app_core.h