DESERT 3.5.1
Loading...
Searching...
No Matches
UWOFDMAloha Class Reference

#include <uw-ofdm-aloha.h>

Inheritance diagram for UWOFDMAloha:
Collaboration diagram for UWOFDMAloha:

Classes

class  AckTimer
 
class  BackOffTimer
 
class  UWOFDMAlohaTimer
 

Public Member Functions

 UWOFDMAloha ()
 
virtual ~UWOFDMAloha ()
 
virtual int command (int argc, const char *const *argv)
 
void init_macofdm_node (int subCarNum, double subCarSize, int ctrl_subCar, string modulation)
 

Protected Types

enum  UWOFDMALOHA_STATUS {
  UWOFDMALOHA_STATE_IDLE = 1 , UWOFDMALOHA_STATE_BACKOFF , UWOFDMALOHA_STATE_TX_DATA , UWOFDMALOHA_STATE_TX_ACK ,
  UWOFDMALOHA_STATE_WAIT_ACK , UWOFDMALOHA_STATE_DATA_RX , UWOFDMALOHA_STATE_ACK_RX , UWOFDMALOHA_STATE_NOT_SET ,
  UWOFDMALOHA_STATE_CHK_ACK_TIMEOUT , UWOFDMALOHA_STATE_RX_IDLE , UWOFDMALOHA_STATE_RX_WAIT_ACK , UWOFDMALOHA_STATE_CHK_BACKOFF_TIMEOUT ,
  UWOFDMALOHA_STATE_RX_BACKOFF , UWOFDMALOHA_STATE_WRONG_PKT_RX , UWOFDMALOHA_STATE_RX_IN_PROGRESS , UWOFDMALOHA_STATE_MULTIPLE_RX_IN_PROGRESS
}
 
enum  UWOFDMALOHA_REASON_STATUS {
  UWOFDMALOHA_REASON_DATA_PENDING , UWOFDMALOHA_REASON_DATA_RX , UWOFDMALOHA_REASON_DATA_TX , UWOFDMALOHA_REASON_ACK_TX ,
  UWOFDMALOHA_REASON_ACK_RX , UWOFDMALOHA_REASON_ACK_TIMEOUT , UWOFDMALOHA_REASON_DATA_EMPTY , UWOFDMALOHA_REASON_NOT_SET ,
  UWOFDMALOHA_REASON_MAX_TX_TRIES , UWOFDMALOHA_REASON_START_RX , UWOFDMALOHA_REASON_PKT_NOT_FOR_ME , UWOFDMALOHA_REASON_WAIT_ACK_PENDING ,
  UWOFDMALOHA_REASON_PKT_ERROR , UWOFDMALOHA_REASON_BACKOFF_TIMEOUT , UWOFDMALOHA_REASON_BACKOFF_PENDING , UWOFDMALOHA_REASON_PKT_RECEIVING
}
 
enum  UWOFDMALOHA_PKT_TYPE { UWOFDMALOHA_ACK_PKT = 1 , UWOFDMALOHA_DATA_PKT , UWOFDMALOHA_DATAMAX_PKT }
 
enum  UWOFDMALOHA_ACK_MODES { UWOFDMALOHA_ACK_MODE = 1 , UWOFDMALOHA_NO_ACK_MODE }
 
enum  UWOFDMALOHA_TIMER_STATUS { UWOFDMALOHA_IDLE = 1 , UWOFDMALOHA_RUNNING , UWOFDMALOHA_FROZEN , UWOFDMALOHA_EXPIRED }
 

Protected Member Functions

virtual void recvFromUpperLayers (Packet *p)
 
virtual void Mac2PhyStartTx (Packet *p)
 
virtual void Phy2MacEndTx (const Packet *p)
 
virtual void Phy2MacStartRx (const Packet *p)
 
virtual void Phy2MacEndRx (Packet *p)
 
virtual double computeTxTime (UWOFDMALOHA_PKT_TYPE type)
 
virtual void initPkt (Packet *p, UWOFDMALOHA_PKT_TYPE pkt_type, int dest_addr=0)
 
virtual double getBackoffTime ()
 
virtual void txData ()
 
virtual void txAck (int dest_addr)
 
virtual void stateIdle ()
 
virtual void stateRxIdle ()
 
virtual void stateTxData ()
 
virtual void stateTxAck (int dest_addr)
 
