|
DESERT 4.0.0
|
#include <uw-smart-ofdm.h>


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 |
Base class of all the timer used in this protocol. This is a derived class of TimerHandler.
|
inline |
Constructor of UWSmartOFDMTimer Class.
|
inlinevirtual |
Destructor of UWSmartOFDMTimer Class.
|
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.
References left_duration, start_time, timer_status, UWSmartOFDM::UWSMARTOFDM_FROZEN, and UWSmartOFDM::UWSMARTOFDM_RUNNING.
Referenced by UWSmartOFDM::stateRxBackoff().
|
inline |
It provides, how many times a timer ran.
References counter.
Referenced by UWSmartOFDM::getBackoffTime().
|
inline |
This methods provide the duration of a timer.
References left_duration.
Referenced by UWSmartOFDM::stateBackoff().
|
inline |
Increment the timer counter. It helps to know the statics of the timer.
References counter.
Referenced by UWSmartOFDM::getBackoffTime(), and UWSmartOFDM::stateTxData().
|
inline |
It tells whether the timer is active or not.
References timer_status, UWSmartOFDM::UWSMARTOFDM_FROZEN, and UWSmartOFDM::UWSMARTOFDM_RUNNING.
Referenced by UWSmartOFDM::stateCheckBackoffExpired(), and UWSmartOFDM::stateCheckCTSBackoffExpired().
|
inline |
Tells whether the timer is expired or not.
References timer_status, and UWSmartOFDM::UWSMARTOFDM_EXPIRED.
Referenced by UWSmartOFDM::stateCheckBackoffExpired(), and UWSmartOFDM::stateCheckCTSBackoffExpired().
|
inline |
It tells whether the timer is in freeze mode or not.
References timer_status, and UWSmartOFDM::UWSMARTOFDM_FROZEN.
Referenced by UWSmartOFDM::stateBackoff().
|
inline |
It tells whether the timer is in Idle state or not.
References timer_status, and UWSmartOFDM::UWSMARTOFDM_IDLE.
|
inline |
This method tells whether the timer is in Running state or not.
References timer_status, and UWSmartOFDM::UWSMARTOFDM_RUNNING.
|
inline |
Reset the timer counter.
Referenced by UWSmartOFDM::stateTxData().
|
inlinevirtual |
Schedule the time, i.e., how long a timer is going to run.
| double | time |
References left_duration, start_time, timer_status, and UWSmartOFDM::UWSMARTOFDM_RUNNING.
Referenced by UWSmartOFDM::clearOccTable(), UWSmartOFDM::init_macofdm_node(), UWSmartOFDM::stateBackoff(), UWSmartOFDM::stateBackoffCTS(), UWSmartOFDM::stateRxCTS(), UWSmartOFDM::stateWaitData(), and UWSmartOFDM::txRTS().
|
inlinevirtual |
References start_time.
|
inlinevirtual |
Stop the timer any way.
References timer_status, and UWSmartOFDM::UWSMARTOFDM_IDLE.
Referenced by UWSmartOFDM::exitBackoff(), UWSmartOFDM::exitCTSBackoff(), UWSmartOFDM::stateIdle(), and UWSmartOFDM::stateRxData().
|
inlinevirtual |
It starts the timer from where it was stopped. To run any freeze timer, we can use unfreeze method.
References left_duration, start_time, timer_status, UWSmartOFDM::UWSMARTOFDM_FROZEN, and UWSmartOFDM::UWSMARTOFDM_RUNNING.
Referenced by UWSmartOFDM::stateBackoff().
|
protected |
How many times a timer ran.
Referenced by getCounter(), and incrCounter().
|
protected |
How long a timer is going to run more.
Referenced by freeze(), getDuration(), schedule(), and unFreeze().
|
protected |
Start time of a timer.
Referenced by freeze(), schedule(), startTime(), and unFreeze().
|
protected |
< Pointer of UWSmartOFDM module. Set the status of the timer.
Referenced by UWSmartOFDM::AckTimer::expire(), UWSmartOFDM::CTSTimer::expire(), UWSmartOFDM::AssignmentTimer::expire(), UWSmartOFDM::AssignmentValidTimer::expire(), UWSmartOFDM::DATATimer::expire(), freeze(), isActive(), isExpired(), isFrozen(), isIdle(), isRunning(), schedule(), stop(), and unFreeze().