A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::UanPhyGen Class Reference

Generic PHY model. More...

#include <uan-phy-gen.h>

+ Inheritance diagram for ns3::UanPhyGen:
+ Collaboration diagram for ns3::UanPhyGen:

Public Member Functions

 UanPhyGen ()
virtual ~UanPhyGen ()
int64_t AssignStreams (int64_t stream)
virtual void Clear (void)
virtual void EnergyDepletionHandler (void)
virtual double GetCcaThresholdDb (void)
virtual Ptr< UanChannelGetChannel (void) const
virtual Ptr< UanNetDeviceGetDevice (void)
virtual UanTxMode GetMode (uint32_t n)
virtual uint32_t GetNModes (void)
virtual Ptr< PacketGetPacketRx (void) const
virtual double GetRxGainDb (void)
virtual double GetRxThresholdDb (void)
virtual Ptr< UanTransducerGetTransducer (void)
virtual double GetTxPowerDb (void)
virtual bool IsStateBusy (void)
virtual bool IsStateCcaBusy (void)
virtual bool IsStateIdle (void)
virtual bool IsStateRx (void)
virtual bool IsStateSleep (void)
virtual bool IsStateTx (void)
virtual void NotifyIntChange (void)
virtual void NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)
virtual void RegisterListener (UanPhyListener *listener)
virtual void SendPacket (Ptr< Packet > pkt, uint32_t modeNum)
virtual void SetCcaThresholdDb (double thresh)
virtual void SetChannel (Ptr< UanChannel > channel)
virtual void SetDevice (Ptr< UanNetDevice > device)
virtual void SetEnergyModelCallback (DeviceEnergyModel::ChangeStateCallback cb)
virtual void SetMac (Ptr< UanMac > mac)
virtual void SetReceiveErrorCallback (RxErrCallback cb)
virtual void SetReceiveOkCallback (RxOkCallback cb)
virtual void SetRxGainDb (double gain)
virtual void SetRxThresholdDb (double thresh)
virtual void SetSleepMode (bool sleep)
virtual void SetTransducer (Ptr< UanTransducer > trans)
virtual void SetTxPowerDb (double txpwr)
virtual void StartRxPacket (Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp)
 Packet arriving from channel: i.e. leading bit of packet has arrived.
- Public Member Functions inherited from ns3::UanPhy
void NotifyRxBegin (Ptr< const Packet > packet)
void NotifyRxDrop (Ptr< const Packet > packet)
void NotifyRxEnd (Ptr< const Packet > packet)
void NotifyTxBegin (Ptr< const Packet > packet)
void NotifyTxDrop (Ptr< const Packet > packet)
void NotifyTxEnd (Ptr< const Packet > packet)
- Public Member Functions inherited from ns3::Object
 Object ()
virtual ~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 Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 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
virtual ~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 UanModesList GetDefaultModes (void)
static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::UanPhyGen.

Protected Member Functions

virtual void DoDispose ()

Private Types

typedef std::list
< UanPhyListener * > 
ListenerList

Private Member Functions

double CalculateSinrDb (Ptr< Packet > pkt, Time arrTime, double rxPowerDb, UanTxMode mode, UanPdp pdp)
double DbToKp (double db)
double GetInterferenceDb (Ptr< Packet > pkt)
double KpToDb (double kp)
void NotifyListenersCcaEnd (void)
void NotifyListenersCcaStart (void)
void NotifyListenersRxBad (void)
void NotifyListenersRxGood (void)
void NotifyListenersRxStart (void)
void NotifyListenersTxStart (Time duration)
void RxEndEvent (Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode)
void TxEndEvent ()
void UpdatePowerConsumption (const State state)

Private Attributes

double m_ccaThreshDb
Ptr< UanChannelm_channel
bool m_cleared
Ptr< UanNetDevicem_device
bool m_disabled
DeviceEnergyModel::ChangeStateCallback m_energyCallback
ListenerList m_listeners
Ptr< UanMacm_mac
double m_minRxSinrDb
UanModesList m_modes
Ptr< UanPhyPerm_per
Ptr< UniformRandomVariablem_pg
 Provides uniform random variables.
