VR-Link API Documentation for DIS
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
DtUnderwaterAcousticPdu Class Reference

Instances of DtUnderwaterAcousticPdu are used to send information about simulated underwater acoustic emissions. More...

+ Inheritance diagram for DtUnderwaterAcousticPdu:
+ Collaboration diagram for DtUnderwaterAcousticPdu:

Public Member Functions

 DtUnderwaterAcousticPdu (DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER)
 Constructors.
 DtUnderwaterAcousticPdu (const DtNetUnderwaterAcousticPdu *initial, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER)
 DtUnderwaterAcousticPdu (const DtUnderwaterAcousticPdu &orig)
virtual ~DtUnderwaterAcousticPdu ()
 destructor
DtUnderwaterAcousticPduoperator= (const DtUnderwaterAcousticPdu &orig)
 Assignment operator.
virtual void setEmittingEntityID (const DtEntityIdentifier &entity)
 Set/Get emitting entity identifier.
virtual const DtEntityIdentifieremittingEntityID () const
virtual void setEventID (const DtEventID &event)
 Set/Get event identifier.
virtual const DtEventIDeventID () const
virtual void setStateChangeUpdate (DtUnderwaterAcousticUpdate upd)
 Set/Get state/change update indicator.
virtual DtUnderwaterAcousticUpdate stateChangeUpdate () const
virtual void setPassiveParameterIndex (DtUnderwaterAcousticPassiveParmIndex ind)
 Set/Get passive parameter index.
virtual
DtUnderwaterAcousticPassiveParmIndex 
passiveParameterIndex () const
virtual void setPropulsionPlantConfig (DtUnderwaterAcousticPropulsionPlantConfig config)
 Set/Get propulsion plant configuration.
virtual
DtUnderwaterAcousticPropulsionPlantConfig 
propulsionPlantConfig () const
virtual bool setNumShafts (DtU8 num)
 Set/Get number of shafts.
virtual DtU8 numShafts () const
virtual bool setNumAdditionalPassiveAct (DtU8 num)
 Set/Get number of additional passive activities.
virtual DtU8 numAdditionalPassiveAct () const
virtual bool setNumEmitterSystems (DtU8 num)
 Set/Get number of emitter systems.
virtual DtU8 numEmitterSystems () const
virtual bool setNumBeams (int emitterSystemIndex, DtU8 num)
 Set/Get number of beam data records for a particular emitter system.
virtual DtU8 numBeams (int emitterSystemIndex) const
virtual bool setShaftSpeed (int index, const DtUnderwaterAcousticShaftSpeed &record)
 Set/Get a shaft speed data record.
virtual bool getShaftSpeed (int index, DtUnderwaterAcousticShaftSpeed &record) const
virtual bool setAddtnlPassiveAct (int index, const DtUnderwaterAcousticAddtnlPassiveAct &record)
 Set/Get an additional passive activity data record.
virtual bool getAddtnlPassiveAct (int index, DtUnderwaterAcousticAddtnlPassiveAct &record) const
virtual bool setEmitterSystem (int index, const DtUnderwaterAcousticEmitterSystem &record)
 Set/Get an underwater acoustic emitter system.
virtual bool getEmitterSystem (int index, DtUnderwaterAcousticEmitterSystem &record) const
virtual bool setBeam (int emitterSystemIndex, int beamIndex, const DtUnderwaterAcousticBeam &record)
 Set/Get beam fundamental data parameters for a beam.
virtual bool getBeam (int emitterSystemIndex, int beamIndex, DtUnderwaterAcousticBeam &record) const
virtual void printData () const
 Print the data contained by this PDU.
virtual void printDataToStream (std::ostream &stream) const
- Public Member Functions inherited from DtStateMsg
 DtStateMsg ()
 default constructor
virtual ~DtStateMsg ()
 destructor
 DtStateMsg (const DtStateMsg &orig)
 copy constructor
DtStateMsgoperator= (const DtStateMsg &orig)
 assignment operator
- Public Member Functions inherited from DtPdu
virtual ~DtPdu ()
 Destructor.
 DtPdu (const DtPdu &pdu, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER)
 Copy constructor.
DtPduoperator= (const DtPdu &pdu)
 Assignment operator.
