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

#include <uw-phy-WakeUp.h>

Inheritance diagram for MPhy_WakeUp:
Collaboration diagram for MPhy_WakeUp:

Public Member Functions

 MPhy_WakeUp ()
 
virtual ~MPhy_WakeUp ()
 
virtual int getModulationType (Packet *)
 
virtual double getTxDuration (Packet *p)
 
virtual double getPER (double snr, int nbits)
 
virtual int getDroppedPktsTxPending ()
 
virtual int command (int argc, const char *const *argv)
 

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 getNoisePower (Packet *p)
 
virtual MSpectralMask * getTxSpectralMask (Packet *p)
 
virtual void dropPacket (Packet *p)
 
void incrDroppedPktsTxPending ()
 
virtual void waitForUser ()
 

Protected Attributes

Packet * PktRx
 
bool txActive
 
double AcquisitionThreshold_dB_
 
double ToneDuration_
 
double MaxTxRange_
 
int droppedPktsTxPending
 

Static Protected Attributes

static bool initialized = false
 
static int modid = -1
 

Detailed Description

Class that describes the WakeUp PHY layer for T-LOHI MAC protocol.

Definition at line 52 of file uw-phy-WakeUp.h.

Constructor & Destructor Documentation

◆ MPhy_WakeUp()

MPhy_WakeUp::MPhy_WakeUp ( )

Class contructor.

Definition at line 106 of file uw-phy-WakeUp.cpp.

◆ ~MPhy_WakeUp()

MPhy_WakeUp::~MPhy_WakeUp ( )
virtual

Class destructor.

Definition at line 120 of file uw-phy-WakeUp.cpp.

Member Function Documentation

◆ command()

int MPhy_WakeUp::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 successfully or not.

Definition at line 125 of file uw-phy-WakeUp.cpp.

◆ dropPacket()

void MPhy_WakeUp::dropPacket ( Packet *  p)
protectedvirtual

Drops a packet.

Parameters
Packet*pointer to the packet to drop

Definition at line 443 of file uw-phy-WakeUp.cpp.

◆ endRx()

void MPhy_WakeUp::endRx ( Packet *  p)
protectedvirtual

Notify to the MAC protocol that the reception is finished and send the packet to it.

Parameters
Packet*pointer ot the packet received

Definition at line 316 of file uw-phy-WakeUp.cpp.

◆ endTx()

void MPhy_WakeUp::endTx ( Packet *  p)
protectedvirtual

Notify to the MAC protocol that the transmission has been finished.

Parameters
Packet*pointer to the packet just transmitted

Definition at line 210 of file uw-phy-WakeUp.cpp.

◆ getDroppedPktsTxPending()

virtual int MPhy_WakeUp::getDroppedPktsTxPending ( )
inlinevirtual

Gets the number of Tx Pending dropped packets.

Returns
Number of Tx Pending dropped packets

Definition at line 92 of file uw-phy-WakeUp.h.

◆ getModulationType()

int MPhy_WakeUp::getModulationType ( Packet *  )
virtual

Returns the Modulation type.

Parameters
Packet*pointer to the packet where get the modulation
Returns
type of the modulation

Definition at line 140 of file uw-phy-WakeUp.cpp.

◆ getNoisePower()

double MPhy_WakeUp::getNoisePower ( Packet *  p)
protectedvirtual

Returns the Power of the noise for a packet.

Parameters
Packet*pointer to the packet where compute the noise
Returns
Noise power in dB

Definition at line 147 of file uw-phy-WakeUp.cpp.

◆ getPER()

double MPhy_WakeUp::getPER ( double  snr,
int  nbits 
)
virtual

Returns the PER for a certain SNR and a dimension of packet.

Parameters
doubleSNR
intnbits, dimension of the packet in bit
Returns
PER

Definition at line 466 of file uw-phy-WakeUp.cpp.

◆ getTxDuration()

virtual double MPhy_WakeUp::getTxDuration ( Packet *  p)
inlinevirtual

Returns the duration of the transmission for the specified packet.

Parameters
Packet*pointer to the packet in which compute the Tx Duration
Returns
duration of the Tone

Definition at line 76 of file uw-phy-WakeUp.h.

◆ getTxSpectralMask()

MSpectralMask * MPhy_WakeUp::getTxSpectralMask ( Packet *  p)
protectedvirtual

Gets the Transmission Spectral Mask for the Packet p.

Parameters
Packet*pointer to the packet where get the Spectral Mask
Returns
the pointer of an Object of MSpectralMask that indicates the type of Spectral Mask adopted

Definition at line 176 of file uw-phy-WakeUp.cpp.

◆ incrDroppedPktsTxPending()

void MPhy_WakeUp::incrDroppedPktsTxPending ( )
inlineprotected

Increases the number of packet dropped.

Definition at line 152 of file uw-phy-WakeUp.h.

◆ startRx()

void MPhy_WakeUp::startRx ( Packet *  p)
protectedvirtual

Notify to the MAC protocol the start of a reception.

Parameters
Packet*pointer to the packet in reception

Definition at line 218 of file uw-phy-WakeUp.cpp.

◆ startTx()

void MPhy_WakeUp::startTx ( Packet *  p)
protectedvirtual

Starts to transmit a Packet.

Parameters
Packet*pointer to the packet to transmit

Definition at line 182 of file uw-phy-WakeUp.cpp.

◆ waitForUser()

void MPhy_WakeUp::waitForUser ( )
protectedvirtual

Used for debug purposes.

Permit a step-by-step behaviour of the PHY layer

Definition at line 474 of file uw-phy-WakeUp.cpp.

Member Data Documentation

◆ AcquisitionThreshold_dB_

double MPhy_WakeUp::AcquisitionThreshold_dB_
protected

How many dB over noise are required for a signal to trigger acquisition (i.e., a RX attempt)

Definition at line 170 of file uw-phy-WakeUp.h.

◆ droppedPktsTxPending

int MPhy_WakeUp::droppedPktsTxPending
protected

Total number of dropped pkts due to tx pending.

Definition at line 178 of file uw-phy-WakeUp.h.

◆ initialized

bool MPhy_WakeUp::initialized = false
staticprotected

used to register the modulation type only once

Definition at line 165 of file uw-phy-WakeUp.h.

◆ MaxTxRange_

double MPhy_WakeUp::MaxTxRange_
protected

Maximum Transmission Range.

Definition at line 176 of file uw-phy-WakeUp.h.

◆ modid

int MPhy_WakeUp::modid = -1
staticprotected

modulation type id

Definition at line 166 of file uw-phy-WakeUp.h.

◆ PktRx

Packet* MPhy_WakeUp::PktRx
protected

Pointer to the packeti in reception.

Definition at line 162 of file uw-phy-WakeUp.h.

◆ ToneDuration_

double MPhy_WakeUp::ToneDuration_
protected

predefined tone duration

Definition at line 174 of file uw-phy-WakeUp.h.

◆ txActive

bool MPhy_WakeUp::txActive
protected

Definition at line 167 of file uw-phy-WakeUp.h.


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