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

#include <uwal.h>

Inheritance diagram for Uwal:
Collaboration diagram for Uwal:

Public Member Functions

 Uwal ()
 
 ~Uwal ()
 
virtual int recvSyncClMsg (ClMessage *m)
 
virtual void recv (Packet *)
 
virtual int command (int, const char *const *)
 
size_t getPSDU ()
 

Protected Member Functions

void ALqueueManager ()
 
void initializeHdr (Packet *, unsigned int)
 
void fragmentPkt (Packet *)
 
void reassembleFrames (Packet *)
 
void checkRxFrameSet ()
 
virtual void startTx (Packet *)
 
virtual void endTx (Packet *)
 
virtual void startRx (Packet *)
 
virtual void endRx (Packet *)
 
virtual double getTxDuration (Packet *)
 
virtual int getModulationType (Packet *)
 
virtual bool isInPERList (int mac_addr)
 
virtual double getPERfromID (int mac_addr)
 

Protected Attributes

int nodeID
 
unsigned int pkt_counter
 
packerpPacker
 
size_t PSDU
 
string dummyStr
 
int debug_
 
std::queue< Packet * > sendDownPkts
 
std::queue< Packet * > sendDownFrames
 
std::queue< Packet * > sendUpFrames
 
std::queue< Packet * > sendUpPkts
 
list< PERListElementPERList
 
std::map< RxFrameSetKey, RxFrameSetsendUpFrameSet
 

Private Attributes

TxFrameTimer InterframeTmr
 
double interframe_period
 
double frame_set_validity
 
int frame_padding
 
int force_endTx_
 
bool has_tap_clmsg
 

Friends

class TxFrameTimer
 

Detailed Description

The main class implementing the module used to implement the adaptation layer between ns2/NS-Miracle and binary data packets.

Definition at line 111 of file uwal.h.

Constructor & Destructor Documentation

◆ Uwal()

Uwal::Uwal ( )

Class constructor.

Definition at line 65 of file uwal.cpp.

◆ ~Uwal()

Uwal::~Uwal ( )

Class destructor.

Definition at line 97 of file uwal.cpp.

Member Function Documentation

◆ ALqueueManager()

void Uwal::ALqueueManager ( )
protected

Method responsible to manage the queueing system of Adaptation Layer.

Definition at line 237 of file uwal.cpp.

◆ checkRxFrameSet()

void Uwal::checkRxFrameSet ( )
protected

Method responsible to check for errors the received frames.

Definition at line 615 of file uwal.cpp.

◆ command()

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

Method to map tcl commands into c++ methods.

Parameters
argcnumber of arguments in argv
argvarray of arguments where argv[3] is the tcl command name and argv[4, 5, ...] are the parameters for the corresponding c++ method.

Definition at line 103 of file uwal.cpp.

◆ endRx()

void Uwal::endRx ( Packet *  p)
protectedvirtual

Method to end a packet reception.

Parameters
ppointer to the last received packet.

Definition at line 734 of file uwal.cpp.

◆ endTx()

void Uwal::endTx ( Packet *  p)
protectedvirtual

Method to end a packet transmission.

This method is also in charge to send a cross layer message Phy2MacEndTx(p) to notify the above layers of the simulator about the end of a transmission, see http://telecom.dei.unipd.it/ns/miracle/doxygen/classMPhy.html#c8c2f52d3833fed8ac736aca0ee52c98.

Parameters
ppointer to the last transmitted packet.

Definition at line 722 of file uwal.cpp.

◆ fragmentPkt()

void Uwal::fragmentPkt ( Packet *  p)
protected

Method responsible to fragment the packet.

Parameters
Pointerto the packet that are going to be fragmented

Definition at line 293 of file uwal.cpp.

◆ getModulationType()

virtual int Uwal::getModulationType ( Packet *  )
inlineprotectedvirtual

Unused method at the moment.

To be implemented because defined as virtual in MPhy.

Definition at line 256 of file uwal.h.

◆ getPERfromID()

double Uwal::getPERfromID ( int  mac_addr)
protectedvirtual

Method to search for the PER associated with a particular MAC address.

Parameters
mac_addrAddr of the node for which search the related Packet Error Rate
Returns
the Packet Error Rate associated

Definition at line 181 of file uwal.cpp.

◆ getPSDU()

size_t Uwal::getPSDU ( )
inline

Definition at line 159 of file uwal.h.

◆ getTxDuration()

virtual double Uwal::getTxDuration ( Packet *  )
inlineprotectedvirtual

Unused method at the moment.

To be implemented because defined as virtual in MPhy.

Definition at line 248 of file uwal.h.

◆ initializeHdr()

void Uwal::initializeHdr ( Packet *  p,
unsigned int  pkt_counter_ 
)
protected

Method responsible to initialize the headers of the packet.

Parameters
Pointerto the packet
IDof the packet

Definition at line 275 of file uwal.cpp.