Ptr< Packetm_pktRx
Time m_pktRxArrTime
UanTxMode m_pktRxMode
UanPdp m_pktRxPdp
RxErrCallback m_recErrCb
RxOkCallback m_recOkCb
TracedCallback< Ptr< const
Packet >, double, UanTxMode
m_rxErrLogger
double m_rxGainDb
TracedCallback< Ptr< const
Packet >, double, UanTxMode
m_rxOkLogger
double m_rxRecvPwrDb
double m_rxThreshDb
Ptr< UanPhyCalcSinrm_sinr
State m_state
Ptr< UanTransducerm_transducer
TracedCallback< Ptr< const
Packet >, double, UanTxMode
m_txLogger
double m_txPwrDb

Additional Inherited Members

- Public Types inherited from ns3::UanPhy
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. More...

Detailed Description

Generic PHY model.

This is a generic PHY class. SINR and PER information are controlled via attributes. By adapting the SINR and PER models to a specific situation, this PHY should be able to model a wide variety of networks.

Definition at line 161 of file uan-phy-gen.h.

Member Typedef Documentation

Definition at line 220 of file uan-phy-gen.h.

Constructor & Destructor Documentation

ns3::UanPhyGen::UanPhyGen ( )

Definition at line 344 of file uan-phy-gen.cc.

References m_energyCallback, m_pg, and ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Nullify().

+ Here is the call graph for this function:

ns3::UanPhyGen::~UanPhyGen ( )
virtual

Definition at line 364 of file uan-phy-gen.cc.

Member Function Documentation

int64_t ns3::UanPhyGen::AssignStreams ( int64_t  stream)
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

Implements ns3::UanPhy.

Definition at line 869 of file uan-phy-gen.cc.

References m_pg, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

+ Here is the call graph for this function:

double ns3::UanPhyGen::CalculateSinrDb ( Ptr< Packet pkt,
Time  arrTime,
double  rxPowerDb,
UanTxMode  mode,
UanPdp  pdp 
)
private

Definition at line 896 of file uan-phy-gen.cc.

References ns3::UanPhyCalcSinr::CalcSinrDb(), ns3::UanTransducer::GetArrivalList(), ns3::UanTxMode::GetBandwidthHz(), ns3::UanTxMode::GetCenterFreqHz(), ns3::UanChannel::GetNoiseDbHz(), m_channel, m_sinr, and m_transducer.

Referenced by StartRxPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::UanPhyGen::Clear ( void  )
virtual

Clears all pointer references

Implements ns3::UanPhy.

Definition at line 370 of file uan-phy-gen.cc.

References ns3::UanPhyCalcSinr::Clear(), ns3::UanMac::Clear(), ns3::UanChannel::Clear(), ns3::UanNetDevice::Clear(), ns3::UanPhyPer::Clear(), ns3::UanTransducer::Clear(), m_channel, m_cleared, m_device, m_listeners, m_mac, m_per, m_pktRx, m_sinr, and m_transducer.

Referenced by DoDispose().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double ns3::UanPhyGen::DbToKp ( double  db)
private

Definition at line 925 of file uan-phy-gen.cc.

Referenced by GetInterferenceDb().

+ Here is the caller graph for this function:

void ns3::UanPhyGen::DoDispose ( void  )
protectedvirtual

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.

Definition at line 412 of file uan-phy-gen.cc.

References Clear(), m_energyCallback, and ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Nullify().

+ Here is the call graph for this function:

void ns3::UanPhyGen::EnergyDepletionHandler ( void  )
virtual

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

Implements ns3::UanPhy.

Definition at line 502 of file uan-phy-gen.cc.

References ns3::Node::GetId(), ns3::UanNetDevice::GetNode(), m_device, m_disabled, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

double ns3::UanPhyGen::GetCcaThresholdDb ( void  )
virtual
Returns
Threshold signal strength in dB to enter CCA busy mode

Implements ns3::UanPhy.

Definition at line 791 of file uan-phy-gen.cc.

References m_ccaThreshDb.

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

Implements ns3::UanPhy.

Definition at line 797 of file uan-phy-gen.cc.

References m_channel.

