Public Types | Public Member Functions | Static Public Member Functions

ns3::WimaxPhy Class Reference

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

List of all members.

Public Types

enum  ModulationType {
  MODULATION_TYPE_BPSK_12, MODULATION_TYPE_QPSK_12, MODULATION_TYPE_QPSK_34, MODULATION_TYPE_QAM16_12,
  MODULATION_TYPE_QAM16_34, MODULATION_TYPE_QAM64_23, MODULATION_TYPE_QAM64_34
}
enum  PhyState { PHY_STATE_IDLE, PHY_STATE_SCANNING, PHY_STATE_TX, PHY_STATE_RX }
enum  PhyType { SimpleWimaxPhy, simpleOfdmWimaxPhy }

Public Member Functions

void Attach (Ptr< WimaxChannel > channel)
Ptr< WimaxChannelGetChannel (void) const
void SetDevice (Ptr< WimaxNetDevice > device)
 Set the device in which this physical layer is installed.
Ptr< NetDeviceGetDevice (void) const
void SetReceiveCallback (Callback< void, Ptr< const PacketBurst > > callback)
 set the callback function to call when a burst is received
Callback< void, Ptr< const
PacketBurst > > 
GetReceiveCallback (void) const
virtual void Send (SendParams *params)=0
 send a packet on the channel
virtual PhyType GetPhyType (void) const =0
 Get the type of the physical layer.
void SetDuplex (uint64_t rxFrequency, uint64_t txFrequency)
 configure the physical layer in duplex mode
void SetSimplex (uint64_t frequency)
 configure the physical layer in simplex mode
uint64_t GetRxFrequency (void) const
uint64_t GetTxFrequency (void) const
uint64_t GetScanningFrequency (void) const
void SetNrCarriers (uint8_t nrCarriers)
 Set the number of carriers in the physical frame.
uint8_t GetNrCarriers (void) const
void SetFrameDuration (Time frameDuration)
 Set the frame duration.
Time GetFrameDurationSec (void) const
Time GetFrameDuration (void) const
void SetFrequency (uint32_t frequency)
 set the frequency on which the device should lock
uint32_t GetFrequency (void) const
void SetChannelBandwidth (uint32_t channelBandwidth)
 Set the channel bandwidth.
uint32_t GetChannelBandwidth (void) const
uint16_t GetNfft (void) const
double GetSamplingFactor (void) const
double GetSamplingFrequency (void) const
void SetPsDuration (Time psDuration)
 set the physical slot duration in seconds
Time GetPsDuration (void) const
void SetSymbolDuration (Time symbolDuration)
 set the OFMD symbol duration in second
Time GetSymbolDuration (void) const
double GetGValue (void) const
void SetPsPerSymbol (uint16_t psPerSymbol)
 set the number of physical slots per symbol
uint16_t GetPsPerSymbol (void) const
void SetPsPerFrame (uint16_t psPerFrame)
 set the number of physical slot per frame
uint16_t GetPsPerFrame (void) const
void SetSymbolsPerFrame (uint32_t symbolsPerFrame)
 set the number of symbols per frame
uint32_t GetSymbolsPerFrame (void) const
bool IsDuplex (void) const
void SetState (PhyState state)
 set the state of the device
PhyState GetState (void) const
void StartScanning (uint64_t frequency, Time timeout, Callback< void, bool, uint64_t > callback)
 scan the frequency frequency for maximum timeout seconds and calls callback if the frequency could be used
void SetScanningCallback (void) const
 calls the scanning call back function
EventId GetChnlSrchTimeoutEvent (void) const
void SetDataRates (void)
 calculates the data rate of each modulation and save them for future use
uint32_t GetDataRate (ModulationType modulationType) const
Time GetTransmissionTime (uint32_t size, ModulationType modulationType) const
uint64_t GetNrSymbols (uint32_t size, ModulationType modulationType) const
uint64_t GetNrBytes (uint32_t symbols, ModulationType modulationType) const
uint16_t GetTtg (void) const
uint16_t GetRtg (void) const
uint8_t GetFrameDurationCode (void) const
Time GetFrameDuration (uint8_t frameDurationCode) const
void SetPhyParameters (void)
 computes the Physical parameters and store them
virtual void DoDispose (void)
virtual Ptr< ObjectGetMobility (void)
virtual void SetMobility (Ptr< Object > mobility)
 set the mobility model of the device

