|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsidnet.stack.users.marco_project.image_charges.app.AppP2P_electrostatic
public class AppP2P_electrostatic
Field Summary | |
---|---|
static long |
ackSequenceNumber
|
Treap |
activeCharges
|
java.util.LinkedList<java.lang.Integer> |
activeRoutes
|
short |
electrostaticIndex
|
boolean |
estimatedSourceLocation
|
Treap |
knownCharges
|
java.util.LinkedList<java.lang.Integer> |
pendingRoutes
|
static long |
querySequenceNumber
|
static long |
rreqSequenceNumber
Sequence numbers |
short |
shortestPathIndex
|
Coordinate |
snk
|
NetAddress |
snkIP
|
Coordinate |
src
|
NetAddress |
srcIP
|
static long |
updateSequenceNumber
|
Query |
userQuery
|
Constructor Summary | |
---|---|
AppP2P_electrostatic(Node myNode,
short shortestPathIndex,
short electrostaticIndex,
StatsCollector stats,
ExperimentDataImpl experimentData,
TopologyGUI topologyGUI)
Creates a new instance of the AppP2P |
Method Summary | |
---|---|
double |
calculateMagnitude(Coordinate src,
Coordinate snk)
|
AppInterface |
getAppProxy()
Return self-referencing APPLICATION proxy entity. |
void |
receive(Message msg,
NetAddress src,
MacAddress lastHop,
byte macId,
NetAddress dst,
byte priority,
byte ttl)
On reception of a message, source/sink perform different tasks for different types of messages. |
void |
run()
Run application. |
void |
run(java.lang.String[] args)
This is your main execution loop at the Application Level. |
void |
selectFirstHops(int nrOfRoutes)
Selects the first-hop nodes around a source node for specified number of routes. |
void |
sendMessage(Message msg)
This methods handles the sending of DataMessages and RreqMessages via Electrostatic Routing. |
void |
sensing(java.util.List params)
Periodically senses phenomena. |
void |
setNetEntity(NetInterface netEntity)
Set network entity. |
void |
signalUserRequest()
Handles reception of user-injected queries at the source node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public short shortestPathIndex
public short electrostaticIndex
public static long rreqSequenceNumber
public static long ackSequenceNumber
public static long updateSequenceNumber
public static long querySequenceNumber
public Coordinate snk
public NetAddress snkIP
public java.util.LinkedList<java.lang.Integer> pendingRoutes
public java.util.LinkedList<java.lang.Integer> activeRoutes
public Query userQuery
public Treap activeCharges
public Treap knownCharges
public Coordinate src
public NetAddress srcIP
public boolean estimatedSourceLocation
Constructor Detail |
---|
public AppP2P_electrostatic(Node myNode, short shortestPathIndex, short electrostaticIndex, StatsCollector stats, ExperimentDataImpl experimentData, TopologyGUI topologyGUI)
myNode
- shortestPathIndex
- electrostaticIndex
- stats
- Method Detail |
---|
public void run(java.lang.String[] args)
run
in interface AppInterface
args
- public void run()
AppInterface
run
in interface AppInterface
public void sensing(java.util.List params)
sensing
in interface AppInterface
params
- public void selectFirstHops(int nrOfRoutes)
nrOfRoutes
- public void signalUserRequest()
signalUserRequest
in interface CallbackInterface
public void receive(Message msg, NetAddress src, MacAddress lastHop, byte macId, NetAddress dst, byte priority, byte ttl)
receive
in interface AppInterface
msg
- src
- lastHop
- macId
- dst
- priority
- ttl
- public void sendMessage(Message msg)
msg
- public double calculateMagnitude(Coordinate src, Coordinate snk)
public void setNetEntity(NetInterface netEntity)
netEntity
- network entitypublic AppInterface getAppProxy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |