|
||||||||||
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.ArticulationParameter
Articulation parameters are components of an entity that can move - this data is appended to the EntityState PDU.
This is a subclass of the PduElement class, the abstract class that all parts of a PDU inherit from. It knows how to serialize, deserialize, and clone itself. It is kept as a part of the EntityStatePdu.
PduElement
,
DetonationPdu
,
SerializationInterface
,
EntityStatePdu
Field Summary | |
protected UnsignedShort |
articulationAttachmentID
The identification of the articulated part to which this articulation parameter is attached. |
protected UnsignedByte |
changeIndicator
The change of any parameter for any articulated part shall be indicated by a change indicator field. |
protected UnsignedInt |
parameterType
The type of parameter represented shall be specified by an enumeration. |
protected UnsignedByte |
parameterTypeDesignator
The identification of whether the Parameter Type Record is for an articulated or attached part shall be designated by this field. |
protected double |
parameterValue
This field contains the value of the Articulation Parameter. |
static int |
sizeOf
Constant value--size of an Articulation Parameter WHEN WRITTEN TO THE WIRE; here : sizeOf = 16 bytes . |
Constructor Summary | |
ArticulationParameter()
Default constructor--fills with zeros for all values. |
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 |
decrementChangeIndicator()
|
void |
deSerialize(java.io.DataInputStream inputStream)
Deserialize our data from the input stream. |
UnsignedShort |
getArticulationAttachmentID()
|
UnsignedByte |
getChangeIndicator()
|
UnsignedInt |
getParameterType()
|
UnsignedByte |
getParameterTypeDesignator()
|
double |
getParameterValue()
changed type of parameterValue from long to double (but note that value gets downcasted to float when sent to VRML) |
void |
incrementChangeIndicator()
incremented automatically when parameterValue is changed, also available to users. |
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 |
printValues(int indentLevel,
java.io.PrintStream printStream,
int idx)
Include index of which ArticulationPararameter is being printed. |
void |
serialize(java.io.DataOutputStream outputStream)
Serialize our data out to the stream. |
void |
setArticulationAttachmentID(int pArticulationAttachmentID)
|
void |
setArticulationAttachmentID(UnsignedShort pArticulationAttachmentID)
|
void |
setChangeIndicator(int pChangeIndicator)
|
void |
setChangeIndicator(UnsignedByte pChangeIndicator)
|
void |
setParameterType(int pParameterType)
|
void |
setParameterType(UnsignedInt pParameterType)
|
void |
setParameterTypeDesignator(int pParameterTypeDesignator)
|
void |
setParameterTypeDesignator(UnsignedByte pParameterTypeDesignator)
|
void |
setParameterValue(double pParameterValue)
|
void |
setParameterValue(long pParameterValue)
Deprecated. 31 MAR 99, use setParameterValue(double) -- changed type of parameterValue from long to double to match DIS specification (nevertheless note that value gets further downcasted to float if sent to VRML) |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected UnsignedByte parameterTypeDesignator
protected UnsignedByte changeIndicator
protected UnsignedShort articulationAttachmentID
protected UnsignedInt parameterType
protected double parameterValue
public static final int sizeOf
sizeOf = 16 bytes
.
Constructor Detail |
public ArticulationParameter()
Method 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 serializedpublic 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 initializedpublic 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 void printValues(int indentLevel, java.io.PrintStream printStream, int idx)
public java.lang.String toString()
public UnsignedByte getParameterTypeDesignator()
public void setParameterTypeDesignator(UnsignedByte pParameterTypeDesignator)
public void setParameterTypeDesignator(int pParameterTypeDesignator)
public UnsignedByte getChangeIndicator()
public void incrementChangeIndicator()
public void decrementChangeIndicator()
public void setChangeIndicator(UnsignedByte pChangeIndicator)
public void setChangeIndicator(int pChangeIndicator)
public UnsignedShort getArticulationAttachmentID()
public void setArticulationAttachmentID(UnsignedShort pArticulationAttachmentID)
public void setArticulationAttachmentID(int pArticulationAttachmentID)
public UnsignedInt getParameterType()
public void setParameterType(UnsignedInt pParameterType)
public void setParameterType(int pParameterType)
public double getParameterValue()
public void setParameterValue(long pParameterValue)
public void setParameterValue(double pParameterValue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |