ns-3
ns3::UanPhy Class Reference

Base class for UAN Phy models. More...

#include <uan-phy.h>

Inheritance diagram for ns3::UanPhy:
Collaboration diagram for ns3::UanPhy:

List of all members.

Public Types

enum  State {
  IDLE, CCABUSY, RX, TX,
  SLEEP
}
 Enum defining possible Phy states.
typedef Callback< void, Ptr
< Packet >, double, UanTxMode
RxOkCallback
typedef Callback< void, Ptr
< Packet >, double > 
RxErrCallback

Public Member Functions

virtual void SetEnergyModelCallback (DeviceEnergyModel::ChangeStateCallback callback)=0
virtual void EnergyDepletionHandler (void)=0
virtual void SendPacket (Ptr< Packet > pkt, uint32_t modeNum)=0
virtual void RegisterListener (UanPhyListener *listener)=0
virtual void StartRxPacket (Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp)=0
 Packet arriving from channel: i.e. leading bit of packet has arrived.
virtual void SetReceiveOkCallback (RxOkCallback cb)=0
virtual void SetReceiveErrorCallback (RxErrCallback cb)=0
virtual void SetRxGainDb (double gain)=0
virtual void SetTxPowerDb (double txpwr)=0
virtual void SetRxThresholdDb (double thresh)=0
virtual void SetCcaThresholdDb (double thresh)=0
virtual double GetRxGainDb (void)=0
virtual double GetTxPowerDb (void)=0
virtual double GetRxThresholdDb (void)=0
virtual double GetCcaThresholdDb (void)=0
virtual bool IsStateSleep (void)=0
virtual bool IsStateIdle (void)=0
virtual bool IsStateBusy (void)=0
virtual bool IsStateRx (void)=0
virtual bool IsStateTx (void)=0
virtual bool IsStateCcaBusy (void)=0
virtual Ptr< UanChannelGetChannel (void) const =0
virtual Ptr< UanNetDeviceGetDevice (void)=0
virtual void SetChannel (Ptr< UanChannel > channel)=0
virtual void SetDevice (Ptr< UanNetDevice > device)=0
virtual void SetMac (Ptr< UanMac > mac)=0
virtual void NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)=0
virtual void NotifyIntChange (void)=0
virtual void SetTransducer (Ptr< UanTransducer > trans)=0
virtual Ptr< UanTransducerGetTransducer (void)=0
virtual uint32_t GetNModes (void)=0
virtual UanTxMode GetMode (uint32_t n)=0
virtual Ptr< PacketGetPacketRx (void) const =0
virtual void Clear (void)=0
virtual void SetSleepMode (bool sleep)=0

Static Public Member Functions

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

Detailed Description

Base class for UAN Phy models.


Member Typedef Documentation

typedef Callback<void, Ptr<Packet>, double > ns3::UanPhy::RxErrCallback

arg1: packet received successfully arg2: snr of packet

arg1: packet received successfully arg2: snr of packet arg3: mode of packet


Member Function Documentation

virtual void ns3::UanPhy::Clear ( void  ) [pure virtual]
virtual void ns3::UanPhy::EnergyDepletionHandler ( void  ) [pure virtual]

This function handles the energy depletion event. Must be implemented by UanPhy child classes.

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::AcousticModemEnergyModel::HandleEnergyDepletion().

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::GetCcaThresholdDb(), and ns3::UanPhyDual::GetCcaThresholdPhy1().

virtual Ptr<UanChannel> ns3::UanPhy::GetChannel ( void  ) const [pure virtual]
Returns:
Channel this phy is attached to

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::GetChannel().

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::GetDevice().

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::GetMode(), and ns3::UanPhyDual::SendPacket().

virtual uint32_t ns3::UanPhy::GetNModes ( void  ) [pure virtual]
Returns:
Number of TX modes supported by this PHY

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::GetMode(), ns3::UanPhyDual::GetNModes(), and ns3::UanPhyDual::SendPacket().

virtual Ptr<Packet> ns3::UanPhy::GetPacketRx ( void  ) const [pure virtual]
Warning:
Returns non-valid pointer if IsStateRx == false
Returns:
Packet currently being received in PHY

Implemented in ns3::UanPhyDual, and ns3::UanPhyGen.

Referenced by ns3::UanPhyDual::GetPhy1PacketRx().

virtual double ns3::UanPhy::GetRxGainDb ( void  ) [pure virtual]
Returns:
Gain added to signal at receiver in dB

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::GetRxGainDb(), and ns3::UanPhyDual::GetRxGainDbPhy1().

virtual double ns3::UanPhy::GetRxThresholdDb ( void  ) [pure virtual]
Returns:
Required signal strength, in dB, to begin receiving packet

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::GetRxThresholdDb().

virtual Ptr<UanTransducer> ns3::UanPhy::GetTransducer ( void  ) [pure virtual]
Returns:
Transducer this Phy outputs to / receives from

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanMacCw::Enqueue(), and ns3::UanPhyDual::GetTransducer().