virtual void stateWaitAck ()
 
virtual void stateRxWaitAck ()
 
virtual void stateBackoff ()
 
virtual void stateRxBackoff ()
 
virtual void stateCheckAckExpired ()
 
virtual void stateCheckBackoffExpired ()
 
virtual void stateRxData (Packet *p)
 
virtual void stateRxAck (Packet *p)
 
virtual void exitBackoff ()
 
virtual void printStateInfo (double delay=0)
 
virtual void initInfo ()
 
virtual void refreshState (UWOFDMALOHA_STATUS state)
 
virtual void refreshReason (UWOFDMALOHA_REASON_STATUS reason)
 
virtual void incrCurrTxRounds ()
 
virtual void resetCurrTxRounds ()
 
virtual void updateRTT (double rtt)
 
virtual double getRTT ()
 
virtual void updateAckTimeout (double rtt)
 
virtual void updateLastDataIdRx (int id)
 
int getPktSeqNum (Packet *p)
 
void putPktInQueue (Packet *p)
 
void eraseItemFromPktQueue (int seq_num)
 
void putAckTimerInMap (int seq_num)
 
void eraseItemFrommapAckTimer (int seq_num)
 
virtual int getRemainingPkts ()
 
virtual void incrUpperDataRx ()
 
int getUpLayersDataPktsRx ()
 
void displayCarriers (Packet *p)
 
void addInvalidCarriers (int c)
 

Protected Attributes

int max_tx_tries
 
double wait_constant
 
double backoff_tuner
 
int max_payload
 
int HDR_size
 
int ACK_size
 
double ACK_timeout
 
int buffer_pkts
 
double alpha_
 
double max_backoff_counter
 
int uwofdmaloha_debug
 
std::vector< string > mac_carMod
 
std::vector< int > mac_carVec
 
int mac_ncarriers
 
double mac_carrierSize
 
int ctrl_car
 
bool AckInBand = true
 
bool alohaOnCarrier = false
 
int waitforpktnum = 0
 
int n_receptions
 
std::vector< Packet * > pkt_rcv_queue
 
std::vector< int > nouse_carriers
 
bool disturbanceNode
 
int last_sent_data_id
 
bool print_transitions
 
bool has_buffer_queue
 
double start_tx_time
 
double srtt
 
double sumrtt
 
double sumrtt2
 
int rttsamples
 
int curr_tx_rounds
 
int last_data_id_rx
 
int recv_data_id
 
Packet * curr_data_pkt
 
int txsn
 
AckTimer ack_timer
 
BackOffTimer backoff_timer
 
UWOFDMALOHA_REASON_STATUS last_reason
 
UWOFDMALOHA_STATUS curr_state
 
UWOFDMALOHA_STATUS prev_state
 
UWOFDMALOHA_STATUS prev_prev_state
 
UWOFDMALOHA_ACK_MODES ack_mode
 
map< pktSeqNum, Packet * > mapPacket
 
map< pktSeqNum, AckTimermapAckTimer
 
ofstream fout
 

Static Protected Attributes

static bool initialized = false
 
static const double prop_speed = 1500.0
 
static map< UWOFDMALOHA_STATUS, string > status_info
 
static map< UWOFDMALOHA_REASON_STATUS, string > reason_info
 
static map< UWOFDMALOHA_PKT_TYPE, string > pkt_type_info
 

Detailed Description

Definition at line 66 of file uw-ofdm-aloha.h.

Member Enumeration Documentation

◆ UWOFDMALOHA_ACK_MODES

Enumeration class of UWOFDMAloha acknowledgement mode.

First enumerator is given value 1. This protocol supports both acknowledgement and non-acknowledgement technique. If Acknowledgement is set, it uses Stop-And-Wait ARQ technique.

Enumerator
UWOFDMALOHA_ACK_MODE 
UWOFDMALOHA_NO_ACK_MODE 

Definition at line 160 of file uw-ofdm-aloha.h.

◆ UWOFDMALOHA_PKT_TYPE

Enumeration class of UWOFDMAloha packet type.

First enumerator is given value

  1. Three kinds of packets are supported by UWOFDMAloha protocol.
Enumerator
UWOFDMALOHA_ACK_PKT 
UWOFDMALOHA_DATA_PKT 
UWOFDMALOHA_DATAMAX_PKT 

Definition at line 148 of file uw-ofdm-aloha.h.

