OverSim
Nps Class Reference

#include <Nps.h>

Inheritance diagram for Nps:
RpcListener AbstractNcs

Public Member Functions

 Nps ()
void init (NeighborCache *neighborCache)
bool isReady ()
void handleTimerEvent (cMessage *msg)
virtual bool handleRpcCall (BaseCallMessage *msg)
Prox getCoordinateBasedProx (const AbstractNcsNodeInfo &info) const
AbstractNcsNodeInfogetUnvalidNcsInfo () const
AbstractNcsNodeInfocreateNcsInfo (const Coords &coords) const
virtual const AbstractNcsNodeInfogetOwnNcsInfo () const
const CoordsgetOwnCoordinates () const
double getOwnCoordinates (uint8_t i) const
uint8_t getOwnLayer () const
- Public Member Functions inherited from RpcListener
virtual ~RpcListener ()
 destructor
- Public Member Functions inherited from AbstractNcs
virtual ~AbstractNcs ()
virtual void processCoordinates (const simtime_t &rtt, const AbstractNcsNodeInfo &nodeInfo)

Protected Member Functions

uint8_t computeOwnLayer (const std::vector< LandmarkDataEntry > &landmarks)
 computes this node's NPS layer (max of reference points' layers + 1)
Coords computeOwnCoordinates (const std::vector< LandmarkDataEntry > &landmarks)
 methods for computing own coordinates with the received data
void setOwnLayer (int8_t layer)
 announces node's NPS layer to Bootstrap Oracle and Neighbor Cache
void setOwnCoordinates (const Coords &coords)
void sendCoordRequests ()
 Get a random set of landmarks / NPS reference node and send coordinate requests to them.
void sendCoordRequests (const std::vector< TransportAddress > &landmarks)
void sendCoordsReqCall (const TransportAddress &dest, simtime_t timeout)
void handleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt)
 This method is called if an RPC response has been received.
void handleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey)
 This method is called if an RPC timeout has been reached.
void coordsReqRpcResponse (CoordsReqResponse *response, cPolymorphic *context, int rpcId, simtime_t rtt)
void coordsReqRpc (CoordsReqCall *msg)
std::vector< LandmarkDataEntrygetLandmarkData () const
std::vector< TransportAddressgetLandmarks (uint8_t howmany)
 Askes GlobalNodeList for appropriate landmark nodes.
const std::vector
< TransportAddress > & 
getLandmarkSet () const
uint16_t getLandmarkSetSize () const
bool setLandmarkSet (uint8_t howManyLM, uint8_t maxLayer, std::vector< TransportAddress > *landmarkSet)
bool enoughLandmarks ()
void updateNodeMeasurement (const TransportAddress &node, uint8_t pending=0, uint8_t sent=0, uint8_t passed=0)
void deleteNodeMeasurement (const TransportAddress &node)
uint16_t getReceivedCalls () const
- Protected Member Functions inherited from RpcListener
virtual void handleRpcResponse (BaseResponseMessage *msg, const RpcState &rpcState, simtime_t rtt)
 This method is called if an RPC response has been received.
virtual void handleRpcTimeout (const RpcState &rpcState)
 This method is called if an RPC timeout has been reached.

Protected Attributes

std::vector< RttMeasurementnodeMeasurements

Private Attributes

NeighborCacheneighborCache
BaseOverlayoverlay
GlobalNodeListglobalNodeList
CoordBasedRoutingcoordBasedRouting
uint8_t maxLayer
uint8_t dimensions
simtime_t landmarkTimeout
GnpNpsCoordsInfoownCoords
int16_t pendingRequests
uint8_t coordCalcRuns
std::vector< TransportAddresslandmarkSet
uint16_t receivedCalls
cMessage * landmarkTimer
bool ready

Friends

class Landmark

Detailed Description

Definition at line 76 of file Nps.h.

Constructor & Destructor Documentation

Nps::Nps ( )
inline

Definition at line 104 of file Nps.h.

