Simple Module NeighborCache

Package: oversim.common
File: src/common/NeighborCache.ned

C++ definition

Module for collecting neighborhood information (rtt, coordinates, ...)

Author: Bernhard Heep

Author: Antonio Zea

NeighborCache

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Extends:

BaseApp (simple module)

Base class for application implementations

Used in compound modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

InetOverlayHost (compound module)

Host that participates in the overlay

OverlayAccessRouter (compound module)

Access router that participates in the overlay

OverlayRouter (compound module)

Router in the overlay network

SimpleMultiOverlayHost (compound module)

Host in the simple network that participates in the overlay

SimpleOverlayHost (compound module)

Host in the simple network that participates in the overlay

SingleHost (compound module)

simulates a single host to connect it to a real network

Parameters:

Name Type Default value Description
rpcUdpTimeout double

default timeout value for direct RPCs

rpcKeyTimeout double

default timeout value for routed RPCs

optimizeTimeouts bool

calculate timeouts from measured RTTs and network coordinates

rpcExponentialBackoff bool

if true, doubles the timeout for every retransmission

debugOutput bool

enable debug output

enableNeighborCache bool

use neighbor cache for reducing ping traffic?

rttExpirationTime double

expiration of the validity of the measured rtts

maxSize double

maximum size of the cache

rttHistory int
timeoutAccuracyLimit double
defaultQueryType string
defaultQueryTypeI string
defaultQueryTypeQ string
doDiscovery bool
ncsType string
npsDimensions int

gnp settings

npsCoordCalcRuns int
landmarkTimeout double
npsMaxLayer int

nps settings

showVivaldiPosition bool

vivaldi settings

vivaldiErrorConst double
vivaldiCoordConst double
vivaldiDimConst double
vivaldiEnableHeightVector bool
vivaldiLossConst double

svivaldi settings

lossResetLimit double

Properties:

Name Value Description
class NeighborCache
display i=block/table

Gates:

Name Direction Size Description
udpIn input

gate from the UDP layer

from_lowerTier input

gate from the lower tier

from_upperTier input

gate from the upper tier

direct_in input

gate for sendDirect

trace_in input

gate for trace file commands

udpOut output

gate to the UDP layer

to_lowerTier output

gate to the lower tier

to_upperTier output

gate to the upper tier

Source code:

//
// Module for collecting neighborhood information (rtt, coordinates, ...)
// @author Bernhard Heep
// @author Antonio Zea
//
simple NeighborCache extends BaseApp
{
    parameters:
        @class(NeighborCache);
        bool enableNeighborCache;  // use neighbor cache for reducing ping traffic?
        double rttExpirationTime @unit(s); // expiration of the validity of the measured rtts
        double maxSize;           // maximum size of the cache

        int rttHistory;
        double timeoutAccuracyLimit;

        string defaultQueryType;
        string defaultQueryTypeI;
        string defaultQueryTypeQ;

        bool doDiscovery;

        string ncsType;

        //gnp settings
        int npsDimensions;
        int npsCoordCalcRuns;
        double landmarkTimeout @unit(s);

        //nps settings
        int npsMaxLayer;

        //vivaldi settings
        bool showVivaldiPosition;
        double vivaldiErrorConst;
        double vivaldiCoordConst;
        double vivaldiDimConst;
        bool vivaldiEnableHeightVector;

        //svivaldi settings
        double vivaldiLossConst;
        double lossResetLimit;

        @display("i=block/table");
}