◆ UWOFDMALOHA_REASON_STATUS

Enumeration class which tells the nodes the reason why it is in this state.

First enumerator is given value 1.

Enumerator
UWOFDMALOHA_REASON_DATA_PENDING 
UWOFDMALOHA_REASON_DATA_RX 
UWOFDMALOHA_REASON_DATA_TX 
UWOFDMALOHA_REASON_ACK_TX 
UWOFDMALOHA_REASON_ACK_RX 
UWOFDMALOHA_REASON_ACK_TIMEOUT 
UWOFDMALOHA_REASON_DATA_EMPTY 
UWOFDMALOHA_REASON_NOT_SET 
UWOFDMALOHA_REASON_MAX_TX_TRIES 
UWOFDMALOHA_REASON_START_RX 
UWOFDMALOHA_REASON_PKT_NOT_FOR_ME 
UWOFDMALOHA_REASON_WAIT_ACK_PENDING 
UWOFDMALOHA_REASON_PKT_ERROR 
UWOFDMALOHA_REASON_BACKOFF_TIMEOUT 
UWOFDMALOHA_REASON_BACKOFF_PENDING 
UWOFDMALOHA_REASON_PKT_RECEIVING 

Definition at line 125 of file uw-ofdm-aloha.h.

◆ UWOFDMALOHA_STATUS

Enumeration class of UWOFDMAloha status.

First enumerator is given value 1.

Enumerator
UWOFDMALOHA_STATE_IDLE 
UWOFDMALOHA_STATE_BACKOFF 
UWOFDMALOHA_STATE_TX_DATA 
UWOFDMALOHA_STATE_TX_ACK 
UWOFDMALOHA_STATE_WAIT_ACK 
UWOFDMALOHA_STATE_DATA_RX 
UWOFDMALOHA_STATE_ACK_RX 
UWOFDMALOHA_STATE_NOT_SET 
UWOFDMALOHA_STATE_CHK_ACK_TIMEOUT 
UWOFDMALOHA_STATE_RX_IDLE 
UWOFDMALOHA_STATE_RX_WAIT_ACK 
UWOFDMALOHA_STATE_CHK_BACKOFF_TIMEOUT 
UWOFDMALOHA_STATE_RX_BACKOFF 
UWOFDMALOHA_STATE_WRONG_PKT_RX 
UWOFDMALOHA_STATE_RX_IN_PROGRESS 
UWOFDMALOHA_STATE_MULTIPLE_RX_IN_PROGRESS 

Definition at line 102 of file uw-ofdm-aloha.h.

◆ UWOFDMALOHA_TIMER_STATUS

Enumeration class of UWOFDMAloha timer status.

First enumerator is given value

  1. It is employed to know the current status of a timer.
Enumerator
UWOFDMALOHA_IDLE 
UWOFDMALOHA_RUNNING 
UWOFDMALOHA_FROZEN 
UWOFDMALOHA_EXPIRED 

Definition at line 166 of file uw-ofdm-aloha.h.

Constructor & Destructor Documentation

◆ UWOFDMAloha()

UWOFDMAloha::UWOFDMAloha ( )

Constructor of UWOFDMAloha Class.

Definition at line 130 of file uw-ofdm-aloha.cpp.

◆ ~UWOFDMAloha()

UWOFDMAloha::~UWOFDMAloha ( )
virtual

Destructor of UWOFDMAloha Class.

Definition at line 175 of file uw-ofdm-aloha.cpp.

Member Function Documentation

◆ addInvalidCarriers()

void UWOFDMAloha::addInvalidCarriers ( int  c)
inlineprotected

Adds carriers that should not be used.

Definition at line 770 of file uw-ofdm-aloha.h.

◆ command()

int UWOFDMAloha::command ( int  argc,
const char *const *  argv 
)
virtual

TCL command interpreter.

It implements the following OTcl methods:

Parameters
argcnumber of arguments in argv
argvarray of strings which are the command parameters (Note that argv[0] is the name of the object)
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched succesfully or not

Definition at line 181 of file uw-ofdm-aloha.cpp.

◆ computeTxTime()

double UWOFDMAloha::computeTxTime ( UWOFDMALOHA_PKT_TYPE  type)
protectedvirtual

Compute the transmission time of a packet.

It uses a cross-layer message to calculate the duration of that packet.

