A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::UanPhy Class Referenceabstract

Base class for UAN Phy models. More...

#include <introspected-doxygen.h>

+ Inheritance diagram for ns3::UanPhy:

Public Types

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

Public Member Functions

virtual int64_t AssignStreams (int64_t stream)=0
 
virtual void Clear (void)=0
 
virtual void EnergyDepletionHandler (void)=0
 
virtual double GetCcaThresholdDb (void)=0
 
virtual Ptr< UanChannelGetChannel (void) const =0
 
virtual Ptr< UanNetDeviceGetDevice (void)=0
 
virtual UanTxMode GetMode (uint32_t n)=0
 
virtual uint32_t GetNModes (void)=0
 
virtual Ptr< PacketGetPacketRx (void) const =0
 
virtual double GetRxGainDb (void)=0
 
virtual double GetRxThresholdDb (void)=0
 
virtual Ptr< UanTransducerGetTransducer (void)=0
 
virtual double GetTxPowerDb (void)=0
 
virtual bool IsStateBusy (void)=0
 
virtual bool IsStateCcaBusy (void)=0
 
virtual bool IsStateIdle (void)=0
 
virtual bool IsStateRx (void)=0
 
virtual bool IsStateSleep (void)=0
 
virtual bool IsStateTx (void)=0
 
virtual void NotifyIntChange (void)=0
 
void NotifyRxBegin (Ptr< const Packet > packet)
 
void NotifyRxDrop (Ptr< const Packet > packet)
 
void NotifyRxEnd (Ptr< const Packet > packet)
 
virtual void NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)=0
 
void NotifyTxBegin (Ptr< const Packet > packet)
 
void NotifyTxDrop (Ptr< const Packet > packet)
 
void NotifyTxEnd (Ptr< const Packet > packet)
 
virtual void RegisterListener (UanPhyListener *listener)=0
 
virtual void SendPacket (Ptr< Packet > pkt, uint32_t modeNum)=0
 
virtual void SetCcaThresholdDb (double thresh)=0
 
virtual void SetChannel (Ptr< UanChannel > channel)=0
 
virtual void SetDevice (Ptr< UanNetDevice > device)=0
 
virtual void SetEnergyModelCallback (DeviceEnergyModel::ChangeStateCallback callback)=0
 
virtual void SetMac (Ptr< UanMac > mac)=0
 
virtual void SetReceiveErrorCallback (RxErrCallback cb)=0
 
virtual void SetReceiveOkCallback (RxOkCallback cb)=0
 
virtual void SetRxGainDb (double gain)=0
 
virtual void SetRxThresholdDb (double thresh)=0
 
virtual void SetSleepMode (bool sleep)=0
 
virtual void SetTransducer (Ptr< UanTransducer > trans)=0
 
virtual void SetTxPowerDb (double txpwr)=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. More...
 
- Public Member Functions inherited from ns3::Object
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 
AggregateIterator GetAggregateIterator (void) const
 
virtual TypeId GetInstanceTypeId (void) const
 
template<typename T >
Ptr< T > GetObject (void) const
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 
void Initialize (void)
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 
- Public Member Functions inherited from ns3::ObjectBase
void GetAttribute (std::string name, AttributeValue &value) const
 
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
 
void SetAttribute (std::string name, const AttributeValue &value)
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 

Static Public Member Functions

static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Private Attributes

TracedCallback< Ptr< const
Packet > > 
m_phyRxBeginTrace
 
TracedCallback< Ptr< const
Packet > > 
m_phyRxDropTrace
 
TracedCallback< Ptr< const
Packet > > 
m_phyRxEndTrace
 
TracedCallback< Ptr< const
Packet > > 
m_phyTxBeginTrace
 
TracedCallback< Ptr< const
Packet > > 
m_phyTxDropTrace
 
TracedCallback< Ptr< const
Packet > > 
m_phyTxEndTrace
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void DoDispose (void)
 
virtual void DoInitialize (void)
 
virtual void NotifyNewAggregate (void)
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

Detailed Description

Base class for UAN Phy models.

Config Paths

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

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

No Attributes are defined for this type.

TraceSources

  • PhyTxBegin: Trace source indicating a packet has begun transmitting over the channel medium
  • PhyTxEnd: Trace source indicating a packet has been completely transmitted over the channel.
  • PhyTxDrop: Trace source indicating a packet has been dropped by the device during transmission
  • PhyRxBegin: Trace source indicating a packet has begun being received from the channel medium by the device
  • PhyRxEnd: Trace source indicating a packet has been completely received from the channel medium by the device
  • PhyRxDrop: Trace source indicating a packet has been dropped by the device during reception

