Vanetza
 
Loading...
Searching...
No Matches
vanetza::geonet::CbfCounterFading Class Reference

#include <cbf_counter.hpp>

Inheritance diagram for vanetza::geonet::CbfCounterFading:

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
 

Detailed Description

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.

Member Typedef Documentation

◆ counter_type

using vanetza::geonet::CbfCounter::counter_type = std::size_t
inherited

Definition at line 27 of file cbf_counter.hpp.

◆ id_type

using vanetza::geonet::CbfCounter::id_type = CbfPacketIdentifier
inherited

Definition at line 26 of file cbf_counter.hpp.

Constructor & Destructor Documentation

◆ CbfCounterFading()

vanetza::geonet::CbfCounterFading::CbfCounterFading ( Runtime rt,
Clock::duration  lifetime 
)

Definition at line 39 of file cbf_counter.cpp.

Member Function Documentation

◆ add()

void vanetza::geonet::CbfCounterFading::add ( const id_type &  id)
overridevirtual

Packet has been added to buffer

Parameters
idpacket identifier

Implements vanetza::geonet::CbfCounter.

Definition at line 45 of file cbf_counter.cpp.

◆ counter()

auto vanetza::geonet::CbfCounterFading::counter ( const id_type &  id) const
overridevirtual

Retrieve counter value

Parameters
idpacket identifier

Implements vanetza::geonet::CbfCounter.

Definition at line 56 of file cbf_counter.cpp.

◆ increment()

void vanetza::geonet::CbfCounterFading::increment ( const id_type &  id)
overridevirtual

Increment packet counter by one

Parameters
idpacket identifier

Implements vanetza::geonet::CbfCounter.

Definition at line 51 of file cbf_counter.cpp.

◆ remove()

void vanetza::geonet::CbfCounterFading::remove ( const id_type &  id)
inlineoverridevirtual

Packet has been removed from buffer.

Parameters
idpacket identifier

Implements vanetza::geonet::CbfCounter.

Definition at line 101 of file cbf_counter.hpp.

Member Data Documentation

◆ m_counters

SoftStateMap<id_type, counter_type> vanetza::geonet::CbfCounterFading::m_counters
private

Definition at line 106 of file cbf_counter.hpp.


The documentation for this class was generated from the following files: