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

Class mil.navy.nps.dis.FixedDatum

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

public class FixedDatum
extends PduElement
Version:
1.0
Author:
Don McGregor (http://www.stl.nps.navy.mil/~mcgredo)
Location:
http://www.stl.nps.navy.mil/dis-java-vrml/mil/navy/nps/dis/FixedDatum.java
Hierarchy Diagram:
Summary:
This record is constructed from fixed data types and their values.
Explanation
The FixedDatum is usually kept as a part of the DataPdu. It contains only an ID and a 32-bit value.

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 described on pp 108-109 in the DIS standard.

History:
15Nov96 /Don McGregor /New
10Mar97 /Don McGregor /Changes for javadoc compliance
16Apr97 /Don McGregor /PrintStream passed to printValues
8Dec97 /Ronan Fauglas /changes for documentation templates + complements in documentation
11Dec97 /Ronan Fauglas /changes access methods names from "variable()" to "getVariable()"
References:
DIS Data Dictionary: Fixed Datum Record Record
DIS specification : IEEE 1278.1, 5.3.20
See Also:
PduElement

Field Summary
int  fixedDatumID
The fixed datum id shall be represented by a 32-bit enumeration.
static int  sizeOf
Constant value--size of a Fixed Datum Record; here :sizeOf = 8 bytes.
int  value
This field shall specify the value of fixed datum indicated by the fixed datum types.
 

Constructor Summary
 FixedDatum()
Default constructor--fills with zeros for all values.
 FixedDatum(int pFixedDatumID, int pValue)
Constructs a new FixedDatum with the values specfied in parameters.
 

Method Summary
java.lang.Object  clone()
 
void  deSerialize(java.io.DataInputStream inputStream)
 
int  getFixedDatumID()
 
int  getValue()
 
int  length()
 
void  printValues(int indentLevel, java.io.PrintStream printStream)
 
void  serialize(java.io.DataOutputStream outputStream)
 
void  setFixedDatumID(int pFixedDatumID)
 
void  setValue(int pValue)
 
 
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

fixedDatumID

protected int fixedDatumID
The fixed datum id shall be represented by a 32-bit enumeration.
Value:
Enumeration; see references below for values.
References:
DIS Data Dictionary : Datum ID Field
see section 7 in the EBV-DOC

value

protected int value
This field shall specify the value of fixed datum indicated by the fixed datum types.
References:
DIS Data Dictionary : Fixed Datum Value Field

sizeOf

public static final int sizeOf
Constant value--size of a Fixed Datum Record; here :sizeOf = 8 bytes.
Constructor Detail

FixedDatum

public FixedDatum()
Default constructor--fills with zeros for all values.

FixedDatum

public FixedDatum(int pFixedDatumID,
                  int pValue)
Constructs a new FixedDatum with the values specfied in parameters.
Parameters:
pFixedDatumID - the value of fixed Datum Identifier
pValue - the value of the Fixed Datum
Method Detail

clone

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

serialize

public void serialize(java.io.DataOutputStream outputStream)
Throws:
java.lang.RuntimeException - when IO Error occurs.
Overrides:
serialize in class PduElement

deSerialize

public void deSerialize(java.io.DataInputStream inputStream)
Throws:
java.lang.RuntimeException - when IO Error occurs.
Overrides:
deSerialize 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

getFixedDatumID

public int getFixedDatumID()

setFixedDatumID

public void setFixedDatumID(int pFixedDatumID)

getValue

public int getValue()

setValue

public void setValue(int pValue)

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