Landmark Class Reference

#include <Landmark.h>

Inheritance diagram for Landmark:
BaseApp BaseRpc RpcListener

List of all members.

Private Member Functions

virtual ~Landmark ()
virtual void initializeApp (int stage)
 initializes derived class-attributes
virtual void finishApp ()
 collects statistical data of derived app

Detailed Description

Definition at line 30 of file Landmark.h.


Constructor & Destructor Documentation

Landmark::~Landmark (  )  [private, virtual]

Definition at line 36 of file Landmark.cc.

00036                     {
00037 }


Member Function Documentation

void Landmark::finishApp (  )  [private, virtual]

collects statistical data of derived app

Reimplemented from BaseApp.

Definition at line 79 of file Landmark.cc.

00080 {
00081     if (((Nps&)(neighborCache->getNcsAccess())).getReceivedCalls() != 0) {
00082         globalStatistics->recordOutVector("Calls to Landmarks",
00083             ((Nps&)(neighborCache->getNcsAccess())).getReceivedCalls());
00084     }
00085 }

void Landmark::initializeApp ( int  stage  )  [private, virtual]

initializes derived class-attributes

Parameters:
stage the init stage

Reimplemented from BaseApp.

Definition at line 39 of file Landmark.cc.

00040 {
00041     if (stage != MIN_STAGE_APP)
00042         return;
00043 
00044     SimpleNodeEntry* entry =
00045         dynamic_cast<SimpleInfo*>(globalNodeList->
00046                                   getPeerInfo(thisNode.getAddress()))->getEntry();
00047 
00048     // Get the responsible Landmark churn generator
00049     /*
00050     ChurnGenerator* lmChurnGen = NULL;
00051     for (uint8_t i = 0; i < underlayConfigurator->getChurnGeneratorNum(); i++) {
00052         ChurnGenerator* searchedGen;
00053         searchedGen = underlayConfigurator->getChurnGenerator(i);
00054         if (searchedGen->getNodeType().overlayType == "oversim.common.cbr.LandmarkModules") {
00055             lmChurnGen = searchedGen;
00056         }
00057     }
00058     */
00059 
00060     if (true) { //TODO
00061         // magic placement using underlays coords
00062         std::vector<double> ownCoords;
00063         for (uint8_t i = 0; i < entry->getDim(); i++) {
00064             ownCoords.push_back(entry->getCoords(i));
00065         }
00066 
00067         Nps& nps = (Nps&)neighborCache->getNcsAccess();
00068         nps.setOwnCoordinates(ownCoords);
00069         nps.setOwnLayer(0);
00070 
00071         thisNode = overlay->getThisNode();
00072         globalNodeList->setOverlayReadyIcon(getThisNode(), true);
00073         globalNodeList->refreshEntry(getThisNode());
00074     } else {
00075         //TODO
00076     }
00077 }


The documentation for this class was generated from the following files:
Generated on Wed May 26 16:21:18 2010 for OverSim by  doxygen 1.6.3