RF24Network v1
|
Header which is sent with each message. More...
#include <RF24Network.h>
Public Member Functions | |
RF24NetworkHeader () | |
Default constructor. | |
RF24NetworkHeader (uint16_t _to, unsigned char _type=0) | |
Send constructor. | |
const char * | toString (void) const |
Create debugging string. | |
Public Attributes | |
uint16_t | from_node |
Logical address where the message was generated. | |
uint16_t | to_node |
Logical address where the message is going. | |
uint16_t | id |
Sequential message ID, incremented every message. | |
unsigned char | type |
Type of the packet. | |
unsigned char | reserved |
Reserved for future use. | |
Static Public Attributes | |
static uint16_t | next_id |
The message ID of the next message to be sent. |
Header which is sent with each message.
The frame put over the air consists of this header and a message
helloworld_rx.pde, helloworld_tx.pde, meshping.pde, and sensornet.pde.
RF24NetworkHeader::RF24NetworkHeader | ( | ) | [inline] |
Default constructor.
Simply constructs a blank header
RF24NetworkHeader::RF24NetworkHeader | ( | uint16_t | _to, |
unsigned char | _type = 0 |
||
) | [inline] |
Send constructor.
Use this constructor to create a header and then send a message
RF24NetworkHeader header(recipient_address,'t'); network.write(header,&message,sizeof(message));
_to | The logical node address where the message is going |
_type | The type of message which follows. Only 0-127 are allowed for user messages. |
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.
unsigned char RF24NetworkHeader::type |
Type of the packet.
0-127 are user-defined types, 128-255 are reserved for system