Vanetza
 
Loading...
Searching...
No Matches
smoothing_channel_probe_processor.hpp
1#ifndef SMOOTHING_CHANNEL_PROBE_PROCESSOR_HPP_EIP1WUDK
2#define SMOOTHING_CHANNEL_PROBE_PROCESSOR_HPP_EIP1WUDK
3
4#include <vanetza/common/unit_interval.hpp>
5#include <vanetza/dcc/channel_load.hpp>
6#include <vanetza/dcc/hooked_channel_probe_processor.hpp>
7#include <functional>
8
9namespace vanetza
10{
11namespace dcc
12{
13
14/**
15 * Smooth local channel load measurements as per
16 * C2C-CC Whitepaper on DCC for Day One (Version 1.0 from 2013)
17 * and Basic System Profile (RS_BSP_240 in Version 1.3)
18 */
20{
21public:
22 /**
23 * Initialize ChannelProbeProcessor with smoothing behaviour.
24 * \param alpha smoothing factor (influence of new raw measurement)
25 */
27
28 /**
29 * Feed new local channel load measurement into smoothing algorithm.
30 * Side effect: Update function is called afterwards with smoothed channel load.
31 * \param cl raw local channel load
32 */
33 void indicate(ChannelLoad cl) override;
34
35 /**
36 * Get smoothed channel load value
37 */
39
40private:
41 UnitInterval m_alpha;
42 ChannelLoad m_channel_load;
43};
44
45} // namespace dcc
46} // namespace vanetza
47
48#endif /* SMOOTH_CHANNEL_PROBE_PROCESSOR_HPP_EIP1WUDK */
49