public class FloatingApplication extends Application
FloatingAppReporter class can be used to record
information about the application behavior.FloatingAppReporter| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
APP_ID
Application ID
|
static java.lang.String |
FLOATING_ANCHOR
anchor zone for the message
|
static java.lang.String |
FLOATING_ANCHOR_GRAN |
static java.lang.String |
FLOATING_ANCHOR_MAX |
static java.lang.String |
FLOATING_DESTINATION
Destination address
|
static java.lang.String |
FLOATING_FLUX
shall node enter/leave events for an anchor zone be collected?
|
static java.lang.String |
FLOATING_IN_ANCHOR_ZONE_FACTOR
factor determining how deep a floating message generator needs to be inside the anchor zone
|
static java.lang.String |
FLOATING_INTERVAL
(minimal) interval between two floating messages per node
|
static java.lang.String |
FLOATING_MODE
mode selection
|
static java.lang.String |
FLOATING_SEED
Seed for the app's random number generator
|
static java.lang.String |
FLOATING_SIZE
Seed for the app's random number generator
|
static java.lang.String |
FLOATING_START
Seed for the app's random number generator
|
static java.lang.String |
FLOATING_TTL
anchor zone for the message
|
static int |
MODE_FIXED_ANCHOR |
static int |
MODE_VARIABLE_ANCHOR |
appID| Constructor and Description |
|---|
FloatingApplication(FloatingApplication a)
Copy-constructor
|
FloatingApplication(Settings s)
Creates a new floating application with the given settings.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getA() |
double |
getAGran() |
double |
getAMax() |
Coord |
getAnchor() |
Coord |
getAnchorGran() |
Coord |
getAnchorMax() |
int |
getDestination() |
boolean |
getFlux() |
boolean |
getInAnchorZone() |
double |
getInAnchorZoneFactor() |
double |
getInterval() |
double |
getLastMessage() |
int |
getMessageSize() |
int |
getMessageSizeGran() |
int |
getMessageSizeMax() |
int |
getMode() |
double |
getR() |
double |
getR2() |
double |
getRGran() |
double |
getRMax() |
int |
getSeed() |
double |
getStartTime() |
double |
getTtl() |
double |
getTtlGran() |
double |
getTtlMax() |
Message |
handle(Message msg,
DTNHost host)
Handles an incoming message.
|
Application |
replicate() |
static void |
reset() |
void |
setA(int a) |
void |
setAnchor(Coord c) |
void |
setDestination(int destination) |
void |
setInAnchorZoneFactor(double factor) |
void |
setInterval(double interval) |
void |
setLastMessage(double lastMessage) |
void |
setMessageSize(int messageSize) |
void |
setR(int r) |
void |
setSeed(int seed) |
void |
setStartTime(double start) |
void |
setTtl(double ttl) |
void |
setX(double x) |
void |
setY(double y) |
void |
update(DTNHost host)
Sends floating messages according to the parameterization provided in the config file.
|
getAppID, getAppListeners, sendEventToListeners, setAppID, setAppListenerspublic static final java.lang.String FLOATING_DESTINATION
public static final java.lang.String FLOATING_SIZE
public static final java.lang.String FLOATING_START
public static final java.lang.String FLOATING_SEED
public static final java.lang.String FLOATING_INTERVAL
public static final java.lang.String FLOATING_ANCHOR
public static final java.lang.String FLOATING_ANCHOR_MAX
public static final java.lang.String FLOATING_ANCHOR_GRAN
public static final java.lang.String FLOATING_TTL
public static final java.lang.String FLOATING_IN_ANCHOR_ZONE_FACTOR
public static final java.lang.String FLOATING_FLUX
public static final java.lang.String FLOATING_MODE
public static final int MODE_FIXED_ANCHOR
public static final int MODE_VARIABLE_ANCHOR
public static final java.lang.String APP_ID
public FloatingApplication(Settings s)
s - Settings to use for initializing the application.public FloatingApplication(FloatingApplication a)
a - public Message handle(Message msg, DTNHost host)
handle in class Applicationmsg - message received by the routerhost - host to which the application instance is attachednull
if the application wants the router to stop forwarding the
message.public Application replicate()
replicate in class Applicationpublic void update(DTNHost host)
update in class Applicationhost - to which the application instance is attachedpublic double getLastMessage()
public void setLastMessage(double lastMessage)
lastFloating - the lastFloating to setpublic double getStartTime()
public void setStartTime(double start)
public double getInterval()
public void setTtl(double ttl)
ttl - the ttl to setpublic double getTtl()
public double getTtlMax()
public double getTtlGran()
public void setInterval(double interval)
interval - the interval to setpublic int getDestination()
public void setDestination(int destination)
destMin - the destMin to setpublic int getSeed()
public void setSeed(int seed)
seed - the seed to setpublic int getMessageSize()
public int getMessageSizeMax()
public int getMessageSizeGran()
public void setMessageSize(int messageSize)
messageSize - the messageSize to setpublic Coord getAnchor()
public Coord getAnchorMax()
public Coord getAnchorGran()
public double getR()
public double getRMax()
public double getRGran()
public double getR2()
public double getA()
public double getAMax()
public double getAGran()
public void setAnchor(Coord c)
the - anchor coordspublic void setX(double x)
the - anchor X coordpublic void setY(double y)
the - anchor Y coordpublic void setR(int r)
the - anchor zone radiuspublic void setA(int a)
the - availability distancepublic double getInAnchorZoneFactor()
public void setInAnchorZoneFactor(double factor)
the - in-anchor-zone factor to setpublic boolean getInAnchorZone()
public boolean getFlux()
public int getMode()
public static void reset()