Parameters
typeis a UWOFDMALOHA_PKT_TYPE
Returns
tranmission time of a packet which is a double data type.

Definition at line 376 of file uw-ofdm-aloha.cpp.

◆ displayCarriers()

void UWOFDMAloha::displayCarriers ( Packet *  p)
inlineprotected

Prints the carriers as a sequence of 0s and 1s.

Definition at line 754 of file uw-ofdm-aloha.h.

◆ eraseItemFrommapAckTimer()

void UWOFDMAloha::eraseItemFrommapAckTimer ( int  seq_num)
inlineprotected

Erase an item from acknowledgement stored container.

Parameters
seq_numwhich is an integer data type.

Definition at line 717 of file uw-ofdm-aloha.h.

◆ eraseItemFromPktQueue()

void UWOFDMAloha::eraseItemFromPktQueue ( int  seq_num)
inlineprotected

It erases the packet from the container.

Parameters
seq_numwhich is an integer data type.

Definition at line 688 of file uw-ofdm-aloha.h.

◆ exitBackoff()

void UWOFDMAloha::exitBackoff ( )
protectedvirtual

It stops the backoff timer.

Definition at line 345 of file uw-ofdm-aloha.cpp.

◆ getBackoffTime()

double UWOFDMAloha::getBackoffTime ( )
protectedvirtual

This function calculates the backoff duration and return the backoff time.It employs the exponential backoff algorithm.

Returns
backoff duration which is a double data type.

Definition at line 351 of file uw-ofdm-aloha.cpp.

◆ getPktSeqNum()

int UWOFDMAloha::getPktSeqNum ( Packet *  p)
inlineprotected

This method is used to get the sequence number from a packet.

Parameters
packetpointer
Returns
it returns sequence number which is an integer data type.

Definition at line 662 of file uw-ofdm-aloha.h.

◆ getRemainingPkts()

virtual int UWOFDMAloha::getRemainingPkts ( )
inlineprotectedvirtual

Number of packets which MAC layer receives form upper layer(s) but were not transmitted.

Returns
an integer value.

Definition at line 730 of file uw-ofdm-aloha.h.

◆ getRTT()

virtual double UWOFDMAloha::getRTT ( )
inlineprotectedvirtual

This method is used to get the average RTT over all the receives RTT.

Returns
average RTT time which is a double data type.

Definition at line 636 of file uw-ofdm-aloha.h.

◆ getUpLayersDataPktsRx()

int UWOFDMAloha::getUpLayersDataPktsRx ( )
inlineprotected

Definition at line 745 of file uw-ofdm-aloha.h.

◆ incrCurrTxRounds()

virtual void UWOFDMAloha::incrCurrTxRounds ( )
inlineprotectedvirtual

Increments the current transmission round of a packet.

It keeps track of the number of retransmition of a packet.

Definition at line 610 of file uw-ofdm-aloha.h.

◆ incrUpperDataRx()

virtual void UWOFDMAloha::incrUpperDataRx ( )
inlineprotectedvirtual

Increment the number of Data packet receive for the upper layer.

Definition at line 739 of file uw-ofdm-aloha.h.

◆ init_macofdm_node()

void UWOFDMAloha::init_macofdm_node ( int  subCarNum,
double  subCarSize,
int  ctrl_subCar,
string  modulation 
)

Initialize subCarriers parameters inside a node, default all carriers are used.

Parameters
subCarNumnumber of subcarriers used in the system
carSizesize of carriers
ctrl_subCarnumber of control subcarriers if used
modulationmodulation used in the subcarriers

Definition at line 308 of file uw-ofdm-aloha.cpp.

◆ initInfo()

void UWOFDMAloha::initInfo ( )
protectedvirtual

This function is used to initialize the UWOFDMAloha protocol.

Definition at line 258 of file uw-ofdm-aloha.cpp.

◆ initPkt()

void UWOFDMAloha::initPkt ( Packet *  p,
UWOFDMALOHA_PKT_TYPE  pkt_type,
int  dest_addr = 0 
)
protectedvirtual

This method, initialize the packet.

If the packet is received from the upper layer, it adds the header (if any). In case of UWOFDMAloha with ARQ technique, it set the fields of ACK packet.

Parameters
Packetpointer P. The packet can be Data packet or ACK packet.
pkt_typeis an UWOFDMALOHA_PKT_TYPE. Packet can be either Data packet or ACK packet.
dest_addris a integer data type. It is initialized as 0.

