Sim.Routing.DSR
Class AckHeader

java.lang.Object
  extended by Sim.Routing.DSR.AckHeader
All Implemented Interfaces:
ProtocolFrame

public class AckHeader
extends java.lang.Object
implements ProtocolFrame

AckHeader defines a packet that contains only an acknowledgement for a DSR packet. This is used for explicit acknowledgement and is required only for the last hop in a route.


Constructor Summary
AckHeader(PacketId id)
          Constructs a new ack for the given non-null Packet ID.
 
Method Summary
 PacketId getId()
          Returns the unique PacketId for the packet to be acknowledged.
 int getSize()
          Returns the "serialized" size of this portion of the packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AckHeader

public AckHeader(PacketId id)
Constructs a new ack for the given non-null Packet ID.

Method Detail

getId

public PacketId getId()
Returns the unique PacketId for the packet to be acknowledged.

Returns:
non-null PacketId

getSize

public int getSize()
Returns the "serialized" size of this portion of the packet.

Specified by:
getSize in interface ProtocolFrame