A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::WimaxPhy Class Referenceabstract

WiMAX PHY entity. More...

#include "wimax-phy.h"

+ Inheritance diagram for ns3::WimaxPhy:
+ Collaboration diagram for ns3::WimaxPhy:

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
}
 ModulationType enumeration. More...
 
enum  PhyState { PHY_STATE_IDLE , PHY_STATE_SCANNING , PHY_STATE_TX , PHY_STATE_RX }
 PhyState enumeration. More...
 
enum  PhyType { SimpleWimaxPhy , simpleOfdmWimaxPhy }
 PhyType enumeration. More...
 

Public Member Functions

 WimaxPhy ()
 
 ~WimaxPhy () override
 
virtual int64_t AssignStreams (int64_t stream)=0
 Assign a fixed random variable stream number to the random variables used by this model.
 
void Attach (Ptr< WimaxChannel > channel)
 Attach the physical layer to a channel.
 
void DoDispose () override
 Destructor implementation.
 
Ptr< WimaxChannelGetChannel () const
 
uint32_t GetChannelBandwidth () const
 Get the channel bandwidth.
 
EventId GetChnlSrchTimeoutEvent () const
 Get channel search timeout event.
 
uint32_t GetDataRate (ModulationType modulationType) const
 Get the data rate corresponding to a modulation type.
 
Ptr< NetDeviceGetDevice () const
 
Time GetFrameDuration () const
 Get the frame duration.
 
Time GetFrameDuration (uint8_t frameDurationCode) const
 Get the frame duration corresponding to a given code.
 
uint8_t GetFrameDurationCode () const
 Get the frame duration code.
 
Time GetFrameDurationSec () const
 Get the frame duration This method is redundant with GetFrameDuration ()
 
uint32_t GetFrequency () const
 Get the frequency on which the device is locked.
 
double GetGValue () const
 Get the guard interval factor (the ratio TG/Td)
 
uint16_t GetNfft () const
 Get the size of the FFT.
 
uint64_t GetNrBytes (uint32_t symbols, ModulationType modulationType) const
 Get the maximum number of bytes that could be carried by symbols symbols using the modulation modulationType.
 
uint8_t GetNrCarriers () const
 Get the number of carriers in the physical frame.
 
uint64_t GetNrSymbols (uint32_t size, ModulationType modulationType) const
 Get the number of symbols needed to transmit size bytes using the modulation modulationType.
 
virtual PhyType GetPhyType () const =0
 Get the type of the physical layer.
 
Time GetPsDuration () const
 Get the physical slot duration.
 
uint16_t GetPsPerFrame () const
 Get the number of physical slots per frame.
 
uint16_t GetPsPerSymbol () const
 Get the number of physical slots per symbol.
 
Callback< void, Ptr< const PacketBurst > > GetReceiveCallback () const
 
uint16_t GetRtg () const
 Get the receive/transmit transition gap.
 
uint64_t GetRxFrequency () const
 Get the reception frequency.
 
double GetSamplingFactor () const
 Get the sampling factor.
 
double GetSamplingFrequency () const
 Get the sampling frequency.
 
uint64_t GetScanningFrequency () const
 Get the scanning frequency.
 
PhyState GetState () const
 Get the state of the device.
 
Time GetSymbolDuration () const
 Get the OFDM symbol duration.
 
uint32_t GetSymbolsPerFrame () const
 Get the number of symbols per frame.
 
Time GetTransmissionTime (uint32_t size, ModulationType modulationType) const
 Get transmission time needed to send bytes at a given modulation.
 
uint16_t GetTtg () const
 Get the transmit/receive transition gap.
 
uint64_t GetTxFrequency () const
 Get the transmission frequency.
 
bool IsDuplex () const
 Check if configured in duplex mode.
 
virtual void Send (SendParams *params)=0
 send a packet on the channel
 
void SetChannelBandwidth (uint32_t channelBandwidth)
 Set the channel bandwidth.
 
void SetDataRates ()
 calculates the data rate of each modulation and save them for future use
 
void SetDevice (Ptr< WimaxNetDevice > device)
 Set the device in which this physical layer is installed.
 
void SetDuplex (uint64_t rxFrequency, uint64_t txFrequency)
 configure the physical layer in duplex mode
 
void SetFrameDuration (Time frameDuration)
 Set the frame duration.
 
void SetFrequency (uint32_t frequency)
 set the frequency on which the device should lock
 
void SetNrCarriers (uint8_t nrCarriers)
 Set the number of carriers in the physical frame.
 
void SetPhyParameters ()
 computes the Physical parameters and store them
 
void SetPsDuration (Time psDuration)
 set the physical slot duration
 
void SetPsPerFrame (uint16_t psPerFrame)
 set the number of physical slots per frame
 
void SetPsPerSymbol (uint16_t psPerSymbol)
 set the number of physical slots per symbol
 
void SetReceiveCallback (Callback< void, Ptr< const PacketBurst > > callback)
 set the callback function to call when a burst is received
 