UanModesList ns3::UanPhyGen::GetDefaultModes ( void  )
static
Returns
Default TX modes of UanPhyGen

Definition at line 420 of file uan-phy-gen.cc.

References ns3::UanModesList::AppendMode(), ns3::UanTxModeFactory::CreateMode(), ns3::UanTxMode::FSK, and ns3::UanTxMode::PSK.

Referenced by ns3::UanPhyDual::GetTypeId(), and GetTypeId().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements ns3::UanPhy.

Definition at line 803 of file uan-phy-gen.cc.

References m_device.

double ns3::UanPhyGen::GetInterferenceDb ( Ptr< Packet pkt)
private

Definition at line 903 of file uan-phy-gen.cc.

References DbToKp(), ns3::UanTransducer::GetArrivalList(), KpToDb(), and m_transducer.

Referenced by NotifyIntChange(), RxEndEvent(), SetSleepMode(), StartRxPacket(), and TxEndEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements ns3::UanPhy.

Definition at line 999 of file uan-phy-gen.cc.

References ns3::UanModesList::GetNModes(), m_modes, and NS_ASSERT.

Referenced by SendPacket(), and StartRxPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::UanPhyGen::GetNModes ( void  )
virtual
Returns
Number of TX modes supported by this PHY

Implements ns3::UanPhy.

Definition at line 993 of file uan-phy-gen.cc.

References ns3::UanModesList::GetNModes(), and m_modes.

Referenced by StartRxPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements ns3::UanPhy.

Definition at line 1007 of file uan-phy-gen.cc.

References m_pktRx.

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

Implements ns3::UanPhy.

Definition at line 775 of file uan-phy-gen.cc.

References m_rxGainDb.

double ns3::UanPhyGen::GetRxThresholdDb ( void  )
virtual
Returns
Required signal strength, in dB, to begin receiving packet

Implements ns3::UanPhy.

Definition at line 786 of file uan-phy-gen.cc.

References m_rxThreshDb.

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

Implements ns3::UanPhy.

Definition at line 809 of file uan-phy-gen.cc.

References m_transducer.

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

Implements ns3::UanPhy.

Definition at line 780 of file uan-phy-gen.cc.

References m_txPwrDb.

TypeId ns3::UanPhyGen::GetTypeId ( void  )
static

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

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

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

Attributes defined for this type:

  • CcaThreshold: Aggregate energy of incoming signals to move to CCA Busy state dB
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 10
    • Flags: construct write read
  • RxThreshold: Required SNR for signal acquisition in dB
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 10
    • Flags: construct write read
  • TxPower: Transmission output power in dB
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 190
    • Flags: construct write read
  • RxGain: Gain added to incoming signal at receiver
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • SupportedModes: List of modes supported by this PHY
    • Set with class: UanModesListValue
    • Underlying type: UanModesList
    • Initial value: 2|0|1|
    • Flags: construct write read
  • PerModel: Functor to calculate PER based on SINR and TxMode
  • SinrModel: Functor to calculate SINR based on pkt arrivals and modes

TraceSources defined for this type:

  • RxOk: A packet was received successfully
  • RxError: A packet was received unsuccessfully
  • Tx: Packet transmission beginning

TraceSources defined in parent class ns3::UanPhy:

  • 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

Reimplemented from ns3::UanPhy.

Definition at line 428 of file uan-phy-gen.cc.

References GetDefaultModes(), m_ccaThreshDb, m_modes, m_per, m_rxErrLogger, m_rxGainDb, m_rxOkLogger, m_rxThreshDb, m_sinr, m_txLogger, m_txPwrDb, ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

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

Implements ns3::UanPhy.

Definition at line 731 of file uan-phy-gen.cc.

References IsStateIdle(), and IsStateSleep().

+ Here is the call graph for this function:

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

Implements ns3::UanPhy.

Definition at line 747 of file uan-phy-gen.cc.

References ns3::UanPhy::CCABUSY, and m_state.

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

Implements ns3::UanPhy.

Definition at line 726 of file uan-phy-gen.cc.

References ns3::UanPhy::IDLE, and m_state.

Referenced by IsStateBusy().

+ Here is the caller graph for this function:

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

