A Discrete-Event Network Simulator
API
uan-phy-gen.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 University of Washington
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Leonard Tracy <lentracy@gmail.com>
19  * Andrea Sacco <andrea.sacco85@gmail.com>
20  */
21 
22 #ifndef UAN_PHY_GEN_H
23 #define UAN_PHY_GEN_H
24 
25 
26 #include "uan-phy.h"
27 #include "ns3/traced-callback.h"
28 #include "ns3/nstime.h"
29 #include "ns3/device-energy-model.h"
30 #include "ns3/random-variable-stream.h"
31 #include "ns3/event-id.h"
32 #include <list>
33 
34 namespace ns3 {
35 
45 {
46 public:
50  virtual ~UanPhyPerGenDefault ();
51 
56  static TypeId GetTypeId (void);
57 
58  virtual double CalcPer (Ptr<Packet> pkt, double sinrDb, UanTxMode mode);
59 private:
60  double m_thresh;
61 
62 }; // class UanPhyPerGenDefault
63 
64 
74 class UanPhyPerUmodem : public UanPhyPer
75 {
76 public:
78  UanPhyPerUmodem ();
80  virtual ~UanPhyPerUmodem ();
81 
86  static TypeId GetTypeId (void);
87 
103  virtual double CalcPer (Ptr<Packet> pkt, double sinrDb, UanTxMode mode);
104 
105 private:
113  double NChooseK (uint32_t n, uint32_t k);
114 
115 }; // class UanPhyPerUmodem
116 
117 
127 {
128 public:
132  virtual ~UanPhyPerCommonModes ();
133 
138  static TypeId GetTypeId (void);
139 
152  virtual double CalcPer (Ptr<Packet> pkt, double sinrDb, UanTxMode mode);
153 
154 }; // class UanPhyPerCommonModes
155 
156 
167 {
168 
169 public:
173  virtual ~UanPhyCalcSinrDefault ();
174 
179  static TypeId GetTypeId (void);
180 
196  virtual double CalcSinrDb (Ptr<Packet> pkt,
197  Time arrTime,
198  double rxPowerDb,
199  double ambNoiseDb,
200  UanTxMode mode,
201  UanPdp pdp,
202  const UanTransducer::ArrivalList &arrivalList
203  ) const;
204 
205 }; // class UanPhyCalcSinrDefault
206 
207 
228 {
229 
230 public:
234  virtual ~UanPhyCalcSinrFhFsk ();
235 
240  static TypeId GetTypeId (void);
241 
242  virtual double CalcSinrDb (Ptr<Packet> pkt,
243  Time arrTime,
244  double rxPowerDb,
245  double ambNoiseDb,
246  UanTxMode mode,
247  UanPdp pdp,
248  const UanTransducer::ArrivalList &arrivalList
249  ) const;
250 private:
252 
253 }; // class UanPhyCalcSinrFhFsk
254 
255 
266 class UanPhyGen : public UanPhy
267 {
268 public:
270  UanPhyGen ();
272  virtual ~UanPhyGen ();
278  static UanModesList GetDefaultModes (void);
279 
284  static TypeId GetTypeId (void);
285 
286  // Inherited methods
288  virtual void EnergyDepletionHandler (void);
289  virtual void EnergyRechargeHandler (void);
290  virtual void SendPacket (Ptr<Packet> pkt, uint32_t modeNum);
291  virtual void RegisterListener (UanPhyListener *listener);
292  virtual void StartRxPacket (Ptr<Packet> pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp);
293  virtual void SetReceiveOkCallback (RxOkCallback cb);
294  virtual void SetReceiveErrorCallback (RxErrCallback cb);
295  virtual bool IsStateSleep (void);
296  virtual bool IsStateIdle (void);
297  virtual bool IsStateBusy (void);
298  virtual bool IsStateRx (void);
299  virtual bool IsStateTx (void);
300  virtual bool IsStateCcaBusy (void);
301  virtual void SetTxPowerDb (double txpwr);
302  virtual void SetRxThresholdDb (double thresh);
303  virtual void SetCcaThresholdDb (double thresh);
304  virtual double GetTxPowerDb (void);
305  virtual double GetRxThresholdDb (void);
306  virtual double GetCcaThresholdDb (void);
307  virtual Ptr<UanChannel> GetChannel (void) const;
308  virtual Ptr<UanNetDevice> GetDevice (void) const;
309  virtual Ptr<UanTransducer> GetTransducer (void);
310  virtual void SetChannel (Ptr<UanChannel> channel);
311  virtual void SetDevice (Ptr<UanNetDevice> device);
312  virtual void SetMac (Ptr<UanMac> mac);
313  virtual void SetTransducer (Ptr<UanTransducer> trans);
314  virtual void NotifyTransStartTx (Ptr<Packet> packet, double txPowerDb, UanTxMode txMode);
315  virtual void NotifyIntChange (void);
316  virtual uint32_t GetNModes (void);
317  virtual UanTxMode GetMode (uint32_t n);
318  virtual Ptr<Packet> GetPacketRx (void) const;
319  virtual void Clear (void);
320  virtual void SetSleepMode (bool sleep);
321  int64_t AssignStreams (int64_t stream);
322 
323 private:
325  typedef std::list<UanPhyListener *> ListenerList;
326 
328 
339 
340  double m_txPwrDb;
341  double m_rxThreshDb;
342  double m_ccaThreshDb;
343 
346  double m_minRxSinrDb;
347  double m_rxRecvPwrDb;
351 
352  bool m_cleared;
353 
356 
359 
368 
379  double CalculateSinrDb (Ptr<Packet> pkt, Time arrTime, double rxPowerDb,
380  UanTxMode mode, UanPdp pdp);
381 
392  double GetInterferenceDb (Ptr<Packet> pkt);
401  double DbToKp (double db);
410  double KpToDb (double kp);
418  void RxEndEvent (Ptr<Packet> pkt, double rxPowerDb, UanTxMode txMode);
420  void TxEndEvent ();
426  void UpdatePowerConsumption (const State state);
427 
428 
430  void NotifyListenersRxStart (void);
432  void NotifyListenersRxGood (void);
434  void NotifyListenersRxBad (void);
436  void NotifyListenersCcaStart (void);
438  void NotifyListenersCcaEnd (void);
444  void NotifyListenersTxStart (Time duration);
448  void NotifyListenersTxEnd (void);
449 
450 protected:
451  virtual void DoDispose ();
452 
453 }; // class UanPhyGen
454 
455 } // namespace ns3
456 
457 #endif /* UAN_PHY_GEN_H */
ns3::UanPhyGen::m_txLogger
ns3::TracedCallback< Ptr< const Packet >, double, UanTxMode > m_txLogger
A packet was sent from this Phy.
Definition: uan-phy-gen.h:367
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::UanPhyGen::GetNModes
virtual uint32_t GetNModes(void)
Get the number of transmission modes supported by this Phy.
Definition: uan-phy-gen.cc:1169
ns3::UanPhyPerCommonModes::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition: uan-phy-gen.cc:263
ns3::UanPhyGen::m_ccaThreshDb
double m_ccaThreshDb
CCA busy threshold.
Definition: uan-phy-gen.h:342
ns3::UanPhyGen::m_pg
Ptr< UniformRandomVariable > m_pg
Provides uniform random variables.
Definition: uan-phy-gen.h:358
ns3::UanPhyGen::ListenerList
std::list< UanPhyListener * > ListenerList
List of Phy Listeners.
Definition: uan-phy-gen.h:325
ns3::UanPhyPerGenDefault::m_thresh
double m_thresh
SINR threshold.
Definition: uan-phy-gen.h:60
ns3::UanPhyGen::GetMode
virtual UanTxMode GetMode(uint32_t n)
Get a specific transmission mode.
Definition: uan-phy-gen.cc:1175
ns3::EventId
An identifier for simulation events.
Definition: event-id.h:54
ns3::UanPhyGen::m_cleared
bool m_cleared
Flag when we've been cleared.
Definition: uan-phy-gen.h:352
ns3::UanPdp
The power delay profile returned by propagation models.
Definition: uan-prop-model.h:92
ns3::Callback< void, int >
ns3::UanPhyCalcSinrFhFsk::CalcSinrDb
virtual double CalcSinrDb(Ptr< Packet > pkt, Time arrTime, double rxPowerDb, double ambNoiseDb, UanTxMode mode, UanPdp pdp, const UanTransducer::ArrivalList &arrivalList) const
Calculate the SINR value for a packet.
Definition: uan-phy-gen.cc:126
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::UanPhyPerGenDefault::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition: uan-phy-gen.cc:221
ns3::UanPhy::RxErrCallback
Callback< void, Ptr< Packet >, double > RxErrCallback
Packet receive error callback function type.
Definition: uan-phy.h:207
ns3::UanPhyPerCommonModes
Packet error rate calculation for common tx modes based on UanPhyPerUmodem.
Definition: uan-phy-gen.h:127
ns3::UanPhyGen::m_listeners
ListenerList m_listeners
List of listeners.
Definition: uan-phy-gen.h:330
ns3::UanPhyGen::m_channel
Ptr< UanChannel > m_channel
Attached channel.
Definition: uan-phy-gen.h:333
ns3::UanPhyPerGenDefault::UanPhyPerGenDefault
UanPhyPerGenDefault()
Constructor.
Definition: uan-phy-gen.cc:211
ns3::UanPhyCalcSinrFhFsk::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition: uan-phy-gen.cc:111
ns3::UanPhyGen::m_device
Ptr< UanNetDevice > m_device
Device hosting this Phy.
Definition: uan-phy-gen.h:335
ns3::UanPhyGen::KpToDb
double KpToDb(double kp)
Convert kilopascals to dB.
Definition: uan-phy-gen.cc:1096
ns3::UanPhyPerUmodem::UanPhyPerUmodem
UanPhyPerUmodem()
Constructor.
Definition: uan-phy-gen.cc:388
ns3::UanPhyGen::m_modes
UanModesList m_modes
List of modes supported by this PHY.
Definition: uan-phy-gen.h:327
ns3::UanPhyGen::m_rxRecvPwrDb
double m_rxRecvPwrDb
Receiver power.
Definition: uan-phy-gen.h:347
third.channel
channel
Definition: third.py:92
ns3::UanPhyGen::NotifyIntChange
virtual void NotifyIntChange(void)
Called when there has been a change in the amount of interference this node is experiencing from othe...
Definition: uan-phy-gen.cc:1052
ns3::UanPhyGen::m_pktRxArrTime
Time m_pktRxArrTime
Packet arrival time.
Definition: uan-phy-gen.h:348
ns3::UanPhyGen::GetInterferenceDb
double GetInterferenceDb(Ptr< Packet > pkt)
Calculate interference power from overlapping packet arrivals, in dB.
Definition: uan-phy-gen.cc:1069
ns3::UanPhyGen::IsStateIdle
virtual bool IsStateIdle(void)
Definition: uan-phy-gen.cc:901
ns3::UanPhyGen::m_rxEndEvent
EventId m_rxEndEvent
Rx event.
Definition: uan-phy-gen.h:355
ns3::UanPhyPerUmodem
Packet error rate calculation assuming WHOI Micromodem-like PHY (FH-FSK)
Definition: uan-phy-gen.h:75
ns3::UanPhyGen::SetChannel
virtual void SetChannel(Ptr< UanChannel > channel)
Attach to a channel.
Definition: uan-phy-gen.cc:980
ns3::UanPhyGen::SetSleepMode
virtual void SetSleepMode(bool sleep)
Set the Phy SLEEP mode.
Definition: uan-phy-gen.cc:1005
ns3::UanPhyGen::m_pktRxPdp
UanPdp m_pktRxPdp
Power delay profile of packet.
Definition: uan-phy-gen.h:349
ns3::UanPhyCalcSinrFhFsk::~UanPhyCalcSinrFhFsk
virtual ~UanPhyCalcSinrFhFsk()
Destructor.
Definition: uan-phy-gen.cc:105
ns3::UanPhyCalcSinrDefault::UanPhyCalcSinrDefault
UanPhyCalcSinrDefault()
Constructor.
Definition: uan-phy-gen.cc:53
third.mac
mac
Definition: third.py:99
ns3::UanPhyGen::m_transducer
Ptr< UanTransducer > m_transducer
Associated transducer.
Definition: uan-phy-gen.h:334
ns3::UanPhyPerCommonModes::UanPhyPerCommonModes
UanPhyPerCommonModes()
Constructor.
Definition: uan-phy-gen.cc:251
ns3::UanModesList
Container for UanTxModes.
Definition: uan-tx-mode.h:258
ns3::UanPhyGen::m_pktTx
Ptr< Packet > m_pktTx
Sent packet.
Definition: uan-phy-gen.h:345
ns3::UanPhyGen::GetPacketRx
virtual Ptr< Packet > GetPacketRx(void) const
Get the packet currently being received.
Definition: uan-phy-gen.cc:1183
ns3::UanPhyPerUmodem::CalcPer
virtual double CalcPer(Ptr< Packet > pkt, double sinrDb, UanTxMode mode)
Calculate the packet error probability based on SINR at the receiver and a tx mode.
Definition: uan-phy-gen.cc:428
ns3::UanPhyGen::GetDevice
virtual Ptr< UanNetDevice > GetDevice(void) const
Get the device hosting this Phy.
Definition: uan-phy-gen.cc:969
ns3::UanPhyGen::EnergyDepletionHandler
virtual void EnergyDepletionHandler(void)
Handle the energy depletion event.
Definition: uan-phy-gen.cc:653
ns3::UanPhyGen::SetMac
virtual void SetMac(Ptr< UanMac > mac)
Set the MAC forwarding messages to this Phy.
Definition: uan-phy-gen.cc:992
ns3::UanPhyGen::IsStateTx
virtual bool IsStateTx(void)
Definition: uan-phy-gen.cc:916
ns3::UanPhyGen::m_pktRxMode
UanTxMode m_pktRxMode
Packet transmission mode at receiver.
Definition: uan-phy-gen.h:350
ns3::UanPhyGen::Clear
virtual void Clear(void)
Clear all pointer references.
Definition: uan-phy-gen.cc:519
ns3::UanPhyCalcSinrFhFsk::m_hops
uint32_t m_hops
Number of hops.
Definition: uan-phy-gen.h:251
ns3::UanPhy
Base class for UAN Phy models.
Definition: uan-phy.h:179
ns3::UanPhyGen::NotifyListenersTxStart
void NotifyListenersTxStart(Time duration)
Call UanListener::NotifyTxStart on all listeners.
Definition: uan-phy-gen.cc:1149
ns3::Ptr< Packet >
ns3::UanPhyGen::NotifyListenersCcaEnd
void NotifyListenersCcaEnd(void)
Call UanListener::NotifyCcaEnd on all listeners.
Definition: uan-phy-gen.cc:1139
ns3::UanPhyPerUmodem::~UanPhyPerUmodem
virtual ~UanPhyPerUmodem()
Destructor.
Definition: uan-phy-gen.cc:392
ns3::UanPhyPer
Calculate packet error probability, based on received SINR and modulation (mode).
Definition: uan-phy.h:111
ns3::UanPhyGen::RxEndEvent
void RxEndEvent(Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode)
Event to process end of packet reception.
Definition: uan-phy-gen.cc:834
ns3::UanPhyGen::NotifyListenersTxEnd
void NotifyListenersTxEnd(void)
Call UanListener::NotifyTxEnd on all listeners.
Definition: uan-phy-gen.cc:1159
ns3::UanPhyGen::IsStateRx
virtual bool IsStateRx(void)
Definition: uan-phy-gen.cc:911
ns3::UanPhyGen::NotifyListenersCcaStart
void NotifyListenersCcaStart(void)
Call UanListener::NotifyCcaStart on all listeners.
Definition: uan-phy-gen.cc:1130
ns3::UanPhyGen::NotifyListenersRxBad
void NotifyListenersRxBad(void)
Call UanListener::NotifyRxEndError on all listeners.
Definition: uan-phy-gen.cc:1121
ns3::UanPhyGen::m_per
Ptr< UanPhyPer > m_per
Error model.
Definition: uan-phy-gen.h:337
uan-phy.h
bianchi11ax.k
int k
Definition: bianchi11ax.py:129
ns3::UanPhyPerCommonModes::CalcPer
virtual double CalcPer(Ptr< Packet > pkt, double sinrDb, UanTxMode mode)
Calculate the Packet ERror probability based on SINR at the receiver and a tx mode.
Definition: uan-phy-gen.cc:274
ns3::UanPhyPerGenDefault
Default Packet Error Rate calculator for UanPhyGen.
Definition: uan-phy-gen.h:45
ns3::UanPhyGen::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition: uan-phy-gen.cc:580
double
ns3::UanPhyGen::m_txEndEvent
EventId m_txEndEvent
Tx event.
Definition: uan-phy-gen.h:354
ns3::UanPhyGen::SendPacket
virtual void SendPacket(Ptr< Packet > pkt, uint32_t modeNum)
Send a packet using a specific transmission mode.
Definition: uan-phy-gen.cc:685
ns3::UanPhyGen::m_minRxSinrDb
double m_minRxSinrDb
Minimum receive SINR during packet reception.
Definition: uan-phy-gen.h:346
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
ns3::UanTxMode
Abstraction of packet modulation information.
Definition: uan-tx-mode.h:42
ns3::UanPhy::State
State
Enum defining possible Phy states.
Definition: uan-phy.h:183
ns3::UanPhyGen::NotifyListenersRxStart
void NotifyListenersRxStart(void)
Call UanListener::NotifyRxStart on all listeners.
Definition: uan-phy-gen.cc:1102
ns3::UanPhyGen::GetDefaultModes
static UanModesList GetDefaultModes(void)
Get the default transmission modes.
Definition: uan-phy-gen.cc:569
ns3::UanPhyGen::m_rxOkLogger
ns3::TracedCallback< Ptr< const Packet >, double, UanTxMode > m_rxOkLogger
A packet destined for this Phy was received without error.
Definition: uan-phy-gen.h:363
ns3::UanPhyGen::GetTxPowerDb
virtual double GetTxPowerDb(void)
Get the current transmit power, in dB.
Definition: uan-phy-gen.cc:945
ns3::UanPhyGen::IsStateCcaBusy
virtual bool IsStateCcaBusy(void)
Definition: uan-phy-gen.cc:922
ns3::UanPhyGen::NotifyListenersRxGood
void NotifyListenersRxGood(void)
Call UanListener::NotifyRxEndOk on all listeners.
Definition: uan-phy-gen.cc:1112
ns3::UanPhyCalcSinrDefault::~UanPhyCalcSinrDefault
virtual ~UanPhyCalcSinrDefault()
Destructor.
Definition: uan-phy-gen.cc:57
ns3::UanPhyGen::SetDevice
virtual void SetDevice(Ptr< UanNetDevice > device)
Set the device hosting this Phy.
Definition: uan-phy-gen.cc:986
ns3::UanPhyCalcSinrFhFsk
WHOI Micromodem like FH-FSK model.
Definition: uan-phy-gen.h:228
ns3::UanPhyGen::m_rxErrLogger
ns3::TracedCallback< Ptr< const Packet >, double, UanTxMode > m_rxErrLogger
A packet destined for this Phy was received with error.
Definition: uan-phy-gen.h:365
ns3::UanPhyGen::m_recErrCb
RxErrCallback m_recErrCb
Callback for packets received with errors.
Definition: uan-phy-gen.h:332
ns3::UanPhyGen::UanPhyGen
UanPhyGen()
Constructor.
Definition: uan-phy-gen.cc:494
ns3::UanPhyGen::StartRxPacket
virtual void StartRxPacket(Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp)
Packet arriving from channel: i.e.
Definition: uan-phy-gen.cc:756
ns3::UanPhyGen::GetTransducer
virtual Ptr< UanTransducer > GetTransducer(void)
Get the attached transducer.
Definition: uan-phy-gen.cc:975
ns3::UanPhyGen::SetCcaThresholdDb
virtual void SetCcaThresholdDb(double thresh)
Set the threshold for detecting channel busy.
Definition: uan-phy-gen.cc:939
uint32_t
ns3::UanPhyGen::IsStateSleep
virtual bool IsStateSleep(void)
Definition: uan-phy-gen.cc:896
ns3::UanPhyGen::DbToKp
double DbToKp(double db)
Convert dB to kilopascals.
Definition: uan-phy-gen.cc:1091
ns3::UanPhyGen::GetChannel
virtual Ptr< UanChannel > GetChannel(void) const
Get the attached channel.
Definition: uan-phy-gen.cc:963
ns3::UanPhyListener
Interface for PHY event listener.
Definition: uan-phy.h:147
ns3::UanPhyGen::EnergyRechargeHandler
virtual void EnergyRechargeHandler(void)
Handle the energy recharge event.
Definition: uan-phy-gen.cc:675
ns3::UanPhyGen::m_pktRx
Ptr< Packet > m_pktRx
Received packet.
Definition: uan-phy-gen.h:344
ns3::UanPhyGen::m_state
State m_state
Phy state.
Definition: uan-phy-gen.h:329
ns3::UanTransducer::ArrivalList
std::list< UanPacketArrival > ArrivalList
List of arriving packets overlapping in time.
Definition: uan-transducer.h:154
ns3::UanPhyGen::SetTxPowerDb
virtual void SetTxPowerDb(double txpwr)
Set the transmit power.
Definition: uan-phy-gen.cc:929
ns3::UanPhyGen::SetEnergyModelCallback
virtual void SetEnergyModelCallback(DeviceEnergyModel::ChangeStateCallback cb)
Set the DeviceEnergyModel callback for UanPhy device.
Definition: uan-phy-gen.cc:635
ns3::UanPhyCalcSinrFhFsk::UanPhyCalcSinrFhFsk
UanPhyCalcSinrFhFsk()
Constructor.
Definition: uan-phy-gen.cc:101
ns3::UanPhyCalcSinr
Class used for calculating SINR of packet in UanPhy.
Definition: uan-phy.h:45
ns3::UanPhyPerUmodem::NChooseK
double NChooseK(uint32_t n, uint32_t k)
Binomial coefficient.
Definition: uan-phy-gen.cc:408
ns3::UanPhyGen::GetRxThresholdDb
virtual double GetRxThresholdDb(void)
Get the minimum received signal strength required to receive a packet without errors.
Definition: uan-phy-gen.cc:952
ns3::UanPhyPerGenDefault::CalcPer
virtual double CalcPer(Ptr< Packet > pkt, double sinrDb, UanTxMode mode)
Calculate the packet error probability based on SINR at the receiver and a tx mode.
Definition: uan-phy-gen.cc:238
ns3::UanPhyGen::SetReceiveErrorCallback
virtual void SetReceiveErrorCallback(RxErrCallback cb)
Definition: uan-phy-gen.cc:891
ns3::UanPhyCalcSinrDefault
Default SINR calculator for UanPhyGen.
Definition: uan-phy-gen.h:167
ns3::UanPhyGen::UpdatePowerConsumption
void UpdatePowerConsumption(const State state)
Update energy source with new state.
Definition: uan-phy-gen.cc:642
ns3::TracedCallback
Forward calls to a chain of Callback.
Definition: traced-callback.h:53
ns3::UanPhyGen::m_recOkCb
RxOkCallback m_recOkCb
Callback for packets received without error.
Definition: uan-phy-gen.h:331
ns3::UanPhyGen::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition: uan-phy-gen.cc:561
ns3::UanPhyPerGenDefault::~UanPhyPerGenDefault
virtual ~UanPhyPerGenDefault()
Destructor.
Definition: uan-phy-gen.cc:216
ns3::UanPhyGen::m_txPwrDb
double m_txPwrDb
Transmit power.
Definition: uan-phy-gen.h:340
ns3::UanPhyGen
Generic PHY model.
Definition: uan-phy-gen.h:267
ns3::UanPhyGen::RegisterListener
virtual void RegisterListener(UanPhyListener *listener)
Register a UanPhyListener to be notified of common UanPhy events.
Definition: uan-phy-gen.cc:749
ns3::UanPhyCalcSinrDefault::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition: uan-phy-gen.cc:63
ns3::UanPhyGen::SetReceiveOkCallback
virtual void SetReceiveOkCallback(RxOkCallback cb)
Set the callback to be used when a packet is received without error.
Definition: uan-phy-gen.cc:885
ns3::UanPhyGen::~UanPhyGen
virtual ~UanPhyGen()
Dummy destructor, see DoDispose.
Definition: uan-phy-gen.cc:513
ns3::UanPhyGen::NotifyTransStartTx
virtual void NotifyTransStartTx(Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)
Called when a transmission is beginning on the attached transducer.
Definition: uan-phy-gen.cc:1043
ns3::UanPhyGen::m_mac
Ptr< UanMac > m_mac
MAC layer.
Definition: uan-phy-gen.h:336
ns3::UanPhyGen::SetTransducer
virtual void SetTransducer(Ptr< UanTransducer > trans)
Attach a transducer to this Phy.
Definition: uan-phy-gen.cc:998
ns3::UanPhyGen::IsStateBusy
virtual bool IsStateBusy(void)
Definition: uan-phy-gen.cc:906
ns3::UanPhyGen::m_sinr
Ptr< UanPhyCalcSinr > m_sinr
SINR calculator.
Definition: uan-phy-gen.h:338
ns3::UanPhyPerUmodem::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition: uan-phy-gen.cc:397
ns3::UanPhyCalcSinrDefault::CalcSinrDb
virtual double CalcSinrDb(Ptr< Packet > pkt, Time arrTime, double rxPowerDb, double ambNoiseDb, UanTxMode mode, UanPdp pdp, const UanTransducer::ArrivalList &arrivalList) const
Calculate the SINR value for a packet.
Definition: uan-phy-gen.cc:74
ns3::UanPhyGen::CalculateSinrDb
double CalculateSinrDb(Ptr< Packet > pkt, Time arrTime, double rxPowerDb, UanTxMode mode, UanPdp pdp)
Calculate the SINR value for a packet.
Definition: uan-phy-gen.cc:1062
ns3::UanPhyGen::AssignStreams
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Definition: uan-phy-gen.cc:1035
sample-rng-plot.n
n
Definition: sample-rng-plot.py:37
ns3::UanPhyPerCommonModes::~UanPhyPerCommonModes
virtual ~UanPhyPerCommonModes()
Destructor.
Definition: uan-phy-gen.cc:257
ns3::UanPhyGen::TxEndEvent
void TxEndEvent()
Event to process end of packet transmission.
Definition: uan-phy-gen.cc:725
ns3::UanPhyGen::m_energyCallback
DeviceEnergyModel::ChangeStateCallback m_energyCallback
Energy model callback.
Definition: uan-phy-gen.h:361
ns3::UanPhyGen::m_rxThreshDb
double m_rxThreshDb
Receive SINR threshold.
Definition: uan-phy-gen.h:341
ns3::UanPhyGen::GetCcaThresholdDb
virtual double GetCcaThresholdDb(void)
Get the CCA threshold signal strength required to detect channel busy.
Definition: uan-phy-gen.cc:957
ns3::UanPhyGen::SetRxThresholdDb
virtual void SetRxThresholdDb(double thresh)
Set the minimum SINR threshold to receive a packet without errors.
Definition: uan-phy-gen.cc:934