#include <cbf_counter.hpp>
Public Types | |
using | id_type = CbfPacketIdentifier |
using | counter_type = std::size_t |
Public Member Functions | |
CbfCounterFading (Runtime &, Clock::duration lifetime) | |
void | add (const id_type &) override |
void | remove (const id_type &) override |
void | increment (const id_type &) override |
counter_type | counter (const id_type &) const override |
Private Attributes | |
SoftStateMap< id_type, counter_type > | m_counters |
Fading CBF counters
Counters are removed from the internal table only after expiry, i.e. they are soft-state. This fixes some serious GN flooding due to ADVANCED routing, see CbfCounterContending.
Definition at line 90 of file cbf_counter.hpp.
|
inherited |
Definition at line 27 of file cbf_counter.hpp.
|
inherited |
Definition at line 26 of file cbf_counter.hpp.
vanetza::geonet::CbfCounterFading::CbfCounterFading | ( | Runtime & | rt, |
Clock::duration | lifetime | ||
) |
Definition at line 39 of file cbf_counter.cpp.
|
overridevirtual |
Packet has been added to buffer
id | packet identifier |
Implements vanetza::geonet::CbfCounter.
Definition at line 45 of file cbf_counter.cpp.
|
overridevirtual |
Retrieve counter value
id | packet identifier |
Implements vanetza::geonet::CbfCounter.
Definition at line 56 of file cbf_counter.cpp.
|
overridevirtual |
Increment packet counter by one
id | packet identifier |
Implements vanetza::geonet::CbfCounter.
Definition at line 51 of file cbf_counter.cpp.
|
inlineoverridevirtual |
Packet has been removed from buffer.
id | packet identifier |
Implements vanetza::geonet::CbfCounter.
Definition at line 101 of file cbf_counter.hpp.
|
private |
Definition at line 106 of file cbf_counter.hpp.