#include <Landmark.h>
Private Member Functions | |
virtual | ~Landmark () |
virtual void | initializeApp (int stage) |
initializes derived class-attributes | |
virtual void | finishApp () |
collects statistical data of derived app |
Definition at line 30 of file Landmark.h.
Landmark::~Landmark | ( | ) | [private, virtual] |
Definition at line 36 of file Landmark.cc.
{ }
void Landmark::finishApp | ( | ) | [private, virtual] |
collects statistical data of derived app
Reimplemented from BaseApp.
Definition at line 79 of file Landmark.cc.
{ if (((Nps&)(neighborCache->getNcsAccess())).getReceivedCalls() != 0) { globalStatistics->recordOutVector("Calls to Landmarks", ((Nps&)(neighborCache->getNcsAccess())).getReceivedCalls()); } }
void Landmark::initializeApp | ( | int | stage | ) | [private, virtual] |
initializes derived class-attributes
stage | the init stage |
Reimplemented from BaseApp.
Definition at line 39 of file Landmark.cc.
{ if (stage != MIN_STAGE_APP) return; SimpleNodeEntry* entry = dynamic_cast<SimpleInfo*>(globalNodeList-> getPeerInfo(thisNode.getIp()))->getEntry(); // Get the responsible Landmark churn generator /* ChurnGenerator* lmChurnGen = NULL; for (uint8_t i = 0; i < underlayConfigurator->getChurnGeneratorNum(); i++) { ChurnGenerator* searchedGen; searchedGen = underlayConfigurator->getChurnGenerator(i); if (searchedGen->getNodeType().overlayType == "oversim.common.cbr.LandmarkModules") { lmChurnGen = searchedGen; } } */ if (true) { //TODO // magic placement using underlays coords std::vector<double> ownCoords; for (uint8_t i = 0; i < entry->getDim(); i++) { ownCoords.push_back(entry->getCoords(i)); } Nps& nps = (Nps&)neighborCache->getNcsAccess(); nps.setOwnCoordinates(ownCoords); nps.setOwnLayer(0); thisNode = overlay->getThisNode(); globalNodeList->setOverlayReadyIcon(getThisNode(), true); globalNodeList->refreshEntry(getThisNode()); } else { //TODO } }