void SetScanningCallback () const
 calls the scanning call back function
 
void SetSimplex (uint64_t frequency)
 configure the physical layer in simplex mode
 
void SetState (PhyState state)
 set the state of the device
 
void SetSymbolDuration (Time symbolDuration)
 set the OFDM symbol duration
 
void SetSymbolsPerFrame (uint32_t symbolsPerFrame)
 set the number of symbols per frame
 
void StartScanning (uint64_t frequency, Time timeout, Callback< void, bool, uint64_t > callback)
 scan a frequency for maximum timeout seconds and call the callback if the frequency can be used
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Private Member Functions

virtual void DoAttach (Ptr< WimaxChannel > channel)=0
 Attach channel.
 
virtual uint32_t DoGetDataRate (ModulationType modulationType) const =0
 Get data rate.
 
virtual Time DoGetFrameDuration (uint8_t frameDurationCode) const =0
 Get frame duration.
 
virtual uint8_t DoGetFrameDurationCode () const =0
 Get frame duration code.
 
virtual double DoGetGValue () const =0
 Get G value.
 
virtual uint16_t DoGetNfft () const =0
 Get NFFT.
 
virtual uint64_t DoGetNrBytes (uint32_t symbols, ModulationType modulationType) const =0
 Get number of bytes.
 
virtual uint64_t DoGetNrSymbols (uint32_t size, ModulationType modulationType) const =0
 Get number of symbols.
 
virtual uint16_t DoGetRtg () const =0
 Get RTG.
 
virtual double DoGetSamplingFactor () const =0
 Get sampling factor.
 
virtual double DoGetSamplingFrequency () const =0
 Get sampling frequency.
 
virtual Time DoGetTransmissionTime (uint32_t size, ModulationType modulationType) const =0
 Get transmission time.
 
virtual uint16_t DoGetTtg () const =0
 Get TTG.
 
virtual void DoSetDataRates ()=0
 Set data rates.
 
virtual void DoSetPhyParameters ()=0
 Set phy parameters.
 
void EndScanning ()
 End scanning.
 
void GetModulationFecParams (ModulationType modulationType, uint8_t &bitsPerSymbol, double &fecCode) const
 Get modulation FEC parameters.
 

Private Attributes

Ptr< WimaxChannelm_channel
 channel
 
uint32_t m_channelBandwidth
 in Hz
 
Ptr< WimaxNetDevicem_device
 the device
 
EventId m_dlChnlSrchTimeoutEvent
 DL channel search timeout event.
 
bool m_duplex
 duplex
 
Time m_frameDuration
 in seconds
 
uint32_t m_frequency
 in KHz
 
uint8_t m_nrCarriers
 number of carriers
 
Time m_psDuration
 in seconds
 
uint16_t m_psPerFrame
 ps per framce
 
uint16_t m_psPerSymbol
 ps per sumbol
 
Callback< void, Ptr< const PacketBurst > > m_rxCallback
 receive callback function
 
uint64_t m_rxFrequency
 receive frequency
 
Callback< void, bool, uint64_t > m_scanningCallback
 scanning callback function
 
uint64_t m_scanningFrequency
 scanning frequency
 
PhyState m_state
 state
 
Time m_symbolDuration
 in seconds
 
uint32_t m_symbolsPerFrame
 symbols per frame
 
uint64_t m_txFrequency
 transmit frequency
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Detailed Description

WiMAX PHY entity.

Config Paths

ns3::WimaxPhy is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy"

Attributes

  • Bandwidth: The channel bandwidth in Hz.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 5000000:30000000
    • Initial value: 10000000
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Channel: Wimax channel
  • FrameDuration: The frame duration in seconds.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +1e+07ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Frequency: The central frequency in KHz.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 1000000:11000000
    • Initial value: 5000000
    • Flags: constructwriteread
    • Support level: SUPPORTED

No TraceSources are defined for this type.
Group: Wimax

Size of this type is 192 bytes (on a 64-bit architecture).

Definition at line 38 of file wimax-phy.h.

Member Enumeration Documentation

◆ ModulationType

ModulationType enumeration.

Enumerator
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 

Definition at line 42 of file wimax-phy.h.

◆ PhyState

PhyState enumeration.

Enumerator
PHY_STATE_IDLE 
PHY_STATE_SCANNING 
PHY_STATE_TX 
PHY_STATE_RX 

Definition at line 54 of file wimax-phy.h.

◆ PhyType

PhyType enumeration.

Enumerator
SimpleWimaxPhy 
simpleOfdmWimaxPhy 

Definition at line 63 of file wimax-phy.h.

Constructor & Destructor Documentation

◆ WimaxPhy()

ns3::WimaxPhy::WimaxPhy ( )

Definition at line 70 of file wimax-phy.cc.

References m_duplex, m_rxFrequency, and m_txFrequency.

◆ ~WimaxPhy()

ns3::WimaxPhy::~WimaxPhy ( )
override

