|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmil.navy.nps.dis.PduElement
mil.navy.nps.dis.ClockTime
Special clock time reporting class.
ProtocolDataUnit
,
PduElement
,
SerializationInterface
,
SimulationManagementFamily
Field Summary | |
protected int |
hour
Hours - This field shall specify the hours since 0000 hours January 1, 1970 UTC. |
static int |
sizeOf
Constant value--size of a Clock Time Record; here : sizeOf = 8 bytes . |
protected UnsignedInt |
timePastHour
Time Past the Hour - This field shall specify the time past the hour indicated in Hour field. |
Constructor Summary | |
ClockTime()
Default constructor--fills with zeros for all values. |
|
ClockTime(long pHour,
long pTimePastHour)
Constructs a new ClockTime object whose values are passed in parameters. |
Method Summary | |
java.lang.Object |
clone()
Makes deep copies of all the instance variables, so we don't have two objects pointing to the same data. |
void |
deSerialize(java.io.DataInputStream inputStream)
Deserialize our data from the input stream. |
int |
getHour()
|
int |
getTimePastHour()
|
int |
length()
Returns the length of the object when serialized in a stream. |
void |
printValues(int indentLevel,
java.io.PrintStream printStream)
Prints the generated serialized object for debugging. |
void |
serialize(java.io.DataOutputStream outputStream)
Serialize our data out to the stream. |
void |
setHour(int pHour)
|
void |
setHour(long pHour)
|
void |
setTimePastHour(long pTimePastHour)
|
void |
setTimePastHour(UnsignedInt pTimePastHour)
|
void |
setValues(long pHour,
long pTimePastHour)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int hour
protected UnsignedInt timePastHour
public static final int sizeOf
sizeOf = 8 bytes
.
Constructor Detail |
public ClockTime()
public ClockTime(long pHour, long pTimePastHour)
pHour
- the passed hours since 0000 hours January 1, 1970 UTCpTimePastHour
- the Timestamp of the new objectMethod Detail |
public java.lang.Object clone()
PduElement
clone
in class PduElement
Object
public void serialize(java.io.DataOutputStream outputStream)
PduElement
super.Serialize()
to make sure
the superclasse's data is serialized out. The order
in which instance variables are serialized is significant. They must
be serialized in the same order they appear in the DIS
spec.
Prints out some information during execution if debugging flag is set.
serialize
in interface SerializationInterface
serialize
in class PduElement
outputStream
- the stream to which this object is serialized
java.lang.RuntimeException
- when an IO Error occurs.public void deSerialize(java.io.DataInputStream inputStream)
PduElement
super.deSerialize
to make sure
the superclass's data are properly affected. The order
in which instance variables are serialized is significant. They must
be deSerialized in the same order as they have been serialized as specified by the DIS spec.
deSerialize
in interface SerializationInterface
deSerialize
in class PduElement
inputStream
- the stream from which this object is initialized
java.lang.RuntimeException
- when an IO Error occurs.public int length()
PduElement
length
in class PduElement
public void printValues(int indentLevel, java.io.PrintStream printStream)
PduElement
printValues
in class PduElement
indentLevel
- number of spaces to indent for visibilitypublic int getHour()
public void setHour(int pHour)
public void setHour(long pHour)
public int getTimePastHour()
public void setTimePastHour(UnsignedInt pTimePastHour)
public void setTimePastHour(long pTimePastHour)
public void setValues(long pHour, long pTimePastHour)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |