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

#include <uwhmmphysical.h>

Inheritance diagram for UnderwaterHMMPhysical:
Collaboration diagram for UnderwaterHMMPhysical:

Public Member Functions

 UnderwaterHMMPhysical ()
 
virtual ~UnderwaterHMMPhysical ()
 
virtual int command (int, const char *const *)
 
void setMCLink (int mac, MCLink *link)
 
int getPktsTotBad () const
 
int getPktsTotMedium () const
 
int getPktsTotGood () const
 
void incrTotPkts (MCLink::ChState ch_state)
 
- Public Member Functions inherited from UnderwaterPhysical
 UnderwaterPhysical ()
 
virtual ~UnderwaterPhysical ()
 
virtual void recv (Packet *)
 
int recvSyncClMsg (ClMessage *m)
 

Protected Member Functions

virtual void endRx (Packet *p) override
 
virtual double ber2per (double ber, Packet *p)
 
- Protected Member Functions inherited from UnderwaterPhysical
virtual void updateInstantaneousStats ()
 
virtual void endTx (Packet *p)
 
virtual void startRx (Packet *p)
 
virtual double consumedEnergyTx (const double &_duration)
 
virtual double consumedEnergyRx (const double &_duration)
 
virtual double getPER (double snr, int nbits, Packet *)
 
const bool isZero (const double &value) const
 
double Get_Tx_Time ()
 
double Get_Rx_Time ()
 
double Get_Energy_Tx ()
 
double Get_Energy_Rx ()
 
double Get_Transmitted_bytes ()
 
void incrTot_pkts_lost ()
 
void incrTotCrtl_pkts_lost ()
 
void incrErrorCtrlPktsInterf ()
 
void incrCollisionDATAvsCTRL ()
 
void incrCollisionCTRL ()
 
void incrCollisionDATA ()
 
int getTot_pkts_lost ()
 
int getTot_CtrlPkts_lost ()
 
int getError_CtrlPktsInterf ()
 
int getCollisionsDATAvsCTRL ()
 
int getCollisionsCTRL ()
 
int getCollisionsDATA ()
 
const double log2 (const double &_input) const
 
const double get_prob_error_symbol_mpsk (const double &_snr, const uint32_t _M) const
 

Protected Attributes

std::map< int, MCLink * > link_map
 
int pkts_tot_good
 
int pkts_tot_medium
 
int pkts_tot_bad
 
- Protected Attributes inherited from UnderwaterPhysical
std::string modulation_name_
 
double time_ready_to_end_rx_
 
double Tx_Time_
 
double Rx_Time_
 
double Energy_Tx_
 
double Energy_Rx_
 
double Transmitted_bytes_
 
double tx_power_
 
double rx_power_
 
int tot_pkts_lost
 
int tot_ctrl_pkts_lost
 
int errorCtrlPktsInterf
 
int collisionDataCTRL
 
int collisionCTRL
 
int collisionDATA
 
std::string Interference_Model
 
uwinterferenceinterference_
 

Detailed Description

UnderwaterHMMPhysical models an hidden Markov Model phy channel.

Definition at line 84 of file uwhmmphysical.h.

Constructor & Destructor Documentation

◆ UnderwaterHMMPhysical()

UnderwaterHMMPhysical::UnderwaterHMMPhysical ( )

Constructor of UnderwaterHMMPhysical class.

Definition at line 83 of file uwhmmphysical.cpp.

◆ ~UnderwaterHMMPhysical()

UnderwaterHMMPhysical::~UnderwaterHMMPhysical ( )
virtual

Destructor of UnderwaterHMMPhysical class.

Definition at line 93 of file uwhmmphysical.cpp.

Member Function Documentation

◆ ber2per()

double UnderwaterHMMPhysical::ber2per ( double  ber,
Packet *  p 
)
protectedvirtual

Returns the packet error rate by using the BER from HMM and the size of a packet.

Parameters
beraccording to HMM state
pPacket
Returns
PER of the packet.

Definition at line 290 of file uwhmmphysical.cpp.

◆ command()

int UnderwaterHMMPhysical::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.

Reimplemented from UnderwaterPhysical.

Definition at line 100 of file uwhmmphysical.cpp.

◆ endRx()

void UnderwaterHMMPhysical::endRx ( Packet *  p)
overrideprotectedvirtual

Handles the end of a packet reception.

Parameters
Packet*p Pointer to the packet received

Reimplemented from UnderwaterPhysical.

Definition at line 143 of file uwhmmphysical.cpp.

◆ getPktsTotBad()

int UnderwaterHMMPhysical::getPktsTotBad ( ) const
inline
Returns
the number of packets sent with bad channel

Definition at line 122 of file uwhmmphysical.h.

◆ getPktsTotGood()

int UnderwaterHMMPhysical::getPktsTotGood ( ) const
inline
Returns
the number of packets sent with good channel

Definition at line 140 of file uwhmmphysical.h.

◆ getPktsTotMedium()

int UnderwaterHMMPhysical::getPktsTotMedium ( ) const
inline
Returns
the number of packets sent with medium channel

Definition at line 131 of file uwhmmphysical.h.

◆ incrTotPkts()

void UnderwaterHMMPhysical::incrTotPkts ( MCLink::ChState  ch_state)
inline

increase the counter of packets sent taking into account the channel state

Definition at line 150 of file uwhmmphysical.h.

◆ setMCLink()

void UnderwaterHMMPhysical::setMCLink ( int  mac,
MCLink link 
)

Adds the Markov Chain transition matrix for each source MAC.

Parameters
macMAC of the transmitting node
linkPointer to associated MCLink

Definition at line 136 of file uwhmmphysical.cpp.

Member Data Documentation

◆ link_map

std::map<int, MCLink*> UnderwaterHMMPhysical::link_map
protected

maps source mac to associated MCLink

Definition at line 183 of file uwhmmphysical.h.

◆ pkts_tot_bad

int UnderwaterHMMPhysical::pkts_tot_bad
protected

Total number of packets arrived with bad channel.

Definition at line 186 of file uwhmmphysical.h.

◆ pkts_tot_good

int UnderwaterHMMPhysical::pkts_tot_good
protected

Total number of packets arrived with good channel.

Definition at line 184 of file uwhmmphysical.h.

◆ pkts_tot_medium

int UnderwaterHMMPhysical::pkts_tot_medium
protected

Total number of packets arrived with medium channel.

Definition at line 185 of file uwhmmphysical.h.


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