Skip to content

Commit fe26e15

Browse files
author
Juha Heiskanen
committed
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.
1 parent 8d61f3b commit fe26e15

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

features/nanostack/mbed-mesh-api/mbed_lib.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
"help": "Nanostack's heap size [bytes: 0-‭4294967295‬]",
77
"value": 32500
88
},
9+
"mac-neigh-table-size": {
10+
"help": "Number of devices stored to the SW MAC neighbour table",
11+
"value_min": 5,
12+
"value_max": 255,
13+
"value": 32
14+
},
915
"use-malloc-for-heap": {
1016
"help": "Use `malloc()` for reserving the Nanostack's internal heap.",
1117
"value": false

features/nanostack/mbed-mesh-api/source/nd_tasklet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ int8_t nd_tasklet_network_init(int8_t device_id)
425425
{
426426
// TODO, read interface name from configuration
427427
mac_description_storage_size_t storage_sizes;
428-
storage_sizes.device_decription_table_size = 32;
428+
storage_sizes.device_decription_table_size = MBED_CONF_MBED_MESH_API_MAC_NEIGH_TABLE_SIZE;
429429
storage_sizes.key_description_table_size = 3;
430430
storage_sizes.key_lookup_size = 1;
431431
storage_sizes.key_usage_size = 3;

features/nanostack/mbed-mesh-api/source/thread_tasklet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ int8_t thread_tasklet_network_init(int8_t device_id)
461461
{
462462
// TODO, read interface name from configuration
463463
mac_description_storage_size_t storage_sizes;
464-
storage_sizes.device_decription_table_size = 32;
464+
storage_sizes.device_decription_table_size = MBED_CONF_MBED_MESH_API_MAC_NEIGH_TABLE_SIZE;
465465
storage_sizes.key_description_table_size = 6;
466466
storage_sizes.key_lookup_size = 1;
467467
storage_sizes.key_usage_size = 3;

features/nanostack/mbed-mesh-api/source/wisun_tasklet.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include MBED_CONF_MBED_MESH_API_CERTIFICATE_HEADER
4040
#endif
4141

42+
4243
// For tracing we need to define flag, have include and define group
4344
//#define HAVE_DEBUG
4445
#define TRACE_GROUP "WSND"
@@ -526,7 +527,7 @@ int8_t wisun_tasklet_network_init(int8_t device_id)
526527
{
527528
// TODO, read interface name from configuration
528529
mac_description_storage_size_t storage_sizes;
529-
storage_sizes.device_decription_table_size = 32;
530+
storage_sizes.device_decription_table_size = MBED_CONF_MBED_MESH_API_MAC_NEIGH_TABLE_SIZE;
530531
storage_sizes.key_description_table_size = 4;
531532
storage_sizes.key_lookup_size = 1;
532533
storage_sizes.key_usage_size = 3;

0 commit comments

Comments
 (0)