Definition at line 446 of file uw-ofdm-aloha.cpp.

◆ Mac2PhyStartTx()

void UWOFDMAloha::Mac2PhyStartTx ( Packet *  p)
protectedvirtual

It informs that a packet transmission started.

Parameters
Packetpointer

Definition at line 504 of file uw-ofdm-aloha.cpp.

◆ Phy2MacEndRx()

void UWOFDMAloha::Phy2MacEndRx ( Packet *  p)
protectedvirtual

PHY layer informs the MAC layer that the reception of the packet is over.

Parameters
Packetpointer.

Definition at line 597 of file uw-ofdm-aloha.cpp.

◆ Phy2MacEndTx()

void UWOFDMAloha::Phy2MacEndTx ( const Packet *  p)
protectedvirtual

It infroms that a packet transmission end.

Parameters
Packetpointer

Definition at line 522 of file uw-ofdm-aloha.cpp.

◆ Phy2MacStartRx()

void UWOFDMAloha::Phy2MacStartRx ( const Packet *  p)
protectedvirtual

PHY layer informs the MAC layer that it is receiving a packet.

@Param Packet pointer (constant)

Definition at line 587 of file uw-ofdm-aloha.cpp.

◆ printStateInfo()

void UWOFDMAloha::printStateInfo ( double  delay = 0)
protectedvirtual

This methods print the state information of the nodes.

Parameters
delayis a double data type.

Definition at line 1043 of file uw-ofdm-aloha.cpp.

◆ putAckTimerInMap()

void UWOFDMAloha::putAckTimerInMap ( int  seq_num)
inlineprotected

Put acknowledgement timer in the container.

Parameters
seq_numwhich is an integer data type.

Definition at line 707 of file uw-ofdm-aloha.h.

◆ putPktInQueue()

void UWOFDMAloha::putPktInQueue ( Packet *  p)
inlineprotected

A node receives packet(s) from upper layer and store them in the container.

Parameters
packetpointer

Definition at line 676 of file uw-ofdm-aloha.h.

◆ recvFromUpperLayers()

void UWOFDMAloha::recvFromUpperLayers ( Packet *  p)
protectedvirtual

This function receives the packet from upper layer and save it in the queue.

Parameters
Packetpointer

Definition at line 410 of file uw-ofdm-aloha.cpp.

◆ refreshReason()

virtual void UWOFDMAloha::refreshReason ( UWOFDMALOHA_REASON_STATUS  reason)
inlineprotectedvirtual

To know the reason why a node is in this current state.

Parameters
reasonis an UWOFDMALOHA_REASON_STATUS type.

Definition at line 600 of file uw-ofdm-aloha.h.

◆ refreshState()

virtual void UWOFDMAloha::refreshState ( UWOFDMALOHA_STATUS  state)
inlineprotectedvirtual

Refreshes the states of the node.

The node save the information of three states, they are: previous to previous state, previous state and current state of the node.

Parameters
statewhich is an UWOFDMALOHA_STATUS type.

Definition at line 588 of file uw-ofdm-aloha.h.

◆ resetCurrTxRounds()

virtual void UWOFDMAloha::resetCurrTxRounds ( )
inlineprotectedvirtual

If a node is going to transmit a new packet, it resets the tx counter.

Definition at line 619 of file uw-ofdm-aloha.h.

◆ stateBackoff()

void UWOFDMAloha::stateBackoff ( )
protectedvirtual

If ACK packet is not received within the acknowledgement expire time.

Definition at line 838 of file uw-ofdm-aloha.cpp.

◆ stateCheckAckExpired()

void UWOFDMAloha::stateCheckAckExpired ( )
protectedvirtual

It checks whether the ack timer is already expired while it was busy with other activities.

Definition at line 743 of file uw-ofdm-aloha.cpp.

◆ stateCheckBackoffExpired()

void UWOFDMAloha::stateCheckBackoffExpired ( )
protectedvirtual

It checks whether the backoff timer is already expired while it was busy with other activities.

Definition at line 776 of file uw-ofdm-aloha.cpp.

◆ stateIdle()

void UWOFDMAloha::stateIdle ( )
protectedvirtual

Node is in Idle state.

It only changes its state if it has packet(s) to transmit or it receives a packet.

Definition at line 806 of file uw-ofdm-aloha.cpp.

