RF24Mesh - Automated Networking for nrf24L01 & nrf52x radios v2.0.2
2024 - A user friendly mesh overlay for sensor neworks using RF24Network
Loading...
Searching...
No Matches
RF24Mesh_config.h File Reference
#include <RF24_config.h>

Go to the source code of this file.

Macros

#define MESH_MAX_CHILDREN   4
 Set 1 to 4 (Default: 4) Restricts the maximum children per node.
 
#define MESH_DEFAULT_CHANNEL   97
 Radio channel to operate on 1-127.
 
#define MESH_RENEWAL_TIMEOUT   7500
 How long to attempt address renewal in milliseconds.
 
#define MESH_MEM_ALLOC_SIZE   10
 master node memory allocation
 
#define MESH_CONNECTION_CHECK_ATTEMPTS   3
 Number of attempts to verify a connection.
 
#define RF24MESH_CONN_CHECK_PARENT   1
 
#define RF24MESH_CONN_CHECK_MASTER   0
 
#define RF24MESH_CONN_CHECK_TYPE   RF24MESH_CONN_CHECK_PARENT
 How to verify a connection.
 
#define MESH_LOOKUP_TIMEOUT   135
 How long to wait in ms for a response during individual address lookups.
 
#define MESH_WRITE_TIMEOUT   115
 How long RF24Mesh::write() retries address lookups before timing out. Allows multiple attempts.
 
#define MESH_DEFAULT_ADDRESS   NETWORK_DEFAULT_ADDRESS
 
#define MESH_MULTICAST_ADDRESS   NETWORK_MULTICAST_ADDRESS
 
#define IF_RF24MESH_DEBUG_MINIMAL(x)
 
#define IF_RF24MESH_DEBUG(x)
 

Detailed Description

macro definitions for configuring RF24Mesh

Definition in file RF24Mesh_config.h.

Macro Definition Documentation

◆ MESH_MAX_CHILDREN

#define MESH_MAX_CHILDREN   4

Set 1 to 4 (Default: 4) Restricts the maximum children per node.

The master node supports MESH_MAX_CHILDREN + 1 nodes

Definition at line 17 of file RF24Mesh_config.h.

◆ MESH_DEFAULT_CHANNEL

#define MESH_DEFAULT_CHANNEL   97

Radio channel to operate on 1-127.

This is normally modified by calling RF24Mesh::setChannel()

Definition at line 33 of file RF24Mesh_config.h.

◆ MESH_RENEWAL_TIMEOUT

#define MESH_RENEWAL_TIMEOUT   7500

How long to attempt address renewal in milliseconds.

See also
RF24Mesh::renewAddress()

Definition at line 41 of file RF24Mesh_config.h.

◆ MESH_MEM_ALLOC_SIZE

#define MESH_MEM_ALLOC_SIZE   10

master node memory allocation

On the master node memory for the address list (nodeIDs + RF24Network Addresses) is allocated dynamically and re-allocated using this value

Example: With a value of 10, space for 10 nodes is allocated on startup. Adding an 11th node will re-allocate the memory space to support 10 more nodes.

On 8-bit AVRs (Arduino Uno, Nano etc) each entry uses 3-bytes of memory space. Minimize this value to save memory. Allocate enough to prevent memory fragmentation.

Definition at line 54 of file RF24Mesh_config.h.

◆ MESH_CONNECTION_CHECK_ATTEMPTS

#define MESH_CONNECTION_CHECK_ATTEMPTS   3

Number of attempts to verify a connection.

On child nodes, when calling mesh.checkConnection();, configure how many attempts will be made to contact the master node to verify connectivity Raising this number can result in a more stable mesh, since nodes can more easily verify that a connection is active

Definition at line 64 of file RF24Mesh_config.h.

◆ RF24MESH_CONN_CHECK_PARENT

#define RF24MESH_CONN_CHECK_PARENT   1

Definition at line 67 of file RF24Mesh_config.h.

◆ RF24MESH_CONN_CHECK_MASTER

#define RF24MESH_CONN_CHECK_MASTER   0

Definition at line 68 of file RF24Mesh_config.h.

◆ RF24MESH_CONN_CHECK_TYPE

#define RF24MESH_CONN_CHECK_TYPE   RF24MESH_CONN_CHECK_PARENT

How to verify a connection.

On child nodes, determine how they verify/check their connection periodically, or when writes start to fail via the RF24Mesh::checkConnection(); function. Set RF24MESH_CONN_CHECK_TYPE to RF24MESH_CONN_CHECK_PARENT for the new behaviour of verifying connectivity only with their parent node. Set RF24MESH_CONN_CHECK_TYPE to RF24MESH_CONN_CHECK_MASTER for the old behaviour of verifying connectivity with the master node. The old behaviour typically results in more network congestion, more load on the master node, and less reliable networks, but it can work well when radio conditions are good and/or when there are only a small number of nodes on the network and/or in close proximity to the master node.

Definition at line 81 of file RF24Mesh_config.h.

◆ MESH_LOOKUP_TIMEOUT

#define MESH_LOOKUP_TIMEOUT   135

How long to wait in ms for a response during individual address lookups.

See also
RF24Mesh::getNodeID and RF24Mesh::getAddress If using distant nodes or a large number of nodes this value can be increased in general or for specific nodes. For Level 1 nodes a response typically takes 2-3ms in good conditions. For Level 2 nodes: 4-5ms, Level 3: 6-15ms, Level 4: 10-25ms

Definition at line 103 of file RF24Mesh_config.h.

◆ MESH_WRITE_TIMEOUT

#define MESH_WRITE_TIMEOUT   115

How long RF24Mesh::write() retries address lookups before timing out. Allows multiple attempts.

Definition at line 108 of file RF24Mesh_config.h.

◆ MESH_DEFAULT_ADDRESS

#define MESH_DEFAULT_ADDRESS   NETWORK_DEFAULT_ADDRESS

◆ MESH_MULTICAST_ADDRESS

#define MESH_MULTICAST_ADDRESS   NETWORK_MULTICAST_ADDRESS

Definition at line 115 of file RF24Mesh_config.h.

◆ IF_RF24MESH_DEBUG_MINIMAL

#define IF_RF24MESH_DEBUG_MINIMAL ( x)

Definition at line 133 of file RF24Mesh_config.h.

◆ IF_RF24MESH_DEBUG

#define IF_RF24MESH_DEBUG ( x)

Definition at line 139 of file RF24Mesh_config.h.