Generic PHY model. More...
#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) |
virtual Ptr< UanChannel > | GetChannel (void) const |
virtual Ptr< UanNetDevice > | GetDevice (void) |
virtual UanTxMode | GetMode (uint32_t n) |
virtual uint32_t | GetNModes (void) |
virtual Ptr< Packet > | GetPacketRx (void) const |
virtual double | GetRxGainDb (void) |
virtual double | GetRxThresholdDb (void) |
virtual Ptr< UanTransducer > | GetTransducer (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. 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 UanModesList | GetDefaultModes (void) |
static TypeId | GetTypeId (void) |
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 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< UanChannel > | m_channel |
bool | m_cleared |
Ptr< UanNetDevice > | m_device |
bool | m_disabled |
DeviceEnergyModel::ChangeStateCallback | m_energyCallback |
ListenerList | m_listeners |
Ptr< UanMac > | m_mac |
double | m_minRxSinrDb |
UanModesList | m_modes |
Ptr< UanPhyPer > | m_per |
Ptr< UniformRandomVariable > | m_pg |
Provides uniform random variables. | |
Ptr< Packet > | m_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< UanPhyCalcSinr > | m_sinr |
State | m_state |
Ptr< UanTransducer > | m_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. | |
Generic PHY model.
ns3::UanPhyGen is accessible through the following paths with Config::Set and Config::Connect:
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.
|
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 869 of file uan-phy-gen.cc.
References m_pg, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().
|
virtual |
Clears all pointer references
Implements ns3::UanPhy.
Definition at line 370 of file uan-phy-gen.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 412 of file uan-phy-gen.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 502 of file uan-phy-gen.cc.
References NS_LOG_DEBUG, and NS_LOG_FUNCTION.
|
virtual |
Implements ns3::UanPhy.
Definition at line 791 of file uan-phy-gen.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 797 of file uan-phy-gen.cc.
|
static |
Definition at line 420 of file uan-phy-gen.cc.
References ns3::UanModesList::AppendMode(), and ns3::UanTxModeFactory::CreateMode().
|
virtual |
Implements ns3::UanPhy.
Definition at line 803 of file uan-phy-gen.cc.
|
virtual |
n | Mode number of mode to return (place in Modeslist) |
Implements ns3::UanPhy.
Definition at line 999 of file uan-phy-gen.cc.
References ns3::UanModesList::GetNModes(), and NS_ASSERT.
Referenced by SendPacket(), and StartRxPacket().
|
virtual |
Implements ns3::UanPhy.
Definition at line 993 of file uan-phy-gen.cc.
References ns3::UanModesList::GetNModes().
Referenced by StartRxPacket().
Implements ns3::UanPhy.
Definition at line 1007 of file uan-phy-gen.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 775 of file uan-phy-gen.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 786 of file uan-phy-gen.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 809 of file uan-phy-gen.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 780 of file uan-phy-gen.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 731 of file uan-phy-gen.cc.
References IsStateIdle(), and IsStateSleep().
|
virtual |
Implements ns3::UanPhy.
Definition at line 747 of file uan-phy-gen.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 726 of file uan-phy-gen.cc.
Referenced by IsStateBusy().
|
virtual |
Implements ns3::UanPhy.
Definition at line 736 of file uan-phy-gen.cc.
|
virtual |
Implements ns3::UanPhy.
Definition at line 721 of file uan-phy-gen.cc.
Referenced by IsStateBusy().
|
virtual |
Implements ns3::UanPhy.
Definition at line 741 of file uan-phy-gen.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 886 of file uan-phy-gen.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 877 of file uan-phy-gen.cc.
|
virtual |
listener | New 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.
pkt | Packet to transmit |
modeNum | Index of mode in SupportedModes list to use for transmission |
Implements ns3::UanPhy.
Definition at line 512 of file uan-phy-gen.cc.
References ns3::UanTxMode::GetDataRateBps(), GetMode(), ns3::Packet::GetSize(), NS_LOG_DEBUG, ns3::Simulator::Schedule(), and ns3::Seconds().
|
virtual |
thresh | Signal power at receiver required for CCA busy state |
Implements ns3::UanPhy.
Definition at line 770 of file uan-phy-gen.cc.
|
virtual |
channel | The channel this Phy is attached to |
Implements ns3::UanPhy.
Definition at line 814 of file uan-phy-gen.cc.
|
virtual |
device | The Net Device this Phy is a part of |
Implements ns3::UanPhy.
Definition at line 820 of file uan-phy-gen.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 484 of file uan-phy-gen.cc.
References NS_LOG_FUNCTION.
mac | The MAC forwarding messages to this Phy |
Implements ns3::UanPhy.
Definition at line 826 of file uan-phy-gen.cc.
|
virtual |
cb | Callback to be enabled when a packet is received with errors |
Implements ns3::UanPhy.
Definition at line 716 of file uan-phy-gen.cc.
|
virtual |
cb | Callback to be enabled when packet is received without error |
Implements ns3::UanPhy.
Definition at line 710 of file uan-phy-gen.cc.
|
virtual |
gain | Gain added at receiver |
Implements ns3::UanPhy.
Definition at line 754 of file uan-phy-gen.cc.
|
virtual |
thresh | Threshold SINR for propper reception in dB |
Implements ns3::UanPhy.
Definition at line 765 of file uan-phy-gen.cc.
|
virtual |
trans | Transducer this Phy outputs to / receives from |
Implements ns3::UanPhy.
Definition at line 832 of file uan-phy-gen.cc.
|
virtual |
txpwr | Final output transmission power in dB |
Implements ns3::UanPhy.
Definition at line 760 of file uan-phy-gen.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 580 of file uan-phy-gen.cc.
References ns3::UanTxMode::GetDataRateBps(), GetMode(), GetNModes(), ns3::Packet::GetSize(), ns3::UanTxMode::GetUid(), ns3::UanPhy::NotifyRxBegin(), ns3::UanPhy::NotifyRxDrop(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, ns3::Simulator::Schedule(), and ns3::Seconds().