Definition at line 87 of file wimax-phy.cc.

Member Function Documentation

◆ AssignStreams()

virtual int64_t ns3::WimaxPhy::AssignStreams ( int64_t stream)
pure virtual

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Implemented in ns3::SimpleOfdmWimaxPhy.

◆ Attach()

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

Attach the physical layer to a channel.

Parameters
channelthe channel to which the physical layer will be attached

Definition at line 99 of file wimax-phy.cc.

References DoAttach(), and m_channel.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoAttach()

virtual void ns3::WimaxPhy::DoAttach ( Ptr< WimaxChannel > channel)
privatepure virtual

Attach channel.

Parameters
channelthe wimax channel

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by Attach().

+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::WimaxPhy::DoDispose ( )
overridevirtual

Destructor implementation.

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

Subclasses are expected to implement their real destruction code in an overridden 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.

Definition at line 92 of file wimax-phy.cc.

References m_channel, and m_device.

Referenced by ns3::SimpleOfdmWimaxPhy::DoDispose().

+ Here is the caller graph for this function:

◆ DoGetDataRate()

virtual uint32_t ns3::WimaxPhy::DoGetDataRate ( ModulationType modulationType) const
privatepure virtual

Get data rate.

Parameters
modulationTypethe modulation type
Returns
the data rate

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetDataRate().

+ Here is the caller graph for this function:

◆ DoGetFrameDuration()

virtual Time ns3::WimaxPhy::DoGetFrameDuration ( uint8_t frameDurationCode) const
privatepure virtual

Get frame duration.

Parameters
frameDurationCodethe frame duration code
Returns
the frame duration time

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetFrameDuration().

+ Here is the caller graph for this function:

◆ DoGetFrameDurationCode()

virtual uint8_t ns3::WimaxPhy::DoGetFrameDurationCode ( ) const
privatepure virtual

Get frame duration code.

Returns
the frame duration code

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetFrameDurationCode().

+ Here is the caller graph for this function:

◆ DoGetGValue()

virtual double ns3::WimaxPhy::DoGetGValue ( ) const
privatepure virtual

Get G value.

Returns
he G value

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetGValue().

+ Here is the caller graph for this function:

◆ DoGetNfft()

virtual uint16_t ns3::WimaxPhy::DoGetNfft ( ) const
privatepure virtual

Get NFFT.

Returns
the NFFT

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetNfft().

+ Here is the caller graph for this function:

◆ DoGetNrBytes()

virtual uint64_t ns3::WimaxPhy::DoGetNrBytes ( uint32_t symbols,
ModulationType modulationType ) const
privatepure virtual

Get number of bytes.

Parameters
symbolsthe number of symbols
modulationTypethe modulation type
Returns
the number of bytes

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetNrBytes().

+ Here is the caller graph for this function:

◆ DoGetNrSymbols()

virtual uint64_t ns3::WimaxPhy::DoGetNrSymbols ( uint32_t size,
ModulationType modulationType ) const
privatepure virtual

Get number of symbols.

Parameters
sizethe transmission size
modulationTypethe modulation type
Returns
the number of symbols

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetNrSymbols().

+ Here is the caller graph for this function:

◆ DoGetRtg()

virtual uint16_t ns3::WimaxPhy::DoGetRtg ( ) const
privatepure virtual

Get RTG.

Returns
the RTG

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetRtg().

+ Here is the caller graph for this function:

◆ DoGetSamplingFactor()

virtual double ns3::WimaxPhy::DoGetSamplingFactor ( ) const
privatepure virtual

Get sampling factor.

Returns
the sampling factor

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetSamplingFactor().

+ Here is the caller graph for this function:

◆ DoGetSamplingFrequency()

virtual double ns3::WimaxPhy::DoGetSamplingFrequency ( ) const
privatepure virtual

Get sampling frequency.

Returns
the sampling frequency

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetSamplingFrequency().

+ Here is the caller graph for this function:

◆ DoGetTransmissionTime()

virtual Time ns3::WimaxPhy::DoGetTransmissionTime ( uint32_t size,
ModulationType modulationType ) const
privatepure virtual

Get transmission time.

Parameters
sizethe transmission size
modulationTypethe modulation type
Returns
the transmission time

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetTransmissionTime().

+ Here is the caller graph for this function:

◆ DoGetTtg()

virtual uint16_t ns3::WimaxPhy::DoGetTtg ( ) const
privatepure virtual

Get TTG.

Returns
the TTG

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by GetTtg().

+ Here is the caller graph for this function:

◆ DoSetDataRates()

virtual void ns3::WimaxPhy::DoSetDataRates ( )
privatepure virtual

Set data rates.

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by SetDataRates().

+ Here is the caller graph for this function:

◆ DoSetPhyParameters()

virtual void ns3::WimaxPhy::DoSetPhyParameters ( )
privatepure virtual

Set phy parameters.

Implemented in ns3::SimpleOfdmWimaxPhy.

