J-Sim v1.2.1-p7 API

drcl.net.traffic
Class TimestampedFooPacket

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.net.Packet
          extended bydrcl.net.FooPacket
              extended bydrcl.net.traffic.TimestampedFooPacket
All Implemented Interfaces:
java.lang.Cloneable, Countable, ObjectDuplicable, PacketWrapper, java.io.Serializable

public class TimestampedFooPacket
extends FooPacket

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

See Also:
Serialized Form

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 wrapper instance.
 void duplicate(java.lang.Object p_)
          opies the content of the source_ object to this object.
 java.lang.String getName()
          Returns the name of this packet.
 double getTimestamp()
           
 boolean isTimestampSupported()
           
 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
finalize, 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()
Overrides:
isTimestampSupported in class Packet

duplicate

public void duplicate(java.lang.Object p_)
Description copied from class: DrclObj
opies the content of the source_ object to this object. he subclass must implement this method to realize DrclObj.clone().

Specified by:
duplicate in interface ObjectDuplicable
Overrides:
duplicate in class FooPacket

clone

public java.lang.Object clone()
Description copied from interface: PacketWrapper
Returns a clone of this wrapper instance.

Specified by:
clone in interface PacketWrapper
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

J-Sim v1.2.1-p7 API

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