Base class for UAN Phy models. More...
#include <uan-phy.h>
Public Types | |
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. More... |
Public Member Functions | |
virtual int64_t | AssignStreams (int64_t stream)=0 |
virtual void | Clear (void)=0 |
virtual void | EnergyDepletionHandler (void)=0 |
virtual double | GetCcaThresholdDb (void)=0 |
virtual Ptr< UanChannel > | GetChannel (void) const =0 |
virtual Ptr< UanNetDevice > | GetDevice (void)=0 |
virtual UanTxMode | GetMode (uint32_t n)=0 |
virtual uint32_t | GetNModes (void)=0 |
virtual Ptr< Packet > | GetPacketRx (void) const =0 |
virtual double | GetRxGainDb (void)=0 |
virtual double | GetRxThresholdDb (void)=0 |
virtual Ptr< UanTransducer > | GetTransducer (void)=0 |
virtual double | GetTxPowerDb (void)=0 |
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 |
void | NotifyRxBegin (Ptr< const Packet > packet) |
void | NotifyRxDrop (Ptr< const Packet > packet) |
void | NotifyRxEnd (Ptr< const Packet > packet) |
virtual void | NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)=0 |
void | NotifyTxBegin (Ptr< const Packet > packet) |
void | NotifyTxDrop (Ptr< const Packet > packet) |
void | NotifyTxEnd (Ptr< const Packet > packet) |
virtual void | RegisterListener (UanPhyListener *listener)=0 |
virtual void | SendPacket (Ptr< Packet > pkt, uint32_t modeNum)=0 |
virtual void | SetCcaThresholdDb (double thresh)=0 |
virtual void | SetChannel (Ptr< UanChannel > channel)=0 |
virtual void | SetDevice (Ptr< UanNetDevice > device)=0 |
virtual void | SetEnergyModelCallback (DeviceEnergyModel::ChangeStateCallback callback)=0 |
virtual void | SetMac (Ptr< UanMac > mac)=0 |
virtual void | SetReceiveErrorCallback (RxErrCallback cb)=0 |
virtual void | SetReceiveOkCallback (RxOkCallback cb)=0 |
virtual void | SetRxGainDb (double gain)=0 |
virtual void | SetRxThresholdDb (double thresh)=0 |
virtual void | SetSleepMode (bool sleep)=0 |
virtual void | SetTransducer (Ptr< UanTransducer > trans)=0 |
virtual void | SetTxPowerDb (double txpwr)=0 |
virtual void | StartRxPacket (Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp)=0 |
Packet arriving from channel: i.e. leading bit of packet has arrived. | |
![]() | |
Object () | |
virtual | ~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) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
virtual | ~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 (void) |
Private Attributes | |
TracedCallback< Ptr< const Packet > > | m_phyRxBeginTrace |
TracedCallback< Ptr< const Packet > > | m_phyRxDropTrace |
TracedCallback< Ptr< const Packet > > | m_phyRxEndTrace |
TracedCallback< Ptr< const Packet > > | m_phyTxBeginTrace |
TracedCallback< Ptr< const Packet > > | m_phyTxDropTrace |
TracedCallback< Ptr< const Packet > > | m_phyTxEndTrace |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | DoDispose (void) |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
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::UanPhyDual, and ns3::UanPhyGen.
Referenced by ns3::UanHelper::AssignStreams().
|
pure virtual |
Clears all pointer references
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanMacAloha::Clear(), ns3::UanMacCw::Clear(), ns3::UanMacRcGw::Clear(), ns3::UanNetDevice::Clear(), ns3::UanPhyDual::Clear(), and ns3::UanMacRc::Clear().
|
pure virtual |
This function handles the energy depletion event. Must be implemented by UanPhy child classes.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::AcousticModemEnergyModel::HandleEnergyDepletion().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetCcaThresholdDb(), ns3::UanPhyDual::GetCcaThresholdPhy1(), and ns3::UanPhyDual::GetCcaThresholdPhy2().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetChannel().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetDevice().
|
pure virtual |
n | Mode number of mode to return (place in Modeslist) |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::AcousticModemEnergyTestCase::DoRun(), ns3::UanMacRcGw::EndCycle(), ns3::UanPhyDual::GetMode(), ns3::UanPhyDual::RxErrFromSubPhy(), ns3::UanMacRc::ScheduleData(), ns3::UanPhyDual::SendPacket(), ns3::UanMacRc::SendPacket(), and ns3::UanMacRcGw::StartCycle().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetMode(), ns3::UanPhyDual::GetNModes(), and ns3::UanPhyDual::SendPacket().
Implemented in ns3::UanPhyDual, and ns3::UanPhyGen.
Referenced by ns3::UanPhyDual::GetPhy1PacketRx(), and ns3::UanPhyDual::GetPhy2PacketRx().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetRxGainDb(), ns3::UanPhyDual::GetRxGainDbPhy1(), and ns3::UanPhyDual::GetRxGainDbPhy2().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetRxThresholdDb().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanMacCw::Enqueue(), and ns3::UanPhyDual::GetTransducer().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetTxPowerDb(), ns3::UanPhyDual::GetTxPowerDbPhy1(), ns3::UanPhyDual::GetTxPowerDbPhy2(), and ns3::UanPhyDual::SendPacket().
|
static |
Reimplemented from ns3::Object.
Reimplemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Definition at line 69 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.
Referenced by ns3::UanMacCw::Enqueue().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::IsStateCcaBusy(), ns3::UanMacCw::NotifyRxEndError(), and ns3::UanMacCw::NotifyRxEndOk().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanMacCw::EndTx(), ns3::UanPhyDual::IsPhy1Idle(), ns3::UanPhyDual::IsPhy2Idle(), and ns3::UanPhyDual::IsStateIdle().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::IsPhy1Rx(), ns3::UanPhyDual::IsPhy2Rx(), and ns3::UanPhyDual::IsStateRx().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::IsStateSleep().
|
pure virtual |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanMacAloha::Enqueue(), ns3::UanMacCw::Enqueue(), ns3::UanPhyDual::IsPhy1Tx(), ns3::UanPhyDual::IsPhy2Tx(), and ns3::UanPhyDual::IsStateTx().
|
pure virtual |
Function 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.
Referenced by ns3::UanPhyDual::NotifyIntChange().
Public method used to fire a PhyRxBegin trace. Implemented for encapsulation purposes.
Definition at line 115 of file uan-phy.cc.
References m_phyRxBeginTrace.
Referenced by ns3::UanPhyGen::StartRxPacket().
Public method used to fire a PhyRxDrop trace. Implemented for encapsulation purposes.
Definition at line 127 of file uan-phy.cc.
References m_phyRxDropTrace.
Referenced by ns3::UanPhyGen::RxEndEvent(), and ns3::UanPhyGen::StartRxPacket().
Public method used to fire a PhyRxEnd trace. Implemented for encapsulation purposes.
Definition at line 121 of file uan-phy.cc.
References m_phyRxEndTrace.
Referenced by ns3::UanPhyGen::RxEndEvent().
|
pure 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.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Public method used to fire a PhyTxBegin trace. Implemented for encapsulation purposes.
Definition at line 97 of file uan-phy.cc.
References m_phyTxBeginTrace.
Referenced by ns3::UanTransducerHd::Transmit().
Public method used to fire a PhyTxDrop trace. Implemented for encapsulation purposes.
Definition at line 109 of file uan-phy.cc.
References m_phyTxDropTrace.
Referenced by ns3::UanTransducerHd::Transmit().
Public method used to fire a PhyTxEnd trace. Implemented for encapsulation purposes.
Definition at line 103 of file uan-phy.cc.
References m_phyTxEndTrace.
Referenced by ns3::UanTransducerHd::Transmit().
|
pure virtual |
listener | New listener to register |
Register an object to be notified of common Phy events
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanMacCw::AttachPhy(), and ns3::UanPhyDual::RegisterListener().
pkt | Packet to transmit |
modeNum | Index of mode in SupportedModes list to use for transmission |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanMacAloha::Enqueue(), ns3::UanMacCw::Enqueue(), ns3::UanPhyDual::SendPacket(), ns3::UanMacCw::SendPacket(), ns3::UanMacRcGw::SendPacket(), and ns3::UanMacRc::SendPacket().
|
pure virtual |
thresh | Signal power at receiver required for CCA busy state |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::SetCcaThresholdDb(), ns3::UanPhyDual::SetCcaThresholdPhy1(), and ns3::UanPhyDual::SetCcaThresholdPhy2().
|
pure virtual |
channel | The channel this Phy is attached to |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanNetDevice::SetChannel(), and ns3::UanPhyDual::SetChannel().
|
pure virtual |
device | The Net Device this Phy is a part of |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::SetDevice(), and ns3::UanNetDevice::SetPhy().
|
pure virtual |
callback | DeviceEnergyModel change state callback. |
This function sets the DeviceEnergyModel callback for UanPhy device. Must be implemented by UanPhy child classes.
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
mac | The MAC forwarding messages to this Phy |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanNetDevice::SetMac(), ns3::UanPhyDual::SetMac(), and ns3::UanNetDevice::SetPhy().
|
pure virtual |
cb | Callback to be enabled when a packet is received with errors |
Implemented in ns3::UanPhyGen.
Referenced by ns3::UanMacAloha::AttachPhy(), ns3::UanMacCw::AttachPhy(), ns3::UanMacRcGw::AttachPhy(), ns3::UanPhyDual::SetReceiveErrorCallback(), and ns3::UanPhyDual::UanPhyDual().
|
pure virtual |
cb | Callback to be enabled when packet is received without error |
Implemented in ns3::UanPhyGen.
Referenced by ns3::UanMacAloha::AttachPhy(), ns3::UanMacCw::AttachPhy(), ns3::UanMacRcGw::AttachPhy(), ns3::UanMacRc::AttachPhy(), ns3::UanPhyDual::SetReceiveOkCallback(), and ns3::UanPhyDual::UanPhyDual().
|
pure virtual |
gain | Gain added at receiver |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::SetRxGainDb(), ns3::UanPhyDual::SetRxGainDbPhy1(), and ns3::UanPhyDual::SetRxGainDbPhy2().
|
pure virtual |
thresh | Threshold SINR for propper reception in dB |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::SetRxThresholdDb().
|
pure virtual |
Implemented in ns3::UanPhyDual, and ns3::UanPhyGen.
Referenced by ns3::UanNetDevice::SetSleepMode().
|
pure virtual |
trans | Transducer this Phy outputs to / receives from |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanNetDevice::SetPhy(), ns3::UanNetDevice::SetTransducer(), and ns3::UanPhyDual::SetTransducer().
|
pure virtual |
txpwr | Final output transmission power in dB |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::SetTxPowerDb(), ns3::UanPhyDual::SetTxPowerDbPhy1(), and ns3::UanPhyDual::SetTxPowerDbPhy2().
|
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 |
txMode | Transmission mode defining modulation of incoming packet |
pdp | Power delay profile of incoming packet |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
|
private |
The trace source fired when a packet begins the reception process from the medium.
Definition at line 463 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyRxBegin().
|
private |
The trace source fired when the phy layer drops a packet it has received.
Definition at line 478 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyRxDrop().
|
private |
The trace source fired when a packet ends the reception process from the medium.
Definition at line 471 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyRxEnd().
|
private |
The trace source fired when a packet begins the transmission process on the medium.
Definition at line 439 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyTxBegin().
|
private |
The trace source fired when the phy layer drops a packet as it tries to transmit it.
Definition at line 455 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyTxDrop().
|
private |
The trace source fired when a packet ends the transmission process on the medium.
Definition at line 447 of file uan-phy.h.
Referenced by GetTypeId(), and NotifyTxEnd().