net.jolsrv2.data
Class Packet

java.lang.Object
  extended by net.jolsrv2.data.Packet

public class Packet
extends java.lang.Object

The class implements the packet, as specified in OLSRv2.

Author:
Andreas Schjønhaug

Constructor Summary
Packet(java.util.ArrayList<Message> messages)
          Constructor
 
Method Summary
 byte[] getBytes()
          Returns the bytes of the packet
 int getSequenceNumber()
          Returns the packet sequence number
 void setSequenceNumber(int sequenceNumber)
          Sets the packet sequence number
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Packet

public Packet(java.util.ArrayList<Message> messages)
Constructor

Parameters:
messages - the messages to be added to the packet
Method Detail

getSequenceNumber

public int getSequenceNumber()
Returns the packet sequence number

Returns:
the packet sequence number

setSequenceNumber

public void setSequenceNumber(int sequenceNumber)
Sets the packet sequence number

Parameters:
sequenceNumber - the packet sequence number

getBytes

public byte[] getBytes()
Returns the bytes of the packet

Returns:
the bytes of the packet