INET Framework for OMNeT++/OMNEST
|
This class provides a mapping between node addresses and their positions. More...
#include <PositionTable.h>
Public Member Functions | |
PositionTable () | |
std::vector< L3Address > | getAddresses () const |
bool | hasPosition (const L3Address &address) const |
Coord | getPosition (const L3Address &address) const |
void | setPosition (const L3Address &address, const Coord &coord) |
void | removePosition (const L3Address &address) |
void | removeOldPositions (simtime_t timestamp) |
void | clear () |
simtime_t | getOldestPosition () const |
Private Types | |
typedef std::pair< simtime_t, Coord > | AddressToPositionMapValue |
typedef std::map< L3Address, AddressToPositionMapValue > | AddressToPositionMap |
Private Attributes | |
AddressToPositionMap | addressToPositionMap |
Friends | |
std::ostream & | operator<< (std::ostream &o, const PositionTable &t) |
This class provides a mapping between node addresses and their positions.
|
private |
|
private |
void inet::PositionTable::clear | ( | ) |
Referenced by inet::GPSR::handleOperationStage(), and inet::GPSR::initialize().
std::vector< L3Address > inet::PositionTable::getAddresses | ( | ) | const |
Referenced by inet::GPSR::findGreedyRoutingNextHop(), and inet::GPSR::getPlanarNeighbors().
simtime_t inet::PositionTable::getOldestPosition | ( | ) | const |
Referenced by inet::GPSR::getNextNeighborExpiration().
Referenced by inet::GPSR::findGreedyRoutingNextHop(), inet::GPSR::getDestinationPosition(), inet::GPSR::getNeighborPosition(), and inet::GPSR::getPlanarNeighbors().
bool inet::PositionTable::hasPosition | ( | const L3Address & | address | ) | const |
void inet::PositionTable::removeOldPositions | ( | simtime_t | timestamp | ) |
Referenced by inet::GPSR::purgeNeighbors().
void inet::PositionTable::removePosition | ( | const L3Address & | address | ) |
Referenced by inet::GPSR::processBeacon(), and inet::GPSR::processBeaconTimer().
|
friend |
|
private |
Referenced by clear(), getAddresses(), getOldestPosition(), getPosition(), hasPosition(), inet::operator<<(), removeOldPositions(), removePosition(), and setPosition().