DESERT 3.5.1
Loading...
Searching...
No Matches
UWSmartOFDM::UWSmartOFDMTimer Class Reference

#include <uw-smart-ofdm.h>

Inheritance diagram for UWSmartOFDM::UWSmartOFDMTimer:
Collaboration diagram for UWSmartOFDM::UWSmartOFDMTimer:

Public Member Functions

 UWSmartOFDMTimer (UWSmartOFDM *m)
 
virtual ~UWSmartOFDMTimer ()
 
virtual double startTime ()
 
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
 
UWSmartOFDM *UWSMARTOFDM_TIMER_STATUS timer_status
 

Detailed Description

Base class of all the timer used in this protocol.

This is a derived class of TimerHandler.

Definition at line 228 of file uw-smart-ofdm.h.

Constructor & Destructor Documentation

◆ UWSmartOFDMTimer()

UWSmartOFDM::UWSmartOFDMTimer::UWSmartOFDMTimer ( UWSmartOFDM m)
inline

Constructor of UWSmartOFDMTimer Class.

Definition at line 235 of file uw-smart-ofdm.h.

◆ ~UWSmartOFDMTimer()

virtual UWSmartOFDM::UWSmartOFDMTimer::~UWSmartOFDMTimer ( )
inlinevirtual

Destructor of UWSmartOFDMTimer Class.

Definition at line 249 of file uw-smart-ofdm.h.

Member Function Documentation

◆ freeze()

virtual void UWSmartOFDM::UWSmartOFDMTimer::freeze ( )
inlinevirtual

It freezes or in another word, it stops the timer for some time.

Suppose, for some reason we want to stop a timer for some period and we want to run this timer from where it was stopped. This function stops the timer and save the left time duration it must run.

Definition at line 267 of file uw-smart-ofdm.h.

◆ getCounter()

int UWSmartOFDM::UWSmartOFDMTimer::getCounter ( )
inline

It provides, how many times a timer ran.

Returns
number of times a timer ran (int).

Definition at line 391 of file uw-smart-ofdm.h.

◆ getDuration()

double UWSmartOFDM::UWSmartOFDMTimer::getDuration ( )
inline

This methods provide the duration of a timer.

Returns
left time duration of a timer (double).

Definition at line 401 of file uw-smart-ofdm.h.

◆ incrCounter()

void UWSmartOFDM::UWSmartOFDMTimer::incrCounter ( )
inline

Increment the timer counter.

It helps to know the statics of the timer.

Definition at line 381 of file uw-smart-ofdm.h.

◆ isActive()

bool UWSmartOFDM::UWSmartOFDMTimer::isActive ( )
inline

It tells whether the timer is active or not.

Returns
1 if the timer is active and 0 if it is not.

Definition at line 361 of file uw-smart-ofdm.h.

◆ isExpired()

bool UWSmartOFDM::UWSmartOFDMTimer::isExpired ( )
inline

Tells whether the timer is expired or not.

Returns
1 if the timer expired and 0 if it is not.

Definition at line 341 of file uw-smart-ofdm.h.

◆ isFrozen()

bool UWSmartOFDM::UWSmartOFDMTimer::isFrozen ( )
inline

It tells whether the timer is in freeze mode or not.

Returns
1 if the timer is in freeze mode and 0 if it is not.

Definition at line 351 of file uw-smart-ofdm.h.

◆ isIdle()

bool UWSmartOFDM::UWSmartOFDMTimer::isIdle ( )
inline

It tells whether the timer is in Idle state or not.

Returns
1 if the timer is idle and 0 if it is not.

Definition at line 321 of file uw-smart-ofdm.h.

◆ isRunning()

bool UWSmartOFDM::UWSmartOFDMTimer::isRunning ( )
inline

This method tells whether the timer is in Running state or not.

Returns
1 if the timer is running and 0 if it is not.

Definition at line 331 of file uw-smart-ofdm.h.

◆ resetCounter()

void UWSmartOFDM::UWSmartOFDMTimer::resetCounter ( )
inline

Reset the timer counter.

Definition at line 371 of file uw-smart-ofdm.h.

◆ schedule()

virtual void UWSmartOFDM::UWSmartOFDMTimer::schedule ( double  val)
inlinevirtual

Schedule the time, i.e., how long a timer is going to run.

Parameters
doubletime

Definition at line 305 of file uw-smart-ofdm.h.

◆ startTime()

virtual double UWSmartOFDM::UWSmartOFDMTimer::startTime ( )
inlinevirtual

Definition at line 254 of file uw-smart-ofdm.h.

◆ stop()

virtual void UWSmartOFDM::UWSmartOFDMTimer::stop ( )
inlinevirtual

Stop the timer any way.

Definition at line 294 of file uw-smart-ofdm.h.

◆ unFreeze()

virtual void UWSmartOFDM::UWSmartOFDMTimer::unFreeze ( )
inlinevirtual

It starts the timer from where it was stopped.

To run any freeze timer, we can use unfreeze method.

Definition at line 281 of file uw-smart-ofdm.h.

Member Data Documentation

◆ counter

int UWSmartOFDM::UWSmartOFDMTimer::counter
protected

How many times a timer ran.

Definition at line 411 of file uw-smart-ofdm.h.

◆ left_duration

double UWSmartOFDM::UWSmartOFDMTimer::left_duration
protected

How long a timer is going to run more.

Definition at line 409 of file uw-smart-ofdm.h.

◆ start_time

double UWSmartOFDM::UWSmartOFDMTimer::start_time
protected

Start time of a timer.

Definition at line 407 of file uw-smart-ofdm.h.

◆ timer_status

UWSmartOFDM* UWSMARTOFDM_TIMER_STATUS UWSmartOFDM::UWSmartOFDMTimer::timer_status
protected

< Pointer of UWSmartOFDM module.

Set the status of the timer.

Definition at line 415 of file uw-smart-ofdm.h.


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