virtual double ns3::UanPhy::GetTxPowerDb ( void  ) [pure virtual]
TypeId ns3::UanPhy::GetTypeId ( void  ) [static]

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

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

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::UanNetDevice/Phy
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::UanPhy
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::UanNetDevice/Phy
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::UanPhy
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Phy

No Attributes defined for this type.
No TraceSources defined for this type.

Reimplemented from ns3::Object.

Reimplemented in ns3::UanPhyGen, and ns3::UanPhyDual.

References ns3::TypeId::SetParent().

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanMacCw::Enqueue().

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::IsStateCcaBusy(), ns3::UanMacCw::NotifyRxEndError(), and ns3::UanMacCw::NotifyRxEndOk().

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::IsPhy1Idle(), and ns3::UanPhyDual::IsStateIdle().

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::IsPhy1Rx(), and ns3::UanPhyDual::IsStateRx().

virtual bool ns3::UanPhy::IsStateSleep ( void  ) [pure virtual]
Returns:
True if Phy is SLEEP

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::IsStateSleep().

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanMacAloha::Enqueue(), ns3::UanMacCw::Enqueue(), ns3::UanPhyDual::IsPhy1Tx(), and ns3::UanPhyDual::IsStateTx().

virtual void ns3::UanPhy::NotifyIntChange ( void  ) [pure virtual]

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::NotifyIntChange().

virtual void ns3::UanPhy::NotifyTransStartTx ( Ptr< Packet packet,
double  txPowerDb,
UanTxMode  txMode 
) [pure virtual]
Parameters:
packetPacket that is beginning transmission
txPowerDbTransmit power of packet
txModeTransmission mode of packet

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

virtual void ns3::UanPhy::RegisterListener ( UanPhyListener listener) [pure virtual]
Parameters:
listenerNew listener to register

Register an object to be notified of common Phy events

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanMacCw::AttachPhy(), and ns3::UanPhyDual::RegisterListener().

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanMacAloha::Enqueue(), ns3::UanMacCw::Enqueue(), and ns3::UanPhyDual::SendPacket().

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::SetCcaThresholdDb(), and ns3::UanPhyDual::SetCcaThresholdPhy1().

virtual void ns3::UanPhy::SetChannel ( Ptr< UanChannel channel) [pure virtual]
Parameters:
channelThe channel this Phy is attached to

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanNetDevice::SetChannel(), and ns3::UanPhyDual::SetChannel().

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::SetDevice(), and ns3::UanNetDevice::SetPhy().

Parameters:
callbackDeviceEnergyModel change state callback.

This function sets the DeviceEnergyModel callback for UanPhy device. Must be implemented by UanPhy child classes.

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

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

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanNetDevice::SetMac(), ns3::UanPhyDual::SetMac(), and ns3::UanNetDevice::SetPhy().

virtual void ns3::UanPhy::SetReceiveErrorCallback ( RxErrCallback  cb) [pure virtual]
Parameters:
cbCallback to be enabled when a packet is received with errors

Implemented in ns3::UanPhyGen.

Referenced by ns3::UanMacAloha::AttachPhy(), ns3::UanMacRcGw::AttachPhy(), and ns3::UanMacCw::AttachPhy().

virtual void ns3::UanPhy::SetReceiveOkCallback ( RxOkCallback  cb) [pure virtual]
Parameters:
cbCallback to be enabled when packet is received without error

Implemented in ns3::UanPhyGen.

Referenced by ns3::UanMacAloha::AttachPhy(), ns3::UanMacCw::AttachPhy(), ns3::UanMacRcGw::AttachPhy(), and ns3::UanMacRc::AttachPhy().

virtual void ns3::UanPhy::SetRxGainDb ( double  gain) [pure virtual]
Parameters:
gainGain added at receiver

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::SetRxGainDb(), and ns3::UanPhyDual::SetRxGainDbPhy1().

virtual void ns3::UanPhy::SetRxThresholdDb ( double  thresh) [pure virtual]
Parameters:
threshThreshold SINR for propper reception in dB

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::SetRxThresholdDb().

virtual void ns3::UanPhy::SetTransducer ( Ptr< UanTransducer trans) [pure virtual]
Parameters:
transTransducer this Phy outputs to / receives from

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanNetDevice::SetPhy(), ns3::UanNetDevice::SetTransducer(), and ns3::UanPhyDual::SetTransducer().

virtual void ns3::UanPhy::SetTxPowerDb ( double  txpwr) [pure virtual]
Parameters:
txpwrFinal output transmission power in dB

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.

Referenced by ns3::UanPhyDual::SetTxPowerDb(), and ns3::UanPhyDual::SetTxPowerDbPhy1().

virtual void ns3::UanPhy::StartRxPacket ( Ptr< Packet pkt,
double  rxPowerDb,
UanTxMode  txMode,
UanPdp  pdp 
) [pure virtual]

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

Parameters:
pktPacket which is arriving
rxPowerDbSignal power of incoming packet in dB
txModeTransmission mode defining modulation of incoming packet
pdpPower delay profile of incoming packet

Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.


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