{};

Member Function Documentation

Coords Nps::computeOwnCoordinates ( const std::vector< LandmarkDataEntry > &  landmarks)
protected

methods for computing own coordinates with the received data

Definition at line 482 of file Nps.cc.

Referenced by coordsReqRpcResponse().

{
CoordCalcFunction coordcalcf(landmarks);
Vec_DP initCoordinates(dimensions);
Vec_DP bestCoordinates(dimensions);
Coords computedCoordinatesStdVector(dimensions);
double bestval;
double resval;
for (uint runs = 0; runs < coordCalcRuns; runs++) {
// start with random coordinates (-100..100 in each dim)
for (uint i = 0; i < dimensions; i++) {
initCoordinates[i] = uniform(-300, 300);
}
// compute minimum coordinates via Simplex-Downhill minimum
// function value is returned, coords are written into initCoordinates
// (call by reference)
resval = CoordCalcFunction::simplex_min(&coordcalcf, initCoordinates);
if (runs == 0 || (runs > 0 && resval < bestval) ) {
bestval = resval;
bestCoordinates = initCoordinates;
}
}
for (uint i = 0; i < dimensions; i++) {
computedCoordinatesStdVector[i] = bestCoordinates[i];
}
//setOwnCoordinates(computedCoordinatesStdVector);
return computedCoordinatesStdVector;
}
uint8_t Nps::computeOwnLayer ( const std::vector< LandmarkDataEntry > &  landmarks)
protected

computes this node's NPS layer (max of reference points' layers + 1)

Definition at line 435 of file Nps.cc.

Referenced by coordsReqRpcResponse().

{
int8_t computedLayer = getOwnLayer();
for (uint i = 0; i < landmarks.size(); i++) {
if (computedLayer <= landmarks[i].layer) {
computedLayer = landmarks[i].layer + 1;
}
}
//setOwnLayer(computedLayer);
return computedLayer;
}
void Nps::coordsReqRpc ( CoordsReqCall msg)
protected

Definition at line 162 of file Nps.cc.

Referenced by handleRpcCall().

{
CoordsReqResponse* coordResp = new CoordsReqResponse("CoordsReqResp");
coordResp->setLayer(getOwnLayer()); //TODO
//if (getOwnLayer() != 0) {
// ordinary node
const Coords& ownCoordinates = getOwnCoordinates();
uint8_t i;
for (i = 0; i < ownCoordinates.size(); ++i) {
coordResp->setNcsInfo(i, ownCoordinates[i]);
}
coordResp->setNcsInfo(i, getOwnLayer());
/*} else {
// landmark node
Landmark* landmark = check_and_cast<Landmark*>(neighborCache->getParentModule()
->getModuleByRelativePath("tier1.landmark"));
assert(landmark);
const Coords& ownCoordinates = landmark->getOwnNpsCoords();
uint8_t i;
for (i = 0; i < ownCoordinates.size(); ++i) {
coordResp->setNcsInfo(i, ownCoordinates[i]);
}
coordResp->setNcsInfo(i, getOwnLayer());
}*/
coordResp->setBitLength(COORDSREQRESPONSE_L(coordResp));
neighborCache->sendRpcResponse(msg, coordResp);
}
void Nps::coordsReqRpcResponse ( CoordsReqResponse response,
cPolymorphic *  context,
int  rpcId,
simtime_t  rtt 
)
protected

Definition at line 209 of file Nps.cc.

Referenced by handleRpcResponse().

