Vanetza
 
Loading...
Searching...
No Matches
vanetza::geonet::CbfCounter Class Referenceabstract

#include <cbf_counter.hpp>

Inheritance diagram for vanetza::geonet::CbfCounter:

Public Types

using id_type = CbfPacketIdentifier
 
using counter_type = std::size_t
 

Public Member Functions

virtual void add (const id_type &id)=0
 
virtual void remove (const id_type &id)=0
 
virtual void increment (const id_type &id)=0
 
virtual counter_type counter (const id_type &id) const =0
 

Detailed Description

Interface for duplicate packet counters. This is used by the Contention Based Forwarding (CBF) packet buffer.

Definition at line 23 of file cbf_counter.hpp.

Member Typedef Documentation

◆ counter_type

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

Definition at line 27 of file cbf_counter.hpp.

◆ id_type

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

Definition at line 26 of file cbf_counter.hpp.

Member Function Documentation

◆ add()

virtual void vanetza::geonet::CbfCounter::add ( const id_type &  id)
pure virtual

Packet has been added to buffer

Parameters
idpacket identifier

Implemented in vanetza::geonet::CbfCounterImmortal, vanetza::geonet::CbfCounterContending, and vanetza::geonet::CbfCounterFading.

◆ counter()

virtual counter_type vanetza::geonet::CbfCounter::counter ( const id_type &  id) const
pure virtual

Retrieve counter value

Parameters
idpacket identifier

Implemented in vanetza::geonet::CbfCounterImmortal, and vanetza::geonet::CbfCounterFading.

◆ increment()

virtual void vanetza::geonet::CbfCounter::increment ( const id_type &  id)
pure virtual

Increment packet counter by one

Parameters
idpacket identifier

Implemented in vanetza::geonet::CbfCounterImmortal, and vanetza::geonet::CbfCounterFading.

◆ remove()

virtual void vanetza::geonet::CbfCounter::remove ( const id_type &  id)
pure virtual

Packet has been removed from buffer.

Parameters
idpacket identifier

Implemented in vanetza::geonet::CbfCounterImmortal, vanetza::geonet::CbfCounterContending, and vanetza::geonet::CbfCounterFading.


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