Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class mil.navy.nps.dis.AcknowledgePdu

java.lang.Object
  |
  +--mil.navy.nps.dis.PduElement
        |
        +--mil.navy.nps.dis.ProtocolDataUnit
              |
              +--mil.navy.nps.dis.SimulationManagementPdu
                    |
                    +--mil.navy.nps.dis.AcknowledgePdu

public class AcknowledgePdu
extends SimulationManagementPdu
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/AcknowledgePdu.java
Hierarchy Diagram:
Summary:
The acknowledgment of the receipt of a Start/Resume PDU, Stop/Freeze PDU, Create Entity PDU, or a Remove Entity PDU shall be communicated by issuing an Acknowledge PDU.
Explanation:
As the other Simulation Manager Pdu, this PDU has two header section, the first one is inherited from the ProtocolDataUnit abstract class, the second from the SimulationManagementPDU abstract class. After That the PDU constains Acknowledge Flag, Response Flag and requestID fields. As with other things, the AcknowledgePdu has to know how to serialize and deserialize itself, clone itself, and print out its values.

History:
16Sep97 /Antonio Alexandre Rua /New
8Dec97 /Ronan Fauglas /changes for documentation templates + complements in documentation
11Dec97 /Ronan Fauglas /changed access methods: thisVariable() --> getThisVariable()
17Dec97 /Ronan Fauglas /bug fix changed sizeOf 40->32
References:
DIS Data Dictionary : Acknowledge PDU
DIS-Java-VRML Working Group: http://www.stl.nps.navy.mil/dis-java-vrml/
DIS specification : IEEE 1278.1, Section 5.4.6.5, 4.4.5.4.5
See Section 7 in EBV-DOC
See Also:
ProtocolDataUnit, PduElement, mil.navy.nps.util.SerializationInterface, CreateEntityPdu, RemoveEntityPdu, StartResumePdu, StopFreezePdu, AcknowledgePdu, ActionRequestPdu, ActionResponsePdu, DataQueryPdu, SetDataPdu, DataPdu, EventReportPdu, CommentPdu

Field Summary
mil.navy.nps.util.UnsignedShort acknowledgeFlag
          Acknowledge Flag - This field shall indicate what type of message has been acknowledged.
static AcknowledgePdu exemplar
          An "exemplar" object, which is filled out to the state that is needed most of the time.
mil.navy.nps.util.UnsignedInt requestID
          Request ID - This field shall identify the matching response to the specific a Start/Resume, Stop/Freeze, Create Entity, or Remove Entity PDU sent by the simulation manager.
mil.navy.nps.util.UnsignedShort responseFlag
          Reponse flag - This field shall indicate whether or not the receiving entity was able to comply with the request, and for what reason.
static int sizeOf
          Constant value--size of a full Acknowledge PDU with header.
 
Fields inherited from class mil.navy.nps.dis.SimulationManagementPdu
originatingEntityID, receivingEntityID, sizeOf
 
Fields inherited from class mil.navy.nps.dis.ProtocolDataUnit
DEBUG, exerciseID, pduType, protocolFamily, protocolVersion, sizeOf, timestamp
 
Constructor Summary
AcknowledgePdu()
          Default constructor--fills with zeros for all values.
 
Method Summary
java.lang.Object clone()
           
void deSerialize(java.io.DataInputStream inputStream)
           
mil.navy.nps.util.UnsignedShort getAcknowledgeFlag()
           
AcknowledgePdu getExemplar()
           
mil.navy.nps.util.UnsignedInt getRequestID()
           
mil.navy.nps.util.UnsignedShort getResponseFlag()
           
int length()
           
java.lang.String PDUName()
           
void printValues(int indentLevel, java.io.PrintStream printStream)
           
void serialize(java.io.DataOutputStream outputStream)
           
void setAcknowledgeFlag(mil.navy.nps.util.UnsignedShort pAcknowledgeFlag)
           
void setAcknowledgeFlag(int pAcknowledgeFlag)
           
