A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::UanPhyDual Class Reference

Two channel Phy. More...

#include "uan-phy-dual.h"

+ Inheritance diagram for ns3::UanPhyDual:
+ Collaboration diagram for ns3::UanPhyDual:

Public Member Functions

 UanPhyDual ()
 Constructor.
 
 ~UanPhyDual () override
 Dummy destructor.
 
int64_t AssignStreams (int64_t stream) override
 Assign a fixed random variable stream number to the random variables used by this model.
 
void Clear () override
 Clear all pointer references.
 
void EnergyDepletionHandler () override
 Handle the energy depletion event.
 
void EnergyRechargeHandler () override
 Handle the energy recharge event.
 
double GetCcaThresholdDb () override
 Get the CCA threshold signal strength required to detect channel busy.
 
double GetCcaThresholdPhy1 () const
 Get the CCA threshold signal strength required to detect channel busy.
 
double GetCcaThresholdPhy2 () const
 Get the CCA threshold signal strength required to detect channel busy.
 
Ptr< UanChannelGetChannel () const override
 Get the attached channel.
 
Ptr< UanNetDeviceGetDevice () const override
 Get the device hosting this Phy.
 
UanTxMode GetMode (uint32_t n) override
 Get a specific transmission mode.
 
UanModesList GetModesPhy1 () const
 Get the list of available modes.
 
UanModesList GetModesPhy2 () const
 Get the list of available modes.
 
uint32_t GetNModes () override
 Get the number of transmission modes supported by this Phy.
 
Ptr< PacketGetPacketRx () const override
 Get the packet currently being received.
 
Ptr< UanPhyPerGetPerModelPhy1 () const
 Get the error probability model.
 
Ptr< UanPhyPerGetPerModelPhy2 () const
 Get the error probability model.
 
Ptr< PacketGetPhy1PacketRx () const
 Get the packet currently being received.
 
Ptr< PacketGetPhy2PacketRx () const
 Get the packet currently being received.
 
double GetRxThresholdDb () override
 Get the minimum received signal strength required to receive a packet without errors.
 
Ptr< UanPhyCalcSinrGetSinrModelPhy1 () const
 Get the SINR calculator.
 
Ptr< UanPhyCalcSinrGetSinrModelPhy2 () const
 Get the SINR calculator.
 
Ptr< UanTransducerGetTransducer () override
 Get the attached transducer.
 
double GetTxPowerDb () override
 Get the current transmit power, in dB.
 
double GetTxPowerDbPhy1 () const
 Get the current transmit power, in dB.
 
double GetTxPowerDbPhy2 () const
 Get the current transmit power, in dB.
 
bool IsPhy1Idle ()
 
bool IsPhy1Rx ()
 
bool IsPhy1Tx ()
 
bool IsPhy2Idle ()
 
bool IsPhy2Rx ()
 
bool IsPhy2Tx ()
 
bool IsStateBusy () override
 
bool IsStateCcaBusy () override
 
bool IsStateIdle () override
 
bool IsStateRx () override
 
bool IsStateSleep () override
 
bool IsStateTx () override
 
void NotifyIntChange () override
 Called when there has been a change in the amount of interference this node is experiencing from other transmissions.
 
void NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode) override
 Called when a transmission is beginning on the attached transducer.
 
void RegisterListener (UanPhyListener *listener) override
 Register a UanPhyListener to be notified of common UanPhy events.
 
void SendPacket (Ptr< Packet > pkt, uint32_t modeNum) override
 Send a packet using a specific transmission mode.
 
void SetCcaThresholdDb (double thresh) override
 Set the threshold for detecting channel busy.
 
void SetCcaThresholdPhy1 (double thresh)
 Set the threshold for detecting channel busy.
 
void SetCcaThresholdPhy2 (double thresh)
 Set the threshold for detecting channel busy.
 
void SetChannel (Ptr< UanChannel > channel) override
 Attach to a channel.
 
void SetDevice (Ptr< UanNetDevice > device) override
 Set the device hosting this Phy.
 
void SetEnergyModelCallback (DeviceEnergyModel::ChangeStateCallback callback) override
 Set the DeviceEnergyModel callback for UanPhy device.
 
void SetMac (Ptr< UanMac > mac) override
 Set the MAC forwarding messages to this Phy.
 
void SetModesPhy1 (UanModesList modes)
 Set the available modes.
 
