urv.olsr.message
Class OLSRPacketFactory

java.lang.Object
  extended by urv.olsr.message.OLSRPacketFactory

public class OLSRPacketFactory
extends java.lang.Object

This class provides helper methods to create objects of the OLSRPacket class. These objects include the corresponding sequence number and the originator node.

Author:
Gerard Paris Aixala

Constructor Summary
OLSRPacketFactory(OLSRNode localNode)
           
 
Method Summary
 OLSRNode getLocalNode()
           
 OLSRPacket getOlsrPacket(int messageType, ValidityTime time, int ttl, OLSRMessage content)
          Obtains an OLSRPacket with the specified type,time,ttl and content; with the local node as originator, the hop-count set to 0, and the corresponding message sequence number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OLSRPacketFactory

public OLSRPacketFactory(OLSRNode localNode)
Method Detail

getOlsrPacket

public OLSRPacket getOlsrPacket(int messageType,
                                ValidityTime time,
                                int ttl,
                                OLSRMessage content)
Obtains an OLSRPacket with the specified type,time,ttl and content; with the local node as originator, the hop-count set to 0, and the corresponding message sequence number.

Parameters:
messageType -
time -
ttl -
content -
Returns:

getLocalNode

public OLSRNode getLocalNode()
Returns:
the localNode