#include <repeater.hpp>
Classes | |
| struct | Repetition |
Public Types | |
| using | Callback = std::function<void(const DataRequestVariant&, std::unique_ptr<DownPacket>)> |
Public Member Functions | |
| Repeater (Runtime &rt, const Callback &cb) | |
| template<class REQUEST> | |
| void | add (const REQUEST &request, const DownPacket &payload) |
Private Member Functions | |
| void | add (const DataRequestVariant &, const DataRequest::Repetition &, const DownPacket &) |
| void | trigger (std::list< Repetition >::iterator, Clock::time_point) |
Private Attributes | |
| std::list< Repetition > | m_repetitions |
| Callback | m_repeat_fn |
| Runtime & | m_runtime |
Repeater eases handling of packet repetitions. Packet repetitions are repeated requests with same payload.
Definition at line 23 of file repeater.hpp.
| using vanetza::geonet::Repeater::Callback = std::function<void(const DataRequestVariant&, std::unique_ptr<DownPacket>)> |
Definition at line 26 of file repeater.hpp.
| vanetza::geonet::Repeater::Repeater | ( | Runtime & | rt, |
| const Callback & | cb ) |
Create a Repeater instance
| rt | runtime used for scheduling repetitions |
| cb | callback to be invoked when repetition is due |
Definition at line 16 of file repeater.cpp.
| vanetza::geonet::Repeater::~Repeater | ( | ) |
Definition at line 21 of file repeater.cpp.
|
private |
Add packet repetition to internal book keeping
Definition at line 26 of file repeater.cpp.
|
inline |
Add another repetition
| request | any kind of GeoNet data request |
| payload | request's payload |
Definition at line 42 of file repeater.hpp.
|
private |
Triggered when repetition is due according to runtime
Definition at line 38 of file repeater.cpp.
|
private |
Definition at line 69 of file repeater.hpp.
|
private |
Definition at line 68 of file repeater.hpp.
|
private |
Definition at line 70 of file repeater.hpp.