DESERT 4.0.0
UwElectroMagneticChannel Class Reference

#include <uwem-channel.h>

Inheritance diagram for UwElectroMagneticChannel:
Inheritance graph
Collaboration diagram for UwElectroMagneticChannel:
Collaboration graph

Public Member Functions

 UwElectroMagneticChannel ()
 
virtual ~UwElectroMagneticChannel ()
 
virtual void recv (Packet *p, ChSAP *chsap)
 
virtual int command (int argc, const char *const *argv)
 

Protected Member Functions

virtual double getPropDelay (Position *s, Position *d)
 
void sendUpPhy (Packet *p, ChSAP *chsap)
 

Protected Attributes

double refractive_index
 
double speed_of_light
 

Detailed Description

UwElectroMagneticChannel extends Miracle channel class and implements the underwater optical channel

Constructor & Destructor Documentation

◆ UwElectroMagneticChannel()

UwElectroMagneticChannel::UwElectroMagneticChannel ( )

Constructor of UwElectroMagneticChannel class.

References refractive_index, and speed_of_light.

◆ ~UwElectroMagneticChannel()

virtual UwElectroMagneticChannel::~UwElectroMagneticChannel ( )
inlinevirtual

Destructor of UwElectroMagneticChannel class.

Member Function Documentation

◆ command()

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

◆ getPropDelay()

double UwElectroMagneticChannel::getPropDelay ( Position *  s,
Position *  d 
)
protectedvirtual

Returns the underwater optical propagation delay between the two given Position pointers.

Parameters
Position*s pointer to the first Position object
Position*d pointer to the second Position object
Returns
underwater optical propagation delay [s]

References speed_of_light.

Referenced by sendUpPhy().

◆ recv()

void UwElectroMagneticChannel::recv ( Packet *  p,
ChSAP *  chsap 
)
virtual

Performs the reception of packets from upper and lower layers.

Parameters
Packet*Pointer to the packet received.
ChSAP*Pointer to the channel Service Access Point (SAP)

References sendUpPhy().

Here is the call graph for this function:

◆ sendUpPhy()

void UwElectroMagneticChannel::sendUpPhy ( Packet *  p,
ChSAP *  chsap 
)
protected

Sends the given Packet* to the upper PHY layer

Parameters
Packet*Pointer to the packet received.
ChSAP*Pointer to the channel Service Access Point (SAP)

References getPropDelay().

Referenced by recv().

Here is the call graph for this function:

Member Data Documentation

◆ refractive_index

double UwElectroMagneticChannel::refractive_index
protected

refractive index of the underwater medium.

Referenced by UwElectroMagneticChannel().

◆ speed_of_light

double UwElectroMagneticChannel::speed_of_light
protected

Speed of light in the underwater medium.

Referenced by getPropDelay(), and UwElectroMagneticChannel().


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