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

#include <position_updater.hpp>

Public Member Functions

 PositionUpdater (Runtime &runtime, PositionProvider &pos, Router &router)
 
void update_rate (Clock::duration interval)
 
void update_rate (units::Frequency)
 

Private Member Functions

void schedule ()
 

Private Attributes

Runtimem_runtime
 
PositionProviderm_positioning
 
Routerm_router
 
Clock::duration m_interval
 

Detailed Description

PositionUpdater helps updating a Router's position vector periodically

Definition at line 21 of file position_updater.hpp.

Constructor & Destructor Documentation

◆ PositionUpdater()

vanetza::geonet::PositionUpdater::PositionUpdater ( Runtime runtime,
PositionProvider pos,
Router router 
)

Create PositionUpdater scheduling position updates read from position provider

Note
the default update rate is derived from router's MIB.
Parameters
runtimewhere updater schedules its callback
posposition updates are read from this source
routerposition sink

Definition at line 13 of file position_updater.cpp.

◆ ~PositionUpdater()

vanetza::geonet::PositionUpdater::~PositionUpdater ( )

Definition at line 19 of file position_updater.cpp.

Member Function Documentation

◆ schedule()

void vanetza::geonet::PositionUpdater::schedule ( )
private

Definition at line 24 of file position_updater.cpp.

◆ update_rate() [1/2]

void vanetza::geonet::PositionUpdater::update_rate ( Clock::duration  interval)

Change rate at which update is looking up new positions

Note
MIB setting is not affected
an update interval smaller than zero disables updates
Parameters
intervalupdate interval

Definition at line 34 of file position_updater.cpp.

◆ update_rate() [2/2]

void vanetza::geonet::PositionUpdater::update_rate ( units::Frequency  rate)

Definition at line 41 of file position_updater.cpp.

Member Data Documentation

◆ m_interval

Clock::duration vanetza::geonet::PositionUpdater::m_interval
private

Definition at line 49 of file position_updater.hpp.

◆ m_positioning

PositionProvider& vanetza::geonet::PositionUpdater::m_positioning
private

Definition at line 47 of file position_updater.hpp.

◆ m_router

Router& vanetza::geonet::PositionUpdater::m_router
private

Definition at line 48 of file position_updater.hpp.

◆ m_runtime

Runtime& vanetza::geonet::PositionUpdater::m_runtime
private

Definition at line 46 of file position_updater.hpp.


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