Vanetza
Loading...
Searching...
No Matches
channel_load.hpp
1
#ifndef CHANNEL_LOAD_HPP_D1JOCNLP
2
#define CHANNEL_LOAD_HPP_D1JOCNLP
3
4
#include <vanetza/common/unit_interval.hpp>
5
6
namespace
vanetza
7
{
8
namespace
dcc
9
{
10
11
class
ChannelLoad
:
public
UnitInterval
12
{
13
public
:
14
using
UnitInterval::UnitInterval;
15
ChannelLoad
() =
default
;
16
ChannelLoad
(
const
UnitInterval
&);
17
18
/**
19
* Create ChannelLoad from rational probes
20
* \see ChannelLoad::create_from_probes
21
*
22
* \param probes_busy number of probes above busy threshold
23
* \param probes_total total number of probes
24
*/
25
ChannelLoad
(
unsigned
probes_busy,
unsigned
probes_total);
26
27
/**
28
* Calculate UnitInterval representing ChannelLoad from rational probes
29
* \param probes_busy number of probes above busy threshold
30
* \param probes_total total number of probes
31
* \return interval representing channel load (capped if probes_total < probes_busy)
32
*/
33
static
UnitInterval
create_from_probes
(
unsigned
probes_busy,
unsigned
probes_total);
34
};
35
36
}
// namespace dcc
37
}
// namespace vanetza
38
39
#endif
/* CHANNEL_LOAD_HPP_D1JOCNLP */
40
vanetza::UnitInterval
Definition:
unit_interval.hpp:24
vanetza::dcc::ChannelLoad
Definition:
channel_load.hpp:12
vanetza::dcc::ChannelLoad::create_from_probes
static UnitInterval create_from_probes(unsigned probes_busy, unsigned probes_total)
Definition:
channel_load.cpp:18
vanetza
dcc
channel_load.hpp
Generated on Thu Nov 30 2023 12:03:35 for Vanetza by
1.9.6