Definition at line 166 of file uan-phy.h.

Member Typedef Documentation

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

arg1: packet received successfully arg2: snr of packet

Definition at line 188 of file uan-phy.h.

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

Definition at line 182 of file uan-phy.h.

Member Function Documentation

virtual int64_t ns3::UanPhy::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::UanPhyDual, and ns3::UanPhyGen.

virtual void ns3::UanPhy::Clear ( void  )
pure virtual

Clears all pointer references

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

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.

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.

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

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

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.

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.

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.

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.

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

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

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.

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

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

virtual double ns3::UanPhy::GetTxPowerDb ( void  )
pure virtual
Returns
Current TX power output

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

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

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

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.

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

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

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

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

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

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

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

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

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.

void ns3::UanPhy::NotifyRxBegin ( Ptr< const Packet packet)

Public method used to fire a PhyRxBegin trace. Implemented for encapsulation purposes.

Definition at line 115 of file uan-phy.cc.

References m_phyRxBeginTrace.

Referenced by ns3::UanPhyGen::StartRxPacket().

void ns3::UanPhy::NotifyRxDrop ( Ptr< const Packet packet)

Public method used to fire a PhyRxDrop trace. Implemented for encapsulation purposes.

Definition at line 127 of file uan-phy.cc.

References m_phyRxDropTrace.

Referenced by ns3::UanPhyGen::StartRxPacket().

void ns3::UanPhy::NotifyRxEnd ( Ptr< const Packet packet)

Public method used to fire a PhyRxEnd trace. Implemented for encapsulation purposes.

Definition at line 121 of file uan-phy.cc.

References m_phyRxEndTrace.

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.

void ns3::UanPhy::NotifyTxBegin ( Ptr< const Packet packet)

Public method used to fire a PhyTxBegin trace. Implemented for encapsulation purposes.

Definition at line 97 of file uan-phy.cc.

References m_phyTxBeginTrace.

void ns3::UanPhy::NotifyTxDrop ( Ptr< const Packet packet)

Public method used to fire a PhyTxDrop trace. Implemented for encapsulation purposes.

Definition at line 109 of file uan-phy.cc.

References m_phyTxDropTrace.

void ns3::UanPhy::NotifyTxEnd ( Ptr< const Packet packet)

Public method used to fire a PhyTxEnd trace. Implemented for encapsulation purposes.

Definition at line 103 of file uan-phy.cc.

References m_phyTxEndTrace.

Referenced by ns3::UanTransducerHd::Transmit().

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.

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.

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.

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.

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.

virtual void ns3::UanPhy::SetEnergyModelCallback ( DeviceEnergyModel::ChangeStateCallback  callback)
pure virtual
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.

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, and ns3::UanPhyDual.

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

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

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

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

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

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

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.

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

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

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.

Member Data Documentation

TracedCallback<Ptr<const Packet> > ns3::UanPhy::m_phyRxBeginTrace
private

The trace source fired when a packet begins the reception process from the medium.

See Also
class CallBackTraceSource

Definition at line 463 of file uan-phy.h.

Referenced by NotifyRxBegin().

TracedCallback<Ptr<const Packet> > ns3::UanPhy::m_phyRxDropTrace
private

The trace source fired when the phy layer drops a packet it has received.

See Also
class CallBackTraceSource

Definition at line 478 of file uan-phy.h.

Referenced by NotifyRxDrop().

TracedCallback<Ptr<const Packet> > ns3::UanPhy::m_phyRxEndTrace
private

The trace source fired when a packet ends the reception process from the medium.

See Also
class CallBackTraceSource

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

Referenced by NotifyRxEnd().

TracedCallback<Ptr<const Packet> > ns3::UanPhy::m_phyTxBeginTrace
private

The trace source fired when a packet begins the transmission process on the medium.

See Also
class CallBackTraceSource

Definition at line 439 of file uan-phy.h.

Referenced by NotifyTxBegin().

TracedCallback<Ptr<const Packet> > ns3::UanPhy::m_phyTxDropTrace
private

The trace source fired when the phy layer drops a packet as it tries to transmit it.

See Also
class CallBackTraceSource

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

Referenced by NotifyTxDrop().

TracedCallback<Ptr<const Packet> > ns3::UanPhy::m_phyTxEndTrace
private

The trace source fired when a packet ends the transmission process on the medium.

See Also
class CallBackTraceSource

Definition at line 447 of file uan-phy.h.

Referenced by NotifyTxEnd().


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