DESERT 4.0.0
UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer Class Reference

#include <uw-csma-aloha-trigger-node.h>

Inheritance diagram for UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer:
Inheritance graph
Collaboration diagram for UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer:
Collaboration graph

Public Member Functions

 Csma_Aloha_Triggered_Timer (UwCsmaAloha_Trigger_NODE *m)
 
virtual ~Csma_Aloha_Triggered_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
 
UwCsmaAloha_Trigger_NODE *UW_CS_ALOHA_TRIG_NODE_TIMER_STATUS timer_status
 

Detailed Description

Class that describes the timers in the node

Constructor & Destructor Documentation

◆ Csma_Aloha_Triggered_Timer()

UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::Csma_Aloha_Triggered_Timer ( UwCsmaAloha_Trigger_NODE m)
inline

Constructor of the AlohaTimer class

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

◆ ~Csma_Aloha_Triggered_Timer()

virtual UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::~Csma_Aloha_Triggered_Timer ( )
inlinevirtual

Destructor of the AlohaTimer class

Member Function Documentation

◆ freeze()

virtual void UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::freeze ( )
inlinevirtual

◆ getCounter()

int UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::getCounter ( )
inline

Returns the counter of the timer

Returns
the value of the counter of the timer

References counter.

◆ getDuration()

double UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::getDuration ( )
inline

Returns the left duration of the timer

Returns
left duration of the timer

References left_duration.

◆ incrCounter()

void UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::incrCounter ( )
inline

Increments the counter of the timer

References counter.

Referenced by UwCsmaAloha_Trigger_NODE::stateListen().

◆ isActive()

bool UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::isActive ( )
inline

◆ isExpired()

bool UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::isExpired ( )
inline

Checks if the timer is EXPIRED

Returns
true or false

References timer_status, and UwCsmaAloha_Trigger_NODE::UW_CS_ALOHA_TRIG_NODE_EXPIRED.

Referenced by UwCsmaAloha_Trigger_NODE::stateCheckListenExpired().

◆ isFrozen()

bool UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::isFrozen ( )
inline

Checks if the timer is FROZEN

Returns
true or false

References timer_status, and UwCsmaAloha_Trigger_NODE::UW_CS_ALOHA_TRIG_NODE_FROZEN.

◆ isIdle()

bool UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::isIdle ( )
inline

checks if the timer is IDLE

Returns
bool true or false

References timer_status, and UwCsmaAloha_Trigger_NODE::UW_CS_ALOHA_TRIG_NODE_IDLE.

◆ isRunning()

bool UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::isRunning ( )
inline

checks if the timer is RUNNING

Returns
true or false

References timer_status, and UwCsmaAloha_Trigger_NODE::UW_CS_ALOHA_TRIG_NODE_RUNNING.

◆ resetCounter()

void UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::resetCounter ( )
inline

Resets the counter of the timer

Referenced by UwCsmaAloha_Trigger_NODE::stateTxData().

◆ schedule()

virtual void UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::schedule ( double  val)
inlinevirtual

◆ stop()

virtual void UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::stop ( )
inlinevirtual

◆ unFreeze()

virtual void UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::unFreeze ( )
inlinevirtual

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

References left_duration, start_time, timer_status, UwCsmaAloha_Trigger_NODE::UW_CS_ALOHA_TRIG_NODE_FROZEN, and UwCsmaAloha_Trigger_NODE::UW_CS_ALOHA_TRIG_NODE_RUNNING.

Member Data Documentation

◆ counter

int UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::counter
protected

counter of the timer

Referenced by getCounter(), and incrCounter().

◆ left_duration

double UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::left_duration
protected

Left duration of the timer

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

◆ start_time

double UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::start_time
protected

Start time of the timer

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

◆ timer_status

UwCsmaAloha_Trigger_NODE* UW_CS_ALOHA_TRIG_NODE_TIMER_STATUS UwCsmaAloha_Trigger_NODE::Csma_Aloha_Triggered_Timer::timer_status
protected

< Pointer of an object of type UwCsmaAloha_Triggered Timer status

Referenced by UwCsmaAloha_Trigger_NODE::ListenTimer::expire(), freeze(), isActive(), isExpired(), isFrozen(), isIdle(), isRunning(), schedule(), stop(), and unFreeze().


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