Two channel Phy. More...
#include "uan-phy-dual.h"
Public Member Functions | |
UanPhyDual () | |
Constructor. More... | |
virtual | ~UanPhyDual () |
Dummy destructor. More... | |
int64_t | AssignStreams (int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. More... | |
virtual void | Clear (void) |
Clear all pointer references. More... | |
virtual void | EnergyDepletionHandler (void) |
Handle the energy depletion event. More... | |
virtual void | EnergyRechargeHandler (void) |
Handle the energy recharge event. More... | |
virtual double | GetCcaThresholdDb (void) |
Get the CCA threshold signal strength required to detect channel busy. More... | |
double | GetCcaThresholdPhy1 (void) const |
Get the CCA threshold signal strength required to detect channel busy. More... | |
double | GetCcaThresholdPhy2 (void) const |
Get the CCA threshold signal strength required to detect channel busy. More... | |
virtual Ptr< UanChannel > | GetChannel (void) const |
Get the attached channel. More... | |
virtual Ptr< UanNetDevice > | GetDevice (void) const |
Get the device hosting this Phy. More... | |
virtual UanTxMode | GetMode (uint32_t n) |
Get a specific transmission mode. More... | |
UanModesList | GetModesPhy1 (void) const |
Get the list of available modes. More... | |
UanModesList | GetModesPhy2 (void) const |
Get the list of available modes. More... | |
virtual uint32_t | GetNModes (void) |
Get the number of transmission modes supported by this Phy. More... | |
Ptr< Packet > | GetPacketRx (void) const |
Get the packet currently being received. More... | |
Ptr< UanPhyPer > | GetPerModelPhy1 (void) const |
Get the error probability model. More... | |
Ptr< UanPhyPer > | GetPerModelPhy2 (void) const |
Get the error probability model. More... | |
Ptr< Packet > | GetPhy1PacketRx (void) const |
Get the packet currently being received. More... | |
Ptr< Packet > | GetPhy2PacketRx (void) const |
Get the packet currently being received. More... | |
virtual double | GetRxThresholdDb (void) |
Get the minimum received signal strength required to receive a packet without errors. More... | |
Ptr< UanPhyCalcSinr > | GetSinrModelPhy1 (void) const |
Get the SINR calculator. More... | |
Ptr< UanPhyCalcSinr > | GetSinrModelPhy2 (void) const |
Get the SINR calculator. More... | |
virtual Ptr< UanTransducer > | GetTransducer (void) |
Get the attached transducer. More... | |
virtual double | GetTxPowerDb (void) |
Get the current transmit power, in dB. More... | |
double | GetTxPowerDbPhy1 (void) const |
Get the current transmit power, in dB. More... | |
double | GetTxPowerDbPhy2 (void) const |
Get the current transmit power, in dB. More... | |
bool | IsPhy1Idle (void) |
bool | IsPhy1Rx (void) |
bool | IsPhy1Tx (void) |
bool | IsPhy2Idle (void) |
bool | IsPhy2Rx (void) |
bool | IsPhy2Tx (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) |
Called when there has been a change in the amount of interference this node is experiencing from other transmissions. More... | |
virtual void | NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode) |
Called when a transmission is beginning on the attached transducer. More... | |
virtual void | RegisterListener (UanPhyListener *listener) |
Register a UanPhyListener to be notified of common UanPhy events. More... | |
virtual void | SendPacket (Ptr< Packet > pkt, uint32_t modeNum) |
Send a packet using a specific transmission mode. More... | |
virtual void | SetCcaThresholdDb (double thresh) |
Set the threshold for detecting channel busy. More... | |
void | SetCcaThresholdPhy1 (double thresh) |
Set the threshold for detecting channel busy. More... | |
void | SetCcaThresholdPhy2 (double thresh) |
Set the threshold for detecting channel busy. More... | |
virtual void | SetChannel (Ptr< UanChannel > channel) |
Attach to a channel. More... | |
virtual void | SetDevice (Ptr< UanNetDevice > device) |
Set the device hosting this Phy. More... | |
virtual void | SetEnergyModelCallback (DeviceEnergyModel::ChangeStateCallback callback) |
Set the DeviceEnergyModel callback for UanPhy device. More... | |
virtual void | SetMac (Ptr< UanMac > mac) |
Set the MAC forwarding messages to this Phy. More... | |
void | SetModesPhy1 (UanModesList modes) |
Set the available modes. More... | |
void | SetModesPhy2 (UanModesList modes) |
Set the available modes. More... | |
void | SetPerModelPhy1 (Ptr< UanPhyPer > per) |
Set the error probability model. More... | |
void | SetPerModelPhy2 (Ptr< UanPhyPer > per) |
Set the error probability model. More... | |
virtual void | SetReceiveErrorCallback (RxErrCallback cb) |
Set the callback to be used when a packet is received with errors. More... | |
virtual void | SetReceiveOkCallback (RxOkCallback cb) |
Set the callback to be used when a packet is received without error. More... | |
virtual void | SetRxThresholdDb (double thresh) |
Set the minimum SINR threshold to receive a packet without errors. More... | |
void | SetSinrModelPhy1 (Ptr< UanPhyCalcSinr > calcSinr) |
Set the SINR calculator. More... | |
void | SetSinrModelPhy2 (Ptr< UanPhyCalcSinr > calcSinr) |
Set the SINR calculator. More... | |
virtual void | SetSleepMode ([[maybe_unused]] bool sleep) |
virtual void | SetTransducer (Ptr< UanTransducer > trans) |
Attach a transducer to this Phy. More... | |
virtual void | SetTxPowerDb (double txpwr) |
Set the transmit power. More... | |
void | SetTxPowerDbPhy1 (double txpwr) |
Set the transmit power. More... | |
void | SetTxPowerDbPhy2 (double txpwr) |
Set the transmit power. More... | |
virtual void | StartRxPacket (Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp) |
Packet arriving from channel: i.e. More... | |
Public Member Functions inherited from ns3::UanPhy | |
void | NotifyRxBegin (Ptr< const Packet > packet) |
Called when the Phy begins to receive a packet. More... | |
void | NotifyRxDrop (Ptr< const Packet > packet) |
Called when the Phy drops a packet. More... | |
void | NotifyRxEnd (Ptr< const Packet > packet) |
Called when a packet is received without error. More... | |
void | NotifyTxBegin (Ptr< const Packet > packet) |
Called when the transducer begins transmitting a packet. More... | |
void | NotifyTxDrop (Ptr< const Packet > packet) |
Called when the transducer attempts to transmit a new packet while already transmitting a prior packet. More... | |
void | NotifyTxEnd (Ptr< const Packet > packet) |
Called when the transducer finishes transmitting a packet. More... | |
virtual void | SetSleepMode (bool sleep)=0 |
Set the Phy SLEEP mode. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the most derived TypeId for this Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized (void) const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= ([[maybe_unused]] const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::UanPhy | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Protected Member Functions | |
virtual void | DoDispose () |
Destructor implementation. More... | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
Private Member Functions | |
void | RxErrFromSubPhy (Ptr< Packet > pkt, double sinr) |
Handle callback and logger for packets received with error. More... | |
void | RxOkFromSubPhy (Ptr< Packet > pkt, double sinr, UanTxMode mode) |
Handle callback and logger for packets received without error. More... | |
Private Attributes | |
Ptr< UanPhy > | m_phy1 |
First Phy layer. More... | |
Ptr< UanPhy > | m_phy2 |
Second Phy layer. More... | |
RxErrCallback | m_recErrCb |
Callback when packet received with errors. More... | |
RxOkCallback | m_recOkCb |
Callback when packet received without errors. More... | |
ns3::TracedCallback< Ptr< const Packet >, double, UanTxMode > | m_rxErrLogger |
A packet was received unsuccessfully. More... | |
ns3::TracedCallback< Ptr< const Packet >, double, UanTxMode > | m_rxOkLogger |
A packet was received successfully. More... | |
ns3::TracedCallback< Ptr< const Packet >, double, UanTxMode > | m_txLogger |
A packet was sent from this Phy. More... | |
Additional Inherited Members | |
Public Types inherited from ns3::UanPhy | |
typedef Callback< void, Ptr< Packet >, double > | RxErrCallback |
Packet receive error callback function type. More... | |
typedef Callback< void, Ptr< Packet >, double, UanTxMode > | RxOkCallback |
Packet received successfully callback function type. More... | |
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. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
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.
ns3::UanPhyDual is accessible through the following paths with Config::Set and Config::Connect:
Size of this type is 280 bytes (on a 64-bit architecture).
Definition at line 81 of file uan-phy-dual.h.
ns3::UanPhyDual::UanPhyDual | ( | ) |
Constructor.
Definition at line 118 of file uan-phy-dual.cc.
References m_phy1, m_phy2, m_recErrCb, and m_recOkCb.
|
virtual |
|
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.
stream | First stream index to use. |
Implements ns3::UanPhy.
Definition at line 634 of file uan-phy-dual.cc.
References NS_LOG_FUNCTION.
|
virtual |
Clear all pointer references.
Implements ns3::UanPhy.
Definition at line 138 of file uan-phy-dual.cc.
References m_phy1, and m_phy2.
Referenced by DoDispose().
|
protectedvirtual |
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 152 of file uan-phy-dual.cc.
References Clear(), and ns3::Object::DoDispose().
|
virtual |
Handle the energy depletion event.
Implements ns3::UanPhy.
Definition at line 240 of file uan-phy-dual.cc.
References NS_LOG_DEBUG.
|
virtual |
Handle the energy recharge event.
Implements ns3::UanPhy.
Definition at line 246 of file uan-phy-dual.cc.
References NS_LOG_DEBUG.
|
virtual |
Get the CCA threshold signal strength required to detect channel busy.
Implements ns3::UanPhy.
Definition at line 365 of file uan-phy-dual.cc.
References m_phy1, and NS_LOG_WARN.
double ns3::UanPhyDual::GetCcaThresholdPhy1 | ( | void | ) | const |
Get the CCA threshold signal strength required to detect channel busy.
Definition at line 371 of file uan-phy-dual.cc.
References m_phy1.
Referenced by GetTypeId().
double ns3::UanPhyDual::GetCcaThresholdPhy2 | ( | void | ) | const |
Get the CCA threshold signal strength required to detect channel busy.
Definition at line 376 of file uan-phy-dual.cc.
References m_phy2.
Referenced by GetTypeId().
|
virtual |
Get the attached channel.
Implements ns3::UanPhy.
Definition at line 458 of file uan-phy-dual.cc.
References m_phy1.
|
virtual |
Get the device hosting this Phy.
Implements ns3::UanPhy.
Definition at line 463 of file uan-phy-dual.cc.
References m_phy1.
|
virtual |
Get a specific transmission mode.
n | The mode number. |
Implements ns3::UanPhy.
Definition at line 514 of file uan-phy-dual.cc.
References GetNModes(), m_phy1, and m_phy2.
UanModesList ns3::UanPhyDual::GetModesPhy1 | ( | void | ) | const |
Get the list of available modes.
Definition at line 527 of file uan-phy-dual.cc.
References ns3::UanModesListValue::Get(), and m_phy1.
Referenced by GetTypeId().
UanModesList ns3::UanPhyDual::GetModesPhy2 | ( | void | ) | const |
Get the list of available modes.
Definition at line 536 of file uan-phy-dual.cc.
References ns3::UanModesListValue::Get(), and m_phy2.
Referenced by GetTypeId().
|
virtual |
Get the number of transmission modes supported by this Phy.
Implements ns3::UanPhy.
Definition at line 509 of file uan-phy-dual.cc.
References m_phy1, and m_phy2.
Referenced by GetMode(), and SendPacket().
Get the packet currently being received.
Implements ns3::UanPhy.
Definition at line 627 of file uan-phy-dual.cc.
References NS_FATAL_ERROR.
Get the error probability model.
Definition at line 556 of file uan-phy-dual.cc.
References m_phy1.
Referenced by GetTypeId().
Get the error probability model.
Definition at line 564 of file uan-phy-dual.cc.
References m_phy2.
Referenced by GetTypeId().
Get the packet currently being received.
Definition at line 411 of file uan-phy-dual.cc.
References m_phy1.
Get the packet currently being received.
Definition at line 417 of file uan-phy-dual.cc.
References m_phy2.
|
virtual |
Get the minimum received signal strength required to receive a packet without errors.
Implements ns3::UanPhy.
Definition at line 359 of file uan-phy-dual.cc.
References m_phy1.
Ptr< UanPhyCalcSinr > ns3::UanPhyDual::GetSinrModelPhy1 | ( | void | ) | const |
Get the SINR calculator.
Definition at line 584 of file uan-phy-dual.cc.
References m_phy1.
Referenced by GetTypeId().
Ptr< UanPhyCalcSinr > ns3::UanPhyDual::GetSinrModelPhy2 | ( | void | ) | const |
Get the SINR calculator.
Definition at line 592 of file uan-phy-dual.cc.
References m_phy2.
Referenced by GetTypeId().
|
virtual |
Get the attached transducer.
Implements ns3::UanPhy.
Definition at line 503 of file uan-phy-dual.cc.
References m_phy1, and NS_LOG_WARN.
|
virtual |
Get the current transmit power, in dB.
Implements ns3::UanPhy.
Definition at line 340 of file uan-phy-dual.cc.
References m_phy1, and NS_LOG_WARN.
double ns3::UanPhyDual::GetTxPowerDbPhy1 | ( | void | ) | const |
Get the current transmit power, in dB.
Definition at line 347 of file uan-phy-dual.cc.
References m_phy1.
Referenced by GetTypeId().
double ns3::UanPhyDual::GetTxPowerDbPhy2 | ( | void | ) | const |
Get the current transmit power, in dB.
Definition at line 353 of file uan-phy-dual.cc.
References m_phy2.
Referenced by GetTypeId().
|
static |
Register this type.
Definition at line 159 of file uan-phy-dual.cc.
References GetCcaThresholdPhy1(), GetCcaThresholdPhy2(), ns3::UanPhyGen::GetDefaultModes(), GetModesPhy1(), GetModesPhy2(), GetPerModelPhy1(), GetPerModelPhy2(), GetSinrModelPhy1(), GetSinrModelPhy2(), GetTxPowerDbPhy1(), GetTxPowerDbPhy2(), m_rxErrLogger, m_rxOkLogger, m_txLogger, ns3::MakeDoubleAccessor(), ns3::MakePointerAccessor(), ns3::MakeTraceSourceAccessor(), ns3::MakeUanModesListAccessor(), ns3::MakeUanModesListChecker(), SetCcaThresholdPhy1(), SetCcaThresholdPhy2(), SetModesPhy1(), SetModesPhy2(), ns3::TypeId::SetParent(), SetPerModelPhy1(), SetPerModelPhy2(), SetSinrModelPhy1(), SetSinrModelPhy2(), SetTxPowerDbPhy1(), and SetTxPowerDbPhy2().
bool ns3::UanPhyDual::IsPhy1Idle | ( | void | ) |
Definition at line 382 of file uan-phy-dual.cc.
References m_phy1.
bool ns3::UanPhyDual::IsPhy1Rx | ( | void | ) |
Definition at line 393 of file uan-phy-dual.cc.
References m_phy1.
bool ns3::UanPhyDual::IsPhy1Tx | ( | void | ) |
Definition at line 405 of file uan-phy-dual.cc.
References m_phy1.
bool ns3::UanPhyDual::IsPhy2Idle | ( | void | ) |
Definition at line 387 of file uan-phy-dual.cc.
References m_phy2.
bool ns3::UanPhyDual::IsPhy2Rx | ( | void | ) |
Definition at line 399 of file uan-phy-dual.cc.
References m_phy2.
bool ns3::UanPhyDual::IsPhy2Tx | ( | void | ) |
Definition at line 423 of file uan-phy-dual.cc.
References m_phy2.
|
virtual |
Implements ns3::UanPhy.
Definition at line 438 of file uan-phy-dual.cc.
References IsStateIdle(), and IsStateSleep().
|
virtual |
Implements ns3::UanPhy.
Definition at line 453 of file uan-phy-dual.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 433 of file uan-phy-dual.cc.
References m_phy1, and m_phy2.
Referenced by IsStateBusy().
|
virtual |
Implements ns3::UanPhy.
Definition at line 443 of file uan-phy-dual.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 428 of file uan-phy-dual.cc.
References m_phy1, and m_phy2.
Referenced by IsStateBusy().
|
virtual |
Implements ns3::UanPhy.
Definition at line 448 of file uan-phy-dual.cc.
|
virtual |
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 490 of file uan-phy-dual.cc.
|
virtual |
Called when a transmission is beginning on the attached transducer.
packet | Packet that is beginning transmission. |
txPowerDb | Transmit power of packet. |
txMode | Transmission mode of packet. |
Implements ns3::UanPhy.
Definition at line 486 of file uan-phy-dual.cc.
|
virtual |
Register a UanPhyListener to be notified of common UanPhy events.
listener | New listener to register. |
Implements ns3::UanPhy.
Definition at line 269 of file uan-phy-dual.cc.
Handle callback and logger for packets received with error.
pkt | The packet. |
sinr | The SINR. |
Definition at line 620 of file uan-phy-dual.cc.
References m_phy1, m_recErrCb, and m_rxErrLogger.
Handle callback and logger for packets received without error.
pkt | The packet. |
sinr | The SINR. |
mode | The channel mode. |
Definition at line 612 of file uan-phy-dual.cc.
References m_recOkCb, m_rxOkLogger, ns3::Now(), NS_LOG_DEBUG, and ns3::Time::S.
Send a packet using a specific transmission mode.
pkt | Packet to transmit. |
modeNum | Index of mode in SupportedModes list to use for transmission. |
Implements ns3::UanPhy.
Definition at line 252 of file uan-phy-dual.cc.
References GetNModes(), m_phy1, m_phy2, m_txLogger, ns3::Now(), NS_LOG_DEBUG, and ns3::Time::S.
|
virtual |
Set the threshold for detecting channel busy.
thresh | Signal power threshold at receiver. |
Implements ns3::UanPhy.
Definition at line 321 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetCcaThresholdPhy1 | ( | double | thresh | ) |
Set the threshold for detecting channel busy.
thresh | Signal power threshold at receiver. |
Definition at line 328 of file uan-phy-dual.cc.
References m_phy1.
Referenced by GetTypeId().
void ns3::UanPhyDual::SetCcaThresholdPhy2 | ( | double | thresh | ) |
Set the threshold for detecting channel busy.
thresh | Signal power threshold at receiver. |
Definition at line 333 of file uan-phy-dual.cc.
References m_phy2.
Referenced by GetTypeId().
|
virtual |
Attach to a channel.
channel | The channel to attach to. |
Implements ns3::UanPhy.
Definition at line 468 of file uan-phy-dual.cc.
References third::channel, m_phy1, and m_phy2.
|
virtual |
Set the device hosting this Phy.
device | The device. |
Implements ns3::UanPhy.
Definition at line 474 of file uan-phy-dual.cc.
|
virtual |
Set the DeviceEnergyModel callback for UanPhy device.
callback | The DeviceEnergyModel change state callback. |
Implements ns3::UanPhy.
Definition at line 234 of file uan-phy-dual.cc.
References NS_LOG_DEBUG.
Set the MAC forwarding messages to this Phy.
mac | The MAC. |
Implements ns3::UanPhy.
Definition at line 480 of file uan-phy-dual.cc.
References m_phy1, m_phy2, and third::mac.
void ns3::UanPhyDual::SetModesPhy1 | ( | UanModesList | modes | ) |
Set the available modes.
modes | List of modes. |
Definition at line 544 of file uan-phy-dual.cc.
References m_phy1.
Referenced by GetTypeId().
void ns3::UanPhyDual::SetModesPhy2 | ( | UanModesList | modes | ) |
Set the available modes.
modes | List of modes. |
Definition at line 550 of file uan-phy-dual.cc.
References m_phy2.
Referenced by GetTypeId().
Set the error probability model.
per | The error model. |
Definition at line 572 of file uan-phy-dual.cc.
References m_phy1.
Referenced by GetTypeId().
Set the error probability model.
per | The error model. |
Definition at line 578 of file uan-phy-dual.cc.
References m_phy2.
Referenced by GetTypeId().
|
virtual |
Set the callback to be used when a packet is received with errors.
cb | The callback. |
Implements ns3::UanPhy.
Definition at line 289 of file uan-phy-dual.cc.
|
virtual |
Set the callback to be used when a packet is received without error.
cb | The callback. |
Implements ns3::UanPhy.
Definition at line 282 of file uan-phy-dual.cc.
|
virtual |
Set the minimum SINR threshold to receive a packet without errors.
thresh | Threshold SINR for proper reception in dB re 1 uPa. |
Implements ns3::UanPhy.
Definition at line 315 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetSinrModelPhy1 | ( | Ptr< UanPhyCalcSinr > | calcSinr | ) |
Set the SINR calculator.
calcSinr | The SINR calculator. |
Definition at line 600 of file uan-phy-dual.cc.
References m_phy1.
Referenced by GetTypeId().
void ns3::UanPhyDual::SetSinrModelPhy2 | ( | Ptr< UanPhyCalcSinr > | calcSinr | ) |
Set the SINR calculator.
calcSinr | The SINR calculator. |
Definition at line 606 of file uan-phy-dual.cc.
References m_phy2.
Referenced by GetTypeId().
|
inlinevirtual |
Definition at line 138 of file uan-phy-dual.h.
|
virtual |
Attach a transducer to this Phy.
trans | The transducer. |
Implements ns3::UanPhy.
Definition at line 497 of file uan-phy-dual.cc.
|
virtual |
Set the transmit power.
txpwr | Final output transmission power, in dB. |
Implements ns3::UanPhy.
Definition at line 297 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetTxPowerDbPhy1 | ( | double | txpwr | ) |
Set the transmit power.
txpwr | Final output transmission power, in dB. |
Definition at line 304 of file uan-phy-dual.cc.
References m_phy1.
Referenced by GetTypeId().
void ns3::UanPhyDual::SetTxPowerDbPhy2 | ( | double | txpwr | ) |
Set the transmit power.
txpwr | Final output transmission power, in dB. |
Definition at line 309 of file uan-phy-dual.cc.
References m_phy2.
Referenced by GetTypeId().
|
virtual |
Packet arriving from channel: i.e.
leading bit of packet has arrived.
pkt | Packet which is arriving. |
rxPowerDb | Signal power of incoming packet in dB re 1 uPa. |
txMode | Transmission mode defining modulation of incoming packet. |
pdp | Power delay profile of incoming packet. |
Implements ns3::UanPhy.
Definition at line 276 of file uan-phy-dual.cc.
First Phy layer.
Definition at line 242 of file uan-phy-dual.h.
Referenced by UanPhyDual(), Clear(), GetCcaThresholdDb(), GetCcaThresholdPhy1(), GetChannel(), GetDevice(), GetMode(), GetModesPhy1(), GetNModes(), GetPerModelPhy1(), GetPhy1PacketRx(), GetRxThresholdDb(), GetSinrModelPhy1(), GetTransducer(), GetTxPowerDb(), GetTxPowerDbPhy1(), IsPhy1Idle(), IsPhy1Rx(), IsPhy1Tx(), IsStateCcaBusy(), IsStateIdle(), IsStateRx(), IsStateSleep(), IsStateTx(), NotifyIntChange(), RegisterListener(), RxErrFromSubPhy(), SendPacket(), SetCcaThresholdDb(), SetCcaThresholdPhy1(), SetChannel(), SetDevice(), SetMac(), SetModesPhy1(), SetPerModelPhy1(), SetReceiveErrorCallback(), SetReceiveOkCallback(), SetRxThresholdDb(), SetSinrModelPhy1(), SetTransducer(), SetTxPowerDb(), and SetTxPowerDbPhy1().
Second Phy layer.
Definition at line 244 of file uan-phy-dual.h.
Referenced by UanPhyDual(), Clear(), GetCcaThresholdPhy2(), GetMode(), GetModesPhy2(), GetNModes(), GetPerModelPhy2(), GetPhy2PacketRx(), GetSinrModelPhy2(), GetTxPowerDbPhy2(), IsPhy2Idle(), IsPhy2Rx(), IsPhy2Tx(), IsStateCcaBusy(), IsStateIdle(), IsStateRx(), IsStateSleep(), IsStateTx(), NotifyIntChange(), RegisterListener(), SendPacket(), SetCcaThresholdDb(), SetCcaThresholdPhy2(), SetChannel(), SetDevice(), SetMac(), SetModesPhy2(), SetPerModelPhy2(), SetReceiveErrorCallback(), SetReceiveOkCallback(), SetRxThresholdDb(), SetSinrModelPhy2(), SetTransducer(), SetTxPowerDb(), and SetTxPowerDbPhy2().
|
private |
Callback when packet received with errors.
Definition at line 255 of file uan-phy-dual.h.
Referenced by UanPhyDual(), and RxErrFromSubPhy().
|
private |
Callback when packet received without errors.
Definition at line 253 of file uan-phy-dual.h.
Referenced by UanPhyDual(), and RxOkFromSubPhy().
|
private |
A packet was received unsuccessfully.
Definition at line 249 of file uan-phy-dual.h.
Referenced by GetTypeId(), and RxErrFromSubPhy().
|
private |
A packet was received successfully.
Definition at line 247 of file uan-phy-dual.h.
Referenced by GetTypeId(), and RxOkFromSubPhy().
|
private |
A packet was sent from this Phy.
Definition at line 251 of file uan-phy-dual.h.
Referenced by GetTypeId(), and SendPacket().