{
NodeHandle& srcNode = response->getSrcNode();
Coords tempCoords;
for (uint8_t i = 0; i < response->getNcsInfoArraySize(); i++) {
tempCoords.push_back(response->getNcsInfo(i));
}
GnpNpsCoordsInfo* coordsInfo =
static_cast<GnpNpsCoordsInfo*>(createNcsInfo(tempCoords));
EV << "[Nps::coordsReqRpcResponse() @ " << neighborCache->thisNode.getIp()
<< " (" << neighborCache->thisNode.getKey().toString(16) << ")]\n received landmark coords: "
<< tempCoords[0];
for (uint8_t i = 1; i < dimensions; i++) {
EV << ", " << tempCoords[i];
}
EV << " (rtt = " << rtt << ")" << endl;
#ifdef EXTJOIN_DISCOVERY
if (doingDiscovery()) {
//if in Discovery insert RTT only if lower then already set RTT
if ((isEntry(srcNode) && rtt < getNodeRtt(srcNode))
|| (isEntry(srcNode) && getNodeRtt(srcNode) < 0) ) {
updateNode(srcNode, rtt, tempCoords, 0);
} else if (!(isEntry(srcNode))) {
updateNode(srcNode, rtt, tempCoords, 0);
} else {
updateNode(srcNode, getNodeRtt(srcNode), tempCoords, 0);
}
setNodeLayer(srcNode, tempLayer);
}
else if (doingNodeMeasurement()) {
if (getPendingRttsReq(srcNode) == -1) {
updateNode(srcNode, rtt, tempCoords, 0);
setNodeLayer(srcNode, tempLayer);
RttToNodeCall* prevCall = getNodeMessage(srcNode);
RttToNodeResponse* rttRes = new RttToNodeResponse("RttToNodeXRes");
rttRes->setPingedNode(srcNode);
rttRes->setRttToNode(rtt);
Coords tempOwnCoords;
tempOwnCoords = getOwnCoordinates();
rttRes->setOwnCoordinatesArraySize(tempOwnCoords.size());
for (uint i = 0; i < tempOwnCoords.size(); i++) {
rttRes->setOwnCoordinates(i, tempOwnCoords[i]);
}
sendRpcResponse(prevCall, rttRes);
} else {
updateNode(srcNode, rtt, tempCoords, 0);
setNodeLayer(srcNode, tempLayer);
if (checkCoordinates(getOwnCoordinates(), tempCoords, rtt)) {
updateNodeMeasurement(srcNode, -1, 0, 1);
} else {
updateNodeMeasurement(srcNode, -1, 0, 0);
}
}
}
else
#endif
if (pendingRequests == 0) {
// got all responses, now compute own coordinates and join overlay
coordsInfo);
std::vector<LandmarkDataEntry> probedLandmarks;
if (getLandmarkSetSize() < dimensions + 1) {
setLandmarkSet(dimensions + 1, maxLayer, &landmarkSet);
}
for (std::vector<TransportAddress>::iterator it = landmarkSet.begin();
it != landmarkSet.end(); ++it) {
const GnpNpsCoordsInfo* tempInfo =
dynamic_cast<const GnpNpsCoordsInfo*>(neighborCache->getNodeCoordsInfo(*it));
assert(tempInfo);
temp.coordinates.resize(tempInfo->getDimension());
temp.rtt = neighborCache->getNodeRtt(*it).first;
temp.layer = tempInfo->getLayer();
for (uint8_t i = 0; i < tempInfo->getDimension(); ++i) {
temp.coordinates[i] = tempInfo->getCoords(i);
}
temp.ip = NULL;
probedLandmarks.push_back(temp);
}
assert(probedLandmarks.size() > 0);
setOwnLayer(computeOwnLayer(probedLandmarks));
EV << "[Nps::coordsReqRpcResponse() @ " << neighborCache->thisNode.getIp()
<< " (" << neighborCache->thisNode.getKey().toString(16) << ")]\n setting own coords: "
<< coords[0];
for (uint8_t i = 1; i < dimensions; i++) {
EV << ", " << coords[i];
}
EV << endl;
ready = true;
//test
/*
ChurnGenerator* lmChurnGen = NULL;
for (uint8_t i = 0; i < neighborCache->underlayConfigurator->getChurnGeneratorNum(); i++) {
ChurnGenerator* searchedGen;
searchedGen = neighborCache->underlayConfigurator->getChurnGenerator(i);
if (searchedGen->getNodeType().overlayType != "oversim.common.cbr.LandmarkModules") {
lmChurnGen = searchedGen;
}
}
*/
SimpleNodeEntry* entry =
dynamic_cast<SimpleInfo*>(globalNodeList->
getPeerInfo(neighborCache->thisNode.getIp()))->getEntry();
double error = 0;
for (uint8_t i = 1; i < entry->getDim(); i++) {
error += pow(coords[i] - entry->getCoords(i), 2);
}
error = sqrt(error);
//std::cout << "error = " << error << std::endl;
->addStdDev("NPS: Coordinate difference", error);
neighborCache->neighborCache.clear(); //TODO
neighborCache->getParentModule()
->bubble("GNP/NPS coordinates calculated -> JOIN overlay!");
} else {
coordsInfo);
}
}
AbstractNcsNodeInfo * Nps::createNcsInfo ( const Coords coords) const
virtual