Referenced by SetPhyParameters().

+ Here is the caller graph for this function:

◆ EndScanning()

void ns3::WimaxPhy::EndScanning ( )
private

End scanning.

Definition at line 137 of file wimax-phy.cc.

References m_scanningCallback, and m_scanningFrequency.

Referenced by StartScanning().

+ Here is the caller graph for this function:

◆ GetChannel()

Ptr< WimaxChannel > ns3::WimaxPhy::GetChannel ( ) const
Returns
the channel to which this physical layer is attached

Definition at line 106 of file wimax-phy.cc.

References m_channel.

Referenced by ns3::SimpleOfdmWimaxPhy::DoAttach(), GetTypeId(), and ns3::SimpleOfdmWimaxPhy::StartSendDummyFecBlock().

+ Here is the caller graph for this function:

◆ GetChannelBandwidth()

uint32_t ns3::WimaxPhy::GetChannelBandwidth ( ) const

Get the channel bandwidth.

Returns
the channel bandwidth

Definition at line 327 of file wimax-phy.cc.

References m_channelBandwidth.

Referenced by ns3::SimpleOfdmWimaxPhy::DoGetSamplingFactor(), ns3::SimpleOfdmWimaxPhy::DoGetSamplingFrequency(), ns3::SimpleOfdmWimaxPhy::GetBandwidth(), and GetTypeId().

+ Here is the caller graph for this function:

◆ GetChnlSrchTimeoutEvent()

EventId ns3::WimaxPhy::GetChnlSrchTimeoutEvent ( ) const

Get channel search timeout event.

Returns
event ID

Definition at line 205 of file wimax-phy.cc.

References m_dlChnlSrchTimeoutEvent.

Referenced by ns3::SimpleOfdmWimaxPhy::StartReceive().

+ Here is the caller graph for this function:

◆ GetDataRate()

uint32_t ns3::WimaxPhy::GetDataRate ( WimaxPhy::ModulationType modulationType) const

Get the data rate corresponding to a modulation type.

Returns
the data rate
Parameters
modulationTypethe modulation that you want to get its data rate

Definition at line 223 of file wimax-phy.cc.

References DoGetDataRate().

+ Here is the call graph for this function:

◆ GetDevice()

Ptr< NetDevice > ns3::WimaxPhy::GetDevice ( ) const
Returns
the the device in which this physical layer is installed

Definition at line 118 of file wimax-phy.cc.

References m_device.

◆ GetFrameDuration() [1/2]

Time ns3::WimaxPhy::GetFrameDuration ( ) const

Get the frame duration.

Returns
the frame duration

Definition at line 297 of file wimax-phy.cc.

References GetFrameDurationSec().

Referenced by ns3::SimpleOfdmWimaxPhy::DoGetFrameDurationCode(), and ns3::SimpleOfdmWimaxPhy::DoSetPhyParameters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetFrameDuration() [2/2]

Time ns3::WimaxPhy::GetFrameDuration ( uint8_t frameDurationCode) const

Get the frame duration corresponding to a given code.

Parameters
frameDurationCodethe frame duration code to use
Returns
the frame duration

Definition at line 265 of file wimax-phy.cc.

References DoGetFrameDuration().

+ Here is the call graph for this function:

◆ GetFrameDurationCode()

uint8_t ns3::WimaxPhy::GetFrameDurationCode ( ) const

Get the frame duration code.

Returns
the frame duration code

Definition at line 259 of file wimax-phy.cc.

References DoGetFrameDurationCode().

+ Here is the call graph for this function:

◆ GetFrameDurationSec()

Time ns3::WimaxPhy::GetFrameDurationSec ( ) const

Get the frame duration This method is redundant with GetFrameDuration ()

Returns
the frame duration

Definition at line 303 of file wimax-phy.cc.

References m_frameDuration.

Referenced by GetFrameDuration(), and GetTypeId().

+ Here is the caller graph for this function:

◆ GetFrequency()

uint32_t ns3::WimaxPhy::GetFrequency ( ) const

Get the frequency on which the device is locked.

Returns
the frequency on which the device is locked

Definition at line 315 of file wimax-phy.cc.

References m_frequency.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetGValue()

double ns3::WimaxPhy::GetGValue ( ) const

Get the guard interval factor (the ratio TG/Td)

Returns
the guard interval factor

Definition at line 375 of file wimax-phy.cc.

References DoGetGValue().

+ Here is the call graph for this function:

◆ GetModulationFecParams()

void ns3::WimaxPhy::GetModulationFecParams ( ModulationType modulationType,
uint8_t & bitsPerSymbol,
double & fecCode ) const
private

Get modulation FEC parameters.

Parameters
modulationTypethe modultion type
bitsPerSymbolthe number of bits per symbol page
fecCodethe FEC code

◆ GetNfft()

uint16_t ns3::WimaxPhy::GetNfft ( ) const

Get the size of the FFT.

Returns
the size of the FFT