◆ stateRxAck()

void UWOFDMAloha::stateRxAck ( Packet *  p)
protectedvirtual

The node comes to this state if it receives an ACK packet.

After receiving an ACK packet it changes it states according to the previously stored status information.

Definition at line 1008 of file uw-ofdm-aloha.cpp.

◆ stateRxBackoff()

void UWOFDMAloha::stateRxBackoff ( )
protectedvirtual

If a node start receiving a packet when it is in backoff state.

The node first freeze (or another word, hold) the backoff timer and start receiving the packet.

Definition at line 862 of file uw-ofdm-aloha.cpp.

◆ stateRxData()

void UWOFDMAloha::stateRxData ( Packet *  p)
protectedvirtual

It process the packet which is received.

After receiving a packet it changes it states according to the previously stored status information.

Parameters
<i>Data</i>packet pointer

Definition at line 984 of file uw-ofdm-aloha.cpp.

◆ stateRxIdle()

void UWOFDMAloha::stateRxIdle ( )
protectedvirtual

If a node start receiving a packet in Idle state.

Definition at line 830 of file uw-ofdm-aloha.cpp.

◆ stateRxWaitAck()

void UWOFDMAloha::stateRxWaitAck ( )
protectedvirtual

If a node receives any packet while it was waiting for ACK packet, it moves to this state.

The packet it is receiving can be a Data packet from another node or ACK packet.

Definition at line 963 of file uw-ofdm-aloha.cpp.

◆ stateTxAck()

void UWOFDMAloha::stateTxAck ( int  dest_addr)
protectedvirtual

If the protocl uses ARQ technique, in that case, after receiving a Data packet the node sends an ACK packet.

Definition at line 971 of file uw-ofdm-aloha.cpp.

◆ stateTxData()

void UWOFDMAloha::stateTxData ( )
protectedvirtual

If a node has packet to transmits.

In such case, it moves from Idle state to data transmits state.

Definition at line 871 of file uw-ofdm-aloha.cpp.

◆ stateWaitAck()

void UWOFDMAloha::stateWaitAck ( )
protectedvirtual

After transmitting a Data packet, a node waits for the ACK packet.

Definition at line 945 of file uw-ofdm-aloha.cpp.

◆ txAck()

void UWOFDMAloha::txAck ( int  dest_addr)
protectedvirtual

This methods transmits ACK packet from MAC layer to PHY layer.

Parameters
dest_addrwhich is an integer data type.

Definition at line 730 of file uw-ofdm-aloha.cpp.

◆ txData()

void UWOFDMAloha::txData ( )
protectedvirtual

This method transmits Data packets from MAC layer to PHY layer.

Definition at line 712 of file uw-ofdm-aloha.cpp.

◆ updateAckTimeout()

void UWOFDMAloha::updateAckTimeout ( double  rtt)
protectedvirtual

Like updateRTT() function.

Definition at line 335 of file uw-ofdm-aloha.cpp.

◆ updateLastDataIdRx()

virtual void UWOFDMAloha::updateLastDataIdRx ( int  id)
inlineprotectedvirtual

It updates the sequence number of the last data packet rx.

Parameters
idis an integer data type.

Definition at line 651 of file uw-ofdm-aloha.h.

◆ updateRTT()

void UWOFDMAloha::updateRTT ( double  rtt)
protectedvirtual

Update the Round Trip Time (RTT) which is necessary to compute the acknowledgement duration as well as backoff duration.

Parameters
rttis a double data type.

Definition at line 326 of file uw-ofdm-aloha.cpp.

Member Data Documentation

◆ ack_mode

UWOFDMALOHA_ACK_MODES UWOFDMAloha::ack_mode
protected

Enum variable.

It tells the node whether to use ARQ technique or not.

Definition at line 852 of file uw-ofdm-aloha.h.

◆ ACK_size

int UWOFDMAloha::ACK_size
protected

Size of the ACK, if the node uses ARQ technique.

Definition at line 780 of file uw-ofdm-aloha.h.

◆ ACK_timeout

double UWOFDMAloha::ACK_timeout
protected

ACK timeout for the initial packet.

Definition at line 781 of file uw-ofdm-aloha.h.

◆ ack_timer

AckTimer UWOFDMAloha::ack_timer
protected

An object of the AckTimer class.

Definition at line 837 of file uw-ofdm-aloha.h.