void SetModesPhy2 (UanModesList modes)
 Set the available modes.
 
void SetPerModelPhy1 (Ptr< UanPhyPer > per)
 Set the error probability model.
 
void SetPerModelPhy2 (Ptr< UanPhyPer > per)
 Set the error probability model.
 
void SetReceiveErrorCallback (RxErrCallback cb) override
 Set the callback to be used when a packet is received with errors.
 
void SetReceiveOkCallback (RxOkCallback cb) override
 Set the callback to be used when a packet is received without error.
 
void SetRxThresholdDb (double thresh) override
 Set the minimum SINR threshold to receive a packet without errors.
 
void SetSinrModelPhy1 (Ptr< UanPhyCalcSinr > calcSinr)
 Set the SINR calculator.
 
void SetSinrModelPhy2 (Ptr< UanPhyCalcSinr > calcSinr)
 Set the SINR calculator.
 
void SetSleepMode (bool) override
 Set the Phy SLEEP mode.
 
void SetTransducer (Ptr< UanTransducer > trans) override
 Attach a transducer to this Phy.
 
void SetTxPowerDb (double txpwr) override
 Set the transmit power.
 
void SetTxPowerDbPhy1 (double txpwr)
 Set the transmit power.
 
void SetTxPowerDbPhy2 (double txpwr)
 Set the transmit power.
 
void StartRxPacket (Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp) override
 Packet arriving from channel: i.e.
 
- Public Member Functions inherited from ns3::UanPhy
virtual int64_t AssignStreams (int64_t stream)=0
 Assign a fixed random variable stream number to the random variables used by this model.
 
virtual void Clear ()=0
 Clear all pointer references.
 
virtual void EnergyDepletionHandler ()=0
 Handle the energy depletion event.
 
virtual void EnergyRechargeHandler ()=0
 Handle the energy recharge event.
 
virtual double GetCcaThresholdDb ()=0
 Get the CCA threshold signal strength required to detect channel busy.
 
virtual Ptr< UanChannelGetChannel () const =0
 Get the attached channel.
 
virtual Ptr< UanNetDeviceGetDevice () const =0
 Get the device hosting this Phy.
 
virtual UanTxMode GetMode (uint32_t n)=0
 Get a specific transmission mode.
 
virtual uint32_t GetNModes ()=0
 Get the number of transmission modes supported by this Phy.
 
virtual Ptr< PacketGetPacketRx () const =0
 Get the packet currently being received.
 
virtual double GetRxThresholdDb ()=0
 Get the minimum received signal strength required to receive a packet without errors.
 
virtual Ptr< UanTransducerGetTransducer ()=0
 Get the attached transducer.
 
virtual double GetTxPowerDb ()=0
 Get the current transmit power, in dB.
 
virtual bool IsStateBusy ()=0
 
virtual bool IsStateCcaBusy ()=0
 
virtual bool IsStateIdle ()=0
 
virtual bool IsStateRx ()=0
 
virtual bool IsStateSleep ()=0
 
virtual bool IsStateTx ()=0
 
virtual void NotifyIntChange ()=0
 Called when there has been a change in the amount of interference this node is experiencing from other transmissions.
 
void NotifyRxBegin (Ptr< const Packet > packet)
 Called when the Phy begins to receive a packet.
 
void NotifyRxDrop (Ptr< const Packet > packet)
 Called when the Phy drops a packet.
 
void NotifyRxEnd (Ptr< const Packet > packet)
 Called when a packet is received without error.
 
virtual void NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)=0
 Called when a transmission is beginning on the attached transducer.
 
void NotifyTxBegin (Ptr< const Packet > packet)
 Called when the transducer begins transmitting a packet.
 
void NotifyTxDrop (Ptr< const Packet > packet)
 Called when the transducer attempts to transmit a new packet while already transmitting a prior packet.
 
void NotifyTxEnd (Ptr< const Packet > packet)
 Called when the transducer finishes transmitting a packet.
 
virtual void RegisterListener (UanPhyListener *listener)=0
 Register a UanPhyListener to be notified of common UanPhy events.
 
virtual void SendPacket (Ptr< Packet > pkt, uint32_t modeNum)=0
 Send a packet using a specific transmission mode.
 
virtual void SetCcaThresholdDb (double thresh)=0
 Set the threshold for detecting channel busy.
 
virtual void SetChannel (Ptr< UanChannel > channel)=0
 Attach to a channel.
 
