|
ns-3
|
Base class for UAN Phy models. More...
#include <uan-phy.h>


Public Types | |
| enum | State { IDLE, CCABUSY, RX, TX, SLEEP } |
| Enum defining possible Phy states. | |
| typedef Callback< void, Ptr < Packet >, double, UanTxMode > | RxOkCallback |
| typedef Callback< void, Ptr < Packet >, double > | RxErrCallback |
Public Member Functions | |
| virtual void | SetEnergyModelCallback (DeviceEnergyModel::ChangeStateCallback callback)=0 |
| virtual void | EnergyDepletionHandler (void)=0 |
| virtual void | SendPacket (Ptr< Packet > pkt, uint32_t modeNum)=0 |
| virtual void | RegisterListener (UanPhyListener *listener)=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. | |
| virtual void | SetReceiveOkCallback (RxOkCallback cb)=0 |
| virtual void | SetReceiveErrorCallback (RxErrCallback cb)=0 |
| virtual void | SetRxGainDb (double gain)=0 |
| virtual void | SetTxPowerDb (double txpwr)=0 |
| virtual void | SetRxThresholdDb (double thresh)=0 |
| virtual void | SetCcaThresholdDb (double thresh)=0 |
| virtual double | GetRxGainDb (void)=0 |
| virtual double | GetTxPowerDb (void)=0 |
| virtual double | GetRxThresholdDb (void)=0 |
| virtual double | GetCcaThresholdDb (void)=0 |
| virtual bool | IsStateSleep (void)=0 |
| virtual bool | IsStateIdle (void)=0 |
| virtual bool | IsStateBusy (void)=0 |
| virtual bool | IsStateRx (void)=0 |
| virtual bool | IsStateTx (void)=0 |
| virtual bool | IsStateCcaBusy (void)=0 |
| virtual Ptr< UanChannel > | GetChannel (void) const =0 |
| virtual Ptr< UanNetDevice > | GetDevice (void)=0 |
| virtual void | SetChannel (Ptr< UanChannel > channel)=0 |
| virtual void | SetDevice (Ptr< UanNetDevice > device)=0 |
| virtual void | SetMac (Ptr< UanMac > mac)=0 |
| virtual void | NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)=0 |
| virtual void | NotifyIntChange (void)=0 |
| virtual void | SetTransducer (Ptr< UanTransducer > trans)=0 |
| virtual Ptr< UanTransducer > | GetTransducer (void)=0 |
| virtual uint32_t | GetNModes (void)=0 |
| virtual UanTxMode | GetMode (uint32_t n)=0 |
| virtual Ptr< Packet > | GetPacketRx (void) const =0 |
| virtual void | Clear (void)=0 |
| virtual void | SetSleepMode (bool sleep)=0 |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| This method returns the TypeId associated to ns3::UanPhy. | |
Base class for UAN Phy models.
| typedef Callback<void, Ptr<Packet>, double > ns3::UanPhy::RxErrCallback |
arg1: packet received successfully arg2: snr of packet
| typedef Callback<void, Ptr<Packet>, double, UanTxMode> ns3::UanPhy::RxOkCallback |
arg1: packet received successfully arg2: snr of packet arg3: mode of packet
| virtual void ns3::UanPhy::Clear | ( | void | ) | [pure virtual] |
Clears all pointer references
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanMacAloha::Clear(), ns3::UanMacCw::Clear(), ns3::UanNetDevice::Clear(), ns3::UanPhyDual::Clear(), and ns3::UanMacRc::Clear().
| virtual void ns3::UanPhy::EnergyDepletionHandler | ( | void | ) | [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().
| virtual double ns3::UanPhy::GetCcaThresholdDb | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetCcaThresholdDb(), and ns3::UanPhyDual::GetCcaThresholdPhy1().
| virtual Ptr<UanChannel> ns3::UanPhy::GetChannel | ( | void | ) | const [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetChannel().
| virtual Ptr<UanNetDevice> ns3::UanPhy::GetDevice | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetDevice().
| virtual UanTxMode ns3::UanPhy::GetMode | ( | uint32_t | n | ) | [pure virtual] |
| n | Mode number of mode to return (place in Modeslist) |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetMode(), and ns3::UanPhyDual::SendPacket().
| virtual uint32_t ns3::UanPhy::GetNModes | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetMode(), ns3::UanPhyDual::GetNModes(), and ns3::UanPhyDual::SendPacket().
| virtual Ptr<Packet> ns3::UanPhy::GetPacketRx | ( | void | ) | const [pure virtual] |
Implemented in ns3::UanPhyDual, and ns3::UanPhyGen.
Referenced by ns3::UanPhyDual::GetPhy1PacketRx().
| virtual double ns3::UanPhy::GetRxGainDb | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetRxGainDb(), and ns3::UanPhyDual::GetRxGainDbPhy1().
| virtual double ns3::UanPhy::GetRxThresholdDb | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetRxThresholdDb().
| virtual Ptr<UanTransducer> ns3::UanPhy::GetTransducer | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanMacCw::Enqueue(), and ns3::UanPhyDual::GetTransducer().
| virtual double ns3::UanPhy::GetTxPowerDb | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::GetTxPowerDb(), ns3::UanPhyDual::GetTxPowerDbPhy1(), and ns3::UanPhyDual::SendPacket().
| TypeId ns3::UanPhy::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::UanPhy.
This object is accessible through the following paths with Config::Set and Config::Connect:
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Object.
Reimplemented in ns3::UanPhyGen, and ns3::UanPhyDual.
References ns3::TypeId::SetParent().
| virtual bool ns3::UanPhy::IsStateBusy | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanMacCw::Enqueue().
| virtual bool ns3::UanPhy::IsStateCcaBusy | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::IsStateCcaBusy(), ns3::UanMacCw::NotifyRxEndError(), and ns3::UanMacCw::NotifyRxEndOk().
| virtual bool ns3::UanPhy::IsStateIdle | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::IsPhy1Idle(), and ns3::UanPhyDual::IsStateIdle().
| virtual bool ns3::UanPhy::IsStateRx | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::IsPhy1Rx(), and ns3::UanPhyDual::IsStateRx().
| virtual bool ns3::UanPhy::IsStateSleep | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::IsStateSleep().
| virtual bool ns3::UanPhy::IsStateTx | ( | void | ) | [pure virtual] |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanMacAloha::Enqueue(), ns3::UanMacCw::Enqueue(), ns3::UanPhyDual::IsPhy1Tx(), and ns3::UanPhyDual::IsStateTx().
| virtual void ns3::UanPhy::NotifyIntChange | ( | void | ) | [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().
| virtual void ns3::UanPhy::NotifyTransStartTx | ( | Ptr< Packet > | packet, |
| double | txPowerDb, | ||
| UanTxMode | txMode | ||
| ) | [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.
| virtual void ns3::UanPhy::RegisterListener | ( | UanPhyListener * | listener | ) | [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().
| virtual void ns3::UanPhy::SendPacket | ( | Ptr< Packet > | pkt, |
| uint32_t | modeNum | ||
| ) | [pure virtual] |
| 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(), and ns3::UanPhyDual::SendPacket().
| virtual void ns3::UanPhy::SetCcaThresholdDb | ( | double | thresh | ) | [pure virtual] |
| thresh | Signal power at receiver required for CCA busy state |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::SetCcaThresholdDb(), and ns3::UanPhyDual::SetCcaThresholdPhy1().
| virtual void ns3::UanPhy::SetChannel | ( | Ptr< UanChannel > | channel | ) | [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().
| virtual void ns3::UanPhy::SetDevice | ( | Ptr< UanNetDevice > | device | ) | [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().
| virtual void ns3::UanPhy::SetEnergyModelCallback | ( | DeviceEnergyModel::ChangeStateCallback | callback | ) | [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.
| virtual void ns3::UanPhy::SetMac | ( | Ptr< UanMac > | mac | ) | [pure virtual] |
| 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().
| virtual void ns3::UanPhy::SetReceiveErrorCallback | ( | RxErrCallback | cb | ) | [pure virtual] |
| cb | Callback to be enabled when a packet is received with errors |
Implemented in ns3::UanPhyGen.
Referenced by ns3::UanMacAloha::AttachPhy(), ns3::UanMacRcGw::AttachPhy(), and ns3::UanMacCw::AttachPhy().
| virtual void ns3::UanPhy::SetReceiveOkCallback | ( | RxOkCallback | cb | ) | [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(), and ns3::UanMacRc::AttachPhy().
| virtual void ns3::UanPhy::SetRxGainDb | ( | double | gain | ) | [pure virtual] |
| gain | Gain added at receiver |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::SetRxGainDb(), and ns3::UanPhyDual::SetRxGainDbPhy1().
| virtual void ns3::UanPhy::SetRxThresholdDb | ( | double | thresh | ) | [pure virtual] |
| thresh | Threshold SINR for propper reception in dB |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::SetRxThresholdDb().
| virtual void ns3::UanPhy::SetTransducer | ( | Ptr< UanTransducer > | trans | ) | [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().
| virtual void ns3::UanPhy::SetTxPowerDb | ( | double | txpwr | ) | [pure virtual] |
| txpwr | Final output transmission power in dB |
Implemented in ns3::UanPhyGen, and ns3::UanPhyDual.
Referenced by ns3::UanPhyDual::SetTxPowerDb(), and ns3::UanPhyDual::SetTxPowerDbPhy1().
| virtual void ns3::UanPhy::StartRxPacket | ( | Ptr< Packet > | pkt, |
| double | rxPowerDb, | ||
| UanTxMode | txMode, | ||
| UanPdp | pdp | ||
| ) | [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.