◆ AckInBand

bool UWOFDMAloha::AckInBand = true
protected

Definition at line 796 of file uw-ofdm-aloha.h.

◆ alohaOnCarrier

bool UWOFDMAloha::alohaOnCarrier = false
protected

Definition at line 797 of file uw-ofdm-aloha.h.

◆ alpha_

double UWOFDMAloha::alpha_
protected

This variable is used to tune the RTT.

Definition at line 783 of file uw-ofdm-aloha.h.

◆ backoff_timer

BackOffTimer UWOFDMAloha::backoff_timer
protected

An object of the backoff timer class.

Definition at line 838 of file uw-ofdm-aloha.h.

◆ backoff_tuner

double UWOFDMAloha::backoff_tuner
protected

Tunes the backoff duration.

Definition at line 777 of file uw-ofdm-aloha.h.

◆ buffer_pkts

int UWOFDMAloha::buffer_pkts
protected

Number of packets a node can store in the container.

Definition at line 782 of file uw-ofdm-aloha.h.

◆ ctrl_car

int UWOFDMAloha::ctrl_car
protected

Definition at line 795 of file uw-ofdm-aloha.h.

◆ curr_data_pkt

Packet* UWOFDMAloha::curr_data_pkt
protected

Pointer of the latest selected data packet.

Definition at line 831 of file uw-ofdm-aloha.h.

◆ curr_state

UWOFDMALOHA_STATUS UWOFDMAloha::curr_state
protected

Enum variable.

It stores the current state of a node

Definition at line 843 of file uw-ofdm-aloha.h.

◆ curr_tx_rounds

int UWOFDMAloha::curr_tx_rounds
protected

How many times a packet is transmitted.

Definition at line 826 of file uw-ofdm-aloha.h.

◆ disturbanceNode

bool UWOFDMAloha::disturbanceNode
protected

Definition at line 806 of file uw-ofdm-aloha.h.

◆ fout

ofstream UWOFDMAloha::fout
protected

An object of ofstream class.

Definition at line 869 of file uw-ofdm-aloha.h.

◆ has_buffer_queue

bool UWOFDMAloha::has_buffer_queue
protected

Whether the node has buffer to store data or not.

Definition at line 817 of file uw-ofdm-aloha.h.

◆ HDR_size

int UWOFDMAloha::HDR_size
protected

Size of the HDR if any.

Definition at line 779 of file uw-ofdm-aloha.h.

◆ initialized

bool UWOFDMAloha::initialized = false
staticprotected

It checks whether UWOFDMAloha protocol is initialized or not.

If FALSE means, not initialized and if TRUE means it is initialized

Definition at line 809 of file uw-ofdm-aloha.h.

◆ last_data_id_rx

int UWOFDMAloha::last_data_id_rx
protected

The sequence number of last received packet.

Definition at line 827 of file uw-ofdm-aloha.h.

◆ last_reason

UWOFDMALOHA_REASON_STATUS UWOFDMAloha::last_reason
protected

Enum variable which stores the last reason why a node changes its state.

Definition at line 841 of file uw-ofdm-aloha.h.

◆ last_sent_data_id

int UWOFDMAloha::last_sent_data_id
protected

sequence number of the last sent packet

Definition at line 814 of file uw-ofdm-aloha.h.

◆ mac_carMod

std::vector<string> UWOFDMAloha::mac_carMod
protected

--— OFDM PARAMS

Definition at line 791 of file uw-ofdm-aloha.h.

◆ mac_carrierSize

double UWOFDMAloha::mac_carrierSize
protected

Definition at line 794 of file uw-ofdm-aloha.h.

◆ mac_carVec

std::vector<int> UWOFDMAloha::mac_carVec
protected

Definition at line 792 of file uw-ofdm-aloha.h.

◆ mac_ncarriers

int UWOFDMAloha::mac_ncarriers
protected

Definition at line 793 of file uw-ofdm-aloha.h.

◆ mapAckTimer

map<pktSeqNum, AckTimer> UWOFDMAloha::mapAckTimer
protected

Container where acknowledgement timer(s) is stored.

Definition at line 866 of file uw-ofdm-aloha.h.

◆ mapPacket

map<pktSeqNum, Packet *> UWOFDMAloha::mapPacket
protected

Container where Data packets are stored.

Definition at line 865 of file uw-ofdm-aloha.h.