virtual void SetDevice (Ptr< UanNetDevice > device)=0
 Set the device hosting this Phy.
 
virtual void SetEnergyModelCallback (DeviceEnergyModel::ChangeStateCallback callback)=0
 Set the DeviceEnergyModel callback for UanPhy device.
 
virtual void SetMac (Ptr< UanMac > mac)=0
 Set the MAC forwarding messages to this Phy.
 
virtual void SetReceiveErrorCallback (RxErrCallback cb)=0
 Set the callback to be used when a packet is received with errors.
 
virtual void SetReceiveOkCallback (RxOkCallback cb)=0
 Set the callback to be used when a packet is received without error.
 
virtual void SetRxThresholdDb (double thresh)=0
 Set the minimum SINR threshold to receive a packet without errors.
 
virtual void SetSleepMode (bool sleep)=0
 Set the Phy SLEEP mode.
 
virtual void SetTransducer (Ptr< UanTransducer > trans)=0
 Attach a transducer to this Phy.
 
virtual void SetTxPowerDb (double txpwr)=0
 Set the transmit power.
 
virtual void StartRxPacket (Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp)=0
 Packet arriving from channel: i.e.
 
- 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) 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.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
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 ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::UanPhy
static TypeId GetTypeId ()
 Register this type.
 
- 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.
 

Protected Member Functions

void DoDispose () override
 Destructor implementation.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
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.
 

Private Member Functions

void RxErrFromSubPhy (Ptr< Packet > pkt, double sinr)
 Handle callback and logger for packets received with error.
 
void RxOkFromSubPhy (Ptr< Packet > pkt, double sinr, UanTxMode mode)
 Handle callback and logger for packets received without error.
 

Private Attributes

Ptr< UanPhym_phy1
 First Phy layer.
 
Ptr< UanPhym_phy2
 Second Phy layer.
 
RxErrCallback m_recErrCb
 Callback when packet received with errors.
 
RxOkCallback m_recOkCb
 Callback when packet received without errors.
 
ns3::TracedCallback< Ptr< const Packet >, double, UanTxModem_rxErrLogger
 A packet was received unsuccessfuly.
 
ns3::TracedCallback< Ptr< const Packet >, double, UanTxModem_rxOkLogger
 A packet was received successfully.
 
ns3::TracedCallback< Ptr< const Packet >, double, UanTxModem_txLogger
 A packet was sent from this Phy.
 

Additional Inherited Members

- Public Types inherited from ns3::UanPhy
typedef Callback< void, Ptr< Packet >, doubleRxErrCallback
 Packet receive error callback function type.
 
typedef Callback< void, Ptr< Packet >, double, UanTxModeRxOkCallback
 Packet received successfully callback function type.
 
enum  State {
  IDLE , CCABUSY , RX , TX ,
  SLEEP , DISABLED
}
 Enum defining possible Phy states. More...
 
typedef void(* TracedCallback) (Ptr< const Packet > pkt, double sinr, UanTxMode mode)
 TracedCallback signature for UanPhy packet send/receive events.
 

Detailed Description

Two channel Phy.

A class that wraps two generic UAN Phy layers (UanPhyGen) into a single PHY. This is used to simulate two receivers (and transmitters) that use the same front end hardware. When attached to a UanTransducerHd, this results in a net device able to transmit on one or two channels simultaneously or receive on one or two channels simultaneously but that cannot transmit and receive simultaneously.

Many of the standard PHY functions here become ambiguous. In most cases information for "Phy1" are returned.

Config Paths

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

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

Attributes

  • CcaThresholdPhy1: Aggregate energy of incoming signals to move to CCA Busy state dB of Phy1.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 10
    • Flags: constructwriteread
  • CcaThresholdPhy2: Aggregate energy of incoming signals to move to CCA Busy state dB of Phy2.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 10
    • Flags: constructwriteread
  • PerModelPhy1: Functor to calculate PER based on SINR and TxMode for Phy1.
  • PerModelPhy2: Functor to calculate PER based on SINR and TxMode for Phy2.
  • SinrModelPhy1: Functor to calculate SINR based on pkt arrivals and modes for Phy1.
  • SinrModelPhy2: Functor to calculate SINR based on pkt arrivals and modes for Phy2.
  • SupportedModesPhy1: List of modes supported by Phy1.
  • SupportedModesPhy2: List of modes supported by Phy2.
  • TxPowerPhy1: Transmission output power in dB of Phy1.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 190
    • Flags: constructwriteread
  • TxPowerPhy2: Transmission output power in dB of Phy2.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 190
    • Flags: constructwriteread

