Vanetza
Loading...
Searching...
No Matches
vanetza::geonet::LocationTableEntry Class Reference

Public Member Functions

 LocationTableEntry (const Runtime &rt)
const Addressgeonet_address () const
const MacAddresslink_layer_address () const
StationType station_type () const
double get_pdr () const
void update_pdr (std::size_t packet_size, double beta=0.5)
bool has_position_vector () const
const LongPositionVectorget_position_vector () const
bool update_position_vector (const LongPositionVector &pv)
bool is_neighbour () const
void set_neighbour (bool flag)
void set_neighbour (bool flag, Clock::duration expiry)

Public Attributes

ObjectContainer extensions

Private Member Functions

bool set_position_vector (const LongPositionVector &pv)

Private Attributes

const Runtimem_runtime
Clock::time_point m_is_neighbour
bool m_has_position_vector
LongPositionVector m_position_vector
double m_pdr
Clock::time_point m_pdr_update

Detailed Description

Definition at line 18 of file location_table.hpp.

Constructor & Destructor Documentation

◆ LocationTableEntry()

vanetza::geonet::LocationTableEntry::LocationTableEntry ( const Runtime & rt)

Definition at line 12 of file location_table.cpp.

Member Function Documentation

◆ geonet_address()

const Address & vanetza::geonet::LocationTableEntry::geonet_address ( ) const

Definition at line 23 of file location_table.cpp.

◆ get_pdr()

double vanetza::geonet::LocationTableEntry::get_pdr ( ) const
inline

Get packed data rate (PDR) of corresponding source.

Returns
PDR in bytes per second, might be not-a-number

Definition at line 31 of file location_table.hpp.

◆ get_position_vector()

const LongPositionVector & vanetza::geonet::LocationTableEntry::get_position_vector ( ) const
inline

Get stored position vector

Returns
position vector (empty until set_position_vector invocation)

Definition at line 52 of file location_table.hpp.

◆ has_position_vector()

bool vanetza::geonet::LocationTableEntry::has_position_vector ( ) const
inline

Check if position vector has been set before

Returns
false after entry initialization true after set_position_vector invocations

Definition at line 46 of file location_table.hpp.

◆ is_neighbour()

bool vanetza::geonet::LocationTableEntry::is_neighbour ( ) const

Check if this entry belongs to a direct neighbour

Returns
true if direct neighbour

Definition at line 33 of file location_table.cpp.

◆ link_layer_address()

const MacAddress & vanetza::geonet::LocationTableEntry::link_layer_address ( ) const

Definition at line 28 of file location_table.cpp.

◆ set_neighbour() [1/2]

void vanetza::geonet::LocationTableEntry::set_neighbour ( bool flag)

Set neighbour relation

Parameters
flagtrue if entry represents a direct neighbour

Definition at line 80 of file location_table.cpp.

◆ set_neighbour() [2/2]

void vanetza::geonet::LocationTableEntry::set_neighbour ( bool flag,
Clock::duration expiry )

Set neighbour relation with expiry

Parameters
flagtrue if entry represents a direct neighbour
expiryreset neighbour relation to false after expiry

Definition at line 85 of file location_table.cpp.

◆ set_position_vector()

bool vanetza::geonet::LocationTableEntry::set_position_vector ( const LongPositionVector & pv)
private

Set stored position vector (without timestamp check)

Parameters
pvsource position vector

Definition at line 56 of file location_table.cpp.

◆ station_type()

StationType vanetza::geonet::LocationTableEntry::station_type ( ) const

Definition at line 18 of file location_table.cpp.

◆ update_pdr()

void vanetza::geonet::LocationTableEntry::update_pdr ( std::size_t packet_size,
double beta = 0.5 )

Update packet data rate. See Annex B of EN 302 636-4-1 for details.

Parameters
packet_sizereceived number of bytes
betaweight factor for exponential moving average ]0; 1[

Definition at line 38 of file location_table.cpp.

◆ update_position_vector()

bool vanetza::geonet::LocationTableEntry::update_position_vector ( const LongPositionVector & pv)

Update stored position vector (only after time stamp check)

Parameters
pvsource position vector
Returns
true if position vector passed time stamp check

Definition at line 67 of file location_table.cpp.

Member Data Documentation

◆ extensions

ObjectContainer vanetza::geonet::LocationTableEntry::extensions

Definition at line 80 of file location_table.hpp.

◆ m_has_position_vector

bool vanetza::geonet::LocationTableEntry::m_has_position_vector
private

Definition at line 91 of file location_table.hpp.

◆ m_is_neighbour

Clock::time_point vanetza::geonet::LocationTableEntry::m_is_neighbour
private

Definition at line 90 of file location_table.hpp.

◆ m_pdr

double vanetza::geonet::LocationTableEntry::m_pdr
private

Definition at line 93 of file location_table.hpp.

◆ m_pdr_update

Clock::time_point vanetza::geonet::LocationTableEntry::m_pdr_update
private

Definition at line 94 of file location_table.hpp.

◆ m_position_vector

LongPositionVector vanetza::geonet::LocationTableEntry::m_position_vector
private

Definition at line 92 of file location_table.hpp.

◆ m_runtime

const Runtime& vanetza::geonet::LocationTableEntry::m_runtime
private

Definition at line 89 of file location_table.hpp.


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