13#define RH_MESH_MESSAGE_TYPE_APPLICATION 0
14#define RH_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_REQUEST 1
15#define RH_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_RESPONSE 2
16#define RH_MESH_MESSAGE_TYPE_ROUTE_FAILURE 3
19#define RH_MESH_ARP_TIMEOUT 4000
120 #define RH_MESH_MAX_MESSAGE_LEN (RH_ROUTER_MAX_MESSAGE_LEN - sizeof(RHMesh::MeshMessageHeader))
132 uint8_t data[RH_MESH_MAX_MESSAGE_LEN];
141 uint8_t
route[RH_MESH_MAX_MESSAGE_LEN - 2];
175 uint8_t
sendtoWait(uint8_t* buf, uint8_t len, uint8_t dest, uint8_t flags = 0);
200 bool recvfromAck(uint8_t* buf, uint8_t* len, uint8_t* source = NULL, uint8_t* dest = NULL, uint8_t*
id = NULL, uint8_t* flags = NULL, uint8_t* hops = NULL);
216 bool 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, uint8_t* hops = NULL);
238 virtual bool doArp(uint8_t address);
254 static uint8_t _tmpMessage[RH_ROUTER_MAX_MESSAGE_LEN];
uint8_t thisAddress()
Definition RHDatagram.cpp:77
Abstract base class for a RadioHead driver.
Definition RHGenericDriver.h:42
RHRouter subclass for sending addressed, optionally acknowledged datagrams multi-hop routed across a ...
Definition RHMesh.h:116
virtual uint8_t route(RoutedMessage *message, uint8_t messageLen)
Definition RHMesh.cpp:123
virtual bool doArp(uint8_t address)
Definition RHMesh.cpp:51
bool 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, uint8_t *hops=NULL)
Definition RHMesh.cpp:236
virtual void peekAtMessage(RoutedMessage *message, uint8_t messageLen)
Definition RHMesh.cpp:92
uint8_t sendtoWait(uint8_t *buf, uint8_t len, uint8_t dest, uint8_t flags=0)
Definition RHMesh.cpp:31
virtual bool isPhysicalAddress(uint8_t *address, uint8_t addresslen)
Definition RHMesh.cpp:148
bool recvfromAck(uint8_t *buf, uint8_t *len, uint8_t *source=NULL, uint8_t *dest=NULL, uint8_t *id=NULL, uint8_t *flags=NULL, uint8_t *hops=NULL)
Definition RHMesh.cpp:155
RHReliableDatagram subclass for sending addressed, optionally acknowledged datagrams multi-hop routed...
Definition RHRouter.h:134
Signals an application layer message for the caller of RHMesh.
Definition RHMesh.h:130
MeshMessageHeader header
msgType = RH_MESH_MESSAGE_TYPE_APPLICATION
Definition RHMesh.h:131
Signals a route discovery request or reply (At present only supports physical dest addresses of lengt...
Definition RHMesh.h:137
uint8_t dest
The address of the destination node whose route is being sought.
Definition RHMesh.h:140
MeshMessageHeader header
msgType = RH_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_*
Definition RHMesh.h:138
uint8_t destlen
Reserved. Must be 1.
Definition RHMesh.h:139
Signals a route failure.
Definition RHMesh.h:146
uint8_t dest
The address of the destination towards which the route failed.
Definition RHMesh.h:148
MeshMessageHeader header
msgType = RH_MESH_MESSAGE_TYPE_ROUTE_FAILURE
Definition RHMesh.h:147
Defines the structure of a RHRouter message.
Definition RHRouter.h:150