◆ isInPERList()

bool Uwal::isInPERList ( int  mac_addr)
protectedvirtual

Method to search a MAC address in the PER List.

Parameters
mac_addrAddress to search
Returns
true if mac_addr in in the PERList, false otherwise

Definition at line 165 of file uwal.cpp.

◆ reassembleFrames()

void Uwal::reassembleFrames ( Packet *  p)
protected

Method responsible to reassemble the various fragments in a unique packets.

Parameters
pointerto the original Packet

Definition at line 457 of file uwal.cpp.

◆ recv()

void Uwal::recv ( Packet *  p)
virtual

Method to handle the reception of packets arriving from the upper layers of the network simulator.

Parameters
ppointer to the packet that has been received from the simulator's upper layers.

Definition at line 197 of file uwal.cpp.

◆ recvSyncClMsg()

int Uwal::recvSyncClMsg ( ClMessage *  m)
virtual

Method to handle the reception of a synchronous crosslayer message.

Parameters
mpointer to the crosslayer message.
Returns
0 if seccess

Definition at line 577 of file uwal.cpp.

◆ startRx()

void Uwal::startRx ( Packet *  p)
protectedvirtual

Method to start a packet reception.

This method is also in charge to send a cross layer message Phy2MacStartRx(p) to notify the above layers of the simulator about the start of a reception, see http://telecom.dei.unipd.it/ns/miracle/doxygen/classMPhy.html#a15cc91b98013e1c631ad85072867ab6.

Parameters
ppointer to the last received packet.

Definition at line 728 of file uwal.cpp.

◆ startTx()

void Uwal::startTx ( Packet *  p)
protectedvirtual

Method to start the packet transmission.

Parameters
ppointer to the packet to be transmitted.

Definition at line 707 of file uwal.cpp.

Friends And Related Symbol Documentation

◆ TxFrameTimer

friend class TxFrameTimer
friend

Friend class used to implement the timer handler.

See also
TxFrameTimer

Definition at line 118 of file uwal.h.

Member Data Documentation

◆ debug_

int Uwal::debug_
protected

String containing dummy characters to be used as padding chars if necessary.

Flag to enable debug mode (i.e., printing of debug messages) if set to 1.

Definition at line 171 of file uwal.h.

◆ dummyStr

string Uwal::dummyStr
protected

Definition at line 169 of file uwal.h.

◆ force_endTx_

int Uwal::force_endTx_
private

0 not force, otherwise force endTx

Definition at line 281 of file uwal.h.

◆ frame_padding

int Uwal::frame_padding
private

Flag to determine if perfoming bit padding up to PSDU size.

Definition at line 279 of file uwal.h.

◆ frame_set_validity

double Uwal::frame_set_validity
private

Time of validity of a frame set.

Definition at line 278 of file uwal.h.

◆ has_tap_clmsg

bool Uwal::has_tap_clmsg
private

True if received a ClMessage from uwTAP.

Definition at line 283 of file uwal.h.

◆ interframe_period

double Uwal::interframe_period
private

Time period [s] between two successive frame to be sent down.

Definition at line 276 of file uwal.h.

◆ InterframeTmr

TxFrameTimer Uwal::InterframeTmr
private

Object of the class TxFrameTimer.

Definition at line 275 of file uwal.h.

◆ nodeID

int Uwal::nodeID
protected

Node ID.

Definition at line 165 of file uwal.h.

◆ PERList

list<PERListElement> Uwal::PERList
protected

PER list (couple of ID of the node and Packet Error Rate associated )

Definition at line 181 of file uwal.h.

◆ pkt_counter

unsigned int Uwal::pkt_counter
protected

Counter for the pktID to set in TX.

Definition at line 166 of file uwal.h.

◆ pPacker

packer* Uwal::pPacker
protected

Pointer to the packer of the protocol headers.

Definition at line 167 of file uwal.h.

◆ PSDU

size_t Uwal::PSDU
protected

size of the PSDU

Definition at line 168 of file uwal.h.

◆ sendDownFrames

std::queue<Packet *> Uwal::sendDownFrames
protected

queue of the frames to send down

Definition at line 176 of file uwal.h.

◆ sendDownPkts

std::queue<Packet *> Uwal::sendDownPkts
protected

queue of the packet to send down to the modem

Definition at line 174 of file uwal.h.

◆ sendUpFrames

std::queue<Packet *> Uwal::sendUpFrames
protected

queue of the frames to send up to the upper protocols

Definition at line 177 of file uwal.h.

◆ sendUpFrameSet

std::map<RxFrameSetKey, RxFrameSet> Uwal::sendUpFrameSet
protected

map of the frames to send up

Definition at line 184 of file uwal.h.

◆ sendUpPkts

std::queue<Packet *> Uwal::sendUpPkts
protected

queue of the packets to send up to the upper protocols

Definition at line 179 of file uwal.h.


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