Definition at line 333 of file wimax-phy.cc.

References DoGetNfft().

+ Here is the call graph for this function:

◆ GetNrBytes()

uint64_t ns3::WimaxPhy::GetNrBytes ( uint32_t symbols,
WimaxPhy::ModulationType modulationType ) const

Get the maximum number of bytes that could be carried by symbols symbols using the modulation modulationType.

Parameters
symbolsthe number of symbols to use
modulationTypethe modulation that will be used
Returns
the maximum number of bytes

Definition at line 241 of file wimax-phy.cc.

References DoGetNrBytes().

+ Here is the call graph for this function:

◆ GetNrCarriers()

uint8_t ns3::WimaxPhy::GetNrCarriers ( ) const

Get the number of carriers in the physical frame.

Returns
the number of carriers in the physical frame

Definition at line 285 of file wimax-phy.cc.

References m_nrCarriers.

Referenced by ns3::SimpleOfdmWimaxPhy::CalculateDataRate().

+ Here is the caller graph for this function:

◆ GetNrSymbols()

uint64_t ns3::WimaxPhy::GetNrSymbols ( uint32_t size,
WimaxPhy::ModulationType modulationType ) const

Get the number of symbols needed to transmit size bytes using the modulation modulationType.

Returns
the number of symbols needed
Parameters
sizethe number of byte to transmit
modulationTypethe modulation that will be used to transmit the bytes

Definition at line 235 of file wimax-phy.cc.

References DoGetNrSymbols().

+ Here is the call graph for this function:

◆ GetPhyType()

virtual PhyType ns3::WimaxPhy::GetPhyType ( ) const
pure virtual

Get the type of the physical layer.

Returns
the phy type

Implemented in ns3::SimpleOfdmWimaxPhy.

◆ GetPsDuration()

Time ns3::WimaxPhy::GetPsDuration ( ) const

Get the physical slot duration.

Returns
the physical slot duration

Definition at line 357 of file wimax-phy.cc.

References m_psDuration.

◆ GetPsPerFrame()

uint16_t ns3::WimaxPhy::GetPsPerFrame ( ) const

Get the number of physical slots per frame.

Returns
the number of physical slot per frame

Definition at line 399 of file wimax-phy.cc.

References m_psPerFrame.

◆ GetPsPerSymbol()

uint16_t ns3::WimaxPhy::GetPsPerSymbol ( ) const

Get the number of physical slots per symbol.

Returns
the number of physical slots per symbol

Definition at line 387 of file wimax-phy.cc.

References m_psPerSymbol.

Referenced by ns3::SimpleOfdmWimaxPhy::DoGetRtg(), and ns3::SimpleOfdmWimaxPhy::DoGetTtg().

+ Here is the caller graph for this function:

◆ GetReceiveCallback()

Callback< void, Ptr< const PacketBurst > > ns3::WimaxPhy::GetReceiveCallback ( ) const
Returns
the receive callback

Definition at line 149 of file wimax-phy.cc.

References m_rxCallback.

Referenced by ns3::SimpleOfdmWimaxPhy::EndReceive().

+ Here is the caller graph for this function:

◆ GetRtg()

uint16_t ns3::WimaxPhy::GetRtg ( ) const

Get the receive/transmit transition gap.

Returns
the receive/transmit transition gap

Definition at line 253 of file wimax-phy.cc.

References DoGetRtg().

+ Here is the call graph for this function:

◆ GetRxFrequency()

uint64_t ns3::WimaxPhy::GetRxFrequency ( ) const

Get the reception frequency.

Returns
the reception frequency

Definition at line 169 of file wimax-phy.cc.

References m_rxFrequency.

Referenced by ns3::SimpleOfdmWimaxPhy::StartReceive().

+ Here is the caller graph for this function:

◆ GetSamplingFactor()

double ns3::WimaxPhy::GetSamplingFactor ( ) const

Get the sampling factor.

Returns
the sampling factor

Definition at line 339 of file wimax-phy.cc.

References DoGetSamplingFactor().

+ Here is the call graph for this function:

◆ GetSamplingFrequency()

double ns3::WimaxPhy::GetSamplingFrequency ( ) const

Get the sampling frequency.

Returns
the sampling frequency

Definition at line 345 of file wimax-phy.cc.

References DoGetSamplingFrequency().

+ Here is the call graph for this function:

◆ GetScanningFrequency()

uint64_t ns3::WimaxPhy::GetScanningFrequency ( ) const

Get the scanning frequency.

Returns
the scanning frequency

Definition at line 181 of file wimax-phy.cc.

References m_scanningFrequency.

Referenced by SetScanningCallback(), and ns3::SimpleOfdmWimaxPhy::StartReceive().

+ Here is the caller graph for this function:

◆ GetState()

WimaxPhy::PhyState ns3::WimaxPhy::GetState ( ) const

Get the state of the device.

Returns
the state of the device (PHY_STATE_IDLE, PHY_STATE_SCANNING, PHY_STATE_TX, PHY_STATE_RX)

