fd

Dependents:   xtoff3 CYS_Receiver

Fork of RF24Network by Akash Vibhute

Embed: (wiki syntax)

« Back to documentation index

RF24NetworkFrame Struct Reference

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.
 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)
const char * toString (void) const
 Create debugging string.

Data Fields

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

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

Definition at line 258 of file RF24Network.h.


Constructor & Destructor Documentation

Default constructor.

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

Definition at line 276 of file RF24Network.h.

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)


**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.

Definition at line 298 of file RF24Network.h.


Member Function Documentation

const char* 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

Field Documentation

Header which is sent with each message.

Definition at line 259 of file RF24Network.h.

uint8_t* 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

Definition at line 267 of file RF24Network.h.

uint16_t message_size

The size in bytes of the payload length.

Definition at line 260 of file RF24Network.h.