VR-Link API Documentation for HLA Evolved
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:

List of all members.

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

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

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

destructor

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

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

time is specified in seconds.

Set/Get timestamp type.

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().

Referenced by DtPdu::timeStampType().


Member Data Documentation

const double DtNetTimeStamp::theHourFracPerHour [static, protected]
const double DtNetTimeStamp::theHourPerHourFrac [static, protected]

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

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)