Vanetza
 
Loading...
Searching...
No Matches
vanetza::dcc::ChannelLoad Class Reference
Inheritance diagram for vanetza::dcc::ChannelLoad:

Public Member Functions

 ChannelLoad (const UnitInterval &)
 
 ChannelLoad (unsigned probes_busy, unsigned probes_total)
 
constexpr UnitInterval ()
 
constexpr UnitInterval (double v)
 
 UnitInterval (const UnitInterval &)=default
 
UnitIntervaloperator+= (const UnitInterval &)
 
UnitIntervaloperator+= (double)
 
UnitIntervaloperator-= (const UnitInterval &)
 
UnitIntervaloperator-= (double)
 
UnitIntervaloperator*= (const UnitInterval &)
 
UnitIntervaloperator*= (double)
 
UnitIntervaloperator/= (const UnitInterval &)
 
UnitIntervaloperator/= (double)
 
bool operator< (const UnitInterval &other) const
 
bool operator== (const UnitInterval &other) const
 
double value () const
 
UnitInterval complement () const
 

Static Public Member Functions

static UnitInterval create_from_probes (unsigned probes_busy, unsigned probes_total)
 

Private Member Functions

UnitIntervalclamp ()
 

Static Private Member Functions

static constexpr double clamp (double v)
 

Private Attributes

double m_value
 

Detailed Description

Definition at line 11 of file channel_load.hpp.

Constructor & Destructor Documentation

◆ ChannelLoad() [1/2]

vanetza::dcc::ChannelLoad::ChannelLoad ( const UnitInterval interval)

Definition at line 8 of file channel_load.cpp.

◆ ChannelLoad() [2/2]

vanetza::dcc::ChannelLoad::ChannelLoad ( unsigned  probes_busy,
unsigned  probes_total 
)

Create ChannelLoad from rational probes

See also
ChannelLoad::create_from_probes
Parameters
probes_busynumber of probes above busy threshold
probes_totaltotal number of probes

Definition at line 13 of file channel_load.cpp.

Member Function Documentation

◆ clamp() [1/2]

UnitInterval & vanetza::UnitInterval::clamp ( )
privateinherited

Definition at line 71 of file unit_interval.cpp.

◆ clamp() [2/2]

static constexpr double vanetza::UnitInterval::clamp ( double  v)
inlinestaticconstexprprivateinherited

Definition at line 50 of file unit_interval.hpp.

◆ complement()

UnitInterval vanetza::UnitInterval::complement ( ) const
inherited

Definition at line 77 of file unit_interval.cpp.

◆ create_from_probes()

UnitInterval vanetza::dcc::ChannelLoad::create_from_probes ( unsigned  probes_busy,
unsigned  probes_total 
)
static

Calculate UnitInterval representing ChannelLoad from rational probes

Parameters
probes_busynumber of probes above busy threshold
probes_totaltotal number of probes
Returns
interval representing channel load (capped if probes_total < probes_busy)

Definition at line 18 of file channel_load.cpp.

◆ operator*=() [1/2]

UnitInterval & vanetza::UnitInterval::operator*= ( const UnitInterval other)
inherited

Definition at line 21 of file unit_interval.cpp.

◆ operator*=() [2/2]

UnitInterval & vanetza::UnitInterval::operator*= ( double  value)
inherited

Definition at line 48 of file unit_interval.cpp.

◆ operator+=() [1/2]

UnitInterval & vanetza::UnitInterval::operator+= ( const UnitInterval other)
inherited

Definition at line 9 of file unit_interval.cpp.

◆ operator+=() [2/2]

UnitInterval & vanetza::UnitInterval::operator+= ( double  value)
inherited

Definition at line 36 of file unit_interval.cpp.

◆ operator-=() [1/2]

UnitInterval & vanetza::UnitInterval::operator-= ( const UnitInterval other)
inherited

Definition at line 15 of file unit_interval.cpp.

◆ operator-=() [2/2]

UnitInterval & vanetza::UnitInterval::operator-= ( double  value)
inherited

Definition at line 42 of file unit_interval.cpp.

◆ operator/=() [1/2]

UnitInterval & vanetza::UnitInterval::operator/= ( const UnitInterval other)
inherited

Definition at line 28 of file unit_interval.cpp.

◆ operator/=() [2/2]

UnitInterval & vanetza::UnitInterval::operator/= ( double  value)
inherited

Definition at line 54 of file unit_interval.cpp.

◆ operator<()

bool vanetza::UnitInterval::operator< ( const UnitInterval other) const
inherited

Definition at line 60 of file unit_interval.cpp.

◆ operator==()

bool vanetza::UnitInterval::operator== ( const UnitInterval other) const
inherited

Definition at line 65 of file unit_interval.cpp.

◆ UnitInterval() [1/2]

constexpr vanetza::UnitInterval::UnitInterval ( )
inlineconstexpr

Definition at line 26 of file unit_interval.hpp.

◆ UnitInterval() [2/2]

constexpr vanetza::UnitInterval::UnitInterval ( double  v)
inlineexplicitconstexpr

Definition at line 27 of file unit_interval.hpp.

◆ value()

double vanetza::UnitInterval::value ( ) const
inlineinherited

Definition at line 46 of file unit_interval.hpp.

Member Data Documentation

◆ m_value

double vanetza::UnitInterval::m_value
privateinherited

Definition at line 56 of file unit_interval.hpp.


The documentation for this class was generated from the following files: