Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions
WisunBorderRouter Class Reference

Wi-SUN Border Router class. More...

#include <WisunBorderRouter.h>

Public Member Functions

 WisunBorderRouter ()
 Create WisunBorderRouter. More...
 
mesh_error_t start (NetworkInterface *mesh_if, NetworkInterface *backbone_if)
 Start Wi-SUN Border Router. More...
 
mesh_error_t start (NetworkInterface *mesh_if, OnboardNetworkStack::Interface *backbone_if)
 Start Wi-SUN Border Router. More...
 
void stop ()
 Stop Wi-SUN Border Router. More...
 
mesh_error_t set_rpl_parameters (uint8_t dio_interval_min, uint8_t dio_interval_doublings, uint8_t dio_redundancy_constant)
 Set Wi-SUN RPL DIO trickle parameters. More...
 
mesh_error_t get_rpl_parameters (uint8_t *dio_interval_min, uint8_t *dio_interval_doublings, uint8_t *dio_redundancy_constant)
 Get Wi-SUN RPL DIO trickle parameters. More...
 
mesh_error_t validate_rpl_parameters (uint8_t dio_interval_min, uint8_t dio_interval_doublings, uint8_t dio_redundancy_constant)
 Validate Wi-SUN RPL DIO trickle parameters. More...
 
mesh_error_t set_pan_configuration (uint16_t pan_id)
 Set Wi-SUN PAN configuration parameters. More...
 
mesh_error_t get_pan_configuration (uint16_t *pan_id)
 Get Wi-SUN PAN configuration parameters. More...
 
mesh_error_t validate_pan_configuration (uint16_t pan_id)
 Validate Wi-SUN PAN configuration parameters. More...
 
mesh_error_t info_get (ws_br_info_t *info_ptr)
 Get Wi-SUN Border Router information. More...
 
int routing_table_get (ws_br_route_info_t *table_ptr, uint16_t table_len)
 Get Wi-SUN neighbor table information. More...
 

Detailed Description

Wi-SUN Border Router class.

Class can be used to start, stop and configure Wi-SUN Border Router.

Definition at line 55 of file WisunBorderRouter.h.

Constructor & Destructor Documentation

Create WisunBorderRouter.

Definition at line 61 of file WisunBorderRouter.h.

Member Function Documentation

mesh_error_t get_pan_configuration ( uint16_t *  pan_id)

Get Wi-SUN PAN configuration parameters.

Function reads PAN ID from Border Router. Mesh interface must be initialized before calling this function.

Parameters
pan_idPAN ID.
Returns
MESH_ERROR_NONE on success.
MESH_ERROR_UNKNOWN in case of failure.
mesh_error_t get_rpl_parameters ( uint8_t *  dio_interval_min,
uint8_t *  dio_interval_doublings,
uint8_t *  dio_redundancy_constant 
)

Get Wi-SUN RPL DIO trickle parameters.

Function reads DIO trickle timer Imin, DIO trickle timer Imax and DIO trickle timer redundancy constant from Border Router. Mesh interface must be initialized before calling this function.

Parameters
dio_interval_minDIO trickle timer Imin parameter.
dio_interval_doublingsDIO trickle timer Imax parameter as doublings of Imin.
dio_redundancy_constantDIO trickle timer redundancy constant.
Returns
MESH_ERROR_NONE on success.
MESH_ERROR_UNKNOWN in case of failure.
mesh_error_t info_get ( ws_br_info_t info_ptr)

Get Wi-SUN Border Router information.

Function reads RPL information from Border Router. Mesh interface must be initialized before calling this function.

Parameters
info_ptrStructure given to stack where information will be stored
Returns
MESH_ERROR_NONE on success.
MESH_ERROR_UNKNOWN in case of failure.
int routing_table_get ( ws_br_route_info_t table_ptr,
uint16_t  table_len 
)

Get Wi-SUN neighbor table information.

Function reads Routing Table information from Border Router. Table is Parent child relation using the Global address IID of the devices. To get the full IPv6 address of the device, IPv6 = Global Prefix + IID. Mesh interface must be initialized before calling this function.

