|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsidnet.stack.users.marco_project.node_centric.routing.ElectrostaticRouter
public class ElectrostaticRouter
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface jist.swans.route.RouteInterface |
---|
RouteInterface.Aodv, RouteInterface.BezierRouting, RouteInterface.Dsr, RouteInterface.ECGRIDRouting, RouteInterface.GenericRouting, RouteInterface.HeartbeatProtocol, RouteInterface.MultiTreeRouting, RouteInterface.RandomPathRouting, RouteInterface.ShortestPathRouting, RouteInterface.Zrp |
Field Summary | |
---|---|
int |
contorUndeliverable
|
double |
cosineCompensationBudget
|
double[] |
fieldVector
|
Coordinate |
rly
|
Coordinate |
snk
|
static TopologyGUI |
topologyGUI
|
MacAddress |
undeliverableToMacAddress
|
Constructor Summary | |
---|---|
ElectrostaticRouter(Node myNode,
StatsCollector stats)
Creates a new instance of ElectrostaticRouter |
Method Summary | |
---|---|
double[] |
calculateFieldVector(java.util.List<ElectricCharge> charges)
|
double |
cosineSimilarity(Coordinate rcv,
double[] fieldVector)
|
void |
drawFieldVector(double[] fieldVectorr)
|
void |
dropNotify(Message msg,
MacAddress nextHopMac,
Reason reason)
Notification mechanism for packet dropped due to various "Reasons" |
RouteInterface |
getProxy()
internals |
void |
peek(NetMessage msg,
MacAddress lastHopMac)
Called by the network layer for every incoming packet. |
void |
receive(Message msg,
NetAddress src,
MacAddress lastHop,
byte macId,
NetAddress dst,
byte priority,
byte ttl)
Receive a message from the Link layer This function is called whenever the link layer receives a message whose final destination is THIS node. |
void |
RelayNode()
|
double[] |
rotateFieldVector(double[] fieldVector)
|
int |
selectNextHop(double[] fieldVector)
|
void |
send(NetMessage netmsg)
This function is called when the App Layer transmits a packet (other than broadcast (NetAddress.ANY) packet) or a message is received from the MAC layer, but, since this node is not the FINAL destination of the message, needs to be forwarded The mechanism is explained in the SIDnet manual. |
void |
sendToAppLayer(Message msg,
NetAddress src)
convenience function to send data UP ("to app layer") |
byte |
sendToLinkLayer(NetMessage.Ip ipMsg,
NetAddress nextHopDestIP)
convenience function to send data DOWN ("to link layer") |
void |
setAppInterface(AppInterface appInterface)
internals - for hooking up with App-Layer |
void |
setNetEntity(NetInterface netEntity)
internals - for hooking up with the Network-Layer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static TopologyGUI topologyGUI
public int contorUndeliverable
public MacAddress undeliverableToMacAddress
public Coordinate rly
public Coordinate snk
public double[] fieldVector
public double cosineCompensationBudget
Constructor Detail |
---|
public ElectrostaticRouter(Node myNode, StatsCollector stats)
Method Detail |
---|
public void dropNotify(Message msg, MacAddress nextHopMac, Reason reason)
dropNotify
in interface NetInterface.NetHandler
public void send(NetMessage netmsg)
send
in interface NetInterface.NetHandler
send
in interface RouteInterface
netmsg
- outgoing packetpublic void receive(Message msg, NetAddress src, MacAddress lastHop, byte macId, NetAddress dst, byte priority, byte ttl)
receive
in interface NetInterface.NetHandler
msg
- message receivedsrc
- source network addresslastHop
- source link addressmacId
- incoming interfacedst
- destination network addresspriority
- packet priorityttl
- packet time-to-livepublic void peek(NetMessage msg, MacAddress lastHopMac)
RouteInterface
peek
in interface RouteInterface
msg
- incoming packetlastHopMac
- last link-level hop of incoming packetpublic void RelayNode()
public int selectNextHop(double[] fieldVector)
public double cosineSimilarity(Coordinate rcv, double[] fieldVector)
public double[] rotateFieldVector(double[] fieldVector)
public double[] calculateFieldVector(java.util.List<ElectricCharge> charges)
public void drawFieldVector(double[] fieldVectorr)
public byte sendToLinkLayer(NetMessage.Ip ipMsg, NetAddress nextHopDestIP)
public void sendToAppLayer(Message msg, NetAddress src)
public void setAppInterface(AppInterface appInterface)
public void setNetEntity(NetInterface netEntity)
public RouteInterface getProxy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |