Public Member Functions | Static Public Member Functions | Protected Member Functions

ns3::UanPhyDual Class Reference

#include <uan-phy-dual.h>

Inheritance diagram for ns3::UanPhyDual:
Inheritance graph
[legend]
Collaboration diagram for ns3::UanPhyDual:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void SendPacket (Ptr< Packet > pkt, uint32_t modeNum)
virtual void RegisterListener (UanPhyListener *listener)
 Register a class to receive phy state change notifications.
virtual void StartRxPacket (Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp)
 Packet arriving from channel: i.e. leading bit of packet has arrived.
virtual void SetReceiveOkCallback (RxOkCallback cb)
virtual void SetReceiveErrorCallback (RxErrCallback cb)
virtual void SetRxGainDb (double gain)
virtual void SetTxPowerDb (double txpwr)
virtual void SetRxThresholdDb (double thresh)
virtual void SetCcaThresholdDb (double thresh)
virtual double GetRxGainDb (void)
virtual double GetTxPowerDb (void)
virtual double GetRxThresholdDb (void)
virtual double GetCcaThresholdDb (void)
virtual bool IsStateIdle (void)
virtual bool IsStateBusy (void)
virtual bool IsStateRx (void)
virtual bool IsStateTx (void)
virtual bool IsStateCcaBusy (void)
virtual Ptr< UanChannelGetChannel (void) const
virtual Ptr< UanNetDeviceGetDevice (void)
virtual void SetChannel (Ptr< UanChannel > channel)
virtual void SetDevice (Ptr< UanNetDevice > device)
virtual void SetMac (Ptr< UanMac > mac)
virtual void NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)
virtual void NotifyIntChange (void)
virtual void SetTransducer (Ptr< UanTransducer > trans)
virtual Ptr< UanTransducerGetTransducer (void)
virtual uint32_t GetNModes (void)
virtual UanTxMode GetMode (uint32_t n)
virtual void Clear (void)
bool IsPhy1Idle (void)
bool IsPhy2Idle (void)
bool IsPhy1Rx (void)
bool IsPhy2Rx (void)
bool IsPhy1Tx (void)
bool IsPhy2Tx (void)
double GetCcaThresholdPhy1 (void) const
double GetCcaThresholdPhy2 (void) const
void SetCcaThresholdPhy1 (double thresh)
void SetCcaThresholdPhy2 (double thresh)
double GetTxPowerDbPhy1 (void) const
double GetTxPowerDbPhy2 (void) const
void SetTxPowerDbPhy1 (double)
void SetTxPowerDbPhy2 (double)
double GetRxGainDbPhy1 (void) const
double GetRxGainDbPhy2 (void) const
void SetRxGainDbPhy1 (double gain)
void SetRxGainDbPhy2 (double gain)
UanModesList GetModesPhy1 (void) const
UanModesList GetModesPhy2 (void) const
void SetModesPhy1 (UanModesList modes)
void SetModesPhy2 (UanModesList modes)
Ptr< UanPhyPerGetPerModelPhy1 (void) const
Ptr< UanPhyPerGetPerModelPhy2 (void) const
void SetPerModelPhy1 (Ptr< UanPhyPer > per)
void SetPerModelPhy2 (Ptr< UanPhyPer > per)
Ptr< UanPhyCalcSinrGetSinrModelPhy1 (void) const
Ptr< UanPhyCalcSinrGetSinrModelPhy2 (void) const
void SetSinrModelPhy1 (Ptr< UanPhyCalcSinr > calcSinr)
void SetSinrModelPhy2 (Ptr< UanPhyCalcSinr > calcSinr)
Ptr< PacketGetPhy1PacketRx (void) const
Ptr< PacketGetPhy2PacketRx (void) const
Ptr< PacketGetPacketRx (void) const

Static Public Member Functions

static TypeId GetTypeId ()
 This method returns the TypeId associated to ns3::UanPhyDual.

Protected Member Functions

virtual void DoDispose ()

Detailed Description

A class that wraps two generic UAN Phy layers (UanPhyGen) into a single PHY. This is used to simulate two receivers (and transmitters) that use the same front end hardware. When attached to a UanTransducerHd, this results in a net device able to transmit on one or two channels simultaneously or receive on one or two channels simultaneously but that cannot transmit and receive simultaneously.

Many of the standard PHY functions here become ambiguous. In most cases information for "Phy1" are returned.


Member Function Documentation

