DESERT 4.0.0
Uwpolling_AUV::Uwpolling_AUV_Timer Class Reference

#include <uwpolling_AUV.h>

Inheritance diagram for Uwpolling_AUV::Uwpolling_AUV_Timer:
Inheritance graph
Collaboration diagram for Uwpolling_AUV::Uwpolling_AUV_Timer:
Collaboration graph

Public Member Functions

 Uwpolling_AUV_Timer (Uwpolling_AUV *m)
 
virtual ~Uwpolling_AUV_Timer ()
 
virtual void freeze ()
 
virtual void unFreeze ()
 
virtual void stop ()
 
virtual void schedule (double val)
 
bool isIdle ()
 
bool isRunning ()
 
bool isExpired ()
 
bool isFrozen ()
 
bool isActive ()
 
void resetCounter ()
 
void incrCounter ()
 
int getCounter ()
 
double getDuration ()
 

Protected Attributes

double start_time
 
double left_duration
 
int counter
 
Uwpolling_AUV *UWPOLLING_TIMER_STATUS timer_status
 

Detailed Description

Class that describes the timer in the AUV

Constructor & Destructor Documentation

◆ Uwpolling_AUV_Timer()

Uwpolling_AUV::Uwpolling_AUV_Timer::Uwpolling_AUV_Timer ( Uwpolling_AUV m)
inline

Constructor of the Uwpolling_AUV_Timer class

Parameters
Uwpolling_AUV*a pointer to an object of type Uwpolling_AUV

◆ ~Uwpolling_AUV_Timer()

virtual Uwpolling_AUV::Uwpolling_AUV_Timer::~Uwpolling_AUV_Timer ( )
inlinevirtual

Destructor of the Uwpolling_AUV_Timer class

Member Function Documentation

◆ freeze()

virtual void Uwpolling_AUV::Uwpolling_AUV_Timer::freeze ( )
inlinevirtual

◆ getCounter()

int Uwpolling_AUV::Uwpolling_AUV_Timer::getCounter ( )
inline

Returns the counter of the timer

Returns
the value of the counter of the timer

References counter.

◆ getDuration()

double Uwpolling_AUV::Uwpolling_AUV_Timer::getDuration ( )
inline

Returns the left duration of the timer

Returns
the value of the counter of the timer

References left_duration.

◆ incrCounter()

void Uwpolling_AUV::Uwpolling_AUV_Timer::incrCounter ( )
inline

Increments the counter of the timer

References counter.

◆ isActive()

bool Uwpolling_AUV::Uwpolling_AUV_Timer::isActive ( )
inline

Checks if the timer is ACTIVE

Returns
true or false

References timer_status, Uwpolling_AUV::UWPOLLING_FROZEN, and Uwpolling_AUV::UWPOLLING_RUNNING.

◆ isExpired()

bool Uwpolling_AUV::Uwpolling_AUV_Timer::isExpired ( )
inline

Checks if the timer is EXPIRED

Returns
true or false

References timer_status, and Uwpolling_AUV::UWPOLLING_EXPIRED.

◆ isFrozen()

bool Uwpolling_AUV::Uwpolling_AUV_Timer::isFrozen ( )
inline

Checks if the timer is FROZEN

Returns
true or false

References timer_status, and Uwpolling_AUV::UWPOLLING_FROZEN.

◆ isIdle()

bool Uwpolling_AUV::Uwpolling_AUV_Timer::isIdle ( )
inline

Checks if the timer is IDLE

Returns
bool true or false

References timer_status, and Uwpolling_AUV::UWPOLLING_IDLE.

◆ isRunning()

bool Uwpolling_AUV::Uwpolling_AUV_Timer::isRunning ( )
inline

Checks if the timer is RUNNING

Returns
true or false

References timer_status, and Uwpolling_AUV::UWPOLLING_RUNNING.

◆ resetCounter()

void Uwpolling_AUV::Uwpolling_AUV_Timer::resetCounter ( )
inline

Resets the counter of the timer

◆ schedule()

virtual void Uwpolling_AUV::Uwpolling_AUV_Timer::schedule ( double  val)
inlinevirtual

◆ stop()

virtual void Uwpolling_AUV::Uwpolling_AUV_Timer::stop ( )
inlinevirtual

stops the timer

References timer_status, and Uwpolling_AUV::UWPOLLING_IDLE.

◆ unFreeze()

virtual void Uwpolling_AUV::Uwpolling_AUV_Timer::unFreeze ( )
inlinevirtual

unFreeze is used to resume the timer starting from the point where it was freezed

References left_duration, start_time, timer_status, Uwpolling_AUV::UWPOLLING_FROZEN, and Uwpolling_AUV::UWPOLLING_RUNNING.

Member Data Documentation

◆ counter

int Uwpolling_AUV::Uwpolling_AUV_Timer::counter
protected

counter of the timer

Referenced by getCounter(), and incrCounter().

◆ left_duration

double Uwpolling_AUV::Uwpolling_AUV_Timer::left_duration
protected

Left duration of the timer

Referenced by freeze(), getDuration(), schedule(), and unFreeze().

◆ start_time

double Uwpolling_AUV::Uwpolling_AUV_Timer::start_time
protected

Start Time of the timer

Referenced by freeze(), schedule(), and unFreeze().

◆ timer_status

Uwpolling_AUV* UWPOLLING_TIMER_STATUS Uwpolling_AUV::Uwpolling_AUV_Timer::timer_status
protected

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