17#ifndef WISUNINTERFACE_H
18#define WISUNINTERFACE_H
20#include "MeshInterfaceNanostack.h"
73 WISUN_SECONDARY_PARENT,
74 WISUN_CANDIDATE_PARENT,
108 using MeshInterfaceNanostack::MeshInterfaceNanostack;
384 mesh_error_t
set_broadcast_channel_function(mesh_channel_function_t channel_function, uint16_t fixed_channel = 0xffff, uint8_t dwell_interval = 0x00, uint32_t broadcast_interval = 0x00);
398 mesh_error_t
get_broadcast_channel_function(mesh_channel_function_t *channel_function, uint16_t *fixed_channel, uint8_t *dwell_interval, uint32_t *broadcast_interval);
428 mesh_error_t
set_timing_parameters(uint16_t disc_trickle_imin = 0x00, uint16_t disc_trickle_imax = 0x00, uint8_t disc_trickle_k = 0x00, uint16_t pan_timeout = 0x00);
442 mesh_error_t
get_timing_parameters(uint16_t *disc_trickle_imin, uint16_t *disc_trickle_imax, uint8_t *disc_trickle_k, uint16_t *pan_timeout);
457 mesh_error_t
validate_timing_parameters(uint16_t disc_trickle_imin, uint16_t disc_trickle_imax, uint8_t disc_trickle_k, uint16_t pan_timeout);
520 mesh_error_t
set_own_certificate(uint8_t *cert, uint16_t cert_len, uint8_t *cert_key = NULL, uint16_t cert_key_len = 0);
669 Nanostack::WisunInterface *get_interface()
const;
Wi-SUN mesh network interface class.
mesh_error_t set_network_regulatory_domain(uint8_t regulatory_domain=0xff, uint8_t operating_class=0xff, uint8_t operating_mode=0xff)
Set Wi-SUN network regulatory domain, operating class and operating mode.
mesh_error_t get_network_regulatory_domain(uint8_t *regulatory_domain, uint8_t *operating_class, uint8_t *operating_mode)
Get Wi-SUN network regulatory domain, operating class and operating mode.
mesh_error_t get_channel_mask(uint32_t *channel_mask)
Get Wi-SUN FHSS channel mask.
mesh_error_t validate_network_regulatory_domain(uint8_t regulatory_domain, uint8_t operating_class, uint8_t operating_mode)
Validate Wi-SUN network regulatory domain, operating class and operating mode.
mesh_error_t read_mac_statistics(mesh_mac_statistics_t *statistics)
Reads Wi-SUN MAC statistics.
mesh_error_t validate_network_size(uint8_t network_size)
Validate Wi-SUN network size.
mesh_error_t set_network_domain_configuration(uint8_t regulatory_domain, uint8_t phy_mode_id, uint8_t channel_plan_id)
Set Wi-SUN network regulatory domain, PHY mode ID and channel plan ID.
mesh_error_t set_device_min_sens(uint8_t device_min_sens)
Set Wi-SUN device minimum sensitivity.
mesh_error_t get_unicast_channel_function(mesh_channel_function_t *channel_function, uint16_t *fixed_channel, uint8_t *dwell_interval)
Get Wi-SUN FHSS unicast channel function parameters.
mesh_error_t get_device_min_sens(uint8_t *device_min_sens)
Get Wi-SUN device minimum sensitivity.
mesh_error_t read_nw_statistics(mesh_nw_statistics_t *statistics)
Reads Wi-SUN network statistics.
mesh_error_t enable_statistics(void)
Enable Wi-SUN statistics.
mesh_error_t nbr_info_get(ws_nbr_info_t *nbr_ptr, uint16_t *count)
Get Wi-SUN Neighbor table information.
mesh_error_t validate_device_min_sens(uint8_t device_min_sens)
Validates Device minimum sensitivity.
mesh_error_t set_channel_mask(uint32_t channel_mask[8])
Set Wi-SUN FHSS channel mask.
mesh_error_t validate_network_domain_configuration(uint8_t regulatory_domain, uint8_t phy_mode_id, uint8_t channel_plan_id)
Validate Wi-SUN network regulatory domain, PHY mode ID and channel plan ID.
mesh_error_t validate_broadcast_channel_function(mesh_channel_function_t channel_function, uint16_t fixed_channel, uint8_t dwell_interval, uint32_t broadcast_interval)
Validate Wi-SUN FHSS broadcast channel function parameters.
mesh_error_t set_network_size(uint8_t network_size)
Set Wi-SUN network size.
mesh_error_t get_network_size(uint8_t *network_size)
Get Wi-SUN network size.
mesh_error_t validate_unicast_channel_function(mesh_channel_function_t channel_function, uint16_t fixed_channel, uint8_t dwell_interval)
Validate Wi-SUN FHSS unicast channel function parameters.
mesh_error_t set_unicast_channel_function(mesh_channel_function_t channel_function, uint16_t fixed_channel=0xffff, uint8_t dwell_interval=0x00)
Set Wi-SUN FHSS unicast channel function parameters.
mesh_error_t get_broadcast_channel_function(mesh_channel_function_t *channel_function, uint16_t *fixed_channel, uint8_t *dwell_interval, uint32_t *broadcast_interval)
Get Wi-SUN FHSS broadcast channel function parameters.
mesh_error_t cca_threshold_table_get(ws_cca_threshold_table_t *table)
Get Wi-SUN CCA threshold table information.
bool getRouterIpAddress(char *address, int8_t len)
Get router IP address.
mesh_error_t get_network_name(char *network_name)
Get Wi-SUN network name.
mesh_error_t remove_trusted_certificates(void)
Remove trusted certificates from the Wi-SUN network.
mesh_error_t set_broadcast_channel_function(mesh_channel_function_t channel_function, uint16_t fixed_channel=0xffff, uint8_t dwell_interval=0x00, uint32_t broadcast_interval=0x00)
Set Wi-SUN FHSS broadcast channel function parameters.
mesh_error_t get_network_domain_configuration(uint8_t *regulatory_domain, uint8_t *phy_mode_id, uint8_t *channel_plan_id)
Get Wi-SUN network regulatory domain, PHY mode ID and channel plan ID.
mesh_error_t validate_channel_mask(uint32_t channel_mask[8])
Validate Wi-SUN FHSS channel mask.
mesh_error_t set_timing_parameters(uint16_t disc_trickle_imin=0x00, uint16_t disc_trickle_imax=0x00, uint8_t disc_trickle_k=0x00, uint16_t pan_timeout=0x00)
Set Wi-SUN timing parameters.
mesh_error_t set_trusted_certificate(uint8_t *cert, uint16_t cert_len)
Set trusted certificate reference to the Wi-SUN network.
mesh_error_t validate_timing_parameters(uint16_t disc_trickle_imin, uint16_t disc_trickle_imax, uint8_t disc_trickle_k, uint16_t pan_timeout)
Validates Wi-SUN timing parameters.
mesh_error_t remove_own_certificates(void)
Remove own certificates from the Wi-SUN network.
mesh_error_t info_get(ws_rpl_info_t *info_ptr)
Get Wi-SUN Router information.
mesh_error_t get_timing_parameters(uint16_t *disc_trickle_imin, uint16_t *disc_trickle_imax, uint8_t *disc_trickle_k, uint16_t *pan_timeout)
Get Wi-SUN timing parameters.
mesh_error_t stack_info_get(ws_stack_state_t *stack_info_ptr)
Get Wi-SUN Stack information.
mesh_error_t set_own_certificate(uint8_t *cert, uint16_t cert_len, uint8_t *cert_key=NULL, uint16_t cert_key_len=0)
Set own certificate and private key reference to the Wi-SUN network.
mesh_error_t validate_network_name(char *network_name)
Validate Wi-SUN network name.
mesh_error_t reset_statistics(void)
Reset Wi-SUN statistics.
mesh_error_t set_network_name(char *network_name)
Set Wi-SUN network name.
signed int nsapi_error_t
Type used to represent error codes.
Mesh physical layer statistics.
Struct ws_cca_threshold_table Wi-SUN CCA threshold table information.
const int8_t * cca_threshold_table
CCA threshold table.
uint8_t number_of_channels
Number of channels.
Struct ws_nbr_info_t Gives the neighbor information.
uint16_t rpl_rank
RPL Rank value for parents 0xffff for neighbors RANK is unknown.
uint8_t global_address[16]
Global address if it is known set to 0 if not available.
uint16_t etx
Measured ETX value if known set to 0xFFFF if not known or Child.
uint32_t lifetime
Remaining lifetime Link lifetime for parents and ARO lifetime for children.
uint8_t rsl_out
parent RSSI Out measured RSSI value calculated using EWMA specified by Wi-SUN from range of -174 (0) ...
ws_nbr_type_e type
Neighbour type (Primary Parent, Secondary Parent, Candidate parent, child, other(Temporary neighbours...
uint8_t rsl_in
parent RSSI in measured RSSI value calculated using EWMA specified by Wi-SUN from range of -174 (0) t...
uint8_t link_local_address[16]
Link local address.
Struct ws_rpl_info Wi-SUN router RPL information.
uint16_t current_rank
RPL DODAG node current Rank.
uint8_t rpl_dodag_id[16]
Router dodag id.
uint16_t primary_parent_rank
RPL Primary Parent Rank.
uint8_t version
RPL version number.
uint8_t instance_id
Router instance identifier.
Struct ws_stack_state Wi-SUN stack information.
uint8_t device_min_sens
Device RF minimum sensitivity configuration.
uint16_t pan_id
Network PAN ID.
uint8_t rsl_out
parent RSSI Out measured RSSI value calculated using EWMA specified by Wi-SUN from range of -174 (0) ...
uint8_t join_state
Wi-SUN join state defined by Wi-SUN specification 1-5.
uint8_t rsl_in
parent RSSI in measured RSSI value calculated using EWMA specified by Wi-SUN from range of -174 (0) t...
uint8_t link_local_addr[16]
Mesh Interface Link Local IPv6 Address.
uint8_t global_addr[16]
Mesh Interface Global IPv6 Address.
uint8_t parent_addr[16]
Parent link local address.