TraceSources

TraceSources defined in parent class ns3::UanPhy

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

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

Definition at line 78 of file uan-phy-dual.h.

Constructor & Destructor Documentation

◆ UanPhyDual()

ns3::UanPhyDual::UanPhyDual ( )

Constructor.

Definition at line 126 of file uan-phy-dual.cc.

References m_phy1, m_phy2, m_recErrCb, and m_recOkCb.

◆ ~UanPhyDual()

ns3::UanPhyDual::~UanPhyDual ( )
override

Dummy destructor.

See also
DoDispose

Definition at line 139 of file uan-phy-dual.cc.

Member Function Documentation

◆ AssignStreams()

int64_t ns3::UanPhyDual::AssignStreams ( int64_t  stream)
overridevirtual

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 680 of file uan-phy-dual.cc.

References NS_LOG_FUNCTION.

◆ Clear()

void ns3::UanPhyDual::Clear ( )
overridevirtual

Clear all pointer references.

Implements ns3::UanPhy.

Definition at line 144 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

Referenced by DoDispose().

+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::UanPhyDual::DoDispose ( )
overrideprotectedvirtual

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 159 of file uan-phy-dual.cc.

References Clear(), and ns3::Object::DoDispose().

+ Here is the call graph for this function:

◆ EnergyDepletionHandler()

void ns3::UanPhyDual::EnergyDepletionHandler ( )
overridevirtual

Handle the energy depletion event.

Implements ns3::UanPhy.

Definition at line 260 of file uan-phy-dual.cc.

References NS_LOG_DEBUG.

◆ EnergyRechargeHandler()

void ns3::UanPhyDual::EnergyRechargeHandler ( )
overridevirtual

Handle the energy recharge event.

Implements ns3::UanPhy.

Definition at line 266 of file uan-phy-dual.cc.

References NS_LOG_DEBUG.

◆ GetCcaThresholdDb()

double ns3::UanPhyDual::GetCcaThresholdDb ( )
overridevirtual

Get the CCA threshold signal strength required to detect channel busy.

Returns
The CCA threshold signal strength in dB.

Implements ns3::UanPhy.

Definition at line 390 of file uan-phy-dual.cc.

References m_phy1, and NS_LOG_WARN.

◆ GetCcaThresholdPhy1()

double ns3::UanPhyDual::GetCcaThresholdPhy1 ( ) const

Get the CCA threshold signal strength required to detect channel busy.

Returns
The CCA threshold signal strength in dB.

Definition at line 397 of file uan-phy-dual.cc.

References m_phy1.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetCcaThresholdPhy2()

double ns3::UanPhyDual::GetCcaThresholdPhy2 ( ) const

Get the CCA threshold signal strength required to detect channel busy.

Returns
The CCA threshold signal strength in dB.

Definition at line 403 of file uan-phy-dual.cc.

References m_phy2.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetChannel()

Ptr< UanChannel > ns3::UanPhyDual::GetChannel ( ) const
overridevirtual

Get the attached channel.

Returns
The channel.

Implements ns3::UanPhy.

Definition at line 493 of file uan-phy-dual.cc.

References m_phy1.

◆ GetDevice()

Ptr< UanNetDevice > ns3::UanPhyDual::GetDevice ( ) const
overridevirtual

Get the device hosting this Phy.

Returns
The net device.

Implements ns3::UanPhy.

Definition at line 499 of file uan-phy-dual.cc.

References m_phy1.

◆ GetMode()

UanTxMode ns3::UanPhyDual::GetMode ( uint32_t  n)
overridevirtual

Get a specific transmission mode.

Parameters
nThe mode number.
Returns
The mode.

Implements ns3::UanPhy.

Definition at line 560 of file uan-phy-dual.cc.

References GetNModes(), m_phy1, and m_phy2.

+ Here is the call graph for this function:

◆ GetModesPhy1()

UanModesList ns3::UanPhyDual::GetModesPhy1 ( ) const

Get the list of available modes.

Returns
The mode list.

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

References ns3::UanModesListValue::Get(), and m_phy1.

Referenced by GetTypeId().

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

◆ GetModesPhy2()

UanModesList ns3::UanPhyDual::GetModesPhy2 ( ) const

Get the list of available modes.

Returns
The mode list.

