VR-Link API Documentation for HLA 1.3
List of all members | Public Member Functions | Protected Attributes | Static Protected Attributes
DtNetTimeStamp Class Reference

Instances of DtNetTimeStamp are network representations of a DIS time stamp. More...

+ Collaboration diagram for DtNetTimeStamp:

Public Member Functions

 DtNetTimeStamp ()
 Default constructor - creates an instance with a time of zero and timestamp type of relative.
 DtNetTimeStamp (DtTime time, DtTimeStampType type=DtTimeStampRelative)
 Creates an instance with the time set to time (specified in seconds) modulo an hour, and the timestamp type set to type.
 ~DtNetTimeStamp ()
 destructor
 DtNetTimeStamp (const DtNetTimeStamp &orig)
 copy constructor
DtNetTimeStampoperator= (const DtNetTimeStamp &orig)
 assignment operator
 operator DtU32 () const
 Cast to a DtU32 representing the whole timestamp Useful mainly for backwards compatibility for applications that used to cast DtNetTimeStamp to DtU32 before accessing it.
DtTime time () const
 Get the time contained in the timestamp (in seconds).
void setTime (DtTime time)
 Get the time contained in the timestamp to time % an hour.
void setType (DtTimeStampType type)
 Set/Get timestamp type.
DtTimeStampType type () const

Protected Attributes

DtNetU32 myRep

Static Protected Attributes

static const double theHourFracPerHour
static const double theHourPerHourFrac

Detailed Description

Instances of DtNetTimeStamp are network representations of a DIS time stamp.

This class has NO VIRTUAL FUNCTIONS, since it is a DtNetType - whose exact byte layout is relied on by PDU classes, etc.

Constructor & Destructor Documentation

DtNetTimeStamp::DtNetTimeStamp ( )

Default constructor - creates an instance with a time of zero and timestamp type of relative.

DtNetTimeStamp::DtNetTimeStamp ( DtTime  time,
DtTimeStampType  type = DtTimeStampRelative 
)

Creates an instance with the time set to time (specified in seconds) modulo an hour, and the timestamp type set to type.

DtNetTimeStamp::~DtNetTimeStamp ( )

destructor

DtNetTimeStamp::DtNetTimeStamp ( const DtNetTimeStamp orig)

copy constructor

Member Function Documentation

DtNetTimeStamp::operator DtU32 ( ) const

Cast to a DtU32 representing the whole timestamp Useful mainly for backwards compatibility for applications that used to cast DtNetTimeStamp to DtU32 before accessing it.

DtNetTimeStamp& DtNetTimeStamp::operator= ( const DtNetTimeStamp orig)

assignment operator

void DtNetTimeStamp::setTime ( DtTime  time)

Get the time contained in the timestamp to time % an hour.

time is specified in seconds.

void DtNetTimeStamp::setType ( DtTimeStampType  type)

Set/Get timestamp type.

DtTime DtNetTimeStamp::time ( ) const

Get the time contained in the timestamp (in seconds).

The value returned will be between 0.0 and 3600.0 seconds.

Referenced by DtPdu::timeStamp().

DtTimeStampType DtNetTimeStamp::type ( ) const

Referenced by DtPdu::timeStampType().

Member Data Documentation

DtNetU32 DtNetTimeStamp::myRep
protected
const double DtNetTimeStamp::theHourFracPerHour
staticprotected
const double DtNetTimeStamp::theHourPerHourFrac
staticprotected

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

Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)