UmtsPhy Class Reference

Inheritance diagram for UmtsPhy:

Inheritance graph
[legend]
Collaboration diagram for UmtsPhy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UmtsPhy ()
int command (int argc, const char *const *argv)
int getModulationType (Packet *)
double getTxDuration (Packet *p)
virtual double getDataRate ()

Protected Member Functions

void startTx (Packet *p)
void endTx (Packet *p)
void startRx (Packet *p)
void endRx (Packet *p)
double getTxPower (Packet *p)
virtual pcEntrygetPcEntry (int id)
virtual void addPcEntry (int id)
virtual void pcUpdateCmd (Packet *p)
virtual void pcUpdatePi (Packet *p)
virtual void pcReadCmd (Packet *p)
virtual double getPrAfterDeSpreading (Packet *p)
double sinr2ber (double)
virtual void calculateErrors (Packet *p)
virtual double getPacketErrorRate (Packet *p, double sinr)
virtual int getNumBits (Packet *p)

Protected Attributes

double chip_rate_
int spreading_factor_
 Chip Rate in chip/second.
int bits_per_symbol_
 Spreading Factor.
double coding_rate_
 Number of Bits per Symbol.
int coding_type_
 Coding Rate (e.g., 1/2, 1/3...).
double slot_duration_
 Type of code, e.g. CODE_CONVOLUTIONAL.
int code_id_
 Duration of a slot in seconds.
MSpectralMaskdl_smask_
 modulation type id
MSpectralMaskul_smask_
 downlink spectral mask
double alpha_
 uplink spectral mask
pcEntrypcTable_
 which is comprehensive of data and cotrol, it's value is 49/225
double maxTxPower_
 for each connection monitored
double minTxPower_
double pcStep_
 minimum value to be used as transmission power [W]
double SIRtarget_
 power control step [W], typically 1 dB
double PERtarget_
 SIRtarget value (fast power control algorithm).
int PowerCtrlUpdateCmdAtStartRx_
 Packet Error Rate value to be used to set the SIRtarget in the power control algorithm.
int PowerCtrlReadCmdAtStartRx_

Static Protected Attributes

static int code_id_counter = 0
static bool mod_initialized = false
static int modid = -1
 used to register the modulation type only once

Detailed Description

Definition at line 65 of file umts-phy.h.


Member Function Documentation

int UmtsPhy::command ( int  argc,
const char *const *  argv 
) [virtual]

TCL command parser

Parameters:
argc 
argv 
Returns:
TCL_OK or TCL_ERROR

Reimplemented from MPhy.

Reimplemented in UmtsPhyME.

Definition at line 112 of file umts-phy.cc.

References addPcEntry(), MPhy::command(), dl_smask_, getDataRate(), hdr_rlc::offset_, hdr_umtsphy::offset_, hdr_MPhy::offset_, PERtarget_, sinr2ber(), SIRtarget_, and ul_smask_.

Referenced by UmtsPhyME::command().

Here is the call graph for this function:

int UmtsPhy::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 388 of file umts-phy.cc.

References mod_initialized, and modid.

double UmtsPhy::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 395 of file umts-phy.cc.

References slot_duration_.

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

Reimplemented in UmtsPhyBS, and UmtsPhyME.

Definition at line 446 of file umts-phy.cc.

References hdr_umtsphy::bits_per_symbol, bits_per_symbol_, hdr_umtsphy::coding_rate, coding_rate_, hdr_umtsphy::coding_type, coding_type_, hdr_rlc::dst_rlc_id_, getPcEntry(), hdr_umtsphy::powerUp, pcEntry::powerUp_, Module::sendDown(), hdr_umtsphy::spreading_factor, and spreading_factor_.

Referenced by UmtsPhyME::startTx(), and UmtsPhyBS::startTx().

Here is the call graph for this function:

void UmtsPhy::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 464 of file umts-phy.cc.

void UmtsPhy::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 490 of file umts-phy.cc.

References pcReadCmd(), pcUpdateCmd(), PowerCtrlReadCmdAtStartRx_, and PowerCtrlUpdateCmdAtStartRx_.

Here is the call graph for this function:

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

Reimplemented in UmtsPhyBS, and UmtsPhyME.

Definition at line 547 of file umts-phy.cc.