virtual void ns3::UanPhyDual::Clear ( void   )  [virtual]

Clears all pointer references

Implements ns3::UanPhy.

virtual void ns3::UanPhyDual::DoDispose (  )  [protected, virtual]

This method is called by Object::Dispose or by the object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.

It is safe to call GetObject from within this method.

Reimplemented from ns3::Object.

virtual double ns3::UanPhyDual::GetCcaThresholdDb ( void   )  [virtual]
Returns:
Threshold signal strength in dB to enter CCA busy mode

Implements ns3::UanPhy.

double ns3::UanPhyDual::GetCcaThresholdPhy1 ( void   )  const
Returns:
Clear channel assessment threshold of Phy1
double ns3::UanPhyDual::GetCcaThresholdPhy2 ( void   )  const
Returns:
Clear channel assessment threshold of Phy2
virtual Ptr<UanChannel> ns3::UanPhyDual::GetChannel ( void   )  const [virtual]
Returns:
Channel this phy is attached to

Implements ns3::UanPhy.

virtual Ptr<UanNetDevice> ns3::UanPhyDual::GetDevice ( void   )  [virtual]
Returns:
the Net Device that this Phy is a part of

Implements ns3::UanPhy.

virtual UanTxMode ns3::UanPhyDual::GetMode ( uint32_t  n  )  [virtual]
Parameters:
n Mode number of mode to return (place in Modeslist)
Returns:
Mode n

Implements ns3::UanPhy.

UanModesList ns3::UanPhyDual::GetModesPhy1 ( void   )  const
Returns:
List of available modes on Phy1
UanModesList ns3::UanPhyDual::GetModesPhy2 ( void   )  const
Returns:
List of available modes on Phy2
virtual uint32_t ns3::UanPhyDual::GetNModes ( void   )  [virtual]
Returns:
Number of TX modes supported by this PHY

Implements ns3::UanPhy.

Ptr<Packet> ns3::UanPhyDual::GetPacketRx ( void   )  const [virtual]
Returns:
Packet currenty being received on Phy1 (Null Ptr if none)

Implements ns3::UanPhy.

Ptr<UanPhyPer> ns3::UanPhyDual::GetPerModelPhy1 ( void   )  const
Returns:
Ptr to PER model for Phy1
Ptr<UanPhyPer> ns3::UanPhyDual::GetPerModelPhy2 ( void   )  const
Returns:
Ptr to PER model for Phy2
Ptr<Packet> ns3::UanPhyDual::GetPhy1PacketRx ( void   )  const
Returns:
Packet currently being received on Phy1 (Null Ptr if none)
Ptr<Packet> ns3::UanPhyDual::GetPhy2PacketRx ( void   )  const
Returns:
Packet currently being received on Phy2 (Null Ptr if none)
virtual double ns3::UanPhyDual::GetRxGainDb ( void   )  [virtual]
Returns:
Gain added to signal at receiver in dB

Implements ns3::UanPhy.

double ns3::UanPhyDual::GetRxGainDbPhy1 ( void   )  const
Returns:
RX gain of Phy1 in dB
double ns3::UanPhyDual::GetRxGainDbPhy2 ( void   )  const
Returns:
RX gain of Phy2 in dB
virtual double ns3::UanPhyDual::GetRxThresholdDb ( void   )  [virtual]
Returns:
Required signal strength, in dB, to begin receiving packet

Implements ns3::UanPhy.

Ptr<UanPhyCalcSinr> ns3::UanPhyDual::GetSinrModelPhy1 ( void   )  const
Returns:
Ptr to SINR model for Phy1
Ptr<UanPhyCalcSinr> ns3::UanPhyDual::GetSinrModelPhy2 ( void   )  const
Returns:
Ptr to SINR model for Phy2
virtual Ptr<UanTransducer> ns3::UanPhyDual::GetTransducer ( void   )  [virtual]
Returns:
Transducer this Phy outputs to / receives from

Implements ns3::UanPhy.

virtual double ns3::UanPhyDual::GetTxPowerDb ( void   )  [virtual]
Returns:
Current TX power output

Implements ns3::UanPhy.

double ns3::UanPhyDual::GetTxPowerDbPhy1 ( void   )  const
Returns:
Current TX power setting of Phy 1 in dB
double ns3::UanPhyDual::GetTxPowerDbPhy2 ( void   )  const
Returns:
Current TX power setting of Phy 2 in dB
static TypeId ns3::UanPhyDual::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::UanPhyDual.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/NoiseModel/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/PropagationModel/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Mac/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Phy/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Transducer/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/NoiseModel/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/PropagationModel/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/NoiseModel/$ns3::UanPhyDual
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/PropagationModel/$ns3::UanPhyDual