Implements ns3::UanPhy.

Definition at line 736 of file uan-phy-gen.cc.

References m_state, and ns3::UanPhy::RX.

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

Implements ns3::UanPhy.

Definition at line 721 of file uan-phy-gen.cc.

References m_state, and ns3::UanPhy::SLEEP.

Referenced by IsStateBusy().

+ Here is the caller graph for this function:

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

Implements ns3::UanPhy.

Definition at line 741 of file uan-phy-gen.cc.

References m_state, and ns3::UanPhy::TX.

double ns3::UanPhyGen::KpToDb ( double  kp)
private

Definition at line 930 of file uan-phy-gen.cc.

Referenced by GetInterferenceDb().

+ Here is the caller graph for this function:

void ns3::UanPhyGen::NotifyIntChange ( void  )
virtual

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

Implements ns3::UanPhy.

Definition at line 886 of file uan-phy-gen.cc.

References ns3::UanPhy::CCABUSY, GetInterferenceDb(), ns3::UanPhy::IDLE, m_ccaThreshDb, m_state, and NotifyListenersCcaEnd().

+ Here is the call graph for this function:

void ns3::UanPhyGen::NotifyListenersCcaEnd ( void  )
private

Definition at line 973 of file uan-phy-gen.cc.

References m_listeners.

Referenced by NotifyIntChange().

+ Here is the caller graph for this function:

void ns3::UanPhyGen::NotifyListenersCcaStart ( void  )
private

Definition at line 964 of file uan-phy-gen.cc.

References m_listeners.

Referenced by RxEndEvent(), SetSleepMode(), StartRxPacket(), and TxEndEvent().

+ Here is the caller graph for this function:

void ns3::UanPhyGen::NotifyListenersRxBad ( void  )
private

Definition at line 955 of file uan-phy-gen.cc.

References m_listeners.

Referenced by RxEndEvent().

+ Here is the caller graph for this function:

void ns3::UanPhyGen::NotifyListenersRxGood ( void  )
private

Definition at line 946 of file uan-phy-gen.cc.

References m_listeners.

Referenced by RxEndEvent().

+ Here is the caller graph for this function:

void ns3::UanPhyGen::NotifyListenersRxStart ( void  )
private

Definition at line 936 of file uan-phy-gen.cc.

References m_listeners.

Referenced by StartRxPacket().

+ Here is the caller graph for this function:

void ns3::UanPhyGen::NotifyListenersTxStart ( Time  duration)
private

Definition at line 983 of file uan-phy-gen.cc.

References m_listeners.

Referenced by SendPacket().

+ Here is the caller graph for this function:

void ns3::UanPhyGen::NotifyTransStartTx ( Ptr< Packet packet,
double  txPowerDb,
UanTxMode  txMode 
)
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.

Implements ns3::UanPhy.

Definition at line 877 of file uan-phy-gen.cc.

References m_minRxSinrDb, and m_pktRx.

void ns3::UanPhyGen::RegisterListener ( UanPhyListener listener)
virtual
Parameters
listenerNew listener to register

Register an object to be notified of common Phy events

Implements ns3::UanPhy.

Definition at line 573 of file uan-phy-gen.cc.

References m_listeners.

void ns3::UanPhyGen::SendPacket ( Ptr< Packet pkt,
uint32_t  modeNum 
)
virtual
void ns3::UanPhyGen::SetCcaThresholdDb ( double  thresh)
virtual
Parameters
threshSignal power at receiver required for CCA busy state

Implements ns3::UanPhy.

Definition at line 770 of file uan-phy-gen.cc.

References m_ccaThreshDb.

void ns3::UanPhyGen::SetChannel ( Ptr< UanChannel channel)
virtual
Parameters
channelThe channel this Phy is attached to

Implements ns3::UanPhy.

Definition at line 814 of file uan-phy-gen.cc.

References m_channel.

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

Implements ns3::UanPhy.

Definition at line 820 of file uan-phy-gen.cc.

References m_device.

void ns3::UanPhyGen::SetEnergyModelCallback ( DeviceEnergyModel::ChangeStateCallback  callback)
virtual
Parameters
callbackDeviceEnergyModel change state callback.

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

