DRCL J-Sim API

drcl.net.traffic
Class TimestampedFooPacket

java.lang.Object
  extended bydrcl.net.Packet
      extended bydrcl.net.FooPacket
          extended bydrcl.net.traffic.TimestampedFooPacket
All Implemented Interfaces:
java.lang.Cloneable, Countable, ObjectCloneable, PacketWrapper

public class TimestampedFooPacket
extends FooPacket

A packet class that keeps a timestamp in addition to what is in the superclass.


Field Summary
 
Fields inherited from class drcl.net.Packet
body, headerSize, id, size
 
Constructor Summary
TimestampedFooPacket()
           
TimestampedFooPacket(double time_, int pktsize_, int pktcnt_, long bytecnt_)
           
TimestampedFooPacket(int pktsize_, int pktcnt_, long bytecnt_)
           
 
Method Summary
 java.lang.String _toString(java.lang.String separator_)
          Prints the packet header.
 java.lang.Object clone()
          Returns a clone of this object.
 java.lang.String getName()
          Returns the name of this packet.
 double getTimestamp()
           
 boolean isTimestampSupported()
          Returns true always.
 void setTimestamp(double time_)
           
 
Methods inherited from class drcl.net.FooPacket
getByteCount, getNumberCount, getPacketCount, getPacketType, getSizeCount, isByteCountSupported, isPacketCountSupported, set, setByteCount, setPacketCount
 
Methods inherited from class drcl.net.Packet
equals, getBody, getHeaderSize, getPacketSize, getSize, setBody, setBody, setHeaderSize, setPacketSize, setSize, toString, toString, wraps
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimestampedFooPacket

public TimestampedFooPacket()

TimestampedFooPacket

public TimestampedFooPacket(int pktsize_,
                            int pktcnt_,
                            long bytecnt_)

TimestampedFooPacket

public TimestampedFooPacket(double time_,
                            int pktsize_,
                            int pktcnt_,
                            long bytecnt_)
Method Detail

getName

public java.lang.String getName()
Description copied from class: Packet
Returns the name of this packet.

Overrides:
getName in class FooPacket

setTimestamp

public void setTimestamp(double time_)
Overrides:
setTimestamp in class Packet

getTimestamp

public double getTimestamp()
Overrides:
getTimestamp in class Packet

isTimestampSupported

public boolean isTimestampSupported()
Returns true always.

Overrides:
isTimestampSupported in class Packet

clone

public java.lang.Object clone()
Description copied from interface: ObjectCloneable
Returns a clone of this object.

Specified by:
clone in interface ObjectCloneable
Overrides:
clone in class FooPacket

_toString

public java.lang.String _toString(java.lang.String separator_)
Description copied from class: Packet
Prints the packet header.

Overrides:
_toString in class FooPacket

DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~