References calculateErrors(), pcReadCmd(), pcUpdateCmd(), pcUpdatePi(), PowerCtrlReadCmdAtStartRx_, PowerCtrlUpdateCmdAtStartRx_, and Module::sendUp().

Referenced by UmtsPhyME::endRx(), and UmtsPhyBS::endRx().

Here is the call graph for this function:

double UmtsPhy::getTxPower ( Packet *  p  )  [protected, virtual]

Returns the transmission power for the packet being transmitted.

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

Parameters:
p packet being transmitted
Returns:
the transmission power in W

Reimplemented from MPhy.

Definition at line 403 of file umts-phy.cc.

References hdr_rlc::dst_rlc_id_, getPcEntry(), hdr_rlc::src_rlc_id_, and pcEntry::TxPower_.

Here is the call graph for this function:

void UmtsPhy::pcUpdateCmd ( Packet *  p  )  [protected, virtual]

we must use interference power measured for previous RX since at this point it is not determined for current RX moreover, Pr does still not include the effect of de-spreading at this point

we can use the interference power for current RX the effect of de-spreading at this point has already been taken into account

Definition at line 279 of file umts-phy.cc.

References code_id_, hdr_rlc::dst_rlc_id_, getPcEntry(), getPrAfterDeSpreading(), pcStep_, hdr_MPhy::Pi, pcEntry::Pi, hdr_MPhy::Pn, PowerCtrlUpdateCmdAtStartRx_, pcEntry::powerUp_, hdr_MPhy::Pr, hdr_MPhy::Pt, SIRtarget_, and hdr_rlc::src_rlc_id_.

Referenced by endRx(), and startRx().

Here is the call graph for this function:

void UmtsPhy::pcReadCmd ( Packet *  p  )  [protected, virtual]

unknown terminal, ignoring

Definition at line 330 of file umts-phy.cc.

References hdr_umtsphy::data, getPcEntry(), maxTxPower_, minTxPower_, pcStep_, hdr_umtsphy::powerUp, hdr_rlc::src_rlc_id_, and pcEntry::TxPower_.

Referenced by endRx(), and startRx().

Here is the call graph for this function:


Member Data Documentation

int UmtsPhy::code_id_counter = 0 [static, protected]

id of the code used for CDMA indicates the UL scrambling code id for the ME or the DL scramling code for the BS (Nodeb)

Definition at line 111 of file umts-phy.h.

Referenced by UmtsPhy().

bool UmtsPhy::mod_initialized = false [static, protected]

increments as each new ME/BS gets its own code upon creation

Definition at line 114 of file umts-phy.h.

Referenced by getModulationType(), and UmtsPhy().

pcEntry* UmtsPhy::pcTable_ [protected]

which is comprehensive of data and cotrol, it's value is 49/225

alpha_ is used to compute the signal power used for the data from the whole one

Definition at line 123 of file umts-phy.h.

Referenced by addPcEntry(), and getPcEntry().

double UmtsPhy::maxTxPower_ [protected]

for each connection monitored

table in which are stored the next power control command

Definition at line 125 of file umts-phy.h.

Referenced by addPcEntry(), pcReadCmd(), and UmtsPhy().

double UmtsPhy::minTxPower_ [protected]

UE side (uplink): 21 dBm (0.125 W) Node B side (downlink): 43 dBm (20 W)

Definition at line 128 of file umts-phy.h.

Referenced by pcReadCmd(), and UmtsPhy().

int UmtsPhy::PowerCtrlUpdateCmdAtStartRx_ [protected]

Packet Error Rate value to be used to set the SIRtarget in the power control algorithm.

If nonzero, SIR is estimated in startRx() using current RX power and previous interference power. If zero, SIR is estimated in endRx() using current RX and interference power. The zero setting yields a longer delay in the PC loop.

Definition at line 133 of file umts-phy.h.

Referenced by endRx(), pcUpdateCmd(), startRx(), and UmtsPhy().

int UmtsPhy::PowerCtrlReadCmdAtStartRx_ [protected]

If nonzero, parse Power Ctrl messages upon startRx(), otherwise (zero) parse them upon endRx(). The zero setting yields a longer delay in the PC loop.

Definition at line 144 of file umts-phy.h.

Referenced by endRx(), startRx(), and UmtsPhy().


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