Attributes defined for this type:

  • CcaThresholdPhy1: Aggregate energy of incoming signals to move to CCA Busy state dB of Phy1
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 10
    • Flags: construct write read
  • CcaThresholdPhy2: Aggregate energy of incoming signals to move to CCA Busy state dB of Phy2
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 10
    • Flags: construct write read
  • TxPowerPhy1: Transmission output power in dB of Phy1
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 190
    • Flags: construct write read
  • TxPowerPhy2: Transmission output power in dB of Phy2
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 190
    • Flags: construct write read
  • RxGainPhy1: Gain added to incoming signal at receiver of Phy1
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • RxGainPhy2: Gain added to incoming signal at receiver of Phy2
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • SupportedModesPhy1: List of modes supported by Phy1
    • Set with class: UanModesListValue
    • Underlying type: UanModesList
    • Initial value: 2|0|1|
    • Flags: construct write read
  • SupportedModesPhy2: List of modes supported by Phy2
    • Set with class: UanModesListValue
    • Underlying type: UanModesList
    • Initial value: 2|0|1|
    • Flags: construct write read
  • PerModelPhy1: Functor to calculate PER based on SINR and TxMode for Phy1
  • PerModelPhy2: Functor to calculate PER based on SINR and TxMode for Phy2
  • SinrModelPhy1: Functor to calculate SINR based on pkt arrivals and modes for Phy1
  • SinrModelPhy2: Functor to calculate SINR based on pkt arrivals and modes for Phy2

TraceSources defined for this type:

  • RxOk: A packet was received successfully
  • RxError: A packet was received unsuccessfully
  • Tx: Packet transmission beginning

Reimplemented from ns3::Object.

bool ns3::UanPhyDual::IsPhy1Idle ( void   ) 

/returns True if Phy1 is Idle

bool ns3::UanPhyDual::IsPhy1Rx ( void   ) 

/returns True if Phy1 is currently in RX mode

bool ns3::UanPhyDual::IsPhy1Tx ( void   ) 

/returns True if Phy1 is in TX mode

bool ns3::UanPhyDual::IsPhy2Idle ( void   ) 

/returns True if Phy2 is Idle

bool ns3::UanPhyDual::IsPhy2Rx ( void   ) 

/returns True if Phy2 is currently in RX mode

bool ns3::UanPhyDual::IsPhy2Tx ( void   ) 

/returns True if Phy2 is in TX mode

virtual bool ns3::UanPhyDual::IsStateBusy ( void   )  [virtual]
Returns:
True if Phy is not IDLE

Implements ns3::UanPhy.

virtual bool ns3::UanPhyDual::IsStateCcaBusy ( void   )  [virtual]
Returns:
True if Phy is not TX or RX but the channel is sensed busy

Implements ns3::UanPhy.

virtual bool ns3::UanPhyDual::IsStateIdle ( void   )  [virtual]
Returns:
True if Phy is IDLE

Implements ns3::UanPhy.

virtual bool ns3::UanPhyDual::IsStateRx ( void   )  [virtual]
Returns:
True if Phy is currently in receive mode

Implements ns3::UanPhy.

virtual bool ns3::UanPhyDual::IsStateTx ( void   )  [virtual]
Returns:
True if Phy is busy transmitting

Implements ns3::UanPhy.

virtual void ns3::UanPhyDual::NotifyIntChange ( void   )  [virtual]

Function called when there has been a change in the ammount of interference this node is experiencing from other transmissions

Implements ns3::UanPhy.

virtual void ns3::UanPhyDual::NotifyTransStartTx ( Ptr< Packet packet,
double  txPowerDb,
UanTxMode  txMode 
) [virtual]
Parameters:
packet Packet that is beginning transmission
txPowerDb Transmit power of packet
txMode Transmission mode of packet

Notification that there is a transmission beginning on the transducer that this Phy is attached to.

Implements ns3::UanPhy.

virtual void ns3::UanPhyDual::RegisterListener ( UanPhyListener listener  )  [virtual]

Register a class to receive phy state change notifications.

Parameters:
listener Class derived from UanPhyListener to receive notifications

Note that, from UanPhyDual, you may receive duplicate messages as underneath there are two generic phys here. Each will notify of state changes independently.