Definition at line 581 of file uan-phy-dual.cc.

References ns3::UanModesListValue::Get(), and m_phy2.

Referenced by GetTypeId().

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

◆ GetNModes()

uint32_t ns3::UanPhyDual::GetNModes ( )
overridevirtual

Get the number of transmission modes supported by this Phy.

Returns
The number modes.

Implements ns3::UanPhy.

Definition at line 554 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

Referenced by GetMode(), and SendPacket().

+ Here is the caller graph for this function:

◆ GetPacketRx()

Ptr< Packet > ns3::UanPhyDual::GetPacketRx ( ) const
overridevirtual

Get the packet currently being received.

Warning
Returns non-valid pointer if IsStateRx == false.
Returns
The packet.

Implements ns3::UanPhy.

Definition at line 672 of file uan-phy-dual.cc.

References NS_FATAL_ERROR.

◆ GetPerModelPhy1()

Ptr< UanPhyPer > ns3::UanPhyDual::GetPerModelPhy1 ( ) const

Get the error probability model.

Returns
The error model.

Definition at line 601 of file uan-phy-dual.cc.

References m_phy1.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetPerModelPhy2()

Ptr< UanPhyPer > ns3::UanPhyDual::GetPerModelPhy2 ( ) const

Get the error probability model.

Returns
The error model.

Definition at line 609 of file uan-phy-dual.cc.

References m_phy2.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetPhy1PacketRx()

Ptr< Packet > ns3::UanPhyDual::GetPhy1PacketRx ( ) const

Get the packet currently being received.

Warning
Returns non-valid pointer if IsStateRx == false.
Returns
The packet.

Definition at line 439 of file uan-phy-dual.cc.

References m_phy1.

◆ GetPhy2PacketRx()

Ptr< Packet > ns3::UanPhyDual::GetPhy2PacketRx ( ) const

Get the packet currently being received.

Warning
Returns non-valid pointer if IsStateRx == false.
Returns
The packet.

Definition at line 445 of file uan-phy-dual.cc.

References m_phy2.

◆ GetRxThresholdDb()

double ns3::UanPhyDual::GetRxThresholdDb ( )
overridevirtual

Get the minimum received signal strength required to receive a packet without errors.

Returns
The minimum required signal strength, in dB.

Implements ns3::UanPhy.

Definition at line 384 of file uan-phy-dual.cc.

References m_phy1.

◆ GetSinrModelPhy1()

Ptr< UanPhyCalcSinr > ns3::UanPhyDual::GetSinrModelPhy1 ( ) const

Get the SINR calculator.

Returns
The SINR calculator.

Definition at line 629 of file uan-phy-dual.cc.

References m_phy1.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetSinrModelPhy2()

Ptr< UanPhyCalcSinr > ns3::UanPhyDual::GetSinrModelPhy2 ( ) const

Get the SINR calculator.

Returns
The SINR calculator.

Definition at line 637 of file uan-phy-dual.cc.

References m_phy2.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTransducer()

Ptr< UanTransducer > ns3::UanPhyDual::GetTransducer ( )
overridevirtual

Get the attached transducer.

Returns
The transducer.

Implements ns3::UanPhy.

Definition at line 547 of file uan-phy-dual.cc.

References m_phy1, and NS_LOG_WARN.

◆ GetTxPowerDb()

double ns3::UanPhyDual::GetTxPowerDb ( )
overridevirtual

Get the current transmit power, in dB.

Returns
The transmit power.

Implements ns3::UanPhy.

Definition at line 365 of file uan-phy-dual.cc.

References m_phy1, and NS_LOG_WARN.

◆ GetTxPowerDbPhy1()

double ns3::UanPhyDual::GetTxPowerDbPhy1 ( ) const

Get the current transmit power, in dB.

Returns
The transmit power.

Definition at line 372 of file uan-phy-dual.cc.

References m_phy1.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTxPowerDbPhy2()

double ns3::UanPhyDual::GetTxPowerDbPhy2 ( ) const

Get the current transmit power, in dB.

Returns
The transmit power.

Definition at line 378 of file uan-phy-dual.cc.

References m_phy2.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

◆ IsPhy1Idle()

bool ns3::UanPhyDual::IsPhy1Idle ( )

Returns
True if Phy is in IDLE state.

Definition at line 409 of file uan-phy-dual.cc.

References m_phy1.

◆ IsPhy1Rx()

