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

#include <location_table.hpp>

Public Types

using table_type = SoftStateMap< MacAddress, LocationTableEntry, LocationTableEntryCreator >
 
using entry_visitor = std::function< void(const MacAddress &, const LocationTableEntry &)>
 
using entry_predicate = std::function< bool(const MacAddress &, const LocationTableEntry &)>
 
using entry_range = boost::select_second_const_range< boost::filtered_range< std::function< bool(const typename table_type::value_type &)>, const typename table_type::map_range > >
 
using neighbour_range = entry_range
 

Public Member Functions

 LocationTable (const MIB &, Runtime &)
 
bool has_entry (const Address &) const
 
LocationTableEntryupdate (const LongPositionVector &)
 
LocationTableEntryget_or_create_entry (const Address &)
 
LocationTableEntryget_or_create_entry (const MacAddress &)
 
const LocationTableEntryget_entry (const Address &) const
 
const LocationTableEntryget_entry (const MacAddress &) const
 
const LongPositionVectorget_position (const Address &) const
 
const LongPositionVectorget_position (const MacAddress &) const
 
bool has_neighbours () const
 
neighbour_range neighbours () const
 
entry_range filter (const entry_predicate &) const
 
void visit (const entry_visitor &) const
 
void drop_expired ()
 

Private Attributes

table_type m_table
 

Detailed Description

GeoNetworking LocationTable See section 7.1 of EN 302 636-4-1 for details.

Definition at line 111 of file location_table.hpp.

Member Typedef Documentation

◆ entry_predicate

using vanetza::geonet::LocationTable::entry_predicate = std::function<bool(const MacAddress&, const LocationTableEntry&)>

Definition at line 116 of file location_table.hpp.

◆ entry_range

using vanetza::geonet::LocationTable::entry_range = boost::select_second_const_range< boost::filtered_range< std::function<bool(const typename table_type::value_type&)>, const typename table_type::map_range> >

Definition at line 117 of file location_table.hpp.

◆ entry_visitor

using vanetza::geonet::LocationTable::entry_visitor = std::function<void(const MacAddress&, const LocationTableEntry&)>

Definition at line 115 of file location_table.hpp.

◆ neighbour_range

using vanetza::geonet::LocationTable::neighbour_range = entry_range

Definition at line 122 of file location_table.hpp.

◆ table_type

Constructor & Destructor Documentation

◆ LocationTable()

vanetza::geonet::LocationTable::LocationTable ( const MIB mib,
Runtime rt 
)

Definition at line 95 of file location_table.cpp.

Member Function Documentation

◆ drop_expired()

void vanetza::geonet::LocationTable::drop_expired ( )
inline

Definition at line 137 of file location_table.hpp.

◆ filter()

auto vanetza::geonet::LocationTable::filter ( const entry_predicate &  predicate) const

Definition at line 127 of file location_table.cpp.

◆ get_entry() [1/2]

const LocationTableEntry * vanetza::geonet::LocationTable::get_entry ( const Address addr) const

Definition at line 168 of file location_table.cpp.

◆ get_entry() [2/2]

const LocationTableEntry * vanetza::geonet::LocationTable::get_entry ( const MacAddress mac) const

Definition at line 173 of file location_table.cpp.

◆ get_or_create_entry() [1/2]

LocationTableEntry & vanetza::geonet::LocationTable::get_or_create_entry ( const Address addr)

Definition at line 158 of file location_table.cpp.

◆ get_or_create_entry() [2/2]

LocationTableEntry & vanetza::geonet::LocationTable::get_or_create_entry ( const MacAddress mac)

Definition at line 163 of file location_table.cpp.

◆ get_position() [1/2]

const LongPositionVector * vanetza::geonet::LocationTable::get_position ( const Address addr) const

Definition at line 178 of file location_table.cpp.

◆ get_position() [2/2]

const LongPositionVector * vanetza::geonet::LocationTable::get_position ( const MacAddress mac) const

Definition at line 183 of file location_table.cpp.

◆ has_entry()

bool vanetza::geonet::LocationTable::has_entry ( const Address addr) const

Definition at line 101 of file location_table.cpp.

◆ has_neighbours()

bool vanetza::geonet::LocationTable::has_neighbours ( ) const

Definition at line 106 of file location_table.cpp.

◆ neighbours()

auto vanetza::geonet::LocationTable::neighbours ( ) const

Definition at line 118 of file location_table.cpp.

◆ update()

LocationTableEntry & vanetza::geonet::LocationTable::update ( const LongPositionVector lpv)

Definition at line 144 of file location_table.cpp.

◆ visit()

void vanetza::geonet::LocationTable::visit ( const entry_visitor &  visitor) const

Definition at line 137 of file location_table.cpp.

Member Data Documentation

◆ m_table

table_type vanetza::geonet::LocationTable::m_table
private

Definition at line 140 of file location_table.hpp.


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