1#ifndef GRADUAL_STATE_MACHINE_HPP_CGPVG4CS
2#define GRADUAL_STATE_MACHINE_HPP_CGPVG4CS
4#include <vanetza/common/clock.hpp>
5#include <vanetza/dcc/channel_load.hpp>
6#include <vanetza/dcc/state_machine.hpp>
28 lower_limit(limit), off_time(off_time) {}
31 Clock::duration off_time;
33 bool operator<(
const State& other)
const {
return lower_limit < other.lower_limit; }
35 using StateContainer = std::set<State>;
42 std::string state()
const;
47 StateContainer m_states;
48 StateContainer::const_iterator m_current;
54static const GradualStateMachine::StateContainer etsiStates1ms = {
55 {
ChannelLoad(0.00), std::chrono::milliseconds(100) },
56 { ChannelLoad(0.30), std::chrono::milliseconds(200) },
57 { ChannelLoad(0.40), std::chrono::milliseconds(400) },
58 { ChannelLoad(0.50), std::chrono::milliseconds(500) },
59 { ChannelLoad(0.60), std::chrono::milliseconds(1000) }
65static const GradualStateMachine::StateContainer etsiStates500us = {
66 { ChannelLoad(0.00), std::chrono::milliseconds(50) },
67 { ChannelLoad(0.30), std::chrono::milliseconds(100) },
68 { ChannelLoad(0.40), std::chrono::milliseconds(200) },
69 { ChannelLoad(0.50), std::chrono::milliseconds(250) },
70 { ChannelLoad(0.65), std::chrono::milliseconds(1000) }
Clock::duration transmission_interval() const override
void update(ChannelLoad) override