Public Member Functions | Protected Attributes

Base class for all kind of time measurements. More...

#include <clock.hpp>

Inheritance diagram for Clock:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Clock ()
 Clock (const Clock &rhs)
virtual Clockclone () const =0
ClockStatus getStatus () const
virtual returnValue getTime (double &_elapsedTime)
virtual double getTime ()
virtual returnValue init (double _initialTime)
Clockoperator= (const Clock &rhs)
virtual returnValue reset ()
virtual returnValue start ()=0
virtual returnValue step (double _timeShift)=0
virtual returnValue stop ()=0
virtual ~Clock ()

Protected Attributes

double elapsedTime
ClockStatus status

Detailed Description

Base class for all kind of time measurements.

The class Clock serves as base class for all kind of time measurements, both real and simulated ones.

Author:
Hans Joachim Ferreau, Boris Houska

Definition at line 53 of file clock.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 45 of file clock.cpp.

Clock::Clock ( const Clock rhs)

Copy constructor (deep copy).

Parameters:
[in]rhsRight-hand side object.

Definition at line 51 of file clock.cpp.

Clock::~Clock ( ) [virtual]

Destructor.

Definition at line 58 of file clock.cpp.


Member Function Documentation

virtual Clock* Clock::clone ( ) const [pure virtual]

Clone constructor (deep copy).

Returns:
Pointer to deep copy of base class type

Implemented in RealClock, and SimulationClock.

ClockStatus Clock::getStatus ( ) const [inline]

Returns current status of clock, see documentation of ClockStatus for details.

Returns:
Current status of clock
returnValue Clock::getTime ( double &  _elapsedTime) [virtual]

Returns elapsed time.

Parameters:
[in]_elapsedTimeElapsed time.
Returns:
SUCCESSFUL_RETURN,
RET_BLOCK_NOT_READY

Definition at line 92 of file clock.cpp.

double Clock::getTime ( ) [virtual]

Returns elapsed time.

Returns:
>= 0: elapsed time,
-INFTY: internal error

Definition at line 116 of file clock.cpp.

returnValue Clock::init ( double  _initialTime) [virtual]

Initializes the clock with given initial time.

Parameters:
[in]_initialTimeInitial time.
Returns:
SUCCESSFUL_RETURN

Definition at line 76 of file clock.cpp.

Clock & Clock::operator= ( const Clock rhs)

Assignment Operator (deep copy).

Parameters:
[in]rhsRight-hand side object.

Definition at line 63 of file clock.cpp.

returnValue Clock::reset ( ) [virtual]

Initializes the clock with initial time zero.

Returns:
SUCCESSFUL_RETURN

Definition at line 86 of file clock.cpp.

virtual returnValue Clock::start ( ) [pure virtual]

Starts time measurement.

Returns:
SUCCESSFUL_RETURN,
RET_CLOCK_NOT_READY,
RET_NO_SYSTEM_TIME

Implemented in RealClock, and SimulationClock.

virtual returnValue Clock::step ( double  _timeShift) [pure virtual]

Shifts measured time by a given offset.

Parameters:
[in]_timeShiftTime offset.
Returns:
SUCCESSFUL_RETURN,
RET_CLOCK_NOT_READY,
RET_NO_SYSTEM_TIME

Implemented in RealClock, and SimulationClock.

virtual returnValue Clock::stop ( ) [pure virtual]

Stops time measurement.

Returns:
SUCCESSFUL_RETURN,
RET_CLOCK_NOT_READY,
RET_NO_SYSTEM_TIME

Implemented in RealClock, and SimulationClock.


Member Data Documentation

double Clock::elapsedTime [protected]

Elapsed time since last reset.

Definition at line 163 of file clock.hpp.

Status of clock.

Definition at line 164 of file clock.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:37