sidnet.stack.users.geographical_tree_aggregation.routing
Class GeographicalTreeRouting

java.lang.Object
  extended by sidnet.stack.users.geographical_tree_aggregation.routing.GeographicalTreeRouting
All Implemented Interfaces:
JistAPI.Proxiable, JistAPI.Timeless, Protocol, NetInterface.NetHandler, RouteInterface, RouteInterface.MultiTreeRouting

public class GeographicalTreeRouting
extends java.lang.Object
implements RouteInterface.MultiTreeRouting


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
static TopologyGUI topologyVisualizationTool
           
static TransmitReceiveFX transmitReceiveFX
           
 
Constructor Summary
GeographicalTreeRouting(NetAddress localAddr, Node myNode, PanelContext hostPanelContext, short selfProtocolIndex)
          Creates a new instance of MultiTreeRouting
 
Method Summary
 void commitData(Message_Aggregation newMsgAggr, NetAddress dst, NetAddress src)
           
 double Distance(double x1, double y1, double x2, double y2)
           
 void dropNotify(Message msg, MacAddress nextHopMac, Reason reason)
          Notification mechanism for packet dropped due to various "Reasons"
 void epochConditionCompleted(Message msgAggrM, java.lang.Object incomingAggregationBeanO)
           
 RouteInterface.MultiTreeRouting getProxy()
           
 boolean isDuplicate(Message msg)
           
 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 network layer.
 void send(NetMessage msg)
          Send a message through the routing protocol
 void sendToAppLayer(Message msg, NetAddress src)
           
 void sendToLinkLayer(Message msg, NetAddress originalSourceIP, NetAddress finalDestinationIP, NetAddress nextHopDestIP)
           
 void sendToLinkLayer(NetMessage.Ip ipMsg, NetAddress nextHopDestIP)
           
 void setAppInterface(AppInterface appInterface)
           
 void setNetEntity(NetInterface netEntity)
           
 void start()
          Start running protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

topologyVisualizationTool

public static TopologyGUI topologyVisualizationTool

transmitReceiveFX

public static TransmitReceiveFX transmitReceiveFX
Constructor Detail

GeographicalTreeRouting

public GeographicalTreeRouting(NetAddress localAddr,
                               Node myNode,
                               PanelContext hostPanelContext,
                               short selfProtocolIndex)
Creates a new instance of MultiTreeRouting

Method Detail

dropNotify

public void dropNotify(Message msg,
                       MacAddress nextHopMac,
                       Reason reason)
Description copied from interface: NetInterface.NetHandler
Notification mechanism for packet dropped due to various "Reasons"

Specified by:
dropNotify in interface NetInterface.NetHandler

peek

public void peek(NetMessage msg,
                 MacAddress lastHopMac)
Description copied from interface: RouteInterface
Called by the network layer for every incoming packet. A routing implementation may wish to look at these packets for informational purposes, but should not change their contents.

Specified by:
peek in interface RouteInterface
Parameters:
msg - incoming packet
lastHopMac - last link-level hop of incoming packet

send

public void send(NetMessage msg)
Description copied from interface: NetInterface.NetHandler
Send a message through the routing protocol

Specified by:
send in interface NetInterface.NetHandler
Specified by:
send in interface RouteInterface
Parameters:
msg - outgoing packet

receive

public void receive(Message msg,
                    NetAddress src,
                    MacAddress lastHop,
                    byte macId,
                    NetAddress dst,
                    byte priority,
                    byte ttl)
Description copied from interface: NetInterface.NetHandler
Receive a message from network layer.

Specified by:
receive in interface NetInterface.NetHandler
Parameters:
msg - message received
src - source network address
lastHop - source link address
macId - incoming interface
dst - destination network address
priority - packet priority
ttl - packet time-to-live

epochConditionCompleted

public void epochConditionCompleted(Message msgAggrM,
                                    java.lang.Object incomingAggregationBeanO)
Specified by:
epochConditionCompleted in interface RouteInterface.MultiTreeRouting

commitData

public void commitData(Message_Aggregation newMsgAggr,
                       NetAddress dst,
                       NetAddress src)

sendToLinkLayer

public void sendToLinkLayer(Message msg,
                            NetAddress originalSourceIP,
                            NetAddress finalDestinationIP,
                            NetAddress nextHopDestIP)

sendToLinkLayer

public void sendToLinkLayer(NetMessage.Ip ipMsg,
                            NetAddress nextHopDestIP)

sendToAppLayer

public void sendToAppLayer(Message msg,
                           NetAddress src)

isDuplicate

public boolean isDuplicate(Message msg)

Distance

public double Distance(double x1,
                       double y1,
                       double x2,
                       double y2)

getProxy

public RouteInterface.MultiTreeRouting getProxy()

setNetEntity

public void setNetEntity(NetInterface netEntity)

setAppInterface

public void setAppInterface(AppInterface appInterface)

start

public void start()
Description copied from interface: Protocol
Start running protocol.

Specified by:
start in interface Protocol