Public Types | Public Member Functions | Static Public Member Functions

ns3::HalfDuplexIdealPhy Class Reference

#include <half-duplex-ideal-phy.h>

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

List of all members.

Public Types

enum  State { IDLE, TX, RX }

Public Member Functions

void SetChannel (Ptr< SpectrumChannel > c)
void SetMobility (Ptr< Object > m)
void SetDevice (Ptr< Object > d)
Ptr< ObjectGetMobility ()
Ptr< ObjectGetDevice ()
Ptr< const SpectrumModelGetRxSpectrumModel () const
void StartRx (Ptr< PacketBurst > p, Ptr< const SpectrumValue > rxPsd, SpectrumType st, Time duration)
SpectrumType GetSpectrumType ()
void SetTxPowerSpectralDensity (Ptr< SpectrumValue > txPsd)
void SetNoisePowerSpectralDensity (Ptr< const SpectrumValue > noisePsd)
bool StartTx (Ptr< Packet > p)
void SetRate (DataRate rate)
DataRate GetRate () const
void SetPhyMacTxEndCallback (PhyMacTxEndCallback c)
void SetPhyMacRxStartCallback (PhyMacRxStartCallback c)
void SetPhyMacRxEndErrorCallback (PhyMacRxEndErrorCallback c)
void SetPhyMacRxEndOkCallback (PhyMacRxEndOkCallback c)

Static Public Member Functions

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

Detailed Description

This PHY layer implementation realizes an ideal OFDM PHY which transmits half-duplex (i.e., it can either receive or transmit at a given time). The device is ideal in the sense that: 1) it uses an error model based on the Shannon capacity, which assumes ideal channel coding; 2) it uses ideal signal acquisition, i.e., preamble detection and synchronization are always successful 3) it has no PHY layer overhead

Being half duplex, if a RX is ongoing but a TX is requested, the RX is aborted and the TX is started. Of course, no RX can be performed while there is an ongoing TX.

The use of OFDM is modeled by means of the Spectrum framework. By calling the method SetTxPowerSpectralDensity(), the user can specify how much of the spectrum is used, how many subcarriers are used, and what power is allocated to each subcarrier.

The user can also specify the PHY rate at which communications take place by using SetRate(). This is equivalent to choosing a particular modulation and coding scheme.

The use of the ShannonSpectrumErrorModel allows us to account for the following aspects in determining whether a transmission is successful or not:


Member Enumeration Documentation

PHY states


Member Function Documentation

Ptr<Object> ns3::HalfDuplexIdealPhy::GetDevice (  )  [virtual]

get the associated NetDevice instance

Returns:
a Ptr to the associated NetDevice instance

Implements ns3::SpectrumPhy.

Ptr<Object> ns3::HalfDuplexIdealPhy::GetMobility (  )  [virtual]

get the associated MobilityModel instance

Returns:
a Ptr to the associated NetDevice instance

Implements ns3::SpectrumPhy.

DataRate ns3::HalfDuplexIdealPhy::GetRate (  )  const
Returns:
the PHY rate used by this PHY.
Ptr<const SpectrumModel> ns3::HalfDuplexIdealPhy::GetRxSpectrumModel (  )  const [virtual]
Returns:
returns the SpectrumModel that this SpectrumPhy expects to be used for all SpectrumValues that are passed to StartRx. If 0 is returned, it means that any model will be accepted.

Implements ns3::SpectrumPhy.

SpectrumType ns3::HalfDuplexIdealPhy::GetSpectrumType (  ) 

Get the SpectrumType used by this PHY

Returns:
static TypeId ns3::HalfDuplexIdealPhy::GetTypeId ( void   )  [static]

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

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

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

Attributes defined for this type:

  • Rate: The PHY rate used by this device
    • Set with class: DataRateValue
    • Underlying type: DataRate
    • Initial value: 1000000bps
    • Flags: construct write read

TraceSources defined for this type:

  • TxStart: Trace fired when a new transmission is started
  • TxEnd: Trace fired when a previosuly started transmission is finished
  • RxStart: Trace fired when the start of a signal is detected
  • RxAbort: Trace fired when a previously started RX is aborted before time
  • RxEndOk: Trace fired when a previosuly started RX terminates successfully
  • RxEndError: Trace fired when a previosuly started RX terminates with an error (packet is corrupted)

Reimplemented from ns3::SpectrumPhy.

void ns3::HalfDuplexIdealPhy::SetChannel ( Ptr< SpectrumChannel c  )  [virtual]

Set the channel attached to this device.

Parameters:
c the channel

Implements ns3::SpectrumPhy.

void ns3::HalfDuplexIdealPhy::SetDevice ( Ptr< Object d  )  [virtual]

set the associated NetDevice instance

Parameters:
d the NetDevice instance

Implements ns3::SpectrumPhy.

void ns3::HalfDuplexIdealPhy::SetMobility ( Ptr< Object m  )  [virtual]

Set the mobility model associated with this device.

Parameters:
m the mobility model

Implements ns3::SpectrumPhy.

void ns3::HalfDuplexIdealPhy::SetNoisePowerSpectralDensity ( Ptr< const SpectrumValue noisePsd  ) 
Parameters:
noisePsd the Noise Power Spectral Density in power units (Watt, Pascal...) per Hz.
void ns3::HalfDuplexIdealPhy::SetPhyMacRxEndErrorCallback ( PhyMacRxEndErrorCallback  c  ) 

set the callback for the end of a RX in error, as part of the interconnections betweenthe PHY and the MAC

Parameters:
c the callback
void ns3::HalfDuplexIdealPhy::SetPhyMacRxEndOkCallback ( PhyMacRxEndOkCallback  c  ) 

set the callback for the successful end of a RX, as part of the interconnections betweenthe PHY and the MAC

Parameters:
c the callback
void ns3::HalfDuplexIdealPhy::SetPhyMacRxStartCallback ( PhyMacRxStartCallback  c  ) 

set the callback for the start of RX, as part of the interconnections betweenthe PHY and the MAC

Parameters:
c the callback
void ns3::HalfDuplexIdealPhy::SetPhyMacTxEndCallback ( PhyMacTxEndCallback  c  ) 

set the callback for the end of a TX, as part of the interconnections betweenthe PHY and the MAC

Parameters:
c the callback
void ns3::HalfDuplexIdealPhy::SetRate ( DataRate  rate  ) 

set the PHY rate to be used by this PHY.

Parameters:
rate 
void ns3::HalfDuplexIdealPhy::SetTxPowerSpectralDensity ( Ptr< SpectrumValue txPsd  ) 

set the Power Spectral Density of outgoing signals in power units (Watt, Pascal...) per Hz.

Parameters:
txPsd 
void ns3::HalfDuplexIdealPhy::StartRx ( Ptr< PacketBurst p,
Ptr< const SpectrumValue rxPsd,
SpectrumType  st,
Time  duration 
) [virtual]

Notify the SpectrumPhy instance of an incoming waveform

Parameters:
p the PacketBurst associated with the incoming waveform
rxPsd the Power Spectral Density of the incoming waveform. The units of the PSD are the same specified for SpectrumChannel::StartTx().
st spectrum type
duration the duration of the incoming waveform

Implements ns3::SpectrumPhy.

bool ns3::HalfDuplexIdealPhy::StartTx ( Ptr< Packet p  ) 

Start a transmission

Parameters:
p the packet to be transmitted
Returns:
true if an error occurred and the transmission was not started, false otherwise.

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