Parameters
table_ptrApplication allocated memory block where routing table is written.
table_lenLength of the table allocated by application given as amount of entries.
Returns
0 - x on success indicates number of entries written to the table_ptr.
<0 in case of errors.
mesh_error_t set_pan_configuration ( uint16_t  pan_id)

Set Wi-SUN PAN configuration parameters.

Function stores new parameters to Border Router and uses them when mesh interface connect() is called next time. If device is already connected to the Wi-SUN network then device will restart Wi-SUN network after changing the PAN configuration parameters. Mesh interface must be initialized before calling this function.

Parameters
pan_idPAN ID. 0xffff will generate the PAN ID on the mesh interface connect() call if not already generated.
Returns
MESH_ERROR_NONE on success.
MESH_ERROR_UNKNOWN in case of failure.
mesh_error_t set_rpl_parameters ( uint8_t  dio_interval_min,
uint8_t  dio_interval_doublings,
uint8_t  dio_redundancy_constant 
)

Set Wi-SUN RPL DIO trickle parameters.

Function stores new parameters to Border Router and uses them when mesh interface connect() is called next time. If device is already connected to the Wi-SUN network then device will restart Wi-SUN network after changing the RPL DIO trickle parameters. Mesh interface must be initialized before calling this function.

Parameters
dio_interval_minDIO trickle timer Imin parameter. Use 0x00 to use leave parameter unchanged.
dio_interval_doublingsDIO trickle timer Imax parameter as doublings of Imin. Use 0x00 to use leave parameter unchanged.
dio_redundancy_constantDIO trickle timer redundancy constant. Use 0xff to use leave parameter unchanged.
Returns
MESH_ERROR_NONE on success.
MESH_ERROR_UNKNOWN in case of failure.
mesh_error_t start ( NetworkInterface mesh_if,
NetworkInterface backbone_if 
)

Start Wi-SUN Border Router.

Starts Wi-SUN Border Router and routing between the mesh and backbone interfaces. Network interfaces must be initialized and connected before calling the start. Backbone interface can be either Ethernet (EMAC) or Cellular.

Parameters
mesh_ifWi-SUN mesh network interface
backbone_ifBackbone network interface
Returns
MESH_ERROR_NONE on success.
MESH_ERROR_UNKNOWN in case of failure.
mesh_error_t start ( NetworkInterface mesh_if,
OnboardNetworkStack::Interface backbone_if 
)

Start Wi-SUN Border Router.

Starts Wi-SUN Border Router and routing between the mesh and backbone interfaces. Mesh network interface must be initialized and connected before calling the start. Backbone OnboardNetworkStack::Interface must be brought up before calling the start. Backbone interface can be either Ethernet (EMAC) or Cellular (PPP).

Parameters
mesh_ifWi-SUN mesh network interface
backbone_ifBackbone OnboardNetworkStack::Interface interface
Returns
MESH_ERROR_NONE on success.
MESH_ERROR_UNKNOWN in case of failure.
void stop ( )

Stop Wi-SUN Border Router.

Stops Wi-SUN Border Router.

mesh_error_t validate_pan_configuration ( uint16_t  pan_id)

Validate Wi-SUN PAN configuration parameters.

Function validates PAN ID. Function can be used to test that values that will be used on set function are valid. Mesh interface must be initialized before calling this function.

Parameters
pan_idPAN ID.
Returns
MESH_ERROR_NONE on success.
MESH_ERROR_UNKNOWN in case of failure.
mesh_error_t validate_rpl_parameters ( uint8_t  dio_interval_min,
uint8_t  dio_interval_doublings,
uint8_t  dio_redundancy_constant 
)

Validate Wi-SUN RPL DIO trickle parameters.

Function validates DIO trickle timer Imin, DIO trickle timer Imax and DIO trickle timer redundancy constant. Function can be used to test that values that will be used on set function are valid. Mesh interface must be initialized before the calling this function.

Parameters
dio_interval_minDIO trickle timer Imin parameter.
dio_interval_doublingsDIO trickle timer Imax parameter as doublings of Imin.
dio_redundancy_constantDIO trickle timer redundancy constant.
Returns
MESH_ERROR_NONE on success.
MESH_ERROR_UNKNOWN in case of failure.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.