Base class for UAN Phy models. More...
#include <uan-phy.h>
Inheritance diagram for ns3::UanPhy:
Collaboration diagram for ns3::UanPhy: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... | |
| typedef void(* | TracedCallback) (const Ptr< const Packet > pkt, const double sinr, const UanTxMode mode) |
| TracedCallback signature for UanPhy packet send/receive events. 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 () | |
| 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 |
| Implement the GetInstanceTypeId method defined in ObjectBase. More... | |
| template<typename T > | |
| Ptr< T > | GetObject (void) const |
| Get a pointer to the requested aggregated Object. More... | |
| template<typename T > | |
| Ptr< T > | GetObject (TypeId tid) const |
| Get a pointer to the requested aggregated Object. More... | |
| void | Initialize (void) |
| Invoke DoInitialize on all Objects aggregated to this one. 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 |
| 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 (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 | |
| ns3::TracedCallback< Ptr< const Packet > > | m_phyRxBeginTrace |
| Trace source indicating a packet has begun being received from the channel medium by the device. More... | |
| ns3::TracedCallback< Ptr< const Packet > > | m_phyRxDropTrace |
| Trace source indicating a packet has been dropped by the device during reception. More... | |
| ns3::TracedCallback< Ptr< const Packet > > | m_phyRxEndTrace |
| Trace source indicating a packet has been completely received from the channel medium by the device. More... | |
| ns3::TracedCallback< Ptr< const Packet > > | m_phyTxBeginTrace |
| Trace source indicating a packet has begun transmitting over the channel medium. More... | |
| ns3::TracedCallback< Ptr< const Packet > > | m_phyTxDropTrace |
| Trace source indicating a packet has been dropped by the device during transmission. More... | |
| ns3::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) | |
| Copy an Object. More... | |
| virtual void | DoDispose (void) |
| Destructor implementation. 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... | |
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... | |
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.
Size of this type is 128 bytes (on a 64-bit architecture).
| typedef Callback<void, Ptr<Packet>, double > ns3::UanPhy::RxErrCallback |
| typedef Callback<void, Ptr<Packet>, double, UanTxMode> ns3::UanPhy::RxOkCallback |
| typedef void(* ns3::UanPhy::TracedCallback) (const Ptr< const Packet > pkt, const double sinr, const UanTxMode mode) |
TracedCallback signature for UanPhy packet send/receive events.
| [in] | pkt | The packet. |
| [in] | sinr | The SINR. |
| [in] | mode | The channel mode. |
|
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 73 of file uan-phy.cc.
References m_phyRxBeginTrace, m_phyRxDropTrace, m_phyRxEndTrace, m_phyTxBeginTrace, m_phyTxDropTrace, m_phyTxEndTrace, ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().
Here is the call graph for this function:
|
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 132 of file uan-phy.cc.
References m_phyRxBeginTrace.
Referenced by ns3::UanPhyGen::StartRxPacket().
Here is the caller graph for this function:Called when the Phy drops a packet.
This fires a PhyRxDrop trace. Implemented for encapsulation purposes.
| packet | The packet. |
Definition at line 144 of file uan-phy.cc.
References m_phyRxDropTrace.
Referenced by ns3::UanPhyGen::RxEndEvent(), and ns3::UanPhyGen::StartRxPacket().
Here is the caller graph for this function:Called when a packet is received without error.
This fires a PhyRxEnd trace. Implemented for encapsulation purposes.
| packet | The packet. |
Definition at line 138 of file uan-phy.cc.
References m_phyRxEndTrace.
Referenced by ns3::UanPhyGen::RxEndEvent().
Here is the caller graph for this function:
|
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 114 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 126 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 120 of file uan-phy.cc.
References m_phyTxEndTrace.
Referenced by ns3::UanTransducerHd::Transmit().
Here is the caller graph for this function:
|
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 544 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 560 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 552 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 520 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 536 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 528 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyTxEnd().