SimTime Class Reference

Defines the class for managing time in the simulator. More...

#include <sim_time.hpp>

List of all members.

Public Member Functions

 SimTime ()
 A constructor.
 SimTime (double simTime)
 A constructor.
void setTimeInMicroSeconds (double timeInMicroSeconds)
 Set the internal time by specifying microseconds.
void setTimeInMilliSeconds (double timeInMilliSeconds)
 Set the internal time by specifying milliseconds.
void setTimeInSeconds (double timeInSeconds)
 Set the internal time by specifying seconds.
void setTimeInMinutes (double timeInMinutes)
 Set the internal time by specifying minutes.
double getTimeInMicroSeconds () const
 Get the internal time in microseconds.
double getTimeInMilliSeconds () const
 Get the internal time in milliseconds.
double getTimeInSeconds () const
 Get the internal time in seconds.
double getTimeInMinutes () const
 Get the internal time in minutes.
void setTime (double timeInSeconds)
 Set the internal time (by specifying seconds).
double getTime () const
 Get the internal time (in seconds).
bool isValid () const
 Check that the internal format of time is valid.
SimTimeoperator+= (const SimTime &rhs)
 An operator for the class.
SimTimeoperator-= (const SimTime &rhs)
 An operator for the class.
bool operator< (const SimTime &rhs) const
 An operator for the class.
bool operator<= (const SimTime &rhs) const
 An operator for the class.
bool operator> (const SimTime &rhs) const
 An operator for the class.
bool operator>= (const SimTime &rhs) const
 An operator for the class.


Detailed Description

Defines the class for managing time in the simulator.

Definition at line 13 of file sim_time.hpp.


Constructor & Destructor Documentation

SimTime::SimTime (  ) 

A constructor.

Time is set to zero by default.

Definition at line 4 of file sim_time.cpp.

References setTime().

SimTime::SimTime ( double  simTime  ) 

A constructor.

Sets time in seconds.

Parameters:
simTime time (in seconds) to initialize object.

Definition at line 9 of file sim_time.cpp.

References setTime().


Member Function Documentation

double SimTime::getTime (  )  const [inline]

Get the internal time (in seconds).

Returns:
time in seconds.

Definition at line 166 of file sim_time.hpp.

References getTimeInSeconds().

double SimTime::getTimeInMicroSeconds (  )  const [inline]

Get the internal time in microseconds.

Note: does not handle overflow.

Returns:
time in microseconds.

Definition at line 141 of file sim_time.hpp.

double SimTime::getTimeInMilliSeconds (  )  const [inline]

Get the internal time in milliseconds.

Note: does not handle overflow.

Returns:
time in milliseconds.

Definition at line 146 of file sim_time.hpp.

double SimTime::getTimeInMinutes (  )  const [inline]

Get the internal time in minutes.

Returns:
time in minutes.

Definition at line 156 of file sim_time.hpp.

double SimTime::getTimeInSeconds (  )  const [inline]

Get the internal time in seconds.

Returns:
time in seconds.

Definition at line 151 of file sim_time.hpp.

Referenced by Ricean::fadingFactor(), getTime(), and RfidReaderApp::simulationEndHandler().

bool SimTime::isValid (  )  const [inline]

Check that the internal format of time is valid.

Can be used in assert statements.

Returns:
whether or not the internal format is valid.

Definition at line 171 of file sim_time.hpp.

Referenced by Timer::timeRemaining().

void SimTime::setTime ( double  timeInSeconds  )  [inline]

Set the internal time (by specifying seconds).

Parameters:
timeInSeconds new time specified in seconds.

Definition at line 161 of file sim_time.hpp.

References setTimeInSeconds().

Referenced by Simulator::reset(), and SimTime().

void SimTime::setTimeInMicroSeconds ( double  timeInMicroSeconds  )  [inline]

Set the internal time by specifying microseconds.

Parameters:
timeInMicroSeconds new time specified in microseconds.

Definition at line 117 of file sim_time.hpp.

void SimTime::setTimeInMilliSeconds ( double  timeInMilliSeconds  )  [inline]

Set the internal time by specifying milliseconds.

Parameters:
timeInMilliSeconds new time specified in milliseconds.

Definition at line 123 of file sim_time.hpp.

void SimTime::setTimeInMinutes ( double  timeInMinutes  )  [inline]

Set the internal time by specifying minutes.

Note: does not handle overflow.

Parameters:
timeInMinutes new time specified in minutes.

Definition at line 135 of file sim_time.hpp.

void SimTime::setTimeInSeconds ( double  timeInSeconds  )  [inline]

Set the internal time by specifying seconds.

Parameters:
timeInSeconds new time specified in seconds.

Definition at line 129 of file sim_time.hpp.

Referenced by setTime().


The documentation for this class was generated from the following files:
Generated on Tue Dec 12 17:04:42 2006 for rfidsim by  doxygen 1.4.7