virtual void * packet () const
 Older function that returns a pointer to the network representation.
virtual int status () const
 Get PDU status.
virtual void setVersion (int vers)
 Set/Get protocol version from PDU header.
virtual int protocolVersion () const
virtual void setExerciseId (int id)
 Set/Get exerciseID in PDU header.
virtual int exerciseId () const
virtual DtPduKind kind () const
 Returns PDU kind from PDU header.
virtual DtProtocolFamily protocolFamily () const
 Returns protocol family from PDU header.
virtual void setTimeStamp (DtTime time, DtTimeStampType type=DtTimeStampRelative)
 Set the PDU header's time stamp to reflect time and type.
virtual DtTime timeStamp () const
 Return the time (in seconds past an hour) encoded in the PDU header's time stamp.
virtual DtTimeStampType timeStampType () const
 Return the type of the time stamp, as indicated in PDU header.
virtual DtTime guessTimeValid (DtTime referenceTime) const
 Since timestamp only represents number of seconds past the hour, guessTimeValid chooses the hour that would make the timestamp closest to reference time, and returns a time that is timestamp seconds past that hour.
virtual DtNetPduHeadernetHeader () const
 Returns a pointer to the PDU's header.
virtual void print () const
 Print the contents of the PDU by calling printToStream(DtInfo).
virtual void printToStream (std::ostream &stream) const
 Print the contents of the PDU by calling printHeaderToStream and printDataToStream.
virtual void printHeader () const
 Print the PDU's header. This calls printHeaderToStream(DtInfo).
virtual void printHeaderToStream (std::ostream &stream) const
 Print the PDU's header to a stream.
virtual void printDataToString (DtString &str) const
- Public Member Functions inherited from DtBaseMsg
virtual ~DtBaseMsg ()
 Destructor.
 DtBaseMsg (const DtBaseMsg &msg, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER)
 Copy constructor.
DtBaseMsgoperator= (const DtBaseMsg &msg)
 Assignment.
virtual const char * netRep () const
 Get network representation.
virtual int length () const
 Get size of message.

Static Public Member Functions

static DtPducreate (const DtNetPacket *initial, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER)
 Create a DtUnderwaterAcousticPdu.
static void addCallback (DtExerciseConn *conn, DtUnderwaterAcousticPduCb cb, void *usr)
 Add (register)/Remove (deregister) function to be called when pdu is received.
static void removeCallback (DtExerciseConn *conn, DtUnderwaterAcousticPduCb cb, void *usr)

Protected Member Functions

DtUnderwaterAcousticPduself () const
 Casts the 'this' pointer for changing elements in a const function.
virtual DtPduKind internalGetPduKind () const
 Returns the internal PDU kind.
virtual
DtNetUnderwaterAcousticPdu
netPduStruct () const
 Casts the netPdu element to our network struct.
virtual char * var () const
 Returns a pointer to the first byte of variable length data.
virtual int shaftSpeedRecordOffset (int recordIndex) const
 Returns a buffer offset to the given shaft speed record.
virtual int passiveActRecordOffset (int recordIndex) const
 Returns a buffer offset to the given additional passive activity record.
virtual int emitterSystemRecordOffset (int recordIndex) const
 Returns a buffer offset to the given acoustic emitter system.
virtual int beamDataRecordOffset (int emitterSystemIndex, int beamIndex) const
 Returns a buffer offset to the given beam fundamental data parameter of a particular emitter system.
int computeStatus () const

Protected Attributes

DtEntityIdentifier myEntityID
 Temporary objects for reference returns.
DtEventID myEventID

Static Protected Attributes

static const int theNetUaPduSize
static const int theNetShaftSize
static const int theNetApaSize
static const int theNetSystemSize
static const int theNetBeamSize

Detailed Description

Instances of DtUnderwaterAcousticPdu are used to send information about simulated underwater acoustic emissions.

Constructor & Destructor Documentation

DtUnderwaterAcousticPdu::DtUnderwaterAcousticPdu ( DtBufferPtr  buffer = DtUSE_INTERNAL_BUFFER)

Constructors.

