sidnet.stack.users.marco_project.image_charges.routing
Class ShortestGeographicalPathRouting
java.lang.Object
   sidnet.stack.users.marco_project.image_charges.routing.ShortestGeographicalPathRouting
sidnet.stack.users.marco_project.image_charges.routing.ShortestGeographicalPathRouting
- All Implemented Interfaces: 
- JistAPI.Proxiable, JistAPI.Timeless, NetInterface.NetHandler, RouteInterface
- public class ShortestGeographicalPathRouting 
- extends java.lang.Object- implements RouteInterface
 
 
 
 
| Method Summary | 
|  void | dropNotify(Message msg,
           MacAddress nextHopMac,
           Reason reason)Notification mechanism for packet dropped due to various "Reasons"
 | 
|  RouteInterface | getProxy()
 | 
|  NetAddress | getThroughShortestPath(Location2D destLocation)
 | 
|  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 network layer
  This method is typically called when this node is the ultimate destination of an incoming data-message (the sink)
 | 
|  void | send(NetMessage msg)Send a message
 This method is being called when a message, comming from either the application layer or the mac layer, needs to be forwarded
 | 
|  void | sendToAppLayer(Message msg,
               NetAddress src)
 | 
|  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
DEBUG
public static final boolean DEBUG
- See Also:
- Constant Field Values
topologyGUI
public static TopologyGUI topologyGUI
ShortestGeographicalPathRouting
public ShortestGeographicalPathRouting(Node myNode)
- Creates a new instance of ShortestGeographicalPathRouting
 
- Parameters:
- myNode- the SIDnet node handle to access its GUI-primitives and shared environment
 
send
public void send(NetMessage msg)
- Send a message
 This method is being called when a message, comming from either the application layer or the mac layer, needs to be forwarded
 
- 
- Specified by:
- sendin interface- NetInterface.NetHandler
- Specified by:
- sendin interface- RouteInterface
 
- 
- Parameters:
- NetMessage- the 'NetMessage' wrapped Message
 
receive
public void receive(Message msg,
                    NetAddress src,
                    MacAddress lastHop,
                    byte macId,
                    NetAddress dst,
                    byte priority,
                    byte ttl)
- Receive a message from the network layer
  This method is typically called when this node is the ultimate destination of an incoming data-message (the sink)
 
- 
- Specified by:
- receivein interface- NetInterface.NetHandler
 
- 
- Parameters:
- Message- the incomming message
- NetAddress- the original source of the message
- MacAddress- the MAC address 1-hop neighbor from which this nodes received this message
- macId- the macId interface through which this message was received
- NetAddress- the IP address of the ultimate node destination (this)
- priority- the priority of the incoming message
- ttl- Time To Leave
 
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
 
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
 
- 
 
sendToLinkLayer
public byte sendToLinkLayer(NetMessage.Ip ipMsg,
                            NetAddress nextHopDestIP)
- 
 
- 
 
sendToAppLayer
public void sendToAppLayer(Message msg,
                           NetAddress src)
- 
 
- 
 
getThroughShortestPath
public NetAddress getThroughShortestPath(Location2D destLocation)
- 
 
- 
 
getProxy
public RouteInterface getProxy()
- 
 
- 
 
setNetEntity
public void setNetEntity(NetInterface netEntity)
- 
 
- 
 
setAppInterface
public void setAppInterface(AppInterface appInterface)
- 
 
- 
 
start
public void start()
- 
 
-