bool ns3::UanPhyDual::IsPhy1Rx ( )

Returns
True if Phy is currently in receive mode.

Definition at line 421 of file uan-phy-dual.cc.

References m_phy1.

◆ IsPhy1Tx()

bool ns3::UanPhyDual::IsPhy1Tx ( )

Returns
True if Phy is busy transmitting.

Definition at line 433 of file uan-phy-dual.cc.

References m_phy1.

◆ IsPhy2Idle()

bool ns3::UanPhyDual::IsPhy2Idle ( )

Returns
True if Phy is in IDLE state.

Definition at line 415 of file uan-phy-dual.cc.

References m_phy2.

◆ IsPhy2Rx()

bool ns3::UanPhyDual::IsPhy2Rx ( )

Returns
True if Phy is currently in receive mode.

Definition at line 427 of file uan-phy-dual.cc.

References m_phy2.

◆ IsPhy2Tx()

bool ns3::UanPhyDual::IsPhy2Tx ( )

Returns
True if Phy is busy transmitting.

Definition at line 451 of file uan-phy-dual.cc.

References m_phy2.

◆ IsStateBusy()

bool ns3::UanPhyDual::IsStateBusy ( )
overridevirtual
Returns
True if Phy is neither IDLE nor SLEEP.

Implements ns3::UanPhy.

Definition at line 469 of file uan-phy-dual.cc.

References IsStateIdle(), and IsStateSleep().

+ Here is the call graph for this function:

◆ IsStateCcaBusy()

bool ns3::UanPhyDual::IsStateCcaBusy ( )
overridevirtual
Returns
True if Phy is in CCABUSY state.

Implements ns3::UanPhy.

Definition at line 487 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ IsStateIdle()

bool ns3::UanPhyDual::IsStateIdle ( )
overridevirtual
Returns
True if Phy is in IDLE state.

Implements ns3::UanPhy.

Definition at line 463 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

Referenced by IsStateBusy().

+ Here is the caller graph for this function:

◆ IsStateRx()

bool ns3::UanPhyDual::IsStateRx ( )
overridevirtual
Returns
True if Phy is currently in receive mode.

Implements ns3::UanPhy.

Definition at line 475 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ IsStateSleep()

bool ns3::UanPhyDual::IsStateSleep ( )
overridevirtual
Returns
True if Phy is in SLEEP state.

Implements ns3::UanPhy.

Definition at line 457 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

Referenced by IsStateBusy().

+ Here is the caller graph for this function:

◆ IsStateTx()

bool ns3::UanPhyDual::IsStateTx ( )
overridevirtual
Returns
True if Phy is busy transmitting.

Implements ns3::UanPhy.

Definition at line 481 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ NotifyIntChange()

void ns3::UanPhyDual::NotifyIntChange ( )
overridevirtual

Called when there has been a change in the amount of interference this node is experiencing from other transmissions.

Implements ns3::UanPhy.

Definition at line 533 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ NotifyTransStartTx()

void ns3::UanPhyDual::NotifyTransStartTx ( Ptr< Packet packet,
double  txPowerDb,
UanTxMode  txMode 
)
overridevirtual

Called when a transmission is beginning on the attached transducer.

Parameters
packetPacket that is beginning transmission.
txPowerDbTransmit power of packet.
txModeTransmission mode of packet.

Implements ns3::UanPhy.

Definition at line 526 of file uan-phy-dual.cc.

◆ RegisterListener()

void ns3::UanPhyDual::RegisterListener ( UanPhyListener listener)
overridevirtual

Register a UanPhyListener to be notified of common UanPhy events.

Parameters
listenerNew listener to register.
Note
You may receive duplicate messages as underneath there are two generic phys here. Each will notify of state changes independently.

Implements ns3::UanPhy.

Definition at line 290 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ RxErrFromSubPhy()

void ns3::UanPhyDual::RxErrFromSubPhy ( Ptr< Packet pkt,
double  sinr 
)
private

Handle callback and logger for packets received with error.

Parameters
pktThe packet.
sinrThe SINR.

Definition at line 665 of file uan-phy-dual.cc.

References m_phy1, m_recErrCb, and m_rxErrLogger.

◆ RxOkFromSubPhy()

void ns3::UanPhyDual::RxOkFromSubPhy ( Ptr< Packet pkt,
double  sinr,
UanTxMode  mode 
)
private

Handle callback and logger for packets received without error.

