DESERT 4.0.0
UWMPhypatch Class Reference

#include <uwmphypatch.h>

Inheritance diagram for UWMPhypatch:
Inheritance graph
Collaboration diagram for UWMPhypatch:
Collaboration graph

Public Member Functions

 UWMPhypatch ()
 
 ~UWMPhypatch ()
 
virtual void recv (Packet *)
 

Protected Member Functions

virtual void startTx (Packet *p)
 
virtual void endTx (Packet *p)
 
virtual void startRx (Packet *p)
 
virtual void endRx (Packet *p)
 
virtual double getTxDuration (Packet *)
 
virtual int getModulationType (Packet *)
 

Private Attributes

int debug_
 

Detailed Description

Class to patch the absence of a PHY layer's module when we want to use a module of the MAC layer. This module just receive a packet and forward it to the layer below (or above) sending the required cross-layer messages to the MAC layer.

Constructor & Destructor Documentation

◆ UWMPhypatch()

UWMPhypatch::UWMPhypatch ( )

Class constructor.

References debug_.

◆ ~UWMPhypatch()

UWMPhypatch::~UWMPhypatch ( )

Class destructor.

Member Function Documentation

◆ endRx()

void UWMPhypatch::endRx ( Packet *  p)
protectedvirtual

Method to send a packet to the above layers after the finishing of a reception.

Parameters
ppointer to the last received packet.

Referenced by recv().

◆ endTx()

void UWMPhypatch::endTx ( Packet *  p)
protectedvirtual

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

Parameters
ppointer to the last transmitted packet.

Referenced by recv().

◆ getModulationType()

int UWMPhypatch::getModulationType ( Packet *  )
protectedvirtual

Unused method.

◆ getTxDuration()

double UWMPhypatch::getTxDuration ( Packet *  )
protectedvirtual

Unused method.

◆ recv()

void UWMPhypatch::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.

References endRx(), endTx(), startRx(), and startTx().

Here is the call graph for this function:

◆ startRx()

void UWMPhypatch::startRx ( Packet *  p)
protectedvirtual

Method 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.

Referenced by recv().

◆ startTx()

void UWMPhypatch::startTx ( Packet *  p)
protectedvirtual

Method to send the packet to be transmitted over the communication channel.

Parameters
ppointer to the packet to be transmitted.

Referenced by recv().

Member Data Documentation

◆ debug_

int UWMPhypatch::debug_
private

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

Referenced by UWMPhypatch().


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