|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #ifndef HALF_DUPLEX_IDEAL_PHY_H
22 #define HALF_DUPLEX_IDEAL_PHY_H
25 #include <ns3/spectrum-value.h>
26 #include <ns3/mobility-model.h>
27 #include <ns3/packet.h>
28 #include <ns3/nstime.h>
29 #include <ns3/net-device.h>
30 #include <ns3/spectrum-phy.h>
31 #include <ns3/spectrum-channel.h>
32 #include <ns3/spectrum-interference.h>
33 #include <ns3/data-rate.h>
34 #include <ns3/generic-phy.h>
35 #include <ns3/event-id.h>
36 #include <ns3/spectrum-signal-parameters.h>
a unique identifier for an interface.
TracedCallback< Ptr< const Packet > > m_phyRxEndErrorTrace
Trace - Rx end (error)
void SetChannel(Ptr< SpectrumChannel > c)
Set the channel attached to this device.
TracedCallback< Ptr< const Packet > > m_phyRxEndOkTrace
Trace - Tx end (ok)
void EndRx()
End current Rx.
An identifier for simulation events.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void EndTx()
End the current Tx.
void SetGenericPhyRxEndErrorCallback(GenericPhyRxEndErrorCallback c)
set the callback for the end of a RX in error, as part of the interconnections between the PHY and th...
void SetMobility(Ptr< MobilityModel > m)
Set the mobility model associated with this device.
GenericPhyTxEndCallback m_phyMacTxEndCallback
Callback - Tx end.
Ptr< AntennaModel > GetRxAntenna() const
Get the AntennaModel used by the NetDevice for reception.
SpectrumInterference m_interference
Received interference.
Smart pointer class similar to boost::intrusive_ptr.
Class for representing data rates.
void StartRx(Ptr< SpectrumSignalParameters > params)
Notify the SpectrumPhy instance of an incoming signal.
void SetTxPowerSpectralDensity(Ptr< SpectrumValue > txPsd)
Set the Power Spectral Density of outgoing signals in power units (Watt, Pascal......
Ptr< const SpectrumValue > m_rxPsd
Rx power spectral density.
Ptr< NetDevice > m_netDevice
NetDevice connected to theis phy.
Ptr< const SpectrumModel > GetRxSpectrumModel() const
Ptr< Packet > m_rxPacket
Rx packet.
EventId m_endRxEventId
End Rx event.
Ptr< SpectrumValue > m_txPsd
Tx power spectral density.
TracedCallback< Ptr< const Packet > > m_phyRxAbortTrace
Trace - Rx abort.
GenericPhyRxEndOkCallback m_phyMacRxEndOkCallback
Callback - Rx end.
Abstract base class for Spectrum-aware PHY layers.
bool StartTx(Ptr< Packet > p)
Start a transmission.
Ptr< MobilityModel > GetMobility() const
Get the associated MobilityModel instance.
void SetGenericPhyRxStartCallback(GenericPhyRxStartCallback c)
Set the callback for the start of RX, as part of the interconnections between the PHY and the MAC.
void SetDevice(Ptr< NetDevice > d)
Set the associated NetDevice instance.
Ptr< AntennaModel > m_antenna
Antenna model.
GenericPhyRxEndErrorCallback m_phyMacRxEndErrorCallback
Callback - Rx error.
void SetNoisePowerSpectralDensity(Ptr< const SpectrumValue > noisePsd)
Set the Noise Power Spectral Density in power units (Watt, Pascal...) per Hz.
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
Trace - Tx end.
GenericPhyRxStartCallback m_phyMacRxStartCallback
Callback - Rx start.
void SetGenericPhyRxEndOkCallback(GenericPhyRxEndOkCallback c)
set the callback for the successful end of a RX, as part of the interconnections between the PHY and ...
TracedCallback< Ptr< const Packet > > m_phyTxStartTrace
Trace - Tx start.
DataRate GetRate() const
Get the PHY rate to be used by this PHY.
This PHY layer implementation realizes an ideal OFDM PHY which transmits half-duplex (i....
void SetGenericPhyTxEndCallback(GenericPhyTxEndCallback c)
Set the callback for the end of a TX, as part of the interconnections between the PHY and the MAC.
TracedCallback< Ptr< const Packet > > m_phyRxStartTrace
Trace - Rx start.
void SetRate(DataRate rate)
Set the PHY rate to be used by this PHY.
Ptr< MobilityModel > m_mobility
Mobility model.
void ChangeState(State newState)
Change the PHY state.
Forward calls to a chain of Callback.
void SetAntenna(Ptr< AntennaModel > a)
set the AntennaModel to be used
virtual ~HalfDuplexIdealPhy()
void AbortRx()
About current Rx.
This class implements a gaussian interference model, i.e., all incoming signals are added to the tota...
Ptr< SpectrumChannel > m_channel
Channel.
Ptr< Packet > m_txPacket
Tx packet.
static TypeId GetTypeId(void)
Get the type ID.
virtual void DoDispose(void)
Destructor implementation.
Ptr< NetDevice > GetDevice() const
Get the associated NetDevice instance.