Definition at line 193 of file wimax-phy.cc.

References m_state.

Referenced by ns3::SimpleOfdmWimaxPhy::Send(), and ns3::SimpleOfdmWimaxPhy::StartReceive().

+ Here is the caller graph for this function:

◆ GetSymbolDuration()

Time ns3::WimaxPhy::GetSymbolDuration ( ) const

Get the OFDM symbol duration.

Returns
the symbol duration in second

Definition at line 369 of file wimax-phy.cc.

References m_symbolDuration.

Referenced by ns3::SimpleOfdmWimaxPhy::CalculateDataRate(), ns3::SimpleOfdmWimaxPhy::DoGetNrBytes(), ns3::SimpleOfdmWimaxPhy::DoGetNrSymbols(), and ns3::SimpleOfdmWimaxPhy::DoGetTransmissionTime().

+ Here is the caller graph for this function:

◆ GetSymbolsPerFrame()

uint32_t ns3::WimaxPhy::GetSymbolsPerFrame ( ) const

Get the number of symbols per frame.

Returns
the number of symbols per frame

Definition at line 411 of file wimax-phy.cc.

References m_symbolsPerFrame.

◆ GetTransmissionTime()

Time ns3::WimaxPhy::GetTransmissionTime ( uint32_t size,
WimaxPhy::ModulationType modulationType ) const

Get transmission time needed to send bytes at a given modulation.

Returns
the time needed
Parameters
sizethe number of byte to transmit
modulationTypethe modulation that will be used to transmit the bytes

Definition at line 229 of file wimax-phy.cc.

References DoGetTransmissionTime().

+ Here is the call graph for this function:

◆ GetTtg()

uint16_t ns3::WimaxPhy::GetTtg ( ) const

Get the transmit/receive transition gap.

Returns
the transmit/receive transition gap

Definition at line 247 of file wimax-phy.cc.

References DoGetTtg().

+ Here is the call graph for this function:

◆ GetTxFrequency()

uint64_t ns3::WimaxPhy::GetTxFrequency ( ) const

Get the transmission frequency.

Returns
the transmission frequency

Definition at line 175 of file wimax-phy.cc.

References m_txFrequency.

Referenced by ns3::SimpleOfdmWimaxPhy::StartSendDummyFecBlock().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::WimaxPhy::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 31 of file wimax-phy.cc.

