7#ifndef RHReliableDatagram_h
8#define RHReliableDatagram_h
10#include <RHDatagram.h>
14#define RH_FLAGS_ACK 0x80
17#define RH_FLAGS_RETRY 0x40
30#ifndef RH_ENABLE_EXPLICIT_RETRY_DEDUP
31 #define RH_ENABLE_EXPLICIT_RETRY_DEDUP 0
35#define RH_DEFAULT_TIMEOUT 200
38#define RH_DEFAULT_RETRIES 3
137 bool sendtoWait(uint8_t* buf, uint8_t len, uint8_t address);
160 bool recvfromAck(uint8_t* buf, uint8_t* len, uint8_t* from = NULL, uint8_t* to = NULL, uint8_t*
id = NULL, uint8_t* flags = NULL);
175 bool recvfromAckTimeout(uint8_t* buf, uint8_t* len, uint16_t timeout, uint8_t* from = NULL, uint8_t* to = NULL, uint8_t*
id = NULL, uint8_t* flags = NULL);
198 uint32_t _retransmissions;
202 uint8_t _lastSequenceNumber;
216 uint8_t _seenIds[256];
Manager class for addressed, unreliable messages.
Definition RHDatagram.h:46
uint8_t thisAddress()
Definition RHDatagram.cpp:77
Abstract base class for a RadioHead driver.
Definition RHGenericDriver.h:42
RHDatagram subclass for sending addressed, acknowledged, retransmitted datagrams.
Definition RHReliableDatagram.h:96
void resetRetransmissions()
Definition RHReliableDatagram.cpp:200
uint32_t retransmissions()
Definition RHReliableDatagram.cpp:195
void setRetries(uint8_t retries)
Definition RHReliableDatagram.cpp:36
void setTimeout(uint16_t timeout)
Definition RHReliableDatagram.cpp:30
uint8_t retries()
Definition RHReliableDatagram.cpp:42
bool recvfromAckTimeout(uint8_t *buf, uint8_t *len, uint16_t timeout, uint8_t *from=NULL, uint8_t *to=NULL, uint8_t *id=NULL, uint8_t *flags=NULL)
Definition RHReliableDatagram.cpp:179
void acknowledge(uint8_t id, uint8_t from)
Definition RHReliableDatagram.cpp:205
bool sendtoWait(uint8_t *buf, uint8_t len, uint8_t address)
Definition RHReliableDatagram.cpp:48
bool recvfromAck(uint8_t *buf, uint8_t *len, uint8_t *from=NULL, uint8_t *to=NULL, uint8_t *id=NULL, uint8_t *flags=NULL)
Definition RHReliableDatagram.cpp:128