urv.olsr.core
Class OLSRController

java.lang.Object
  extended by urv.olsr.core.OLSRController
All Implemented Interfaces:
TopologyInformationSender

public class OLSRController
extends java.lang.Object
implements TopologyInformationSender

This class contains all necessary structures to perform routing with OLSR (one per node (i.e. one per each different IP)

Author:
Marcel Arrufat Arias

Method Summary
static OLSRController getInstance(OLSRNode localNode, OLSRMessageSender messageSender)
          In an emulated environment, the first OLSR instance will be the messageSender
 void handleIncomingControlMessage(org.jgroups.Message msg)
          Process the incoming messages from
 java.lang.Object handleOutgoingDataMessage(org.jgroups.Message msg, OLSRNode dest, java.lang.String mcast_addr_name)
          This method uses the routing table to determine
 void registerMessageUpper(java.lang.String mcast_addr_name, OLSRMessageUpper olsrProtocol)
          Registers an OLSR protocol in order to forward an incoming data message to the correct protocol stack (depending on the mcast_addr_name)
 void registerMulticastGroup(java.lang.String mcast_addr_name)
           
 void sendExtraTCMessage()
           
 void sendMessageToStack(org.jgroups.Message msg, java.lang.String mcastAddr)
          Forwards an incoming data message to the correct protocol stack (depending on the mcast_addr_name)
 void sendTopologyInformationEvent()
          This methods is used to send topology events to the above layer.
 void unregisterMulticastGroup(java.lang.String mcast_addr_name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static OLSRController getInstance(OLSRNode localNode,
                                         OLSRMessageSender messageSender)
In an emulated environment, the first OLSR instance will be the messageSender

Parameters:
localNode -
messageSender -
Returns:

sendTopologyInformationEvent

public void sendTopologyInformationEvent()
This methods is used to send topology events to the above layer.

Specified by:
sendTopologyInformationEvent in interface TopologyInformationSender
See Also:
TopologyEvent

handleIncomingControlMessage

public void handleIncomingControlMessage(org.jgroups.Message msg)
Process the incoming messages from

Parameters:
msg -

handleOutgoingDataMessage

public java.lang.Object handleOutgoingDataMessage(org.jgroups.Message msg,
                                                  OLSRNode dest,
                                                  java.lang.String mcast_addr_name)
This method uses the routing table to determine

Parameters:
msg -
dest -
mcast_addr_name -
Returns:
message with the destination address of the following node towards the real destination node

registerMessageUpper

public void registerMessageUpper(java.lang.String mcast_addr_name,
                                 OLSRMessageUpper olsrProtocol)
Registers an OLSR protocol in order to forward an incoming data message to the correct protocol stack (depending on the mcast_addr_name)

Parameters:
mcast_addr_name -
olsrProtocol -

registerMulticastGroup

public void registerMulticastGroup(java.lang.String mcast_addr_name)

sendExtraTCMessage

public void sendExtraTCMessage()

sendMessageToStack

public void sendMessageToStack(org.jgroups.Message msg,
                               java.lang.String mcastAddr)
Forwards an incoming data message to the correct protocol stack (depending on the mcast_addr_name)

Parameters:
msg -
mcastAddr -

unregisterMulticastGroup

public void unregisterMulticastGroup(java.lang.String mcast_addr_name)