References Attach(), GetChannel(), GetChannelBandwidth(), GetFrameDurationSec(), GetFrequency(), ns3::MakePointerAccessor(), ns3::MakePointerChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), ns3::Seconds(), SetChannelBandwidth(), SetFrameDuration(), SetFrequency(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ IsDuplex()

bool ns3::WimaxPhy::IsDuplex ( ) const

Check if configured in duplex mode.

Returns
true if the device is configured in duplex mode

Definition at line 199 of file wimax-phy.cc.

References m_duplex.

Referenced by ns3::SimpleOfdmWimaxPhy::StartReceive().

+ Here is the caller graph for this function:

◆ Send()

virtual void ns3::WimaxPhy::Send ( SendParams * params)
pure virtual

send a packet on the channel

Parameters
paramsthe parameters used to send the packet

Implemented in ns3::SimpleOfdmWimaxPhy.

◆ SetChannelBandwidth()

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

Set the channel bandwidth.

Parameters
channelBandwidthThe channel bandwidth

Definition at line 321 of file wimax-phy.cc.

References m_channelBandwidth.

Referenced by GetTypeId(), and ns3::SimpleOfdmWimaxPhy::SetBandwidth().

+ Here is the caller graph for this function:

◆ SetDataRates()

void ns3::WimaxPhy::SetDataRates ( )

calculates the data rate of each modulation and save them for future use

Definition at line 217 of file wimax-phy.cc.

References DoSetDataRates().

+ Here is the call graph for this function:

◆ SetDevice()

void ns3::WimaxPhy::SetDevice ( Ptr< WimaxNetDevice > device)

Set the device in which this physical layer is installed.

Parameters
devicethe device in which this physical layer is installed

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

References m_device.

◆ SetDuplex()

void ns3::WimaxPhy::SetDuplex ( uint64_t rxFrequency,
uint64_t txFrequency )

configure the physical layer in duplex mode

Parameters
rxFrequencythe reception frequency
txFrequencythe transmission frequency

Definition at line 155 of file wimax-phy.cc.

References m_rxFrequency, and m_txFrequency.

◆ SetFrameDuration()

void ns3::WimaxPhy::SetFrameDuration ( Time frameDuration)

Set the frame duration.

Parameters
frameDurationthe frame duration

Definition at line 291 of file wimax-phy.cc.

References m_frameDuration.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetFrequency()

void ns3::WimaxPhy::SetFrequency ( uint32_t frequency)

set the frequency on which the device should lock

Parameters
frequencythe frequency to configure

Definition at line 309 of file wimax-phy.cc.

References m_frequency.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetNrCarriers()

void ns3::WimaxPhy::SetNrCarriers ( uint8_t nrCarriers)

Set the number of carriers in the physical frame.

Set the number of carriers in the physical frame

Parameters
nrCarriersthe number of carriers in the frame

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

References m_nrCarriers.

Referenced by ns3::SimpleOfdmWimaxPhy::InitSimpleOfdmWimaxPhy().

+ Here is the caller graph for this function:

◆ SetPhyParameters()

void ns3::WimaxPhy::SetPhyParameters ( )

computes the Physical parameters and store them

Definition at line 273 of file wimax-phy.cc.

References DoSetPhyParameters().

+ Here is the call graph for this function:

◆ SetPsDuration()

void ns3::WimaxPhy::SetPsDuration ( Time psDuration)

set the physical slot duration

Parameters
psDurationthe physical slot duration

Definition at line 351 of file wimax-phy.cc.

References m_psDuration.

Referenced by ns3::SimpleOfdmWimaxPhy::DoSetPhyParameters().

+ Here is the caller graph for this function:

◆ SetPsPerFrame()

void ns3::WimaxPhy::SetPsPerFrame ( uint16_t psPerFrame)

set the number of physical slots per frame

Parameters
psPerFramethe number of physical slots per frame

Definition at line 393 of file wimax-phy.cc.

References m_psPerFrame.

Referenced by ns3::SimpleOfdmWimaxPhy::DoSetPhyParameters().

+ Here is the caller graph for this function:

◆ SetPsPerSymbol()

void ns3::WimaxPhy::SetPsPerSymbol ( uint16_t psPerSymbol)

set the number of physical slots per symbol

Parameters
psPerSymbolthe number of physical slots per symbol

Definition at line 381 of file wimax-phy.cc.

References m_psPerSymbol.

Referenced by ns3::SimpleOfdmWimaxPhy::DoSetPhyParameters().

+ Here is the caller graph for this function:

◆ SetReceiveCallback()

void ns3::WimaxPhy::SetReceiveCallback ( Callback< void, Ptr< const PacketBurst > > callback)

set the callback function to call when a burst is received

Parameters
callbackthe callback function to call when a burst is received

Definition at line 143 of file wimax-phy.cc.

References m_rxCallback.

◆ SetScanningCallback()

void ns3::WimaxPhy::SetScanningCallback ( ) const

calls the scanning call back function

Definition at line 211 of file wimax-phy.cc.

References GetScanningFrequency(), and m_scanningCallback.

Referenced by ns3::SimpleOfdmWimaxPhy::StartReceive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetSimplex()

void ns3::WimaxPhy::SetSimplex ( uint64_t frequency)

configure the physical layer in simplex mode

Parameters
frequencythe frequency to be used for reception and transmission process

Definition at line 162 of file wimax-phy.cc.

References m_rxFrequency, and m_txFrequency.

Referenced by ns3::SimpleOfdmWimaxPhy::StartReceive().

+ Here is the caller graph for this function:

◆ SetState()

void ns3::WimaxPhy::SetState ( PhyState state)

set the state of the device

Parameters
statethe state to be set (PHY_STATE_IDLE, PHY_STATE_SCANNING, PHY_STATE_TX, PHY_STATE_RX)

Definition at line 187 of file wimax-phy.cc.

References m_state.

Referenced by ns3::SimpleOfdmWimaxPhy::EndReceiveFecBlock(), ns3::SimpleOfdmWimaxPhy::EndSend(), ns3::SimpleOfdmWimaxPhy::EndSendFecBlock(), ns3::SimpleOfdmWimaxPhy::StartReceive(), and ns3::SimpleOfdmWimaxPhy::StartSendDummyFecBlock().

+ Here is the caller graph for this function:

◆ SetSymbolDuration()

void ns3::WimaxPhy::SetSymbolDuration ( Time symbolDuration)

set the OFDM symbol duration

Parameters
symbolDurationthe symbol duration

Definition at line 363 of file wimax-phy.cc.

References m_symbolDuration.

Referenced by ns3::SimpleOfdmWimaxPhy::DoSetPhyParameters().

+ Here is the caller graph for this function:

◆ SetSymbolsPerFrame()

void ns3::WimaxPhy::SetSymbolsPerFrame ( uint32_t symbolsPerFrame)

set the number of symbols per frame

Parameters
symbolsPerFramethe number of symbols per frame

Definition at line 405 of file wimax-phy.cc.

References m_symbolsPerFrame.

Referenced by ns3::SimpleOfdmWimaxPhy::DoSetPhyParameters().

+ Here is the caller graph for this function:

◆ StartScanning()

void ns3::WimaxPhy::StartScanning ( uint64_t frequency,
Time timeout,
Callback< void, bool, uint64_t > callback )

scan a frequency for maximum timeout seconds and call the callback if the frequency can be used

Parameters
frequencythe frequency to scan
timeoutthe timeout before considering the channel as unusable
callbackthe function to call if the channel could be used

Definition at line 124 of file wimax-phy.cc.

References EndScanning(), m_dlChnlSrchTimeoutEvent, m_scanningCallback, m_scanningFrequency, m_state, NS_ASSERT_MSG, PHY_STATE_IDLE, PHY_STATE_SCANNING, ns3::Simulator::Schedule(), and timeout.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_channel

Ptr<WimaxChannel> ns3::WimaxPhy::m_channel
private

channel

Definition at line 455 of file wimax-phy.h.

Referenced by Attach(), DoDispose(), and GetChannel().

◆ m_channelBandwidth

uint32_t ns3::WimaxPhy::m_channelBandwidth
private

in Hz

Definition at line 470 of file wimax-phy.h.

Referenced by GetChannelBandwidth(), and SetChannelBandwidth().

◆ m_device

Ptr<WimaxNetDevice> ns3::WimaxPhy::m_device
private

the device

Definition at line 454 of file wimax-phy.h.

Referenced by DoDispose(), GetDevice(), and SetDevice().

◆ m_dlChnlSrchTimeoutEvent

EventId ns3::WimaxPhy::m_dlChnlSrchTimeoutEvent
private

DL channel search timeout event.

Definition at line 460 of file wimax-phy.h.

Referenced by GetChnlSrchTimeoutEvent(), and StartScanning().

◆ m_duplex

bool ns3::WimaxPhy::m_duplex
private

duplex

Definition at line 461 of file wimax-phy.h.

Referenced by WimaxPhy(), and IsDuplex().

◆ m_frameDuration

Time ns3::WimaxPhy::m_frameDuration
private

in seconds

Definition at line 468 of file wimax-phy.h.

Referenced by GetFrameDurationSec(), and SetFrameDuration().

◆ m_frequency

uint32_t ns3::WimaxPhy::m_frequency
private

in KHz

Definition at line 469 of file wimax-phy.h.

Referenced by GetFrequency(), and SetFrequency().

◆ m_nrCarriers

uint8_t ns3::WimaxPhy::m_nrCarriers
private

number of carriers

Definition at line 467 of file wimax-phy.h.

Referenced by GetNrCarriers(), and SetNrCarriers().

◆ m_psDuration

Time ns3::WimaxPhy::m_psDuration
private

in seconds

Definition at line 471 of file wimax-phy.h.

Referenced by GetPsDuration(), and SetPsDuration().

◆ m_psPerFrame

uint16_t ns3::WimaxPhy::m_psPerFrame
private

ps per framce

Definition at line 474 of file wimax-phy.h.

Referenced by GetPsPerFrame(), and SetPsPerFrame().

◆ m_psPerSymbol

uint16_t ns3::WimaxPhy::m_psPerSymbol
private

ps per sumbol

Definition at line 473 of file wimax-phy.h.

Referenced by GetPsPerSymbol(), and SetPsPerSymbol().

◆ m_rxCallback

Callback<void, Ptr<const PacketBurst> > ns3::WimaxPhy::m_rxCallback
private

receive callback function

Definition at line 464 of file wimax-phy.h.

Referenced by GetReceiveCallback(), and SetReceiveCallback().

◆ m_rxFrequency

uint64_t ns3::WimaxPhy::m_rxFrequency
private

receive frequency

Definition at line 458 of file wimax-phy.h.

Referenced by WimaxPhy(), GetRxFrequency(), SetDuplex(), and SetSimplex().

◆ m_scanningCallback

Callback<void, bool, uint64_t> ns3::WimaxPhy::m_scanningCallback
private

scanning callback function

Definition at line 465 of file wimax-phy.h.

Referenced by EndScanning(), SetScanningCallback(), and StartScanning().

◆ m_scanningFrequency

uint64_t ns3::WimaxPhy::m_scanningFrequency
private

scanning frequency

Definition at line 459 of file wimax-phy.h.

Referenced by EndScanning(), GetScanningFrequency(), and StartScanning().

◆ m_state

PhyState ns3::WimaxPhy::m_state
private

state

Definition at line 462 of file wimax-phy.h.

Referenced by GetState(), SetState(), and StartScanning().

◆ m_symbolDuration

Time ns3::WimaxPhy::m_symbolDuration
private

in seconds

Definition at line 472 of file wimax-phy.h.

Referenced by GetSymbolDuration(), and SetSymbolDuration().

◆ m_symbolsPerFrame

uint32_t ns3::WimaxPhy::m_symbolsPerFrame
private

symbols per frame

Definition at line 475 of file wimax-phy.h.

Referenced by GetSymbolsPerFrame(), and SetSymbolsPerFrame().

◆ m_txFrequency

uint64_t ns3::WimaxPhy::m_txFrequency
private

transmit frequency

Definition at line 457 of file wimax-phy.h.

Referenced by WimaxPhy(), GetTxFrequency(), SetDuplex(), and SetSimplex().


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