Optimized RF24Network Layer v2.0.2
2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
Loading...
Searching...
No Matches
RF24NetworkFrame Struct Reference

#include <RF24Network.h>

Public Member Functions

 RF24NetworkFrame ()
 
 RF24NetworkFrame (RF24NetworkHeader &_header, const void *_message=NULL, uint16_t _len=0)
 
 RF24NetworkFrame (RF24NetworkHeader &_header, uint16_t _message_size)
 

Public Attributes

RF24NetworkHeader header
 
uint16_t message_size
 
uint8_t * message_buffer
 

Detailed Description

Frame structure for internal message handling, and for use by external applications

The actual frame put over the air consists of a header (8-bytes) and a message payload (Up to 24-bytes). When data is received, it is stored using the RF24NetworkFrame structure, which includes:

  1. The header containing information about routing the message and the message type
  2. The size of the included message
  3. The 'message' or data being received

Constructor & Destructor Documentation

◆ RF24NetworkFrame() [1/3]

RF24NetworkFrame::RF24NetworkFrame ( )
inline

Default constructor

Simply constructs a blank frame. Frames are generally used internally. See RF24NetworkHeader.

◆ RF24NetworkFrame() [2/3]

RF24NetworkFrame::RF24NetworkFrame ( RF24NetworkHeader & _header,
const void * _message = NULL,
uint16_t _len = 0 )
inline

Constructor for Linux platforms - create a network frame with data Frames are constructed and handled differently on Arduino/AVR and Linux devices (#if defined RF24_LINUX)

Parameters
_headerThe RF24Network header to be stored in the frame
_messageThe 'message' or data.
_lenThe size of the 'message' or data.

Frames are used internally and by external systems. See RF24NetworkHeader.

◆ RF24NetworkFrame() [3/3]

RF24NetworkFrame::RF24NetworkFrame ( RF24NetworkHeader & _header,
uint16_t _message_size )
inline

Constructor for Arduino/AVR/etc. platforms - create a network frame with data Frames are constructed and handled differently on Arduino/AVR and Linux devices (#if defined RF24_LINUX)

See also
ESBNetwork.frag_ptr
Parameters
_headerThe RF24Network header to be stored in the frame
_message_sizeThe size of the 'message' or data

Frames are used internally and by external systems. See RF24NetworkHeader.

Member Data Documentation

◆ header

RF24NetworkHeader RF24NetworkFrame::header

Header which is sent with each message

◆ message_size

uint16_t RF24NetworkFrame::message_size

The size in bytes of the payload length

◆ message_buffer

uint8_t* RF24NetworkFrame::message_buffer

On Arduino, the message buffer is just a pointer, and can be pointed to any memory location. On Linux the message buffer is a standard byte array, equal in size to the defined MAX_PAYLOAD_SIZE