Private Member Functions

Landmark Class Reference

#include <Landmark.h>

Inheritance diagram for Landmark:
BaseApp BaseRpc BaseTcpSupport 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.

                    {
}


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.

{
    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

Parameters:
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
    }
}


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