◆ max_backoff_counter

double UWOFDMAloha::max_backoff_counter
protected

Maximum number of backoff it will consider while it increases the backoff exponentially.

Definition at line 784 of file uw-ofdm-aloha.h.

◆ max_payload

int UWOFDMAloha::max_payload
protected

Maximum number of payload in a packet.

Definition at line 778 of file uw-ofdm-aloha.h.

◆ max_tx_tries

int UWOFDMAloha::max_tx_tries
protected

Maximum number of retransmissions attempt.

Definition at line 774 of file uw-ofdm-aloha.h.

◆ n_receptions

int UWOFDMAloha::n_receptions
protected

Definition at line 801 of file uw-ofdm-aloha.h.

◆ nouse_carriers

std::vector<int> UWOFDMAloha::nouse_carriers
protected

Definition at line 805 of file uw-ofdm-aloha.h.

◆ pkt_rcv_queue

std::vector<Packet *> UWOFDMAloha::pkt_rcv_queue
protected

Definition at line 803 of file uw-ofdm-aloha.h.

◆ pkt_type_info

map< UWOFDMAloha::UWOFDMALOHA_PKT_TYPE, string > UWOFDMAloha::pkt_type_info
staticprotected

Container which stores all the packet type information of UWOFDMAloha.

Definition at line 861 of file uw-ofdm-aloha.h.

◆ prev_prev_state

UWOFDMALOHA_STATUS UWOFDMAloha::prev_prev_state
protected

Enum variable.

It stores the previous to previous state of a node

Definition at line 848 of file uw-ofdm-aloha.h.

◆ prev_state

UWOFDMALOHA_STATUS UWOFDMAloha::prev_state
protected

Enum variable.

It stores the previous state of a node

Definition at line 846 of file uw-ofdm-aloha.h.

◆ print_transitions

bool UWOFDMAloha::print_transitions
protected

Whether to print the state of the nodes.

Definition at line 816 of file uw-ofdm-aloha.h.

◆ prop_speed

const double UWOFDMAloha::prop_speed = 1500.0
staticprotected

Speed of the sound signal.

Definition at line 835 of file uw-ofdm-aloha.h.

◆ reason_info

map< UWOFDMAloha::UWOFDMALOHA_REASON_STATUS, string > UWOFDMAloha::reason_info
staticprotected

Container which stores all the reason information.

Definition at line 858 of file uw-ofdm-aloha.h.

◆ recv_data_id

int UWOFDMAloha::recv_data_id
protected

The sequence number of the packet which is received.

Definition at line 828 of file uw-ofdm-aloha.h.

◆ rttsamples

int UWOFDMAloha::rttsamples
protected

Number of RTT samples.

Definition at line 824 of file uw-ofdm-aloha.h.

◆ srtt

double UWOFDMAloha::srtt
protected

Smoothed Round Trip Time, calculated as for TCP.

Definition at line 821 of file uw-ofdm-aloha.h.

◆ start_tx_time

double UWOFDMAloha::start_tx_time
protected

Time when a packet start transmitting.

Definition at line 820 of file uw-ofdm-aloha.h.

◆ status_info

map< UWOFDMAloha::UWOFDMALOHA_STATUS, string > UWOFDMAloha::status_info
staticprotected

Container which stores all the status information.

Definition at line 854 of file uw-ofdm-aloha.h.

◆ sumrtt

double UWOFDMAloha::sumrtt
protected

Sum of RTT samples.

Definition at line 822 of file uw-ofdm-aloha.h.

◆ sumrtt2

double UWOFDMAloha::sumrtt2
protected

Sum of (RTT^2)

Definition at line 823 of file uw-ofdm-aloha.h.

◆ txsn

int UWOFDMAloha::txsn
protected

Sequence number of the packet which is transmitted.

Definition at line 833 of file uw-ofdm-aloha.h.

◆ uwofdmaloha_debug

int UWOFDMAloha::uwofdmaloha_debug
protected

Debuging Flag.

Definition at line 787 of file uw-ofdm-aloha.h.

◆ wait_constant

double UWOFDMAloha::wait_constant
protected

This fixed time is used to componsate different time variations.

Definition at line 775 of file uw-ofdm-aloha.h.

◆ waitforpktnum

int UWOFDMAloha::waitforpktnum = 0
protected

Definition at line 799 of file uw-ofdm-aloha.h.


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