DtUnderwaterAcousticPdu::DtUnderwaterAcousticPdu ( const DtNetUnderwaterAcousticPdu initial,
DtBufferPtr  buffer = DtUSE_INTERNAL_BUFFER 
)
DtUnderwaterAcousticPdu::DtUnderwaterAcousticPdu ( const DtUnderwaterAcousticPdu orig)
virtual DtUnderwaterAcousticPdu::~DtUnderwaterAcousticPdu ( )
virtual

destructor

Member Function Documentation

static void DtUnderwaterAcousticPdu::addCallback ( DtExerciseConn conn,
DtUnderwaterAcousticPduCb  cb,
void *  usr 
)
static

Add (register)/Remove (deregister) function to be called when pdu is received.

virtual int DtUnderwaterAcousticPdu::beamDataRecordOffset ( int  emitterSystemIndex,
int  beamIndex 
) const
protectedvirtual

Returns a buffer offset to the given beam fundamental data parameter of a particular emitter system.

int DtUnderwaterAcousticPdu::computeStatus ( ) const
protected
static DtPdu* DtUnderwaterAcousticPdu::create ( const DtNetPacket initial,
DtBufferPtr  buffer = DtUSE_INTERNAL_BUFFER 
)
static

Create a DtUnderwaterAcousticPdu.

Caller is responsible for deletion.

virtual int DtUnderwaterAcousticPdu::emitterSystemRecordOffset ( int  recordIndex) const
protectedvirtual

Returns a buffer offset to the given acoustic emitter system.

virtual const DtEntityIdentifier& DtUnderwaterAcousticPdu::emittingEntityID ( ) const
virtual
virtual const DtEventID& DtUnderwaterAcousticPdu::eventID ( ) const
virtual
virtual bool DtUnderwaterAcousticPdu::getAddtnlPassiveAct ( int  index,
DtUnderwaterAcousticAddtnlPassiveAct record 
) const
virtual
virtual bool DtUnderwaterAcousticPdu::getBeam ( int  emitterSystemIndex,
int  beamIndex,
DtUnderwaterAcousticBeam record 
) const
virtual
virtual bool DtUnderwaterAcousticPdu::getEmitterSystem ( int  index,
DtUnderwaterAcousticEmitterSystem record 
) const
virtual
virtual bool DtUnderwaterAcousticPdu::getShaftSpeed ( int  index,
DtUnderwaterAcousticShaftSpeed record 
) const
virtual
virtual DtPduKind DtUnderwaterAcousticPdu::internalGetPduKind ( ) const
inlineprotectedvirtual

Returns the internal PDU kind.

Implements DtPdu.

References DtUnderwaterAcousticPduKind.

virtual DtNetUnderwaterAcousticPdu* DtUnderwaterAcousticPdu::netPduStruct ( ) const
protectedvirtual

Casts the netPdu element to our network struct.

virtual DtU8 DtUnderwaterAcousticPdu::numAdditionalPassiveAct ( ) const
virtual
virtual DtU8 DtUnderwaterAcousticPdu::numBeams ( int  emitterSystemIndex) const
virtual
virtual DtU8 DtUnderwaterAcousticPdu::numEmitterSystems ( ) const
virtual
virtual DtU8 DtUnderwaterAcousticPdu::numShafts ( ) const
virtual
DtUnderwaterAcousticPdu& DtUnderwaterAcousticPdu::operator= ( const DtUnderwaterAcousticPdu orig)

Assignment operator.

virtual int DtUnderwaterAcousticPdu::passiveActRecordOffset ( int  recordIndex) const
protectedvirtual

Returns a buffer offset to the given additional passive activity record.

virtual DtUnderwaterAcousticPassiveParmIndex DtUnderwaterAcousticPdu::passiveParameterIndex ( ) const
virtual
virtual void DtUnderwaterAcousticPdu::printData ( ) const
virtual

Print the data contained by this PDU.

Reimplemented from DtPdu.

virtual void DtUnderwaterAcousticPdu::printDataToStream ( std::ostream &  stream) const
virtual

Reimplemented from DtPdu.

virtual DtUnderwaterAcousticPropulsionPlantConfig DtUnderwaterAcousticPdu::propulsionPlantConfig ( ) const
virtual
static void DtUnderwaterAcousticPdu::removeCallback ( DtExerciseConn conn,
DtUnderwaterAcousticPduCb  cb,
void *  usr 
)
static
DtUnderwaterAcousticPdu* DtUnderwaterAcousticPdu::self ( ) const
protected