Implements ns3::UanPhy.

Definition at line 484 of file uan-phy-gen.cc.

References m_energyCallback, and NS_LOG_FUNCTION.

void ns3::UanPhyGen::SetMac ( Ptr< UanMac mac)
virtual
Parameters
macThe MAC forwarding messages to this Phy

Implements ns3::UanPhy.

Definition at line 826 of file uan-phy-gen.cc.

References m_mac.

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

Implements ns3::UanPhy.

Definition at line 716 of file uan-phy-gen.cc.

References m_recErrCb.

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

Implements ns3::UanPhy.

Definition at line 710 of file uan-phy-gen.cc.

References m_recOkCb.

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

Implements ns3::UanPhy.

Definition at line 754 of file uan-phy-gen.cc.

References m_rxGainDb.

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

Implements ns3::UanPhy.

Definition at line 765 of file uan-phy-gen.cc.

References m_rxThreshDb.

void ns3::UanPhyGen::SetSleepMode ( bool  sleep)
virtual
void ns3::UanPhyGen::SetTransducer ( Ptr< UanTransducer trans)
virtual
Parameters
transTransducer this Phy outputs to / receives from

Implements ns3::UanPhy.

Definition at line 832 of file uan-phy-gen.cc.

References ns3::UanTransducer::AddPhy(), and m_transducer.

+ Here is the call graph for this function:

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

Implements ns3::UanPhy.

Definition at line 760 of file uan-phy-gen.cc.

References m_txPwrDb.

void ns3::UanPhyGen::StartRxPacket ( Ptr< Packet pkt,
double  rxPowerDb,
UanTxMode  txMode,
UanPdp  pdp 
)
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

Implements ns3::UanPhy.

Definition at line 580 of file uan-phy-gen.cc.