Parameters
pktThe packet.
sinrThe SINR.
modeThe channel mode.

Definition at line 657 of file uan-phy-dual.cc.

References m_recOkCb, m_rxOkLogger, ns3::Now(), NS_LOG_DEBUG, and ns3::Time::S.

+ Here is the call graph for this function:

◆ SendPacket()

void ns3::UanPhyDual::SendPacket ( Ptr< Packet pkt,
uint32_t  modeNum 
)
overridevirtual

Send a packet using a specific transmission mode.

Parameters
pktPacket to transmit.
modeNumIndex of mode in SupportedModes list to use for transmission.

Implements ns3::UanPhy.

Definition at line 272 of file uan-phy-dual.cc.

References GetNModes(), m_phy1, m_phy2, m_txLogger, ns3::Now(), NS_LOG_DEBUG, and ns3::Time::S.

+ Here is the call graph for this function:

◆ SetCcaThresholdDb()

void ns3::UanPhyDual::SetCcaThresholdDb ( double  thresh)
overridevirtual

Set the threshold for detecting channel busy.

Parameters
threshSignal power threshold at receiver.

Implements ns3::UanPhy.

Definition at line 346 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ SetCcaThresholdPhy1()

void ns3::UanPhyDual::SetCcaThresholdPhy1 ( double  thresh)

Set the threshold for detecting channel busy.

Parameters
threshSignal power threshold at receiver.

Definition at line 353 of file uan-phy-dual.cc.

References m_phy1.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetCcaThresholdPhy2()

void ns3::UanPhyDual::SetCcaThresholdPhy2 ( double  thresh)

Set the threshold for detecting channel busy.

Parameters
threshSignal power threshold at receiver.

Definition at line 359 of file uan-phy-dual.cc.

References m_phy2.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetChannel()

void ns3::UanPhyDual::SetChannel ( Ptr< UanChannel channel)
overridevirtual

Attach to a channel.

Parameters
channelThe channel to attach to.

Implements ns3::UanPhy.

Definition at line 505 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ SetDevice()

void ns3::UanPhyDual::SetDevice ( Ptr< UanNetDevice device)
overridevirtual

Set the device hosting this Phy.

Parameters
deviceThe device.

Implements ns3::UanPhy.

Definition at line 512 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ SetEnergyModelCallback()

void ns3::UanPhyDual::SetEnergyModelCallback ( DeviceEnergyModel::ChangeStateCallback  callback)
overridevirtual

Set the DeviceEnergyModel callback for UanPhy device.

Parameters
callbackThe DeviceEnergyModel change state callback.

Implements ns3::UanPhy.

Definition at line 254 of file uan-phy-dual.cc.

References NS_LOG_DEBUG.

◆ SetMac()

void ns3::UanPhyDual::SetMac ( Ptr< UanMac mac)
overridevirtual

Set the MAC forwarding messages to this Phy.

Parameters
macThe MAC.

Implements ns3::UanPhy.

Definition at line 519 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ SetModesPhy1()

void ns3::UanPhyDual::SetModesPhy1 ( UanModesList  modes)

Set the available modes.

Parameters
modesList of modes.

Definition at line 589 of file uan-phy-dual.cc.

References m_phy1.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetModesPhy2()

void ns3::UanPhyDual::SetModesPhy2 ( UanModesList  modes)

Set the available modes.

Parameters
modesList of modes.

Definition at line 595 of file uan-phy-dual.cc.

References m_phy2.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetPerModelPhy1()

void ns3::UanPhyDual::SetPerModelPhy1 ( Ptr< UanPhyPer per)

Set the error probability model.

Parameters
perThe error model.

Definition at line 617 of file uan-phy-dual.cc.

References m_phy1.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetPerModelPhy2()

void ns3::UanPhyDual::SetPerModelPhy2 ( Ptr< UanPhyPer per)

Set the error probability model.

Parameters
perThe error model.

Definition at line 623 of file uan-phy-dual.cc.

References m_phy2.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetReceiveErrorCallback()

void ns3::UanPhyDual::SetReceiveErrorCallback ( RxErrCallback  cb)
overridevirtual

Set the callback to be used when a packet is received with errors.

Parameters
cbThe callback.

Implements ns3::UanPhy.

Definition at line 313 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ SetReceiveOkCallback()

void ns3::UanPhyDual::SetReceiveOkCallback ( RxOkCallback  cb)
overridevirtual