Casts the 'this' pointer for changing elements in a const function.

Non-virtual, since you can't override based on return type.

virtual bool DtUnderwaterAcousticPdu::setAddtnlPassiveAct ( int  index,
const DtUnderwaterAcousticAddtnlPassiveAct record 
)
virtual

Set/Get an additional passive activity data record.

Returns false if the record does not exist.

virtual bool DtUnderwaterAcousticPdu::setBeam ( int  emitterSystemIndex,
int  beamIndex,
const DtUnderwaterAcousticBeam record 
)
virtual

Set/Get beam fundamental data parameters for a beam.

Returns false if the record does not exist. Data length field is automatically set by the PDU class.

virtual bool DtUnderwaterAcousticPdu::setEmitterSystem ( int  index,
const DtUnderwaterAcousticEmitterSystem record 
)
virtual

Set/Get an underwater acoustic emitter system.

Returns false if the record does not exist. Data length field is automatically set by the PDU class.

virtual void DtUnderwaterAcousticPdu::setEmittingEntityID ( const DtEntityIdentifier entity)
virtual

Set/Get emitting entity identifier.

virtual void DtUnderwaterAcousticPdu::setEventID ( const DtEventID event)
virtual

Set/Get event identifier.

virtual bool DtUnderwaterAcousticPdu::setNumAdditionalPassiveAct ( DtU8  num)
virtual

Set/Get number of additional passive activities.

May return false if PDU size would exceed the maximum PDU size.

virtual bool DtUnderwaterAcousticPdu::setNumBeams ( int  emitterSystemIndex,
DtU8  num 
)
virtual

Set/Get number of beam data records for a particular emitter system.

May return false if PDU size would exceed the maximum PDU size or if the emitter system number is invalid.

virtual bool DtUnderwaterAcousticPdu::setNumEmitterSystems ( DtU8  num)
virtual

Set/Get number of emitter systems.

May return false if PDU size would exceed the maximum PDU size.

virtual bool DtUnderwaterAcousticPdu::setNumShafts ( DtU8  num)
virtual

Set/Get number of shafts.

May return false if PDU size would exceed the maximum PDU size.

virtual void DtUnderwaterAcousticPdu::setPassiveParameterIndex ( DtUnderwaterAcousticPassiveParmIndex  ind)
virtual

Set/Get passive parameter index.

virtual void DtUnderwaterAcousticPdu::setPropulsionPlantConfig ( DtUnderwaterAcousticPropulsionPlantConfig  config)
virtual

Set/Get propulsion plant configuration.

virtual bool DtUnderwaterAcousticPdu::setShaftSpeed ( int  index,
const DtUnderwaterAcousticShaftSpeed record 
)
virtual

Set/Get a shaft speed data record.

Returns false if the record does not exist.

virtual void DtUnderwaterAcousticPdu::setStateChangeUpdate ( DtUnderwaterAcousticUpdate  upd)
virtual

Set/Get state/change update indicator.

virtual int DtUnderwaterAcousticPdu::shaftSpeedRecordOffset ( int  recordIndex) const
protectedvirtual

Returns a buffer offset to the given shaft speed record.

virtual DtUnderwaterAcousticUpdate DtUnderwaterAcousticPdu::stateChangeUpdate ( ) const
virtual
virtual char* DtUnderwaterAcousticPdu::var ( ) const
protectedvirtual

Returns a pointer to the first byte of variable length data.

Member Data Documentation

DtEntityIdentifier DtUnderwaterAcousticPdu::myEntityID
protected

Temporary objects for reference returns.

DtEventID DtUnderwaterAcousticPdu::myEventID
protected
const int DtUnderwaterAcousticPdu::theNetApaSize
staticprotected
const int DtUnderwaterAcousticPdu::theNetBeamSize
staticprotected
const int DtUnderwaterAcousticPdu::theNetShaftSize
staticprotected
const int DtUnderwaterAcousticPdu::theNetSystemSize
staticprotected
const int DtUnderwaterAcousticPdu::theNetUaPduSize
staticprotected

The documentation for this class was generated from the following file:

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)