Base class for UAN Phy models. More...
#include <uan-phy.h>
Public Types | |
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 } |
Enum defining possible Phy states. More... | |
Public Member Functions | |
virtual int64_t | AssignStreams (int64_t stream)=0 |
Assign a fixed random variable stream number to the random variables used by this model. More... | |
virtual void | Clear (void)=0 |
Clear all pointer references. More... | |
virtual void | EnergyDepletionHandler (void)=0 |
Handle the energy depletion event. More... | |
virtual double | GetCcaThresholdDb (void)=0 |
Get the CCA threshold signal strength required to detect channel busy. More... | |
virtual Ptr< UanChannel > | GetChannel (void) const =0 |
Get the attached channel. More... | |
virtual Ptr< UanNetDevice > | GetDevice (void)=0 |
Get the device hosting this Phy. More... | |
virtual UanTxMode | GetMode (uint32_t n)=0 |
Get a specific transmission mode. More... | |
virtual uint32_t | GetNModes (void)=0 |
Get the number of transmission modes supported by this Phy. More... | |
virtual Ptr< Packet > | GetPacketRx (void) const =0 |
Get the packet currently being received. More... | |
virtual double | GetRxGainDb (void)=0 |
Get the receiver gain added to signal at receiver in dB. More... | |
virtual double | GetRxThresholdDb (void)=0 |
Get the minimum received signal strength required to receive a packet without errors. More... | |
virtual Ptr< UanTransducer > | GetTransducer (void)=0 |
Get the attached transducer. More... | |
virtual double | GetTxPowerDb (void)=0 |
Get the current transmit power, in dB. More... | |
virtual bool | IsStateBusy (void)=0 |
virtual bool | IsStateCcaBusy (void)=0 |
virtual bool | IsStateIdle (void)=0 |
virtual bool | IsStateRx (void)=0 |
virtual bool | IsStateSleep (void)=0 |
virtual bool | IsStateTx (void)=0 |
virtual void | NotifyIntChange (void)=0 |
Called when there has been a change in the ammount of interference this node is experiencing from other transmissions. More... | |
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... | |
virtual void | NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)=0 |
Called when a transmission is beginning on the attched transducer. 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 | RegisterListener (UanPhyListener *listener)=0 |
Register a UanPhyListener to be notified of common UanPhy events. More... | |
virtual void | SendPacket (Ptr< Packet > pkt, uint32_t modeNum)=0 |
Send a packet using a specific transmission mode. More... | |
virtual void | SetCcaThresholdDb (double thresh)=0 |
Set the threshold for detecting channel busy. More... | |
virtual void | SetChannel (Ptr< UanChannel > channel)=0 |
Attach to a channel. More... | |
virtual void | SetDevice (Ptr< UanNetDevice > device)=0 |
Set the device hosting this Phy. More... | |
virtual void | SetEnergyModelCallback (DeviceEnergyModel::ChangeStateCallback callback)=0 |
Set the DeviceEnergyModel callback for UanPhy device. More... | |
virtual void | SetMac (Ptr< UanMac > mac)=0 |
Set the MAC forwarding messages to this Phy. More... | |
virtual void | SetReceiveErrorCallback (RxErrCallback cb)=0 |
Set the callback to be used when a packet is received with errors. More... | |
virtual void | SetReceiveOkCallback (RxOkCallback cb)=0 |
Set the callback to be used when a packet is received without error. More... | |
virtual void | SetRxGainDb (double gain)=0 |
Set the receiver gain. More... | |
virtual void | SetRxThresholdDb (double thresh)=0 |
Set the minimum SINR threshold to receive a packet without errors. More... | |
virtual void | SetSleepMode (bool sleep)=0 |
Set the Phy SLEEP mode. More... | |
virtual void | SetTransducer (Ptr< UanTransducer > trans)=0 |
Attach a transducer to this Phy. More... | |
virtual void | SetTxPowerDb (double txpwr)=0 |
Set the transmit power. More... | |
virtual void | StartRxPacket (Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp)=0 |
Packet arriving from channel: i.e. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
virtual | ~Object () |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
Run the DoDispose methods of this object and all the objects aggregated to it. More... | |
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) |
This method calls the virtual DoInitialize method on all the objects aggregated to this object. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. 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 |
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 (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::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Noop. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Attributes | |
TracedCallback< Ptr< const Packet > > | m_phyRxBeginTrace |
Trace source indicating a packet has begun being received from the channel medium by the device. More... | |
TracedCallback< Ptr< const Packet > > | m_phyRxDropTrace |
Trace source indicating a packet has been dropped by the device during reception. More... | |
TracedCallback< Ptr< const Packet > > | m_phyRxEndTrace |
Trace source indicating a packet has been completely received from the channel medium by the device. More... | |
TracedCallback< Ptr< const Packet > > | m_phyTxBeginTrace |
Trace source indicating a packet has begun transmitting over the channel medium. More... | |
TracedCallback< Ptr< const Packet > > | m_phyTxDropTrace |
Trace source indicating a packet has been dropped by the device during transmission. More... | |
TracedCallback< Ptr< const Packet > > | m_phyTxEndTrace |
Trace source indicating a packet has been completely transmitted over the channel. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
virtual void | DoDispose (void) |
This method is called by Object::Dispose or by the object's destructor, whichever comes first. More... | |
virtual void | DoInitialize (void) |
This method is called only once by Object::Initialize. More... | |
virtual void | NotifyNewAggregate (void) |
This method is invoked whenever two sets of objects are aggregated together. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
This method is invoked once all member attributes have been initialized. More... | |
Base class for UAN Phy models.
ns3::UanPhy is accessible through the following paths with Config::Set and Config::Connect:
No Attributes are defined for this type.
typedef Callback<void, Ptr<Packet>, double > ns3::UanPhy::RxErrCallback |
typedef Callback<void, Ptr<Packet>, double, UanTxMode> ns3::UanPhy::RxOkCallback |
enum ns3::UanPhy::State |
|
pure 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. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Clear all pointer references.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Handle the energy depletion event.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Get the CCA threshold signal strength required to detect channel busy.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
|
pure virtual |
Get the device hosting this Phy.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Get a specific transmission mode.
n | The mode number. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Get the number of transmission modes supported by this Phy.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Get the packet currently being received.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Get the receiver gain added to signal at receiver in dB.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Get the minimum received signal strength required to receive a packet without errors.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Get the attached transducer.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Get the current transmit power, in dB.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
static |
Register this type.
Definition at line 72 of file uan-phy.cc.
References m_phyRxBeginTrace, m_phyRxDropTrace, m_phyRxEndTrace, m_phyTxBeginTrace, m_phyTxDropTrace, m_phyTxEndTrace, ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Called when there has been a change in the ammount of interference this node is experiencing from other transmissions.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Called when the Phy begins to receive a packet.
This fires a PhyRxBegin trace. Implemented for encapsulation purposes.
packet | The packet. |
Definition at line 118 of file uan-phy.cc.
References m_phyRxBeginTrace.
Referenced by ns3::UanPhyGen::StartRxPacket().
Called when the Phy drops a packet.
This fires a PhyRxDrop trace. Implemented for encapsulation purposes.
packet | The packet. |
Definition at line 130 of file uan-phy.cc.
References m_phyRxDropTrace.
Referenced by ns3::UanPhyGen::RxEndEvent(), and ns3::UanPhyGen::StartRxPacket().
Called when a packet is received without error.
This fires a PhyRxEnd trace. Implemented for encapsulation purposes.
packet | The packet. |
Definition at line 124 of file uan-phy.cc.
References m_phyRxEndTrace.
Referenced by ns3::UanPhyGen::RxEndEvent().
|
pure virtual |
Called when a transmission is beginning on the attched transducer.
packet | Packet that is beginning transmission. |
txPowerDb | Transmit power of packet. |
txMode | Transmission mode of packet. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Called when the transducer begins transmitting a packet.
This fires a PhyTxBegin trace. Implemented for encapsulation purposes.
packet | The packet. |
Definition at line 100 of file uan-phy.cc.
References m_phyTxBeginTrace.
Called when the transducer attempts to transmit a new packet while already transmitting a prior packet.
This fires a PhyTxDrop trace. Implemented for encapsulation purposes.
packet | The packet. |
Definition at line 112 of file uan-phy.cc.
References m_phyTxDropTrace.
Called when the transducer finishes transmitting a packet.
This fires a PhyTxEnd trace. Implemented for encapsulation purposes.
packet | The packet. |
Definition at line 106 of file uan-phy.cc.
References m_phyTxEndTrace.
Referenced by ns3::UanTransducerHd::Transmit().
|
pure virtual |
Register a UanPhyListener to be notified of common UanPhy events.
listener | New listener to register. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Send a packet using a specific transmission mode.
pkt | Packet to transmit. |
modeNum | Index of mode in SupportedModes list to use for transmission. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Set the threshold for detecting channel busy.
thresh | Signal power threshold at receiver. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Attach to a channel.
channel | The channel to attach to. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Set the device hosting this Phy.
device | The device. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Set the DeviceEnergyModel callback for UanPhy device.
callback | The DeviceEnergyModel change state callback. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Set the MAC forwarding messages to this Phy.
mac | The MAC. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Set the callback to be used when a packet is received with errors.
cb | The callback. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Set the callback to be used when a packet is received without error.
cb | The callback. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Set the receiver gain.
gain | Gain added at receiver, in dB. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Set the minimum SINR threshold to receive a packet without errors.
thresh | Threshold SINR for propper reception in dB re 1 uPa. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Set the Phy SLEEP mode.
sleep | SLEEP on or off. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Attach a transducer to this Phy.
trans | The transducer. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure virtual |
Set the transmit power.
txpwr | Final output transmission power, in dB. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
pure 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. |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
private |
Trace source indicating a packet has begun being received from the channel medium by the device.
Definition at line 533 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyRxBegin().
|
private |
Trace source indicating a packet has been dropped by the device during reception.
Definition at line 549 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyRxDrop().
|
private |
Trace source indicating a packet has been completely received from the channel medium by the device.
Definition at line 541 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyRxEnd().
|
private |
Trace source indicating a packet has begun transmitting over the channel medium.
Definition at line 509 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyTxBegin().
|
private |
Trace source indicating a packet has been dropped by the device during transmission.
Definition at line 525 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyTxDrop().
|
private |
Trace source indicating a packet has been completely transmitted over the channel.
Definition at line 517 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyTxEnd().