Newly Optimized RF24Network Layer  v1.0.7
2014-2015 - Optimized RF24 Network Layer for NRF24L01 radios
Public Member Functions | Public Attributes | List of all members
RF24NetworkFrame Struct Reference

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

#include <RF24Network.h>

Public Member Functions

 RF24NetworkFrame ()
 Default constructor. More...
 
 RF24NetworkFrame (RF24NetworkHeader &_header, uint16_t _message_size)
 Constructor - create a network frame with data Frames are constructed and handled differently on Arduino/AVR and Linux devices (defined RF24_LINUX) More...
 
const char * toString (void) const
 Create debugging string. More...
 

Public Attributes

RF24NetworkHeader header
 Header which is sent with each message. More...
 
uint16_t message_size
 The size in bytes of the payload length. More...
 
uint8_t * message_buffer
 On Arduino, the message buffer is just a pointer, and can be pointed to any memory location. More...
 

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
  2. The size of the included message
  3. The 'message' or data being received

Constructor & Destructor Documentation

RF24NetworkFrame::RF24NetworkFrame ( )
inline

Default constructor.

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

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

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


Linux:

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


Arduino/AVR/Etc.

See also
RF24Network.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 Function Documentation

const char* RF24NetworkFrame::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.

Returns
String representation of this object

Member Data Documentation

RF24NetworkHeader RF24NetworkFrame::header

Header which is sent with each message.

uint16_t RF24NetworkFrame::message_size

The size in bytes of the payload length.

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