Implements AbstractNcs.

Definition at line 605 of file Nps.cc.

Referenced by coordsReqRpcResponse().

{
assert(coords.size() > 1);
uint8_t i;
for (i = 0; i < coords.size() - 1; ++i) {
info->setCoords(i, coords[i]);
}
info->setLayer(coords[i]);
return info;
}
void Nps::deleteNodeMeasurement ( const TransportAddress node)
protected

Definition at line 588 of file Nps.cc.

Referenced by coordsReqRpcResponse(), and handleRpcTimeout().

{
for(uint i = 0; i < nodeMeasurements.size(); i++) {
if (nodeMeasurements[i].measuredNode == node) {
#ifdef EXTJOIN_DISCOVERY
delete nodeMeasurements[i].message;
#endif
i--;
}
}
if (nodeMeasurements.size() == 0) {
//stopNodeMeasurement();
}
}
bool Nps::enoughLandmarks ( )
protected

Definition at line 543 of file Nps.cc.

Referenced by handleTimerEvent().

Prox Nps::getCoordinateBasedProx ( const AbstractNcsNodeInfo info) const
virtual

Implements AbstractNcs.

Definition at line 549 of file Nps.cc.

{
// TODO hack: coords (and so their distances) are based on one-way latencies
Prox temp = ownCoords->getDistance(abstractInfo);
temp.proximity *= 2;
return temp;
}
std::vector<LandmarkDataEntry> Nps::getLandmarkData ( ) const
protected
std::vector< TransportAddress > Nps::getLandmarks ( uint8_t  howmany)
protected

Askes GlobalNodeList for appropriate landmark nodes.

Parameters
howmanynumber of needed landmark nodes
Returns
vector of landmark addresses

Definition at line 516 of file Nps.cc.

Referenced by sendCoordRequests().

{
std::vector<TransportAddress> returnPool;
if (howmany > globalNodeList->getLandmarkPeerSize()) {
throw cRuntimeError("Not enough landmarks available in network!");
}
while (returnPool.size() < howmany) {
if (lmInfo->getNpsLayer() >= 0 &&
lmInfo->getNpsLayer() < maxLayer) {
// already in returnPool?
bool alreadyin = false;
for (uint8_t i = 0; i < returnPool.size(); i++) {
if (returnPool[i] == *lm)
alreadyin = true;
}
if (alreadyin == false) {
returnPool.push_back(*lm);
}
}
}
return returnPool;
}
const std::vector<TransportAddress>& Nps::getLandmarkSet ( ) const
inlineprotected

Definition at line 175 of file Nps.h.

{ return landmarkSet; };
uint16_t Nps::getLandmarkSetSize ( ) const
inlineprotected

Definition at line 176 of file Nps.h.

Referenced by coordsReqRpcResponse().

{ return landmarkSet.size(); };
const Coords& Nps::getOwnCoordinates ( ) const
inline

Definition at line 117 of file Nps.h.

Referenced by coordsReqRpc(), coordsReqRpcResponse(), and handleRpcTimeout().