References CalculateSinrDb(), ns3::UanPhy::CCABUSY, ns3::UanMac::GetAddress(), ns3::UanTxMode::GetDataRateBps(), GetInterferenceDb(), GetMode(), GetNModes(), ns3::Packet::GetSize(), ns3::UanTxMode::GetUid(), ns3::UanPhy::IDLE, m_ccaThreshDb, m_disabled, m_mac, m_minRxSinrDb, m_pktRx, m_pktRxArrTime, m_pktRxMode, m_pktRxPdp, m_rxRecvPwrDb, m_rxThreshDb, m_state, NotifyListenersCcaStart(), NotifyListenersRxStart(), ns3::UanPhy::NotifyRxBegin(), ns3::UanPhy::NotifyRxDrop(), ns3::Now(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, ns3::UanPhy::RX, RxEndEvent(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::UanPhy::SLEEP, ns3::UanPhy::TX, and UpdatePowerConsumption().

+ Here is the call graph for this function:

void ns3::UanPhyGen::TxEndEvent ( )
private

Definition at line 551 of file uan-phy-gen.cc.

References ns3::UanPhy::CCABUSY, GetInterferenceDb(), ns3::UanPhy::IDLE, m_ccaThreshDb, m_disabled, m_state, NotifyListenersCcaStart(), NS_ASSERT, NS_LOG_DEBUG, ns3::UanPhy::SLEEP, ns3::UanPhy::TX, and UpdatePowerConsumption().

Referenced by SendPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::UanPhyGen::UpdatePowerConsumption ( const State  state)
private

Definition at line 491 of file uan-phy-gen.cc.

References ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_energyCallback, and NS_LOG_FUNCTION.

Referenced by RxEndEvent(), SendPacket(), StartRxPacket(), and TxEndEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

double ns3::UanPhyGen::m_ccaThreshDb
private
Ptr<UanChannel> ns3::UanPhyGen::m_channel
private

Definition at line 228 of file uan-phy-gen.h.

Referenced by CalculateSinrDb(), Clear(), GetChannel(), and SetChannel().

bool ns3::UanPhyGen::m_cleared
private

Definition at line 247 of file uan-phy-gen.h.

Referenced by Clear().

Ptr<UanNetDevice> ns3::UanPhyGen::m_device
private

Definition at line 230 of file uan-phy-gen.h.

Referenced by Clear(), EnergyDepletionHandler(), GetDevice(), and SetDevice().

bool ns3::UanPhyGen::m_disabled
private
DeviceEnergyModel::ChangeStateCallback ns3::UanPhyGen::m_energyCallback
private
Ptr<UanMac> ns3::UanPhyGen::m_mac
private

Definition at line 231 of file uan-phy-gen.h.

Referenced by Clear(), SendPacket(), SetMac(), and StartRxPacket().

double ns3::UanPhyGen::m_minRxSinrDb
private

Definition at line 241 of file uan-phy-gen.h.

Referenced by NotifyTransStartTx(), RxEndEvent(), SendPacket(), and StartRxPacket().

UanModesList ns3::UanPhyGen::m_modes
private

Definition at line 222 of file uan-phy-gen.h.

Referenced by GetMode(), GetNModes(), and GetTypeId().

Ptr<UanPhyPer> ns3::UanPhyGen::m_per
private

Definition at line 232 of file uan-phy-gen.h.

Referenced by Clear(), GetTypeId(), and RxEndEvent().

Ptr<UniformRandomVariable> ns3::UanPhyGen::m_pg
private

Provides uniform random variables.

Definition at line 251 of file uan-phy-gen.h.

Referenced by AssignStreams(), RxEndEvent(), and UanPhyGen().

Ptr<Packet> ns3::UanPhyGen::m_pktRx
private
Time ns3::UanPhyGen::m_pktRxArrTime
private

Definition at line 243 of file uan-phy-gen.h.

Referenced by StartRxPacket().

UanTxMode ns3::UanPhyGen::m_pktRxMode
private

Definition at line 245 of file uan-phy-gen.h.

Referenced by StartRxPacket().

UanPdp ns3::UanPhyGen::m_pktRxPdp
private

Definition at line 244 of file uan-phy-gen.h.

Referenced by StartRxPacket().

RxErrCallback ns3::UanPhyGen::m_recErrCb
private

Definition at line 227 of file uan-phy-gen.h.

Referenced by RxEndEvent(), and SetReceiveErrorCallback().

RxOkCallback ns3::UanPhyGen::m_recOkCb
private

Definition at line 226 of file uan-phy-gen.h.

Referenced by RxEndEvent(), and SetReceiveOkCallback().

TracedCallback<Ptr<const Packet>, double, UanTxMode > ns3::UanPhyGen::m_rxErrLogger
private

Definition at line 255 of file uan-phy-gen.h.

Referenced by GetTypeId(), and RxEndEvent().

double ns3::UanPhyGen::m_rxGainDb
private

Definition at line 235 of file uan-phy-gen.h.

Referenced by GetRxGainDb(), GetTypeId(), and SetRxGainDb().

TracedCallback<Ptr<const Packet>, double, UanTxMode > ns3::UanPhyGen::m_rxOkLogger
private

Definition at line 254 of file uan-phy-gen.h.

Referenced by GetTypeId(), and RxEndEvent().

double ns3::UanPhyGen::m_rxRecvPwrDb
private

Definition at line 242 of file uan-phy-gen.h.

Referenced by StartRxPacket().

double ns3::UanPhyGen::m_rxThreshDb
private

Definition at line 237 of file uan-phy-gen.h.

Referenced by GetRxThresholdDb(), GetTypeId(), SetRxThresholdDb(), and StartRxPacket().

Ptr<UanPhyCalcSinr> ns3::UanPhyGen::m_sinr
private

Definition at line 233 of file uan-phy-gen.h.

Referenced by CalculateSinrDb(), Clear(), and GetTypeId().

Ptr<UanTransducer> ns3::UanPhyGen::m_transducer
private
TracedCallback<Ptr<const Packet>, double, UanTxMode > ns3::UanPhyGen::m_txLogger
private

Definition at line 256 of file uan-phy-gen.h.

Referenced by GetTypeId(), and SendPacket().

double ns3::UanPhyGen::m_txPwrDb
private

Definition at line 236 of file uan-phy-gen.h.

Referenced by GetTxPowerDb(), GetTypeId(), SendPacket(), and SetTxPowerDb().


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