sidnet.stack.users.k_shortest_path.routing
Class KShortestPathRouting5
java.lang.Object
   sidnet.stack.users.k_shortest_path.routing.KShortestPathRouting5
sidnet.stack.users.k_shortest_path.routing.KShortestPathRouting5
- All Implemented Interfaces: 
- JistAPI.Proxiable, JistAPI.Timeless, NetInterface.NetHandler, RouteInterface
- public class KShortestPathRouting5 
- extends java.lang.Object- implements RouteInterface
 
 
 
| Constructor Summary | 
| KShortestPathRouting5(NetAddress localAddr,
                      Node myNode,
                      PanelContext hostPanelContext,
                      int ALTERNATION_POLICY)Creates a new instance of kShortestpathrouting
 | 
| KShortestPathRouting5(NetAddress localAddr,
                      Node myNode,
                      PanelContext hostPanelContext,
                      int VERT_PIPE_SAME,
                      int ALTERNATION_POLICY,
                      double commRangeft,
                      double extensionFactor,
                      NCS_Location2D targetSource)
 | 
 
| Method Summary | 
|  NetAddress | bestNextHopNeighbor(int queryId,
                    long s_seq,
                    Location2D srcLoc,
                    Location2D sinkLoc,
                    long messageSequenceNumber,
                    NetAddress sinkIPAddress,
                    boolean allowBackwards)
 | 
|  Location2D[][] | buildLengthRestrictedTargets1(Location2D sourceLoc,
                              Location2D sinkLoc,
                              int numPaths,
                              double ratio,
                              double spacing,
                              double maximumLength)
 | 
|  Location2D[][] | buildLengthRestrictedTargets2(Location2D sourceLoc,
                              Location2D sinkLoc,
                              int numPaths,
                              double ratio,
                              double spacing,
                              double threeSegmentRatio,
                              double maximumLength)
 | 
|  Location2D[][] | buildTargets1(Location2D sourceLoc,
              Location2D sinkLoc,
              int numPaths,
              double ratio,
              double spacing)
 | 
|  Location2D[][] | buildTargets2(Location2D sourceLoc,
              Location2D sinkLoc,
              int numPaths,
              double ratio,
              double spacing,
              double threeSegmentRatio)
 | 
|  boolean | closerToStraightLine(Location2D neiLoc,
                     Location2D loc1,
                     Location2D endPoint0,
                     Location2D endPoint1)
 | 
|  double | distToStraightLine(Location2D loc1,
                   Location2D endPoint0,
                   Location2D endPoint1)
 | 
|  void | dropNotify(Message msg,
           MacAddress nextHopMac,
           Reason reason)Notification mechanism for packet dropped due to various "Reasons"
 | 
|  RouteInterface | getProxy()
 | 
|  NetAddress | getThroughShortestPath(Location2D destLocation,
                       long messageSequenceNumber,
                       NetAddress sinkIPAddress)
 | 
|  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)
 | 
|  byte | sendToLinkLayer(NetMessage.Ip ipMsg,
                NetAddress nextHopDestIP)
 | 
|  void | setAppInterface(AppInterface appInterface)
 | 
|  void | setNetEntity(NetInterface netEntity)
 | 
|  void | start()
 | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ERROR
public static final byte ERROR
- See Also:
- Constant Field Values
SUCCESS
public static final byte SUCCESS
- See Also:
- Constant Field Values
nQinitHandled
public int nQinitHandled
EXPIRATION_PERIOD
public static final long EXPIRATION_PERIOD
- See Also:
- Constant Field Values
topologyVisualizationTool
public static TopologyGUI topologyVisualizationTool
myLevel
public int myLevel
query
public Query query
KShortestPathRouting5
public KShortestPathRouting5(NetAddress localAddr,
                             Node myNode,
                             PanelContext hostPanelContext,
                             int ALTERNATION_POLICY)
- Creates a new instance of kShortestpathrouting
 
KShortestPathRouting5
public KShortestPathRouting5(NetAddress localAddr,
                             Node myNode,
                             PanelContext hostPanelContext,
                             int VERT_PIPE_SAME,
                             int ALTERNATION_POLICY,
                             double commRangeft,
                             double extensionFactor,
                             NCS_Location2D targetSource)
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:
- peekin interface- RouteInterface
 
- 
- Parameters:
- msg- incoming packet
- lastHopMac- last link-level hop of incoming 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:
- receivein 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
 
send
public void send(NetMessage msg)
- Description copied from interface: NetInterface.NetHandler
- Send a message through the routing protocol
 
- 
- Specified by:
- sendin interface- NetInterface.NetHandler
- Specified by:
- sendin interface- RouteInterface
 
- 
- Parameters:
- msg- outgoing packet
 
buildTargets1
public Location2D[][] buildTargets1(Location2D sourceLoc,
                                    Location2D sinkLoc,
                                    int numPaths,
                                    double ratio,
                                    double spacing)
- 
 
- 
 
buildLengthRestrictedTargets1
public Location2D[][] buildLengthRestrictedTargets1(Location2D sourceLoc,
                                                    Location2D sinkLoc,
                                                    int numPaths,
                                                    double ratio,
                                                    double spacing,
                                                    double maximumLength)
- 
 
- 
 
buildLengthRestrictedTargets2
public Location2D[][] buildLengthRestrictedTargets2(Location2D sourceLoc,
                                                    Location2D sinkLoc,
                                                    int numPaths,
                                                    double ratio,
                                                    double spacing,
                                                    double threeSegmentRatio,
                                                    double maximumLength)
- 
 
- 
 
buildTargets2
public Location2D[][] buildTargets2(Location2D sourceLoc,
                                    Location2D sinkLoc,
                                    int numPaths,
                                    double ratio,
                                    double spacing,
                                    double threeSegmentRatio)
- 
 
- 
 
bestNextHopNeighbor
public NetAddress bestNextHopNeighbor(int queryId,
                                      long s_seq,
                                      Location2D srcLoc,
                                      Location2D sinkLoc,
                                      long messageSequenceNumber,
                                      NetAddress sinkIPAddress,
                                      boolean allowBackwards)
- 
 
- 
 
closerToStraightLine
public boolean closerToStraightLine(Location2D neiLoc,
                                    Location2D loc1,
                                    Location2D endPoint0,
                                    Location2D endPoint1)
- 
 
- 
 
distToStraightLine
public double distToStraightLine(Location2D loc1,
                                 Location2D endPoint0,
                                 Location2D endPoint1)
- 
 
- 
 
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:
- dropNotifyin interface- NetInterface.NetHandler
 
- 
 
getThroughShortestPath
public NetAddress getThroughShortestPath(Location2D destLocation,
                                         long messageSequenceNumber,
                                         NetAddress sinkIPAddress)
- 
 
- 
 
sendToLinkLayer
public void sendToLinkLayer(Message msg,
                            NetAddress originalSourceIP,
                            NetAddress finalDestinationIP,
                            NetAddress nextHopDestIP)
- 
 
- 
 
sendToLinkLayer
public byte sendToLinkLayer(NetMessage.Ip ipMsg,
                            NetAddress nextHopDestIP)
- 
 
- 
 
sendToAppLayer
public void sendToAppLayer(Message msg,
                           NetAddress src)
- 
 
- 
 
getProxy
public RouteInterface getProxy()
- 
 
- 
 
setNetEntity
public void setNetEntity(NetInterface netEntity)
- 
 
- 
 
setAppInterface
public void setAppInterface(AppInterface appInterface)
- 
 
- 
 
start
public void start()
- 
 
-