{ return ownCoords->getCoords(); };
double Nps::getOwnCoordinates ( uint8_t  i) const
inline

Definition at line 118 of file Nps.h.

{ return ownCoords->getCoords(i); };
uint8_t Nps::getOwnLayer ( ) const
inline

Definition at line 119 of file Nps.h.

Referenced by computeOwnLayer(), and coordsReqRpc().

{ return ownCoords->getLayer(); };
virtual const AbstractNcsNodeInfo& Nps::getOwnNcsInfo ( ) const
inlinevirtual

Implements AbstractNcs.

Definition at line 115 of file Nps.h.

{ return *ownCoords; };
uint16_t Nps::getReceivedCalls ( ) const
inlineprotected

Definition at line 191 of file Nps.h.

{ return receivedCalls; };
AbstractNcsNodeInfo* Nps::getUnvalidNcsInfo ( ) const
inlinevirtual

Implements AbstractNcs.

Definition at line 113 of file Nps.h.

{ return new GnpNpsCoordsInfo; };
bool Nps::handleRpcCall ( BaseCallMessage msg)
virtual

Reimplemented from AbstractNcs.

Definition at line 152 of file Nps.cc.

{
RPC_DELEGATE( CoordsReq, coordsReqRpc );
//if (discovery)
return RPC_HANDLED;
}
void Nps::handleRpcResponse ( BaseResponseMessage msg,
cPolymorphic *  context,
int  rpcId,
simtime_t  rtt 
)
protectedvirtual

This method is called if an RPC response has been received.

Parameters
msgThe response message.
contextPointer to an optional state object. The object has to be handled/deleted by the handleRpcResponse() code
rpcIdThe RPC id.
rttThe Round-Trip-Time of this RPC

Reimplemented from RpcListener.

Definition at line 89 of file Nps.cc.

{
// call rpc stubs
RPC_ON_RESPONSE( CoordsReq ) {
coordsReqRpcResponse(_CoordsReqResponse, context, rpcId, rtt);
}
#ifdef EXTJOIN_DISCOVERY
RPC_ON_RESPONSE( RttToNode ) {
rttToNodeRpcResponse(_RttToNodeResponse, context, rpcId, rtt);
}
#endif
return;
}
void Nps::handleRpcTimeout ( BaseCallMessage msg,
const TransportAddress dest,
cPolymorphic *  context,
int  rpcId,
const OverlayKey destKey 
)
protectedvirtual

This method is called if an RPC timeout has been reached.

Parameters
msgThe original RPC message.
destThe destination node
contextPointer to an optional state object. The object has to be handled/deleted by the handleRpcResponse() code
rpcIdThe RPC id.
destKeythe destination OverlayKey

Reimplemented from RpcListener.

Definition at line 108 of file Nps.cc.

{
RPC_ON_CALL( CoordsReq ) {
if (true/*doingNodeMeasurement()*/) {//TODO
#ifdef EXTJOIN_DISCOVERY
if (getPendingRttsReq(dest) == -1) {
RttToNodeCall* call = getNodeMessage(dest);
RttToNodeResponse* rttRes = new RttToNodeResponse("RttToNodeXRes");
rttRes->setPingedNode(dest);
rttRes->setRttToNode(0);
Coords tempOwnCoords;
tempOwnCoords = getOwnCoordinates();
rttRes->setOwnCoordinatesArraySize(tempOwnCoords.size());
for (uint i = 0; i < tempOwnCoords.size(); i++) {
rttRes->setOwnCoordinates(i, tempOwnCoords[i]);
}
sendRpcResponse(call, rttRes);
} else {
#endif
#ifdef EXTJOIN_DISCOVERY
}
#endif
} else {
}
}
#ifdef EXTJOIN_DISCOVERY
RPC_ON_CALL( RttToNode ) {
}
#endif
}
}
void Nps::handleTimerEvent ( cMessage *  msg)
virtual