Implements ns3::UanPhy.

virtual void ns3::UanPhyDual::SendPacket ( Ptr< Packet pkt,
uint32_t  modeNum 
) [virtual]
Parameters:
pkt Packet to transmit
modeNum Index of mode in SupportedModes list to use for transmission

Implements ns3::UanPhy.

virtual void ns3::UanPhyDual::SetCcaThresholdDb ( double  thresh  )  [virtual]
Parameters:
thresh Signal power at receiver required for CCA busy state

Implements ns3::UanPhy.

void ns3::UanPhyDual::SetCcaThresholdPhy1 ( double  thresh  ) 
Parameters:
thresh Signal power threshold in dB to set Phy1 to
void ns3::UanPhyDual::SetCcaThresholdPhy2 ( double  thresh  ) 
Parameters:
thresh Signal power threshold in dB to set Phy2 to
virtual void ns3::UanPhyDual::SetChannel ( Ptr< UanChannel channel  )  [virtual]
Parameters:
channel The channel this Phy is attached to

Implements ns3::UanPhy.

virtual void ns3::UanPhyDual::SetDevice ( Ptr< UanNetDevice device  )  [virtual]
Parameters:
device The Net Device this Phy is a part of

Implements ns3::UanPhy.

virtual void ns3::UanPhyDual::SetMac ( Ptr< UanMac mac  )  [virtual]
Parameters:
mac The MAC forwarding messages to this Phy

Implements ns3::UanPhy.

void ns3::UanPhyDual::SetModesPhy1 ( UanModesList  modes  ) 
Parameters:
modes List of modes to use on Phy1 (index corresponds to mode #)
void ns3::UanPhyDual::SetModesPhy2 ( UanModesList  modes  ) 
Parameters:
modes List of modes to use on Phy2 (index corresponds to mode #)
void ns3::UanPhyDual::SetPerModelPhy1 ( Ptr< UanPhyPer per  ) 
Parameters:
per Ptr to PER model to use on Phy1
void ns3::UanPhyDual::SetPerModelPhy2 ( Ptr< UanPhyPer per  ) 
Parameters:
per Ptr to PER model to use on Phy2
virtual void ns3::UanPhyDual::SetRxGainDb ( double  gain  )  [virtual]
Parameters:
gain Gain added at receiver

Implements ns3::UanPhy.

void ns3::UanPhyDual::SetRxGainDbPhy1 ( double  gain  ) 
Parameters:
gain value in dB to apply to RX gain of Phy1
void ns3::UanPhyDual::SetRxGainDbPhy2 ( double  gain  ) 
Parameters:
gain value in dB to apply to RX gain of Phy2
virtual void ns3::UanPhyDual::SetRxThresholdDb ( double  thresh  )  [virtual]
Parameters:
thresh Threshold SINR for propper reception in dB

Implements ns3::UanPhy.

void ns3::UanPhyDual::SetSinrModelPhy1 ( Ptr< UanPhyCalcSinr calcSinr  ) 
Parameters:
calcSinr Ptr to SINR model to use on Phy1
void ns3::UanPhyDual::SetSinrModelPhy2 ( Ptr< UanPhyCalcSinr calcSinr  ) 
Parameters:
calcSinr Ptr to SINR model to use on Phy2
virtual void ns3::UanPhyDual::SetTransducer ( Ptr< UanTransducer trans  )  [virtual]
Parameters:
trans Transducer this Phy outputs to / receives from

Implements ns3::UanPhy.

virtual void ns3::UanPhyDual::SetTxPowerDb ( double  txpwr  )  [virtual]
Parameters:
txpwr Final output transmission power in dB

Implements ns3::UanPhy.

void ns3::UanPhyDual::SetTxPowerDbPhy1 ( double   ) 
Returns:
TX power setting of Phy1 in dB
void ns3::UanPhyDual::SetTxPowerDbPhy2 ( double   ) 
Returns:
TX power setting of Phy2 in dB
virtual void ns3::UanPhyDual::StartRxPacket ( Ptr< Packet pkt,
double  rxPowerDb,
UanTxMode  txMode,
UanPdp  pdp 
) [virtual]

Packet arriving from channel: i.e. leading bit of packet has arrived.

Parameters:
pkt Packet which is arriving
rxPowerDb Signal power of incoming packet in dB
txMode Transmission mode defining modulation of incoming packet
pdp Power delay profile of incoming packet

Implements ns3::UanPhy.


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