Generic PHY model. More...
#include <uan-phy-gen.h>
Public Member Functions | |
virtual void | SetEnergyModelCallback (DeviceEnergyModel::ChangeStateCallback cb) |
virtual void | EnergyDepletionHandler (void) |
virtual void | SendPacket (Ptr< Packet > pkt, uint32_t modeNum) |
virtual void | RegisterListener (UanPhyListener *listener) |
virtual void | StartRxPacket (Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp) |
Packet arriving from channel: i.e. leading bit of packet has arrived. | |
virtual void | SetReceiveOkCallback (RxOkCallback cb) |
virtual void | SetReceiveErrorCallback (RxErrCallback cb) |
virtual bool | IsStateSleep (void) |
virtual bool | IsStateIdle (void) |
virtual bool | IsStateBusy (void) |
virtual bool | IsStateRx (void) |
virtual bool | IsStateTx (void) |
virtual bool | IsStateCcaBusy (void) |
virtual void | SetRxGainDb (double gain) |
virtual void | SetTxPowerDb (double txpwr) |
virtual void | SetRxThresholdDb (double thresh) |
virtual void | SetCcaThresholdDb (double thresh) |
virtual double | GetRxGainDb (void) |
virtual double | GetTxPowerDb (void) |
virtual double | GetRxThresholdDb (void) |
virtual double | GetCcaThresholdDb (void) |
virtual Ptr< UanChannel > | GetChannel (void) const |
virtual Ptr< UanNetDevice > | GetDevice (void) |
virtual Ptr< UanTransducer > | GetTransducer (void) |
virtual void | SetChannel (Ptr< UanChannel > channel) |
virtual void | SetDevice (Ptr< UanNetDevice > device) |
virtual void | SetMac (Ptr< UanMac > mac) |
virtual void | SetTransducer (Ptr< UanTransducer > trans) |
virtual void | NotifyTransStartTx (Ptr< Packet > packet, double txPowerDb, UanTxMode txMode) |
virtual void | NotifyIntChange (void) |
virtual uint32_t | GetNModes (void) |
virtual UanTxMode | GetMode (uint32_t n) |
virtual Ptr< Packet > | GetPacketRx (void) const |
virtual void | Clear (void) |
Static Public Member Functions | |
static UanModesList | GetDefaultModes (void) |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::UanPhyGen. | |
Protected Member Functions | |
virtual void | DoDispose () |
Generic PHY model.
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.
virtual void ns3::UanPhyGen::Clear | ( | void | ) | [virtual] |
Clears all pointer references
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::DoDispose | ( | ) | [protected, virtual] |
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.
virtual void ns3::UanPhyGen::EnergyDepletionHandler | ( | void | ) | [virtual] |
This function handles the energy depletion event. Must be implemented by UanPhy child classes.
Implements ns3::UanPhy.
virtual double ns3::UanPhyGen::GetCcaThresholdDb | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
virtual Ptr<UanChannel> ns3::UanPhyGen::GetChannel | ( | void | ) | const [virtual] |
Implements ns3::UanPhy.
static UanModesList ns3::UanPhyGen::GetDefaultModes | ( | void | ) | [static] |
virtual Ptr<UanNetDevice> ns3::UanPhyGen::GetDevice | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
virtual UanTxMode ns3::UanPhyGen::GetMode | ( | uint32_t | n | ) | [virtual] |
n | Mode number of mode to return (place in Modeslist) |
Implements ns3::UanPhy.
virtual uint32_t ns3::UanPhyGen::GetNModes | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
Implements ns3::UanPhy.
virtual double ns3::UanPhyGen::GetRxGainDb | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
virtual double ns3::UanPhyGen::GetRxThresholdDb | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
virtual Ptr<UanTransducer> ns3::UanPhyGen::GetTransducer | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
virtual double ns3::UanPhyGen::GetTxPowerDb | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
static TypeId ns3::UanPhyGen::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::UanPhyGen.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
TraceSources defined for this type:
Reimplemented from ns3::Object.
virtual bool ns3::UanPhyGen::IsStateBusy | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
virtual bool ns3::UanPhyGen::IsStateCcaBusy | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
virtual bool ns3::UanPhyGen::IsStateIdle | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
virtual bool ns3::UanPhyGen::IsStateRx | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
virtual bool ns3::UanPhyGen::IsStateSleep | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
virtual bool ns3::UanPhyGen::IsStateTx | ( | void | ) | [virtual] |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::NotifyIntChange | ( | void | ) | [virtual] |
Function called when there has been a change in the ammount of interference this node is experiencing from other transmissions
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::NotifyTransStartTx | ( | Ptr< Packet > | packet, | |
double | txPowerDb, | |||
UanTxMode | txMode | |||
) | [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.
virtual void ns3::UanPhyGen::RegisterListener | ( | UanPhyListener * | listener | ) | [virtual] |
listener | New listener to register |
Register an object to be notified of common Phy events
Implements ns3::UanPhy.
pkt | Packet to transmit | |
modeNum | Index of mode in SupportedModes list to use for transmission |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::SetCcaThresholdDb | ( | double | thresh | ) | [virtual] |
thresh | Signal power at receiver required for CCA busy state |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::SetChannel | ( | Ptr< UanChannel > | channel | ) | [virtual] |
channel | The channel this Phy is attached to |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::SetDevice | ( | Ptr< UanNetDevice > | device | ) | [virtual] |
device | The Net Device this Phy is a part of |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::SetEnergyModelCallback | ( | DeviceEnergyModel::ChangeStateCallback | callback | ) | [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.
mac | The MAC forwarding messages to this Phy |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::SetReceiveErrorCallback | ( | RxErrCallback | cb | ) | [virtual] |
cb | Callback to be enabled when a packet is received with errors |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::SetReceiveOkCallback | ( | RxOkCallback | cb | ) | [virtual] |
cb | Callback to be enabled when packet is received without error |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::SetRxGainDb | ( | double | gain | ) | [virtual] |
gain | Gain added at receiver |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::SetRxThresholdDb | ( | double | thresh | ) | [virtual] |
thresh | Threshold SINR for propper reception in dB |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::SetTransducer | ( | Ptr< UanTransducer > | trans | ) | [virtual] |
trans | Transducer this Phy outputs to / receives from |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::SetTxPowerDb | ( | double | txpwr | ) | [virtual] |
txpwr | Final output transmission power in dB |
Implements ns3::UanPhy.
virtual void ns3::UanPhyGen::StartRxPacket | ( | Ptr< Packet > | pkt, | |
double | rxPowerDb, | |||
UanTxMode | txMode, | |||
UanPdp | pdp | |||
) | [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.