Optimized RF24Network Layer v2.0.2
2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
|
#include <RF24Network.h>
Public Member Functions | |
RF24NetworkHeader () | |
RF24NetworkHeader (uint16_t _to, unsigned char _type=0) | |
const char * | toString (void) const |
Public Attributes | |
uint16_t | from_node |
uint16_t | to_node |
uint16_t | id |
unsigned char | type |
unsigned char | reserved |
Static Public Attributes | |
static uint16_t | next_id = 1 |
Header which is sent with each message
The frame put over the air consists of this header and a message
Headers are addressed to the appropriate node, and the network forwards them on to their final destination.
|
inline |
Default constructor
Simply constructs a blank header
|
inline |
Send constructor
Fragmentation is enabled by default for all devices except ATTiny. Configure fragmentation and max payload size in RF24Network_config.h
Use this constructor to create a header and then send a message
_to | The Octal format, logical node address where the message is going |
_type | The type of message which follows. Only 0 - 127 are allowed for user messages. Types 1 - 64 will not receive a network acknowledgement. |
const char * RF24NetworkHeader::toString | ( | void | ) | const |
Create debugging string
Useful for debugging. Dumps all members into a single string, using internal static memory. This memory will get overridden next time you call the method.
uint16_t RF24NetworkHeader::from_node |
Logical address where the message was generated
uint16_t RF24NetworkHeader::to_node |
Logical address where the message is going
uint16_t RF24NetworkHeader::id |
Sequential message ID, incremented every time a new frame is constructed
unsigned char RF24NetworkHeader::type |
Type of the packet. 0 - 127 are user-defined types, 128 - 255 are reserved for system.
User message types 1 through 64 will NOT be acknowledged by the network, while message types 65 through 127 will receive a network ACK. System message types 192 through 255 will NOT be acknowledged by the network. Message types 128 through 192 will receive a network ACK.
unsigned char RF24NetworkHeader::reserved |
Reserved for system use
During fragmentation, it carries the fragment_id, and on the last fragment it carries the header_type.
|
static |
The message ID of the next message to be sent. This attribute is not sent with the header.