10 #include <RF22Router.h>
13 #define RF22_MESH_MESSAGE_TYPE_APPLICATION 0
14 #define RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_REQUEST 1
15 #define RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_RESPONSE 2
16 #define RF22_MESH_MESSAGE_TYPE_ROUTE_FAILURE 3
102 #define RF22_MESH_MAX_MESSAGE_LEN (RF22_ROUTER_MAX_MESSAGE_LEN - sizeof(RF22Mesh::MeshMessageHeader))
114 uint8_t data[RF22_MESH_MAX_MESSAGE_LEN];
124 uint8_t
route[RF22_MESH_MAX_MESSAGE_LEN - 1];
139 RF22Mesh(uint8_t thisAddress = 0, uint8_t slaveSelectPin = SS, uint8_t interrupt = 0);
157 uint8_t
sendtoWait(uint8_t* buf, uint8_t len, uint8_t dest);
179 boolean recvfromAck(uint8_t* buf, uint8_t* len, uint8_t* source = NULL, uint8_t* dest = NULL, uint8_t*
id = NULL, uint8_t* flags = NULL);
194 boolean recvfromAckTimeout(uint8_t* buf, uint8_t* len, uint16_t timeout, uint8_t* source = NULL, uint8_t* dest = NULL, uint8_t*
id = NULL, uint8_t* flags = NULL);
216 virtual boolean doArp(uint8_t address);
232 static uint8_t _tmpMessage[RF22_ROUTER_MAX_MESSAGE_LEN];
virtual uint8_t route(RoutedMessage *message, uint8_t messageLen)
Definition: RF22Mesh.cpp:117
MeshMessageHeader header
msgType = RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_*
Definition: RF22Mesh.h:121
Definition: RF22Mesh.h:119
boolean recvfromAck(uint8_t *buf, uint8_t *len, uint8_t *source=NULL, uint8_t *dest=NULL, uint8_t *id=NULL, uint8_t *flags=NULL)
Definition: RF22Mesh.cpp:149
Signals a route failure.
Definition: RF22Mesh.h:128
MeshMessageHeader header
msgType = RF22_MESH_MESSAGE_TYPE_ROUTE_FAILURE
Definition: RF22Mesh.h:130
Defines the structure of a RF22Router message.
Definition: RF22Router.h:149
MeshMessageHeader header
msgType = RF22_MESH_MESSAGE_TYPE_APPLICATION
Definition: RF22Mesh.h:113
uint8_t dest
The address of the destination towards which the route failed.
Definition: RF22Mesh.h:131
Signals an application layer message for the caller of RF22Mesh.
Definition: RF22Mesh.h:111
RF22Mesh(uint8_t thisAddress=0, uint8_t slaveSelectPin=SS, uint8_t interrupt=0)
Definition: RF22Mesh.cpp:21
boolean recvfromAckTimeout(uint8_t *buf, uint8_t *len, uint16_t timeout, uint8_t *source=NULL, uint8_t *dest=NULL, uint8_t *id=NULL, uint8_t *flags=NULL)
Definition: RF22Mesh.cpp:221
uint8_t destlen
Reserved. Must be 1.g.
Definition: RF22Mesh.h:122
uint8_t sendtoWait(uint8_t *buf, uint8_t len, uint8_t dest)
Definition: RF22Mesh.cpp:32
virtual void peekAtMessage(RoutedMessage *message, uint8_t messageLen)
Definition: RF22Mesh.cpp:86
uint8_t dest
The address of the destination node whose route is being sought.
Definition: RF22Mesh.h:123
RF22 subclass for sending addressed, optionally acknowledged datagrams multi-hop routed across a netw...
Definition: RF22Mesh.h:97
virtual boolean isPhysicalAddress(uint8_t *address, uint8_t addresslen)
Definition: RF22Mesh.cpp:142
virtual boolean doArp(uint8_t address)
Definition: RF22Mesh.cpp:49
RF22 subclass for sending addressed, optionally acknowledged datagrams multi-hop routed across a netw...
Definition: RF22Router.h:132