Reimplemented from AbstractNcs.

Definition at line 75 of file Nps.cc.

{
// process landmark timer message
if (msg == landmarkTimer) {
if (enoughLandmarks()) {
delete msg;
//std::cout << "[" << getThisNode().getIp() << "] (Re-)Trying to contact landmarks" << std::endl;
} else {
neighborCache->scheduleAt(simTime() + landmarkTimeout, msg);
}
}
}
void Nps::init ( NeighborCache neighborCache)
virtual

Implements AbstractNcs.

Definition at line 41 of file Nps.cc.

{
this->neighborCache = neighborCache;
overlay = neighborCache->overlay;
maxLayer = neighborCache->par("npsMaxLayer");
dimensions = neighborCache->par("gnpDimensions");
landmarkTimeout = neighborCache->par("gnpLandmarkTimeout");
ready = false;
coordCalcRuns = neighborCache->par("gnpCoordCalcRuns");
WATCH(*ownCoords);
WATCH_VECTOR(landmarkSet);
if (neighborCache->getParentModule()->getModuleByRelativePath("tier1")
->getModuleByRelativePath("landmark") == NULL) {
landmarkTimer = new cMessage("landmarkTimer");
neighborCache->scheduleAt(simTime() + landmarkTimeout, landmarkTimer);
} else {
// GNP-landmark or NPS-Layer-0-landmark
ownCoords->setLayer(0); //TODO double, see Landmark.cc
}
}
bool Nps::isReady ( )
inlinevirtual

Reimplemented from AbstractNcs.

Definition at line 107 of file Nps.h.

{ return ready; };
void Nps::sendCoordRequests ( )
protected

Get a random set of landmarks / NPS reference node and send coordinate requests to them.

Definition at line 408 of file Nps.cc.

Referenced by handleTimerEvent().

{
std::vector <TransportAddress> landmarks;
landmarks = getLandmarks(dimensions + 1);
simtime_t timeout = -1;
if (landmarks.size() > 0) {
for (size_t i = 0; i < landmarks.size(); i++) {
const TransportAddress& tolm = landmarks[i];
sendCoordsReqCall(tolm, timeout);
}
}
}
void Nps::sendCoordRequests ( const std::vector< TransportAddress > &  landmarks)
protected
void Nps::sendCoordsReqCall ( const TransportAddress dest,
simtime_t  timeout 
)
protected

Definition at line 424 of file Nps.cc.

Referenced by sendCoordRequests().

{
CoordsReqCall* coordReq = new CoordsReqCall("CoordsReq");
coordReq->setBitLength(COORDSREQCALL_L(coordReq));
coordReq, NULL, NO_OVERLAY_ROUTING,
timeout, 0, -1, this);
}
bool Nps::setLandmarkSet ( uint8_t  howManyLM,
uint8_t  maxLayer,
std::vector< TransportAddress > *  landmarkSet 
)
protected

Definition at line 378 of file Nps.cc.

Referenced by coordsReqRpcResponse(), and sendCoordRequests().

{
landmarkSet->clear();
uint availableLM = 0;
TransportAddress landmark;
for(it = neighborCache->neighborCache.begin(); it != neighborCache->neighborCache.end(); it++ ) {
if (dynamic_cast<GnpNpsCoordsInfo*>(it->second.coordsInfo) &&
static_cast<GnpNpsCoordsInfo*>(it->second.coordsInfo)->getLayer()
< maxLayer) {
landmark.setIp(it->first.getIp());
landmark.setPort(it->second.nodeRef.getPort());
landmarkSet->push_back(landmark);
availableLM++;
}
}
if (availableLM < howManyLM) {
return false;
} else {
uint i = availableLM;
while (i > howManyLM) {
uint randomNumber = (intuniform(0, landmarkSet->size()));
landmarkSet->erase(landmarkSet->begin() + randomNumber);
i--;
}
return true;
}
}
void Nps::setOwnCoordinates ( const Coords coords)
inlineprotected

