VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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. More...
 
 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. More...
 
 ~DtNetTimeStamp ()
 destructor More...
 
 DtNetTimeStamp (const DtNetTimeStamp &orig)
 copy constructor More...
 
DtNetTimeStampoperator= (const DtNetTimeStamp &orig)
 assignment operator More...
 
 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. More...
 
DtTime time () const
 Get the time contained in the timestamp (in seconds). More...
 
void setTime (DtTime time)
 Get the time contained in the timestamp to time % an hour. More...
 
void setType (DtTimeStampType type)
 Set/Get timestamp type. More...
 
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.

Referenced by DtPdu::setTimeStamp().

void DtNetTimeStamp::setType ( DtTimeStampType  type)

Set/Get timestamp type.

Referenced by DtPdu::setTimeStamp().

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 Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)