Set the callback to be used when a packet is received without error.

Parameters
cbThe callback.

Implements ns3::UanPhy.

Definition at line 306 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ SetRxThresholdDb()

void ns3::UanPhyDual::SetRxThresholdDb ( double  thresh)
overridevirtual

Set the minimum SINR threshold to receive a packet without errors.

Deprecated:
See UanPhyPer.
Parameters
threshThreshold SINR for proper reception in dB re 1 uPa.

Implements ns3::UanPhy.

Definition at line 339 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ SetSinrModelPhy1()

void ns3::UanPhyDual::SetSinrModelPhy1 ( Ptr< UanPhyCalcSinr calcSinr)

Set the SINR calculator.

Parameters
calcSinrThe SINR calculator.

Definition at line 645 of file uan-phy-dual.cc.

References m_phy1.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSinrModelPhy2()

void ns3::UanPhyDual::SetSinrModelPhy2 ( Ptr< UanPhyCalcSinr calcSinr)

Set the SINR calculator.

Parameters
calcSinrThe SINR calculator.

Definition at line 651 of file uan-phy-dual.cc.

References m_phy2.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSleepMode()

void ns3::UanPhyDual::SetSleepMode ( bool  sleep)
inlineoverridevirtual

Set the Phy SLEEP mode.

Parameters
sleepSLEEP on or off.
Todo:
This method has to be implemented

Implements ns3::UanPhy.

Definition at line 136 of file uan-phy-dual.h.

◆ SetTransducer()

void ns3::UanPhyDual::SetTransducer ( Ptr< UanTransducer trans)
overridevirtual

Attach a transducer to this Phy.

Parameters
transThe transducer.

Implements ns3::UanPhy.

Definition at line 540 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ SetTxPowerDb()

void ns3::UanPhyDual::SetTxPowerDb ( double  txpwr)
overridevirtual

Set the transmit power.

Parameters
txpwrFinal output transmission power, in dB.

Implements ns3::UanPhy.

Definition at line 320 of file uan-phy-dual.cc.

References m_phy1, and m_phy2.

◆ SetTxPowerDbPhy1()

void ns3::UanPhyDual::SetTxPowerDbPhy1 ( double  txpwr)

Set the transmit power.

Parameters
txpwrFinal output transmission power, in dB.

Definition at line 327 of file uan-phy-dual.cc.

References m_phy1.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetTxPowerDbPhy2()

void ns3::UanPhyDual::SetTxPowerDbPhy2 ( double  txpwr)

Set the transmit power.

Parameters
txpwrFinal output transmission power, in dB.

Definition at line 333 of file uan-phy-dual.cc.

References m_phy2.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ StartRxPacket()

void ns3::UanPhyDual::StartRxPacket ( Ptr< Packet pkt,
double  rxPowerDb,
UanTxMode  txMode,
UanPdp  pdp 
)
overridevirtual

Packet arriving from channel: i.e.

leading bit of packet has arrived.

Parameters
pktPacket which is arriving.
rxPowerDbSignal power of incoming packet in dB re 1 uPa.
txModeTransmission mode defining modulation of incoming packet.
pdpPower delay profile of incoming packet.

Implements ns3::UanPhy.

Definition at line 297 of file uan-phy-dual.cc.

Member Data Documentation

◆ m_phy1

◆ m_phy2

◆ m_recErrCb

RxErrCallback ns3::UanPhyDual::m_recErrCb
private

Callback when packet received with errors.

Definition at line 250 of file uan-phy-dual.h.

Referenced by UanPhyDual(), and RxErrFromSubPhy().

◆ m_recOkCb

RxOkCallback ns3::UanPhyDual::m_recOkCb
private

Callback when packet received without errors.

Definition at line 248 of file uan-phy-dual.h.

Referenced by UanPhyDual(), and RxOkFromSubPhy().

◆ m_rxErrLogger

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

A packet was received unsuccessfuly.

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

Referenced by GetTypeId(), and RxErrFromSubPhy().

◆ m_rxOkLogger

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

A packet was received successfully.

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

Referenced by GetTypeId(), and RxOkFromSubPhy().

◆ m_txLogger

ns3::TracedCallback<Ptr<const Packet>, double, UanTxMode> ns3::UanPhyDual::m_txLogger
private

A packet was sent from this Phy.

Definition at line 246 of file uan-phy-dual.h.

Referenced by GetTypeId(), and SendPacket().


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