Vanetza
 
Loading...
Searching...
No Matches
state_machine_budget.hpp
1#ifndef STATE_MACHINE_BUDGET_HPP_9AL8A2JG
2#define STATE_MACHINE_BUDGET_HPP_9AL8A2JG
3
4#include <vanetza/common/clock.hpp>
5#include <boost/optional.hpp>
6
7namespace vanetza
8{
9
10// forward declarations
11class Runtime;
12namespace dcc { class StateMachine; }
13
14namespace dcc
15{
16
17/**
18 * StateMachineBudget: TRC restrictions as determined by a state machine
19 */
21{
22public:
24 Clock::duration delay();
25 void notify();
26
27private:
28 const StateMachine& m_fsm;
29 const Runtime& m_runtime;
30 boost::optional<Clock::time_point> m_last_tx;
31};
32
33} // namespace dcc
34} // namespace vanetza
35
36#endif /* STATE_MACHINE_BUDGET_HPP_9AL8A2JG */
37