Add possibility to configure Mesh MAC neighbourtable size.

Accepted values are 5-255. MAC neighbour table size is limited to 8-bit number so thats why 255 is max value.
pull/12914/head
Juha Heiskanen 2020-05-04 13:08:39 +03:00
parent af4c8a94f3
commit 3471c3b8c1
4 changed files with 10 additions and 3 deletions

View File

@ -6,6 +6,12 @@
"help": "Nanostack's heap size [bytes: 0-4294967295]",
"value": 32500
},
"mac-neigh-table-size": {
"help": "Number of devices stored to the SW MAC neighbour table",
"value_min": 5,
"value_max": 255,
"value": 32
},
"use-malloc-for-heap": {
"help": "Use `malloc()` for reserving the Nanostack's internal heap.",
"value": false

View File

@ -425,7 +425,7 @@ int8_t nd_tasklet_network_init(int8_t device_id)
{
// TODO, read interface name from configuration
mac_description_storage_size_t storage_sizes;
storage_sizes.device_decription_table_size = 32;
storage_sizes.device_decription_table_size = MBED_CONF_MBED_MESH_API_MAC_NEIGH_TABLE_SIZE;
storage_sizes.key_description_table_size = 3;
storage_sizes.key_lookup_size = 1;
storage_sizes.key_usage_size = 3;

View File

@ -461,7 +461,7 @@ int8_t thread_tasklet_network_init(int8_t device_id)
{
// TODO, read interface name from configuration
mac_description_storage_size_t storage_sizes;
storage_sizes.device_decription_table_size = 32;
storage_sizes.device_decription_table_size = MBED_CONF_MBED_MESH_API_MAC_NEIGH_TABLE_SIZE;
storage_sizes.key_description_table_size = 6;
storage_sizes.key_lookup_size = 1;
storage_sizes.key_usage_size = 3;

View File

@ -38,6 +38,7 @@
#include MBED_CONF_MBED_MESH_API_CERTIFICATE_HEADER
#endif
// For tracing we need to define flag, have include and define group
//#define HAVE_DEBUG
#define TRACE_GROUP "WSND"
@ -581,7 +582,7 @@ int8_t wisun_tasklet_network_init(int8_t device_id)
{
// TODO, read interface name from configuration
mac_description_storage_size_t storage_sizes;
storage_sizes.device_decription_table_size = 32;
storage_sizes.device_decription_table_size = MBED_CONF_MBED_MESH_API_MAC_NEIGH_TABLE_SIZE;
storage_sizes.key_description_table_size = 4;
storage_sizes.key_lookup_size = 1;
storage_sizes.key_usage_size = 3;