MPhy_Bpsk Class Reference

Inheritance diagram for MPhy_Bpsk:

Inheritance graph
[legend]
Collaboration diagram for MPhy_Bpsk:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MPhy_Bpsk ()
virtual int getModulationType (Packet *)
virtual double getTxDuration (Packet *p)
virtual double getPER (double snr, int nbits)

Protected Member Functions

void startTx (Packet *p)
void endTx (Packet *p)
void startRx (Packet *p)
void endRx (Packet *p)

Protected Attributes

Packet * PktRx
double AcquisitionThreshold_dB_
 modulation type id
bool txPending

Static Protected Attributes

static bool initialized = false
 Packet the receiver is synchronized to for reception.
static int modid = -1
 used to register the modulation type only once

Detailed Description

Definition at line 40 of file bpsk.h.


Member Function Documentation

int MPhy_Bpsk::getModulationType ( Packet *  p  )  [virtual]

Get the modulation type to be used for the packet being transmitted. This method should be implemented by all derived classes

Parameters:
p the packet being transmitted
Returns:

Implements MPhy.

Definition at line 62 of file bpsk.cc.

References initialized, and modid.

double MPhy_Bpsk::getTxDuration ( Packet *  p  )  [virtual]

Returns the duration of the transmission for the packet being transmitted. Should account for modulation type, PHY overhead, and so on. This method is not implemented in the MPhy class, it must be implemented by each derived PHY class

The MPhy class evaluates this method just prior to starting the transmission of a packet.

Parameters:
p the packet being transmitted
Returns:
duration in s

Implements MPhy.

Definition at line 69 of file bpsk.cc.

References MSpectralMask::getBandwidth(), and hdr_MPhy::srcSpectralMask.

Here is the call graph for this function:

void MPhy_Bpsk::startTx ( Packet *  p  )  [protected, virtual]

Method invoked at the beginning of the transmission of a given packet. This method must be implemented by each class inheriting from the MPhy class. It should be used to set specific header fields of the particular PHY technology being implemented, such as the ModulationType in the MPhy packet header. Furthermore, each implementation of this method must take care of calling sendDown(p)

Parameters:
p the given packet

Implements MPhy.

Definition at line 99 of file bpsk.cc.

References PktRx, Module::sendDown(), and txPending.

Here is the call graph for this function:

void MPhy_Bpsk::endTx ( Packet *  p  )  [protected, virtual]

Method invoked at the end of the transmission of a given packet. This method must be implemented by each class inheriting from the MPhy class. No idea what this method might be useful for, however... probably most implementations will be fine with an empty body for it.

Parameters:
p the given packet

Implements MPhy.

Definition at line 109 of file bpsk.cc.

References MPhy::Phy2MacEndTx(), and txPending.

Here is the call graph for this function:

void MPhy_Bpsk::startRx ( Packet *  p  )  [protected, virtual]

Method invoked at the beginning of the reception of a given packet. This method must be implemented by each class inheriting from the MPhy class. It should be used to check synchronization on the transmission. The ModulationType is probably useful also for this purpose.

Parameters:
p the given packet

Implements MPhy.

Definition at line 118 of file bpsk.cc.

References AcquisitionThreshold_dB_, modid, hdr_MPhy::modulationType, MPhy::Phy2MacStartRx(), PktRx, hdr_MPhy::Pn, hdr_MPhy::Pr, and txPending.

Here is the call graph for this function:

void MPhy_Bpsk::endRx ( Packet *  p  )  [protected, virtual]

Method invoked at the end of the reception of a given packet. This method must be implemented by each class inheriting from the MPhy class.

Please note that this method is called for ALL incoming transmissions, that is even if the receiver was actually not synchronized on packet p. As a consequence, each implementation of this method should check if the receiver was actually synchronized on packet p.

Furthermore, reception errors should be evaluated within this method, and the appropriate action should be taken. It is left to the implementer to decide whether the packet should be dropped in case of errors, or whether some error flag (e.g., ch->error) should be set instead to let some upper layer (e.g., MAC) drop the packet by itself. The ModulationType is probably to be checked for, since even if SNIR is high it is not likely we can decode a modulation other the ones each Phy implementation was designed to decode.

Finally, each implementation of this method should take care to call sendUp(p) in case the reception of the packet was successful.

Parameters:
p the given packet

Implements MPhy.

Definition at line 156 of file bpsk.cc.

References getPER(), hdr_MPhy::Pi, PktRx, hdr_MPhy::Pn, hdr_MPhy::Pr, and Module::sendUp().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Nov 26 15:50:32 2008 for NS-MIRACLE library by  doxygen 1.5.2