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... | |
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.
Create WisunBorderRouter.
Definition at line 61 of file WisunBorderRouter.h.
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.
pan_id | PAN ID. |
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.
dio_interval_min | DIO trickle timer Imin parameter. |
dio_interval_doublings | DIO trickle timer Imax parameter as doublings of Imin. |
dio_redundancy_constant | DIO trickle timer redundancy constant. |
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.
info_ptr | Structure given to stack where information will be stored |
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.
table_ptr | Application allocated memory block where routing table is written. |
table_len | Length of the table allocated by application given as amount of entries. |
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.
pan_id | PAN ID. 0xffff will generate the PAN ID on the mesh interface connect() call if not already generated. |
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.
dio_interval_min | DIO trickle timer Imin parameter. Use 0x00 to use leave parameter unchanged. |
dio_interval_doublings | DIO trickle timer Imax parameter as doublings of Imin. Use 0x00 to use leave parameter unchanged. |
dio_redundancy_constant | DIO trickle timer redundancy constant. Use 0xff to use leave parameter unchanged. |
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.
mesh_if | Wi-SUN mesh network interface |
backbone_if | Backbone network interface |
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).
mesh_if | Wi-SUN mesh network interface |
backbone_if | Backbone OnboardNetworkStack::Interface interface |
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.
pan_id | PAN ID. |
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.
dio_interval_min | DIO trickle timer Imin parameter. |
dio_interval_doublings | DIO trickle timer Imax parameter as doublings of Imin. |
dio_redundancy_constant | DIO trickle timer redundancy constant. |