Decides whether a half-duplex radio link may send while its radio reports that it is receiving a pack...
void received()
A packet arrived, so the peer has taken its turn.
void set_turnaround(uint32_t turnaround_ms)
void end_busy()
Ends the busy period, when the radio is seen to be free other than by a send.
static constexpr uint32_t DEFAULT_MAX_BUSY_MS
void sent(uint32_t now, uint32_t pass)
A packet was sent, ending at now, in the loop pass that started at pass.
uint32_t get_max_busy() const
uint32_t busy_for(uint32_t now) const
How long the current busy period has lasted at now.
bool may_send(bool busy, uint32_t now, uint32_t pass)
True if a packet may be sent at now, in the loop pass that started at pass; busy says whether the rad...
void set_max_busy(uint32_t max_busy_ms)