DESERT 3.5.1
Loading...
Searching...
No Matches
CsmaAloha::AlohaTimer Class Reference

#include <uw-csma-aloha.h>

Inheritance diagram for CsmaAloha::AlohaTimer:
Collaboration diagram for CsmaAloha::AlohaTimer:

Public Member Functions

 AlohaTimer (CsmaAloha *m)
 
virtual ~AlohaTimer ()
 
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
 
CsmaAloha *CSMA_TIMER_STATUS timer_status
 

Detailed Description

Class that describes the timers in the node.

Definition at line 163 of file uw-csma-aloha.h.

Constructor & Destructor Documentation

◆ AlohaTimer()

CsmaAloha::AlohaTimer::AlohaTimer ( CsmaAloha m)
inline

Constructor of the AlohaTimer class.

Parameters
CsmaAloha*a pointer to an object of type CsmaAloha*

Definition at line 170 of file uw-csma-aloha.h.

◆ ~AlohaTimer()

virtual CsmaAloha::AlohaTimer::~AlohaTimer ( )
inlinevirtual

Destructor of the AlohaTimer class.

Definition at line 184 of file uw-csma-aloha.h.

Member Function Documentation

◆ freeze()

virtual void CsmaAloha::AlohaTimer::freeze ( )
inlinevirtual

Freezes the timer.

Definition at line 192 of file uw-csma-aloha.h.

◆ getCounter()

int CsmaAloha::AlohaTimer::getCounter ( )
inline

Returns the counter of the timer.

Returns
the value of the counter of the timer

Definition at line 318 of file uw-csma-aloha.h.

◆ getDuration()

double CsmaAloha::AlohaTimer::getDuration ( )
inline

Returns the left duration of the timer.

Returns
left duration of the timer

Definition at line 328 of file uw-csma-aloha.h.

◆ incrCounter()

void CsmaAloha::AlohaTimer::incrCounter ( )
inline

Increments the counter of the timer.

Definition at line 307 of file uw-csma-aloha.h.

◆ isActive()

bool CsmaAloha::AlohaTimer::isActive ( )
inline

Checks if the timer is ACTIVE.

Returns
true or false

Definition at line 286 of file uw-csma-aloha.h.

◆ isExpired()

bool CsmaAloha::AlohaTimer::isExpired ( )
inline

Checks if the timer is EXPIRED.

Returns
true or false

Definition at line 265 of file uw-csma-aloha.h.

◆ isFrozen()

bool CsmaAloha::AlohaTimer::isFrozen ( )
inline

Checks if the timer is FROZEN.

Returns
true or false

Definition at line 275 of file uw-csma-aloha.h.

◆ isIdle()

bool CsmaAloha::AlohaTimer::isIdle ( )
inline

checks if the timer is IDLE

Returns
bool true or false

Definition at line 244 of file uw-csma-aloha.h.

◆ isRunning()

bool CsmaAloha::AlohaTimer::isRunning ( )
inline

checks if the timer is RUNNING

Returns
true or false

Definition at line 254 of file uw-csma-aloha.h.

◆ resetCounter()

void CsmaAloha::AlohaTimer::resetCounter ( )
inline

Resets the counter of the timer.

Definition at line 297 of file uw-csma-aloha.h.

◆ schedule()

virtual void CsmaAloha::AlohaTimer::schedule ( double  val)
inlinevirtual

schedule a timer

Parameters
doublethe duration of the timer

Definition at line 231 of file uw-csma-aloha.h.

◆ stop()

virtual void CsmaAloha::AlohaTimer::stop ( )
inlinevirtual

stops the timer

Definition at line 220 of file uw-csma-aloha.h.

◆ unFreeze()

virtual void CsmaAloha::AlohaTimer::unFreeze ( )
inlinevirtual

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

Definition at line 207 of file uw-csma-aloha.h.

Member Data Documentation

◆ counter

int CsmaAloha::AlohaTimer::counter
protected

counter of the timer

Definition at line 338 of file uw-csma-aloha.h.

◆ left_duration

double CsmaAloha::AlohaTimer::left_duration
protected

Left duration of the timer.

Definition at line 336 of file uw-csma-aloha.h.

◆ start_time

double CsmaAloha::AlohaTimer::start_time
protected

Start Time of the timer.

Definition at line 334 of file uw-csma-aloha.h.

◆ timer_status

CsmaAloha* CSMA_TIMER_STATUS CsmaAloha::AlohaTimer::timer_status
protected

< Pointer to an object of type CsmaAloha

Timer status

Definition at line 341 of file uw-csma-aloha.h.


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