urv.omolsr.data
Class OMOLSRData

java.lang.Object
  extended by urv.omolsr.data.OMOLSRData

public class OMOLSRData
extends java.lang.Object

This class handles all the data related to the construction of the multicast overlay in the local node. It maintains a list of virtual neighbours for each multicast group, as well as link state table for each group. OMCastData also provides methods to obtain the headers of the messages that must be forwarded.

Author:
Gerard Paris Aixala, Marcel Arrufat Arias

Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
OMOLSRData(OLSRNode localNode)
           
 
Method Summary
 void computeMST()
           
 java.util.Set<OLSRNode> getGroupNodes()
           
 HashMapSet<OLSRNode,OLSRNode> getHeadersForForwardingNodes(java.util.Set<OLSRNode> virtualNeighborsToForwardSet, java.util.Set<OLSRNode> nonVirtualNeighborsToForwardSet)
          Returns the header that must be set in each message when forwarding a multicast message IMPORTANT: now all nodes receive exactly the same header (broadcast reminiscence), although it should only receive
 HashMapSet<OLSRNode,OLSRNode> getHeadersForSource(OLSRNode localOLSRNode)
          Obtains the headers to be sent into a multicast message
 java.util.Set<OLSRNode> getNonVirtualNeighborsExistingInSet(OLSRNode localOLSRNode, java.util.HashSet<OLSRNode> nodeSet)
          Returns a set of node which are not virtualneighbors of the given node and also exist in the given list
 java.util.Set<OLSRNode> getNonVirtualNeighborsInSubtree(java.util.Set<OLSRNode> nonVirtualNeighborsToForwardSet, OLSRNode directDestinationNode)
          Gets the subtree under the direct destination node and returns the nodes which are present in both subtree and nonVirtualNeighbors sets
 java.util.Set<OLSRNode> getTemporalNodes()
           
 java.util.Set<OLSRNode> getVirtualNeighbors(OLSRNode node)
           
 java.util.Set<OLSRNode> getVirtualNeighborsExistingInSet(OLSRNode localOLSRNode, java.util.HashSet<OLSRNode> nodeSet)
          Returns a set of node which are virtualneighbors of the given node and also exist in the given list
 java.lang.String toString()
           
 void updateOMOLSRNetworkGraph(OMOLSRNetworkGraph omolsrNetworkGraph)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Constructor Detail

OMOLSRData

public OMOLSRData(OLSRNode localNode)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

computeMST

public void computeMST()

getGroupNodes

public java.util.Set<OLSRNode> getGroupNodes()

getHeadersForForwardingNodes

public HashMapSet<OLSRNode,OLSRNode> getHeadersForForwardingNodes(java.util.Set<OLSRNode> virtualNeighborsToForwardSet,
                                                                  java.util.Set<OLSRNode> nonVirtualNeighborsToForwardSet)
Returns the header that must be set in each message when forwarding a multicast message IMPORTANT: now all nodes receive exactly the same header (broadcast reminiscence), although it should only receive

Parameters:
virtualNeighborsToForwardSet -
nonVirtualNeighborsToForwardSet -
Returns:

getHeadersForSource

public HashMapSet<OLSRNode,OLSRNode> getHeadersForSource(OLSRNode localOLSRNode)
Obtains the headers to be sent into a multicast message

Parameters:
localOLSRNode -
Returns:

getNonVirtualNeighborsExistingInSet

public java.util.Set<OLSRNode> getNonVirtualNeighborsExistingInSet(OLSRNode localOLSRNode,
                                                                   java.util.HashSet<OLSRNode> nodeSet)
Returns a set of node which are not virtualneighbors of the given node and also exist in the given list

Parameters:
localOLSRNode -
nodeSet -
Returns:

getNonVirtualNeighborsInSubtree

public java.util.Set<OLSRNode> getNonVirtualNeighborsInSubtree(java.util.Set<OLSRNode> nonVirtualNeighborsToForwardSet,
                                                               OLSRNode directDestinationNode)
Gets the subtree under the direct destination node and returns the nodes which are present in both subtree and nonVirtualNeighbors sets

Parameters:
nonVirtualNeighborsToForwardSet -
vnToForwardMessage -
Returns:

getTemporalNodes

public java.util.Set<OLSRNode> getTemporalNodes()

getVirtualNeighbors

public java.util.Set<OLSRNode> getVirtualNeighbors(OLSRNode node)

getVirtualNeighborsExistingInSet

public java.util.Set<OLSRNode> getVirtualNeighborsExistingInSet(OLSRNode localOLSRNode,
                                                                java.util.HashSet<OLSRNode> nodeSet)
Returns a set of node which are virtualneighbors of the given node and also exist in the given list

Parameters:
localOLSRNode -
nodeSet -
Returns:

updateOMOLSRNetworkGraph

public void updateOMOLSRNetworkGraph(OMOLSRNetworkGraph omolsrNetworkGraph)