Definition at line 136 of file Nps.h.

Referenced by coordsReqRpcResponse(), and Landmark::initializeApp().

{
for (uint8_t i = 0; i < coords.size(); ++i) {
ownCoords->setCoords(i, coords[i]);
}
};
void Nps::setOwnLayer ( int8_t  layer)
protected

announces node's NPS layer to Bootstrap Oracle and Neighbor Cache

Definition at line 447 of file Nps.cc.

Referenced by coordsReqRpcResponse(), and Landmark::initializeApp().

{
// Update in BootstrapOracle
thisInfo->setNpsLayer(layer);
// Workaround against -1 ports in BS oracle
if (layer < maxLayer) {
}
}
void Nps::updateNodeMeasurement ( const TransportAddress node,
uint8_t  pending = 0,
uint8_t  sent = 0,
uint8_t  passed = 0 
)
protected

Definition at line 557 of file Nps.cc.

Referenced by coordsReqRpcResponse(), and handleRpcTimeout().

{
bool alreadySet = false;
for(uint i = 0; i < nodeMeasurements.size(); i++) {
if (nodeMeasurements[i].measuredNode == node && sent == 0) {
nodeMeasurements[i].rttsPending += pending;
nodeMeasurements[i].rttsSent += sent;
nodeMeasurements[i].coordsPassed += passed;
alreadySet = true;
i = nodeMeasurements.size();
} else if (nodeMeasurements[i].measuredNode == node) {
nodeMeasurements[i].rttsPending = pending;
nodeMeasurements[i].rttsSent = sent;
nodeMeasurements[i].coordsPassed = passed;
alreadySet = true;
i = nodeMeasurements.size();
}
}
if (!alreadySet) {
RttMeasurement newNode;
newNode.measuredNode = node;
newNode.rttsPending = pending;
newNode.rttsSent = sent;
newNode.coordsPassed = passed;
nodeMeasurements.push_back(newNode);
}
}

Friends And Related Function Documentation

friend class Landmark
friend

Definition at line 78 of file Nps.h.

Member Data Documentation

CoordBasedRouting* Nps::coordBasedRouting
private

Definition at line 84 of file Nps.h.

Referenced by init().

uint8_t Nps::coordCalcRuns
private

Definition at line 93 of file Nps.h.

Referenced by computeOwnCoordinates(), and init().

uint8_t Nps::dimensions
private
GlobalNodeList* Nps::globalNodeList
private

Definition at line 83 of file Nps.h.

Referenced by coordsReqRpcResponse(), enoughLandmarks(), getLandmarks(), init(), and setOwnLayer().

std::vector<TransportAddress> Nps::landmarkSet
private
simtime_t Nps::landmarkTimeout
private

Definition at line 88 of file Nps.h.

Referenced by handleTimerEvent(), and init().

cMessage* Nps::landmarkTimer
private

Definition at line 99 of file Nps.h.

Referenced by handleTimerEvent(), and init().

uint8_t Nps::maxLayer
private
NeighborCache* Nps::neighborCache
private
std::vector<RttMeasurement> Nps::nodeMeasurements
protected

Definition at line 182 of file Nps.h.

Referenced by deleteNodeMeasurement(), and updateNodeMeasurement().

BaseOverlay* Nps::overlay
private

Definition at line 82 of file Nps.h.

Referenced by init().

GnpNpsCoordsInfo* Nps::ownCoords
private
int16_t Nps::pendingRequests
private

Definition at line 92 of file Nps.h.

Referenced by coordsReqRpcResponse(), handleRpcTimeout(), init(), and sendCoordsReqCall().

bool Nps::ready
private

Definition at line 101 of file Nps.h.

Referenced by coordsReqRpcResponse(), init(), and isReady().

uint16_t Nps::receivedCalls
private

Definition at line 97 of file Nps.h.

Referenced by coordsReqRpc(), getReceivedCalls(), and init().


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