VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static 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
 

Static Public Member Functions

static void setTimeStampDis5Increments (bool use1995)
 A switch to change the timestamps to the DIS 5 standards. More...
 
static bool timeStampDis5Increments ()
 get the timestamp increments More...
 

Protected Attributes

DtNetU32 myRep
 

Static Protected Attributes

static double theHourFracPerHour
 
static 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().

static void DtNetTimeStamp::setTimeStampDis5Increments ( bool  use1995)
static

A switch to change the timestamps to the DIS 5 standards.

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

static bool DtNetTimeStamp::timeStampDis5Increments ( )
static

get the timestamp increments

DtTimeStampType DtNetTimeStamp::type ( ) const

Referenced by DtPdu::timeStampType().

Member Data Documentation

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

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

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)