1#ifndef CBF_COUNTER_HPP_QTMUOGJS
2#define CBF_COUNTER_HPP_QTMUOGJS
4#include <vanetza/common/clock.hpp>
5#include <vanetza/geonet/cbf_packet_identifier.hpp>
6#include <vanetza/geonet/soft_state_map.hpp>
8#include <unordered_map>
26 using id_type = CbfPacketIdentifier;
27 using counter_type = std::size_t;
33 virtual void add(
const id_type&
id) = 0;
39 virtual void remove(
const id_type&
id) = 0;
51 virtual counter_type
counter(
const id_type&
id)
const = 0;
64 void add(
const id_type&)
override;
65 void remove(
const id_type&)
override {}
67 counter_type
counter(
const id_type&)
const override;
70 std::unordered_map<id_type, counter_type> m_counters;
80 void add(
const id_type&)
override;
81 void remove(
const id_type&)
override;
100 void add(
const id_type&)
override;
103 counter_type
counter(
const id_type&)
const override;
void add(const id_type &) override
void remove(const id_type &) override
void increment(const id_type &) override
void add(const id_type &) override
void remove(const id_type &) override
counter_type counter(const id_type &) const override
counter_type counter(const id_type &) const override
void remove(const id_type &) override
void add(const id_type &) override
void increment(const id_type &) override
virtual void increment(const id_type &id)=0
virtual void add(const id_type &id)=0
virtual void remove(const id_type &id)=0
virtual counter_type counter(const id_type &id) const =0