void setExemplar(AcknowledgePdu newExemplar)
           
void setRequestID(mil.navy.nps.util.UnsignedInt pRequestID)
           
void setRequestID(int pRequestID)
           
void setResponseFlag(mil.navy.nps.util.UnsignedShort pResponseFlag)
           
void setResponseFlag(int pResponseFlag)
           
 
Methods inherited from class mil.navy.nps.dis.SimulationManagementPdu
clone, deSerialize, getOriginatingEntityID, getReceivingEntityID, length, PDUName, printValues, serialize, setOriginatingEntityID, setReceivingEntityID
 
Methods inherited from class mil.navy.nps.dis.ProtocolDataUnit
, clone, datagramToPdu, deSerialize, getExerciseID, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, getVRMLTimestamp, length, makeTimestampCurrent, PDUName, printValues, serialize, setExerciseID, setExerciseID, setPduType, setPduType, setProtocolFamily, setProtocolFamily, setProtocolVersion, setProtocolVersion, setSimulationStartTime, setTimestamp, setTimestamp
 
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, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

acknowledgeFlag

protected mil.navy.nps.util.UnsignedShort acknowledgeFlag
Acknowledge Flag - This field shall indicate what type of message has been acknowledged.
Value:
Enumeration, see references below for values.
References:
DIS Data Dictionary: Acknowledge Flag Field
See Section 7 in EBV-DOC

responseFlag

protected mil.navy.nps.util.UnsignedShort responseFlag
Reponse flag - This field shall indicate whether or not the receiving entity was able to comply with the request, and for what reason.
Value:
Enumeration, see references below for values.
References:
DIS Data Dictionary: Response Flag Field
See Section 7 in EBV-DOC

requestID

protected mil.navy.nps.util.UnsignedInt requestID
Request ID - This field shall identify the matching response to the specific a Start/Resume, Stop/Freeze, Create Entity, or Remove Entity PDU sent by the simulation manager.
Value:
A 32-bit monotonically increasing integer identifier inserted by the Simulation Manager into all Simulation Manager PDUs.
References:
DIS Data Dictionary: Request ID Field

sizeOf

public static final int sizeOf
Constant value--size of a full Acknowledge PDU with header. sizeOf = 32 bytes

exemplar

protected static AcknowledgePdu exemplar
An "exemplar" object, which is filled out to the state that is needed most of the time.
Explanation
A brand new object has to have most of its values set, such as the forceID, protocol version, and so on. This lets the user fill out most of the values, save it in the class, then retrieve a copy of it as needed.
Constructor Detail

AcknowledgePdu

public AcknowledgePdu()
Default constructor--fills with zeros for all values.
Method Detail

serialize

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

deSerialize

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

clone

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

length

public int length()
Overrides:
length in class SimulationManagementPdu

PDUName

public java.lang.String PDUName()
Overrides:
PDUName in class SimulationManagementPdu

printValues

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

getExemplar

public AcknowledgePdu getExemplar()

setExemplar

public void setExemplar(AcknowledgePdu newExemplar)

getAcknowledgeFlag

public mil.navy.nps.util.UnsignedShort getAcknowledgeFlag()

setAcknowledgeFlag

public void setAcknowledgeFlag(mil.navy.nps.util.UnsignedShort pAcknowledgeFlag)

setAcknowledgeFlag

public void setAcknowledgeFlag(int pAcknowledgeFlag)

getResponseFlag

public mil.navy.nps.util.UnsignedShort getResponseFlag()

setResponseFlag

public void setResponseFlag(mil.navy.nps.util.UnsignedShort pResponseFlag)

setResponseFlag

public void setResponseFlag(int pResponseFlag)

getRequestID

public mil.navy.nps.util.UnsignedInt getRequestID()

setRequestID

public void setRequestID(mil.navy.nps.util.UnsignedInt pRequestID)

setRequestID

public void setRequestID(int pRequestID)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD