Contents | Package | Class | Tree | Deprecated | Index | Help
PREV | NEXT SHOW LISTS | HIDE LISTS

Class mil.navy.nps.dis.DatumSpecification

java.lang.Object
    |
    +----mil.navy.nps.dis.PduElement
            |
            +----mil.navy.nps.dis.DatumSpecification

public class DatumSpecification
extends PduElement
Version:
1.0
Author:
Antonio Alexandre Rua (http://www.garfield.fe.up.pt/~alexrua)
Location:
http://www.stl.nps.navy.mil/dis-java-vrml/mil/navy/nps/dis/DatumSpecification.java
Hierarchy Diagram:
Summary:
The Datum Specification record is used to communicate grouped datum information.
Explanation:
This record shall specify the number of Fixed Datums and Variable Datums, as well as the records itself. The Datum Specification is included in several PDU, as for example the SetDataPDU, the CommentPdu...

Note that our implementation might seem quite different from the representation of a Datum Specification Record in the DIS format, in fact we take advantage of the power of java where we can use elaborate structures "transparently". As with other things, the DatumSpecification record has to know how to serialize and deserialize itself, clone itself, and print out its values.

Note: DatumSpecification doesn't exist in the on-line Dis Data Disctionnary.
History:
16Sep97 /Antonio Alexandre Rua /New
8Dec97 /Ronan Fauglas /changes for documentation templates + complements in documentation
11Dec97 /Ronan Fauglas /changed access methods: thisVariable() --> getThisVariable()
References:
DIS-Java-VRML Working Group: http://www.stl.nps.navy.mil/dis-java-vrml/
DIS specification : IEEE 1278.1, Section 5.3.9
See Also:
ProtocolDataUnit, PduElement, mil.navy.nps.util.SerializationInterface

Field Summary
java.util.Vector  fixedDatumList
Elaborate structure that represents the list of fixed datums.
static int  sizeOf
Constant value--size of a fixed data of the Datum Specification record (actually the 2 counters); here :sizeOf = 8 bytes.
java.util.Vector  variableDatumList
Elaborate structure that represents the list of variable datums.
 

Constructor Summary
 DatumSpecification()
Default constructor.
 

Method Summary
void  addFixedDatum(FixedDatum pDatum)
Adds the specified component to the end of this Fixed Datum list, increasing its size by one.
void  addVariableDatum(VariableDatum pDatum)
Adds the specified component to the end of this Variable Datum list, increasing its size by one.
java.lang.Object  clone()
 
void  deSerialize(java.io.DataInputStream inputStream)
 
void  dropFixedDatum()
Supress the existing Fixed Datum List (used in Comment PDU).
void  dropVariableDatum()
Supress the existing Fixed Datum List.
FixedDatum  fixedDatumAt(int pIdx)
Gets the specified component to the end at the specified index of the Fixed Datum List.
int  getFixedDatumCount()
 
int  getVariableDatumCount()
 
int  length()
 
void  printValues(int indentLevel, java.io.PrintStream printStream)
 
void  serialize(java.io.DataOutputStream outputStream)
 
VariableDatum  variableDatumAt(int pIdx)
Gets the specified component to the end at the specified index of the Variable Datum List.
 
Methods inherited from class mil.navy.nps.dis.PduElement
 clone, deSerialize, length, printValues, serialize
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fixedDatumList

protected java.util.Vector fixedDatumList
Elaborate structure that represents the list of fixed datums. One fixed datum is made of Datum ID (a 32 bit long) and a variable datum (a 32 bit long).

variableDatumList

protected java.util.Vector variableDatumList
Elaborate structure that represents the list of variable datums. When written on the wire one variable datum is made of Datum ID (a 32 bit long), a variable length (a 32 bit long), and a variable datum value (padding bit long).

sizeOf

public static final int sizeOf
Constant value--size of a fixed data of the Datum Specification record (actually the 2 counters); here :sizeOf = 8 bytes.
Constructor Detail

DatumSpecification

public DatumSpecification()
Default constructor. Creates two empty lists of data.
Method Detail

serialize

public void serialize(java.io.DataOutputStream outputStream)
Overrides:
serialize in class PduElement

deSerialize

public void deSerialize(java.io.DataInputStream inputStream)
Overrides:
deSerialize in class PduElement

clone

public java.lang.Object clone()
Overrides:
clone in class PduElement

length

public int length()
Overrides:
length in class PduElement

printValues

public void printValues(int indentLevel,
                        java.io.PrintStream printStream)
Overrides:
printValues in class PduElement

getFixedDatumCount

public int getFixedDatumCount()

getVariableDatumCount

public int getVariableDatumCount()

addFixedDatum

public void addFixedDatum(FixedDatum pDatum)
Adds the specified component to the end of this Fixed Datum list, increasing its size by one.
Parameters:
pDatum - the Datum to be inserted in the list.

fixedDatumAt

public FixedDatum fixedDatumAt(int pIdx)
Gets the specified component to the end at the specified index of the Fixed Datum List.
Parameters:
pIdx - the index we want to get the value of.

dropFixedDatum

public void dropFixedDatum()
Supress the existing Fixed Datum List (used in Comment PDU).
See Also:
CommentPdu

addVariableDatum

public void addVariableDatum(VariableDatum pDatum)
Adds the specified component to the end of this Variable Datum list, increasing its size by one.
Parameters:
pDatum - the Datum to be inserted in the list.

variableDatumAt

public VariableDatum variableDatumAt(int pIdx)
Gets the specified component to the end at the specified index of the Variable Datum List.
Parameters:
pIdx - the index we want to get the value of.

dropVariableDatum

public void dropVariableDatum()
Supress the existing Fixed Datum List.
See Also:
CommentPdu

Contents | Package | Class | Tree | Deprecated | Index | Help
PREV | NEXT SHOW LISTS | HIDE LISTS