Static Public Member Functions

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

Member Function Documentation

void ns3::WimaxPhy::Attach ( Ptr< WimaxChannel channel  ) 

Attach the physical layer to a channel.

Parameters:
channel the channel to which the physical layer will be attached
virtual void ns3::WimaxPhy::DoDispose ( void   )  [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.

Ptr<WimaxChannel> ns3::WimaxPhy::GetChannel ( void   )  const
Returns:
the channel to which this physical layer is attached
uint32_t ns3::WimaxPhy::GetChannelBandwidth ( void   )  const
Returns:
the channel bandwidth
uint32_t ns3::WimaxPhy::GetDataRate ( ModulationType  modulationType  )  const
Returns:
the data rate of the modulation modulationType
Parameters:
modulationType the modulation that you want to get its data rate
Ptr<NetDevice> ns3::WimaxPhy::GetDevice ( void   )  const
Returns:
the the device in which this physical layer is installed
Time ns3::WimaxPhy::GetFrameDuration ( void   )  const
Returns:
the frame duration
Time ns3::WimaxPhy::GetFrameDurationSec ( void   )  const
Returns:
the frame duration in seconds
uint32_t ns3::WimaxPhy::GetFrequency ( void   )  const
Returns:
the frequency on which the device is locked
double ns3::WimaxPhy::GetGValue ( void   )  const
Returns:
the guard interval factor (The ratio TG/Td)
virtual Ptr<Object> ns3::WimaxPhy::GetMobility ( void   )  [virtual]
Returns:
the mobility model of the device
uint16_t ns3::WimaxPhy::GetNfft ( void   )  const
Returns:
the size of the FFT
uint64_t ns3::WimaxPhy::GetNrBytes ( uint32_t  symbols,
ModulationType  modulationType 
) const
Returns:
the maximum number of bytes that could be carried by symbols symbols using the modulation modulationType
Parameters:
symbols the number of symbols to use
modulationType the modulation that will be used
uint8_t ns3::WimaxPhy::GetNrCarriers ( void   )  const
Returns:
the number of carriers in the frame
uint64_t ns3::WimaxPhy::GetNrSymbols ( uint32_t  size,
ModulationType  modulationType 
) const
Returns:
the number of symbols needed to transmit size bytes using the modulation modulationType
Parameters:
size the number of byte to transmit
modulationType the modulation that will be used to transmit the bytes
Time ns3::WimaxPhy::GetPsDuration ( void   )  const
Returns:
the physical slot duration
uint16_t ns3::WimaxPhy::GetPsPerFrame ( void   )  const
Returns:
the number of physical slot per frame
uint16_t ns3::WimaxPhy::GetPsPerSymbol ( void   )  const
Returns:
the number of physical slots per symbol
Callback<void, Ptr<const PacketBurst> > ns3::WimaxPhy::GetReceiveCallback ( void   )  const
Returns:
the receive callback
uint16_t ns3::WimaxPhy::GetRtg ( void   )  const
Returns:
the receive/transmit transition gap
uint64_t ns3::WimaxPhy::GetRxFrequency ( void   )  const
Returns:
the reception frequency
double ns3::WimaxPhy::GetSamplingFactor ( void   )  const
Returns:
the sampling factor
double ns3::WimaxPhy::GetSamplingFrequency ( void   )  const
Returns:
the sampling frequency
uint64_t ns3::WimaxPhy::GetScanningFrequency ( void   )  const
Returns:
the scanning frequency
PhyState ns3::WimaxPhy::GetState ( void   )  const
Returns:
the state of the device (PHY_STATE_IDLE, PHY_STATE_SCANNING, PHY_STATE_TX, PHY_STATE_RX)
Time ns3::WimaxPhy::GetSymbolDuration ( void   )  const
Returns:
the symbol duration in second
uint32_t ns3::WimaxPhy::GetSymbolsPerFrame ( void   )  const
Returns:
the number of symbols per frame
Time ns3::WimaxPhy::GetTransmissionTime ( uint32_t  size,
ModulationType  modulationType 
) const
Returns:
the time needed to transmit size bytes using the modulation modulationType
Parameters:
size the number of byte to transmit
modulationType the modulation that will be used to transmit the bytes
uint16_t ns3::WimaxPhy::GetTtg ( void   )  const
Returns:
the transmit/receive transition gap
uint64_t ns3::WimaxPhy::GetTxFrequency ( void   )  const
Returns:
the transmission frequency
static TypeId ns3::WimaxPhy::GetTypeId ( void   )  [static]

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

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

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

Attributes defined for this type:

  • Channel: Wimax channel
  • FrameDuration: The frame duration in seconds.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 10000000ns
    • Flags: construct write read
  • Frequency: The central frequency in KHz.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 1000000:11000000
    • Initial value: 5000000
    • Flags: construct write read
  • Bandwidth: The channel bandwidth in Hz.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 5000000:30000000
    • Initial value: 10000000
    • Flags: construct write read

No TraceSources defined for this type.

Reimplemented from ns3::Object.

Reimplemented in ns3::SimpleOfdmWimaxPhy.

bool ns3::WimaxPhy::IsDuplex ( void   )  const
Returns:
true if the device is configured in duplex mode
virtual void ns3::WimaxPhy::Send ( SendParams params  )  [pure virtual]

send a packet on the channel

Parameters:
params the parameters used to send the packet

Implemented in ns3::SimpleOfdmWimaxPhy.

void ns3::WimaxPhy::SetChannelBandwidth ( uint32_t  channelBandwidth  ) 

Set the channel bandwidth.

Parameters:
channelBandwidth The channel bandwidth
void ns3::WimaxPhy::SetDevice ( Ptr< WimaxNetDevice device  ) 

Set the device in which this physical layer is installed.

Parameters:
device the device in which this physical layer is installed
void ns3::WimaxPhy::SetDuplex ( uint64_t  rxFrequency,
uint64_t  txFrequency 
)

configure the physical layer in duplex mode

Parameters:
rxFrequency the reception frequency
txFrequency the transmission frequency
void ns3::WimaxPhy::SetFrameDuration ( Time  frameDuration  ) 

Set the frame duration.

Parameters:
frameDuration the frame duration
void ns3::WimaxPhy::SetFrequency ( uint32_t  frequency  ) 

set the frequency on which the device should lock

Parameters:
frequency the frequency to configure
virtual void ns3::WimaxPhy::SetMobility ( Ptr< Object mobility  )  [virtual]

set the mobility model of the device

Parameters:
mobility the mobility model to set
void ns3::WimaxPhy::SetNrCarriers ( uint8_t  nrCarriers  ) 

Set the number of carriers in the physical frame.

Parameters:
nrCarriers the number of carriers in the frame
void ns3::WimaxPhy::SetPsDuration ( Time  psDuration  ) 

set the physical slot duration in seconds

Parameters:
psDuration the physical slot duration
void ns3::WimaxPhy::SetPsPerFrame ( uint16_t  psPerFrame  ) 

set the number of physical slot per frame

Parameters:
psPerFrame the number of physical slot per frame
void ns3::WimaxPhy::SetPsPerSymbol ( uint16_t  psPerSymbol  ) 

set the number of physical slots per symbol

Parameters:
psPerSymbol the number of physical slots per symbol
void ns3::WimaxPhy::SetReceiveCallback ( Callback< void, Ptr< const PacketBurst > >  callback  ) 

set the callback function to call when a burst is received

Parameters:
callback the callback function to call when a burst is received
void ns3::WimaxPhy::SetSimplex ( uint64_t  frequency  ) 

configure the physical layer in simplex mode

Parameters:
frequency the frequency to be used for reception and transmission process
void ns3::WimaxPhy::SetState ( PhyState  state  ) 

set the state of the device

Parameters:
state the state to be set (PHY_STATE_IDLE, PHY_STATE_SCANNING, PHY_STATE_TX, PHY_STATE_RX)
void ns3::WimaxPhy::SetSymbolDuration ( Time  symbolDuration  ) 

set the OFMD symbol duration in second

Parameters:
symbolDuration the symbol duration is second
void ns3::WimaxPhy::SetSymbolsPerFrame ( uint32_t  symbolsPerFrame  ) 

set the number of symbols per frame

Parameters:
symbolsPerFrame the number of symbols per frame
void ns3::WimaxPhy::StartScanning ( uint64_t  frequency,
Time  timeout,
Callback< void, bool, uint64_t >  callback 
)

scan the frequency frequency for maximum timeout seconds and calls callback if the frequency could be used

Parameters:
frequency the frequency to scan
timeout the timout before considering the channel as unusable
callback the function to call if the channel could be used

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