#include <introspected-doxygen.h>
Public Member Functions | |
int64_t | AssignStreams (int64_t stream) |
virtual void | Clear (void) |
virtual void | EnergyDepletionHandler (void) |
virtual double | GetCcaThresholdDb (void) |
double | GetCcaThresholdPhy1 (void) const |
double | GetCcaThresholdPhy2 (void) const |
virtual Ptr< UanChannel > | GetChannel (void) const |
virtual Ptr< UanNetDevice > | GetDevice (void) |
virtual UanTxMode | GetMode (uint32_t n) |
UanModesList | GetModesPhy1 (void) const |
UanModesList | GetModesPhy2 (void) const |
virtual uint32_t | GetNModes (void) |
Ptr< Packet > | GetPacketRx (void) const |
Ptr< UanPhyPer > | GetPerModelPhy1 (void) const |
Ptr< UanPhyPer > | GetPerModelPhy2 (void) const |
Ptr< Packet > | GetPhy1PacketRx (void) const |
Ptr< Packet > | GetPhy2PacketRx (void) const |
virtual double | GetRxGainDb (void) |
double | GetRxGainDbPhy1 (void) const |
double | GetRxGainDbPhy2 (void) const |
virtual double | GetRxThresholdDb (void) |
Ptr< UanPhyCalcSinr > | GetSinrModelPhy1 (void) const |
Ptr< UanPhyCalcSinr > | GetSinrModelPhy2 (void) const |
virtual Ptr< UanTransducer > | GetTransducer (void) |
virtual double | GetTxPowerDb (void) |
double | GetTxPowerDbPhy1 (void) const |
double | GetTxPowerDbPhy2 (void) const |
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) |
virtual void | NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode) |
virtual void | RegisterListener (UanPhyListener *listener) |
Register a class to receive phy state change notifications. More... | |
virtual void | SendPacket (Ptr< Packet > pkt, uint32_t modeNum) |
virtual void | SetCcaThresholdDb (double thresh) |
void | SetCcaThresholdPhy1 (double thresh) |
void | SetCcaThresholdPhy2 (double thresh) |
virtual void | SetChannel (Ptr< UanChannel > channel) |
virtual void | SetDevice (Ptr< UanNetDevice > device) |
virtual void | SetEnergyModelCallback (DeviceEnergyModel::ChangeStateCallback callback) |
virtual void | SetMac (Ptr< UanMac > mac) |
void | SetModesPhy1 (UanModesList modes) |
void | SetModesPhy2 (UanModesList modes) |
void | SetPerModelPhy1 (Ptr< UanPhyPer > per) |
void | SetPerModelPhy2 (Ptr< UanPhyPer > per) |
virtual void | SetReceiveErrorCallback (RxErrCallback cb) |
virtual void | SetReceiveOkCallback (RxOkCallback cb) |
virtual void | SetRxGainDb (double gain) |
void | SetRxGainDbPhy1 (double gain) |
void | SetRxGainDbPhy2 (double gain) |
virtual void | SetRxThresholdDb (double thresh) |
void | SetSinrModelPhy1 (Ptr< UanPhyCalcSinr > calcSinr) |
void | SetSinrModelPhy2 (Ptr< UanPhyCalcSinr > calcSinr) |
virtual void | SetSleepMode (bool sleep) |
virtual void | SetTransducer (Ptr< UanTransducer > trans) |
virtual void | SetTxPowerDb (double txpwr) |
void | SetTxPowerDbPhy1 (double) |
void | SetTxPowerDbPhy2 (double) |
virtual void | StartRxPacket (Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp) |
Packet arriving from channel: i.e. leading bit of packet has arrived. More... | |
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 | |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
Public Member Functions inherited from ns3::ObjectBase | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Static Public Member Functions inherited from ns3::UanPhy | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Protected Member Functions | |
virtual void | DoDispose () |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
Private Member Functions | |
void | RxErrFromSubPhy (Ptr< Packet > pkt, double sinr) |
void | RxOkFromSubPhy (Ptr< Packet > pkt, double sinr, UanTxMode mode) |
Private Attributes | |
Ptr< UanPhy > | m_phy1 |
Ptr< UanPhy > | m_phy2 |
RxErrCallback | m_recErrCb |
RxOkCallback | m_recOkCb |
TracedCallback< Ptr< const Packet >, double, UanTxMode > | m_rxErrLogger |
TracedCallback< Ptr< const Packet >, double, UanTxMode > | m_rxOkLogger |
TracedCallback< Ptr< const Packet >, double, UanTxMode > | m_txLogger |
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. | |
ns3::UanPhyDual is accessible through the following paths with Config::Set and Config::Connect:
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.
Definition at line 72 of file uan-phy-dual.h.
|
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 667 of file uan-phy-dual.cc.
References NS_LOG_FUNCTION.
|
virtual |
Clears all pointer references
Implements ns3::UanPhy.
Definition at line 136 of file uan-phy-dual.cc.
Referenced by DoDispose().
|
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 150 of file uan-phy-dual.cc.
References Clear(), and ns3::Object::DoDispose().
|
virtual |
This function handles the energy depletion event. Must be implemented by UanPhy child classes.
Implements ns3::UanPhy.
Definition at line 244 of file uan-phy-dual.cc.
References NS_LOG_DEBUG.
|
virtual |
Implements ns3::UanPhy.
Definition at line 397 of file uan-phy-dual.cc.
References NS_LOG_WARN.
double ns3::UanPhyDual::GetCcaThresholdPhy1 | ( | void | ) | const |
Definition at line 403 of file uan-phy-dual.cc.
double ns3::UanPhyDual::GetCcaThresholdPhy2 | ( | void | ) | const |
Definition at line 408 of file uan-phy-dual.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 490 of file uan-phy-dual.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 495 of file uan-phy-dual.cc.
|
virtual |
n | Mode number of mode to return (place in Modeslist) |
Implements ns3::UanPhy.
Definition at line 547 of file uan-phy-dual.cc.
References GetNModes().
UanModesList ns3::UanPhyDual::GetModesPhy1 | ( | void | ) | const |
Definition at line 560 of file uan-phy-dual.cc.
UanModesList ns3::UanPhyDual::GetModesPhy2 | ( | void | ) | const |
Definition at line 569 of file uan-phy-dual.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 542 of file uan-phy-dual.cc.
Referenced by GetMode(), and SendPacket().
Definition at line 589 of file uan-phy-dual.cc.
Definition at line 597 of file uan-phy-dual.cc.
Definition at line 443 of file uan-phy-dual.cc.
Definition at line 449 of file uan-phy-dual.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 355 of file uan-phy-dual.cc.
References NS_LOG_WARN.
double ns3::UanPhyDual::GetRxGainDbPhy1 | ( | void | ) | const |
Definition at line 361 of file uan-phy-dual.cc.
double ns3::UanPhyDual::GetRxGainDbPhy2 | ( | void | ) | const |
Definition at line 366 of file uan-phy-dual.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 391 of file uan-phy-dual.cc.
Ptr< UanPhyCalcSinr > ns3::UanPhyDual::GetSinrModelPhy1 | ( | void | ) | const |
Definition at line 617 of file uan-phy-dual.cc.
Ptr< UanPhyCalcSinr > ns3::UanPhyDual::GetSinrModelPhy2 | ( | void | ) | const |
Definition at line 625 of file uan-phy-dual.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 536 of file uan-phy-dual.cc.
References NS_LOG_WARN.
|
virtual |
Implements ns3::UanPhy.
Definition at line 372 of file uan-phy-dual.cc.
References NS_LOG_WARN.
double ns3::UanPhyDual::GetTxPowerDbPhy1 | ( | void | ) | const |
Definition at line 379 of file uan-phy-dual.cc.
double ns3::UanPhyDual::GetTxPowerDbPhy2 | ( | void | ) | const |
Definition at line 385 of file uan-phy-dual.cc.
bool ns3::UanPhyDual::IsPhy1Idle | ( | void | ) |
/returns True if Phy1 is Idle
Definition at line 414 of file uan-phy-dual.cc.
bool ns3::UanPhyDual::IsPhy1Rx | ( | void | ) |
/returns True if Phy1 is currently in RX mode
Definition at line 425 of file uan-phy-dual.cc.
bool ns3::UanPhyDual::IsPhy1Tx | ( | void | ) |
/returns True if Phy1 is in TX mode
Definition at line 437 of file uan-phy-dual.cc.
bool ns3::UanPhyDual::IsPhy2Idle | ( | void | ) |
/returns True if Phy2 is Idle
Definition at line 419 of file uan-phy-dual.cc.
bool ns3::UanPhyDual::IsPhy2Rx | ( | void | ) |
/returns True if Phy2 is currently in RX mode
Definition at line 431 of file uan-phy-dual.cc.
bool ns3::UanPhyDual::IsPhy2Tx | ( | void | ) |
/returns True if Phy2 is in TX mode
Definition at line 455 of file uan-phy-dual.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 470 of file uan-phy-dual.cc.
References IsStateIdle(), and IsStateSleep().
|
virtual |
Implements ns3::UanPhy.
Definition at line 485 of file uan-phy-dual.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 465 of file uan-phy-dual.cc.
Referenced by IsStateBusy().
|
virtual |
Implements ns3::UanPhy.
Definition at line 475 of file uan-phy-dual.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 460 of file uan-phy-dual.cc.
Referenced by IsStateBusy().
|
virtual |
Implements ns3::UanPhy.
Definition at line 480 of file uan-phy-dual.cc.
|
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 523 of file uan-phy-dual.cc.
|
virtual |
packet | Packet that is beginning transmission |
txPowerDb | Transmit power of packet |
txMode | Transmission 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 518 of file uan-phy-dual.cc.
|
virtual |
Register a class to receive phy state change notifications.
listener | Class derived from UanPhyListener to receive notifications |
Note that, from UanPhyDual, 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 267 of file uan-phy-dual.cc.
pkt | Packet to transmit |
modeNum | Index of mode in SupportedModes list to use for transmission |
Implements ns3::UanPhy.
Definition at line 250 of file uan-phy-dual.cc.
References GetNModes(), ns3::Simulator::Now(), and NS_LOG_DEBUG.
|
virtual |
thresh | Signal power at receiver required for CCA busy state |
Implements ns3::UanPhy.
Definition at line 337 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetCcaThresholdPhy1 | ( | double | thresh | ) |
thresh | Signal power threshold in dB to set Phy1 to |
Definition at line 344 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetCcaThresholdPhy2 | ( | double | thresh | ) |
thresh | Signal power threshold in dB to set Phy2 to |
Definition at line 349 of file uan-phy-dual.cc.
|
virtual |
channel | The channel this Phy is attached to |
Implements ns3::UanPhy.
Definition at line 500 of file uan-phy-dual.cc.
|
virtual |
device | The Net Device this Phy is a part of |
Implements ns3::UanPhy.
Definition at line 506 of file uan-phy-dual.cc.
|
virtual |
callback | DeviceEnergyModel 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 238 of file uan-phy-dual.cc.
References NS_LOG_DEBUG.
mac | The MAC forwarding messages to this Phy |
Implements ns3::UanPhy.
Definition at line 512 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetModesPhy1 | ( | UanModesList | modes | ) |
modes | List of modes to use on Phy1 (index corresponds to mode #) |
Definition at line 577 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetModesPhy2 | ( | UanModesList | modes | ) |
modes | List of modes to use on Phy2 (index corresponds to mode #) |
Definition at line 583 of file uan-phy-dual.cc.
per | Ptr to PER model to use on Phy1 |
Definition at line 605 of file uan-phy-dual.cc.
per | Ptr to PER model to use on Phy2 |
Definition at line 611 of file uan-phy-dual.cc.
|
virtual |
cb | Callback to be enabled when a packet is received with errors |
Implements ns3::UanPhy.
Definition at line 287 of file uan-phy-dual.cc.
|
virtual |
cb | Callback to be enabled when packet is received without error |
Implements ns3::UanPhy.
Definition at line 280 of file uan-phy-dual.cc.
|
virtual |
gain | Gain added at receiver |
Implements ns3::UanPhy.
Definition at line 294 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetRxGainDbPhy1 | ( | double | gain | ) |
gain | value in dB to apply to RX gain of Phy1 |
Definition at line 300 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetRxGainDbPhy2 | ( | double | gain | ) |
gain | value in dB to apply to RX gain of Phy2 |
Definition at line 306 of file uan-phy-dual.cc.
|
virtual |
thresh | Threshold SINR for propper reception in dB |
Implements ns3::UanPhy.
Definition at line 330 of file uan-phy-dual.cc.
References NS_LOG_WARN.
void ns3::UanPhyDual::SetSinrModelPhy1 | ( | Ptr< UanPhyCalcSinr > | calcSinr | ) |
calcSinr | Ptr to SINR model to use on Phy1 |
Definition at line 633 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetSinrModelPhy2 | ( | Ptr< UanPhyCalcSinr > | calcSinr | ) |
calcSinr | Ptr to SINR model to use on Phy2 |
Definition at line 639 of file uan-phy-dual.cc.
|
virtual |
trans | Transducer this Phy outputs to / receives from |
Implements ns3::UanPhy.
Definition at line 530 of file uan-phy-dual.cc.
|
virtual |
txpwr | Final output transmission power in dB |
Implements ns3::UanPhy.
Definition at line 312 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetTxPowerDbPhy1 | ( | double | txpwr | ) |
Definition at line 319 of file uan-phy-dual.cc.
void ns3::UanPhyDual::SetTxPowerDbPhy2 | ( | double | txpwr | ) |
Definition at line 324 of file uan-phy-dual.cc.
|
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 |
txMode | Transmission mode defining modulation of incoming packet |
pdp | Power delay profile of incoming packet |
Implements ns3::UanPhy.
Definition at line 274 of file uan-phy-dual.cc.