A Discrete-Event Network Simulator
API
lr-wpan-phy.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 The Boeing Company
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:
19  * Gary Pei <guangyu.pei@boeing.com>
20  * Sascha Alexander Jopen <jopen@cs.uni-bonn.de>
21  */
22 #ifndef LR_WPAN_PHY_H
23 #define LR_WPAN_PHY_H
24 
26 
27 #include <ns3/spectrum-phy.h>
28 #include <ns3/traced-callback.h>
29 #include <ns3/traced-value.h>
30 #include <ns3/event-id.h>
31 
32 namespace ns3 {
33 
34 class Packet;
35 class SpectrumValue;
36 class LrWpanErrorModel;
37 struct LrWpanSpectrumSignalParameters;
38 class MobilityModel;
39 class SpectrumChannel;
40 class SpectrumModel;
41 class AntennaModel;
42 class NetDevice;
43 class UniformRandomVariable;
44 
50 typedef struct
51 {
52  double averagePower;
56 
63 typedef struct
64 {
65  double bitRate;
66  double symbolRate;
68 
75 typedef struct
76 {
77  double shrPreamble;
78  double shrSfd;
79  double phr;
81 
87 typedef enum
88 {
98 
105 typedef enum
106 {
119  IEEE_802_15_4_PHY_UNSPECIFIED = 0xc // all cases not covered by ieee802.15.4
121 
122 namespace TracedValueCallback
123 {
131  typedef void (* LrWpanPhyEnumeration)(LrWpanPhyEnumeration oldValue,
132  LrWpanPhyEnumeration newValue);
133 } // namespace TracedValueCallback
134 
140 typedef enum
141 {
145  phyCCAMode = 0x03,
149  phySymbolsPerOctet = 0x07
151 
157 typedef struct
158 {
160  uint32_t phyChannelsSupported[32];
162  uint8_t phyCCAMode;
163  uint32_t phyCurrentPage;
165  uint32_t phySHRDuration;
168 
179 
188 
197 
207 
217 typedef Callback< void, LrWpanPhyEnumeration,
220 
229 
238 typedef Callback< void, LrWpanPhyEnumeration,
240 
247 class LrWpanPhy : public SpectrumPhy
248 {
249 
250 public:
256  static TypeId GetTypeId (void);
257 
262  static const uint32_t aMaxPhyPacketSize;
263 
269  static const uint32_t aTurnaroundTime;
270 
274  LrWpanPhy (void);
275  virtual ~LrWpanPhy (void);
276 
277  // inherited from SpectrumPhy
279  Ptr<MobilityModel> GetMobility (void) const;
281 
288  void SetDevice (Ptr<NetDevice> d);
289  Ptr<NetDevice> GetDevice (void) const;
290 
296  void SetAntenna (Ptr<AntennaModel> a);
297  Ptr<AntennaModel> GetRxAntenna (void) const;
298  virtual Ptr<const SpectrumModel> GetRxSpectrumModel (void) const;
299 
306 
314 
321 
327  virtual void StartRx (Ptr<SpectrumSignalParameters> params);
328 
336  void PdDataRequest (const uint32_t psduLength, Ptr<Packet> p);
337 
343  void PlmeCcaRequest (void);
344 
350  void PlmeEdRequest (void);
351 
359 
367 
376 
384 
392 
400 
408 
416 
424 
432 
439  double GetDataOrSymbolRate (bool isData);
440 
447 
454 
461  uint64_t GetPhySHRDuration (void) const;
462 
469  double GetPhySymbolsPerOctet (void) const;
470 
478  int64_t AssignStreams (int64_t stream);
479 
490  typedef void (* StateTracedCallback)
491  (Time time, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState);
492 
493 protected:
505 
506 private:
510  typedef std::pair<Ptr<Packet>, bool> PacketAndStatus;
511 
512  // Inherited from Object.
513  virtual void DoDispose (void);
514 
520  void ChangeTrxState (LrWpanPhyEnumeration newState);
521 
526  void SetMyPhyOption (void);
527 
535 
541  void EndTx (void);
542 
547  void CheckInterference (void);
548 
559  void EndRx (Ptr<SpectrumSignalParameters> params);
560 
568  void CancelEd (LrWpanPhyEnumeration state);
569 
574  void EndEd (void);
575 
580  void EndCca (void);
581 
586  void EndSetTRXState (void);
587 
596 
602  Time GetPpduHeaderTxTime (void);
603 
610  bool ChannelSupported (uint8_t channel);
611 
618  bool PhyIsBusy (void) const;
619 
620  // Trace sources
628 
636 
644 
652 
660 
667 
677 
695 
700 
705 
710 
715 
720 
725 
730 
735 
736  // State variables
741 
747 
748  // Callbacks
754 
760 
766 
772 
778 
784 
790 
795 
800 
805 
810 
817 
822 
829  std::pair<Ptr<LrWpanSpectrumSignalParameters>, bool> m_currentRxPacket;
830 
838 
843 
848 
853 
858 
863 };
864 
865 
866 } // namespace ns3
867 
868 #endif /* LR_WPAN_PHY_H */
ns3::LrWpanPhy::m_trxState
TracedValue< LrWpanPhyEnumeration > m_trxState
The current transceiver state.
Definition: lr-wpan-phy.h:740
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::LrWpanPhy::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: lr-wpan-phy.cc:74
ns3::IEEE_802_15_4_2_4GHZ_OQPSK
@ IEEE_802_15_4_2_4GHZ_OQPSK
Definition: lr-wpan-phy.h:95
ns3::LrWpanPhy::EndCca
void EndCca(void)
Called at the end of the CCA.
Definition: lr-wpan-phy.cc:1114
ns3::LrWpanPhyPibAttributes
IEEE802.15.4-2006 PHY PIB Attributes Table 23 in section 6.4.2.
Definition: lr-wpan-phy.h:158
ns3::IEEE_802_15_4_PHY_INVALID_PARAMETER
@ IEEE_802_15_4_PHY_INVALID_PARAMETER
Definition: lr-wpan-phy.h:112
ns3::LrWpanPhyPpduHeaderSymbolNumber::shrSfd
double shrSfd
Number of symbols for the SHR SFD.
Definition: lr-wpan-phy.h:78
ns3::LrWpanPhy::ChannelSupported
bool ChannelSupported(uint8_t channel)
Check if the given channel is supported by the PHY.
Definition: lr-wpan-phy.cc:875
ns3::PlmeSetAttributeConfirmCallback
Callback< void, LrWpanPhyEnumeration, LrWpanPibAttributeIdentifier > PlmeSetAttributeConfirmCallback
This method implements the PD SAP: PlmeSetAttributeConfirm.
Definition: lr-wpan-phy.h:239
ns3::EventId
An identifier for simulation events.
Definition: event-id.h:54
ns3::LrWpanPhy::GetMobility
Ptr< MobilityModel > GetMobility(void) const
Get the associated MobilityModel instance.
Definition: lr-wpan-phy.cc:209
ns3::LrWpanPhy::EndSetTRXState
void EndSetTRXState(void)
Called after applying a deferred transceiver state switch.
Definition: lr-wpan-phy.cc:1188
ns3::LrWpanPhy::m_edPower
LrWpanEdPower m_edPower
Helper value for tracking the average power during ED.
Definition: lr-wpan-phy.h:799
ns3::LrWpanPhy::SetDevice
void SetDevice(Ptr< NetDevice > d)
Set the associated NetDevice instance.
Definition: lr-wpan-phy.cc:217
ns3::Callback
Callback template class.
Definition: callback.h:1279
ns3::IEEE_802_15_4_915MHZ_BPSK
@ IEEE_802_15_4_915MHZ_BPSK
Definition: lr-wpan-phy.h:90
ns3::LrWpanEdPower::lastUpdate
Time lastUpdate
Last update time.
Definition: lr-wpan-phy.h:53
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::PdDataIndicationCallback
Callback< void, uint32_t, Ptr< Packet >, uint8_t > PdDataIndicationCallback
This method implements the PD SAP: PdDataIndication.
Definition: lr-wpan-phy.h:178
ns3::LrWpanPhy::m_txPsd
Ptr< SpectrumValue > m_txPsd
The transmit power spectral density.
Definition: lr-wpan-phy.h:719
ns3::LrWpanPhy::m_phyRxDropTrace
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
The trace source fired when the phy layer drops a packet it has received.
Definition: lr-wpan-phy.h:666
ns3::LrWpanPhy::PlmeSetAttributeRequest
void PlmeSetAttributeRequest(LrWpanPibAttributeIdentifier id, LrWpanPhyPibAttributes *attribute)
IEEE 802.15.4-2006 section 6.2.2.9 PLME-SET.request Set attributes per definition from Table 23 in se...
Definition: lr-wpan-phy.cc:893
ns3::LrWpanPhy::PlmeGetAttributeRequest
void PlmeGetAttributeRequest(LrWpanPibAttributeIdentifier id)
IEEE 802.15.4-2006 section 6.2.2.5 PLME-GET.request Get attributes per definition from Table 23 in se...
Definition: lr-wpan-phy.cc:652
ns3::phyCurrentChannel
@ phyCurrentChannel
Definition: lr-wpan-phy.h:142
ns3::LrWpanPhyPibAttributes::phyCurrentPage
uint32_t phyCurrentPage
Current channel page.
Definition: lr-wpan-phy.h:163
ns3::IEEE_802_15_4_PHY_IDLE
@ IEEE_802_15_4_PHY_IDLE
Definition: lr-wpan-phy.h:111
ns3::LrWpanPhy::GetPhySHRDuration
uint64_t GetPhySHRDuration(void) const
Get the duration of the SHR (preamble and SFD) in symbols, depending on the currently selected channe...
Definition: lr-wpan-phy.cc:1404
third.channel
channel
Definition: third.py:92
ns3::PlmeEdConfirmCallback
Callback< void, LrWpanPhyEnumeration, uint8_t > PlmeEdConfirmCallback
This method implements the PD SAP: PlmeEdConfirm.
Definition: lr-wpan-phy.h:206
ns3::LrWpanPhyPibAttributes::phyMaxFrameDuration
uint32_t phyMaxFrameDuration
The maximum number of symbols in a frame.
Definition: lr-wpan-phy.h:164
ns3::PdDataConfirmCallback
Callback< void, LrWpanPhyEnumeration > PdDataConfirmCallback
This method implements the PD SAP: PdDataConfirm.
Definition: lr-wpan-phy.h:187
ns3::LrWpanPhy::m_plmeCcaConfirmCallback
PlmeCcaConfirmCallback m_plmeCcaConfirmCallback
This callback is used to report CCA status to the MAC or CSMA/CA.
Definition: lr-wpan-phy.h:765
ns3::LrWpanPhy::PlmeSetTRXStateRequest
void PlmeSetTRXStateRequest(LrWpanPhyEnumeration state)
IEEE 802.15.4-2006 section 6.2.2.7 PLME-SET-TRX-STATE.request Set PHY state.
Definition: lr-wpan-phy.cc:687
ns3::LrWpanPhy::GetRxSpectrumModel
virtual Ptr< const SpectrumModel > GetRxSpectrumModel(void) const
Definition: lr-wpan-phy.cc:249
ns3::LrWpanPhy::GetNominalTxPowerFromPib
int8_t GetNominalTxPowerFromPib(uint8_t phyTransmitPower)
Calculates the nominal transmit power of the device in decibels relative to 1 mW according to the rep...
Definition: lr-wpan-phy.cc:1423
ns3::LrWpanPhy::AssignStreams
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Definition: lr-wpan-phy.cc:1446
ns3::LrWpanPhy::m_errorModel
Ptr< LrWpanErrorModel > m_errorModel
The error model describing the bit and packet error rates.
Definition: lr-wpan-phy.h:729
ns3::LrWpanPhy::SetChannel
void SetChannel(Ptr< SpectrumChannel > c)
Set the channel attached to this device.
Definition: lr-wpan-phy.cc:233
ns3::LrWpanPhyDataAndSymbolRates::bitRate
double bitRate
bit rate
Definition: lr-wpan-phy.h:65
ns3::LrWpanPhy::m_phyPIBAttributes
LrWpanPhyPibAttributes m_phyPIBAttributes
The current PHY PIB attributes.
Definition: lr-wpan-phy.h:734
ns3::PlmeGetAttributeConfirmCallback
Callback< void, LrWpanPhyEnumeration, LrWpanPibAttributeIdentifier, LrWpanPhyPibAttributes * > PlmeGetAttributeConfirmCallback
This method implements the PD SAP: PlmeGetAttributeConfirm.
Definition: lr-wpan-phy.h:219
lr-wpan-interference-helper.h
ns3::LrWpanPhy::m_ccaPeakPower
double m_ccaPeakPower
Helper value for the peak power value during CCA.
Definition: lr-wpan-phy.h:804
ns3::LrWpanPhyDataAndSymbolRates::symbolRate
double symbolRate
symbol rate
Definition: lr-wpan-phy.h:66
ns3::LrWpanPhy::GetPhySymbolsPerOctet
double GetPhySymbolsPerOctet(void) const
Get the number of symbols per octet, depending on the currently selected channel.
Definition: lr-wpan-phy.cc:1414
ns3::LrWpanPhy::m_antenna
Ptr< AntennaModel > m_antenna
The antenna used by the transceiver.
Definition: lr-wpan-phy.h:714
ns3::LrWpanPhy::SetTxPowerSpectralDensity
void SetTxPowerSpectralDensity(Ptr< SpectrumValue > txPsd)
Set the Power Spectral Density of outgoing signals in W/Hz.
Definition: lr-wpan-phy.cc:1364
ns3::LrWpanPhy::m_phyTxEndTrace
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
The trace source fired when a packet ends the transmission process on the medium.
Definition: lr-wpan-phy.h:635
ns3::LrWpanPhy::EndEd
void EndEd(void)
Called at the end of the ED procedure.
Definition: lr-wpan-phy.cc:1082
ns3::IEEE_802_15_4_PHY_SUCCESS
@ IEEE_802_15_4_PHY_SUCCESS
Definition: lr-wpan-phy.h:114
ns3::LrWpanPhy::ChangeTrxState
void ChangeTrxState(LrWpanPhyEnumeration newState)
Change the PHY state to the given new state, firing the state change trace.
Definition: lr-wpan-phy.cc:1049
ns3::LrWpanPhy::GetDataOrSymbolRate
double GetDataOrSymbolRate(bool isData)
implement PLME SetAttribute confirm SAP bit rate is in kbit/s.
Definition: lr-wpan-phy.cc:1272
ns3::IEEE_802_15_4_PHY_READ_ONLY
@ IEEE_802_15_4_PHY_READ_ONLY
Definition: lr-wpan-phy.h:118
ns3::LrWpanPhy::m_plmeGetAttributeConfirmCallback
PlmeGetAttributeConfirmCallback m_plmeGetAttributeConfirmCallback
This callback is used to report requested attribute values back to the MAC.
Definition: lr-wpan-phy.h:777
ns3::IEEE_802_15_4_PHY_BUSY
@ IEEE_802_15_4_PHY_BUSY
Definition: lr-wpan-phy.h:107
ns3::IEEE_802_15_4_PHY_UNSUPPORTED_ATTRIBUTE
@ IEEE_802_15_4_PHY_UNSUPPORTED_ATTRIBUTE
Definition: lr-wpan-phy.h:117
ns3::LrWpanPhy::LrWpanPhy
LrWpanPhy(void)
Default constructor.
Definition: lr-wpan-phy.cc:123
ns3::LrWpanPhyPibAttributes::phyCCAMode
uint8_t phyCCAMode
CCA mode.
Definition: lr-wpan-phy.h:162
ns3::LrWpanPhy::m_rxSensitivity
double m_rxSensitivity
The receiver sensitivity.
Definition: lr-wpan-phy.h:809
ns3::PlmeSetTRXStateConfirmCallback
Callback< void, LrWpanPhyEnumeration > PlmeSetTRXStateConfirmCallback
This method implements the PD SAP: PlmeSetTRXStateConfirm.
Definition: lr-wpan-phy.h:228
ns3::LrWpanPibAttributeIdentifier
LrWpanPibAttributeIdentifier
IEEE802.15.4-2006 PHY PIB Attribute Identifiers Table 23 in section 6.4.2.
Definition: lr-wpan-phy.h:141
ns3::LrWpanPhy::m_plmeSetTRXStateConfirmCallback
PlmeSetTRXStateConfirmCallback m_plmeSetTRXStateConfirmCallback
This callback is used to report transceiver state change status to the MAC.
Definition: lr-wpan-phy.h:783
ns3::LrWpanPhyPibAttributes::phyTransmitPower
uint8_t phyTransmitPower
2 MSB: tolerance on the transmit power, 6 LSB: Tx power in dBm relative to 1mW (signed int in 2-compl...
Definition: lr-wpan-phy.h:161
ns3::LrWpanPhy::aTurnaroundTime
static const uint32_t aTurnaroundTime
The turnaround time for switching the transceiver from RX to TX or vice versa.
Definition: lr-wpan-phy.h:269
ns3::Ptr< MobilityModel >
ns3::LrWpanPhy::m_ccaRequest
EventId m_ccaRequest
Scheduler event of a currently running CCA request.
Definition: lr-wpan-phy.h:842
ns3::LrWpanPhy::~LrWpanPhy
virtual ~LrWpanPhy(void)
Definition: lr-wpan-phy.cc:168
ns3::LrWpanPhy::dataSymbolRates
static const LrWpanPhyDataAndSymbolRates dataSymbolRates[7]
The data and symbol rates for the different PHY options.
Definition: lr-wpan-phy.h:499
ns3::LrWpanPhy::m_channel
Ptr< SpectrumChannel > m_channel
The channel attached to this transceiver.
Definition: lr-wpan-phy.h:709
ns3::LrWpanPhy::SetPlmeGetAttributeConfirmCallback
void SetPlmeGetAttributeConfirmCallback(PlmeGetAttributeConfirmCallback c)
set the callback for the end of an GetAttribute, as part of the interconnections betweenthe PHY and t...
Definition: lr-wpan-phy.cc:1028
ns3::IEEE_802_15_4_PHY_TRX_OFF
@ IEEE_802_15_4_PHY_TRX_OFF
Definition: lr-wpan-phy.h:115
ns3::LrWpanPhy::SetPlmeSetAttributeConfirmCallback
void SetPlmeSetAttributeConfirmCallback(PlmeSetAttributeConfirmCallback c)
set the callback for the end of an SetAttribute, as part of the interconnections betweenthe PHY and t...
Definition: lr-wpan-phy.cc:1042
ns3::LrWpanPhy::SetPlmeCcaConfirmCallback
void SetPlmeCcaConfirmCallback(PlmeCcaConfirmCallback c)
set the callback for the end of a CCA, as part of the interconnections betweenthe PHY and the MAC.
Definition: lr-wpan-phy.cc:1014
ns3::phyCurrentPage
@ phyCurrentPage
Definition: lr-wpan-phy.h:146
ns3::IEEE_802_15_4_868MHZ_ASK
@ IEEE_802_15_4_868MHZ_ASK
Definition: lr-wpan-phy.h:91
ns3::LrWpanPhyPpduHeaderSymbolNumber::shrPreamble
double shrPreamble
Number of symbols for the SHR preamble.
Definition: lr-wpan-phy.h:77
ns3::phyCCAMode
@ phyCCAMode
Definition: lr-wpan-phy.h:145
ns3::LrWpanPhy::m_phyRxEndTrace
TracedCallback< Ptr< const Packet >, double > m_phyRxEndTrace
The trace source fired when a packet ends the reception process from the medium.
Definition: lr-wpan-phy.h:659
ns3::SpectrumPhy
Abstract base class for Spectrum-aware PHY layers.
Definition: spectrum-phy.h:46
ns3::LrWpanPhy::GetRxAntenna
Ptr< AntennaModel > GetRxAntenna(void) const
Get the AntennaModel used by the NetDevice for reception.
Definition: lr-wpan-phy.cc:263
ns3::LrWpanPhy::StateTracedCallback
void(* StateTracedCallback)(Time time, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState)
TracedCallback signature for Trx state change events.
Definition: lr-wpan-phy.h:491
ns3::LrWpanPhyPibAttributes::phySymbolsPerOctet
double phySymbolsPerOctet
The number of symbols per octet.
Definition: lr-wpan-phy.h:166
ns3::LrWpanPhy::m_plmeSetAttributeConfirmCallback
PlmeSetAttributeConfirmCallback m_plmeSetAttributeConfirmCallback
This callback is used to report attribute set results back to the MAC.
Definition: lr-wpan-phy.h:789
ns3::LrWpanPhyEnumeration
LrWpanPhyEnumeration
IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3.
Definition: lr-wpan-phy.h:106
ns3::IEEE_802_15_4_PHY_TX_ON
@ IEEE_802_15_4_PHY_TX_ON
Definition: lr-wpan-phy.h:116
ns3::LrWpanPhy::m_rxLastUpdate
Time m_rxLastUpdate
Timestamp of the last calculation of the PER of a packet currently received.
Definition: lr-wpan-phy.h:821
ns3::LrWpanPhy::GetNoisePowerSpectralDensity
Ptr< const SpectrumValue > GetNoisePowerSpectralDensity(void)
Get the noise power spectral density.
Definition: lr-wpan-phy.cc:1382
ns3::phySymbolsPerOctet
@ phySymbolsPerOctet
Definition: lr-wpan-phy.h:149
ns3::IEEE_802_15_4_PHY_RX_ON
@ IEEE_802_15_4_PHY_RX_ON
Definition: lr-wpan-phy.h:113
ns3::LrWpanPhy::GetDevice
Ptr< NetDevice > GetDevice(void) const
Get the associated NetDevice instance.
Definition: lr-wpan-phy.cc:201
ns3::LrWpanPhyDataAndSymbolRates
This data structure provides the Bit rate and Symbol rate for a given channel See IEEE802....
Definition: lr-wpan-phy.h:64
ns3::LrWpanPhy::SetPlmeSetTRXStateConfirmCallback
void SetPlmeSetTRXStateConfirmCallback(PlmeSetTRXStateConfirmCallback c)
set the callback for the end of an SetTRXState, as part of the interconnections betweenthe PHY and th...
Definition: lr-wpan-phy.cc:1035
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::LrWpanPhy::EndTx
void EndTx(void)
Finish the transmission of a frame.
Definition: lr-wpan-phy.cc:1203
ns3::LrWpanPhy::CalculateTxTime
Time CalculateTxTime(Ptr< const Packet > packet)
Calculate the time required for sending the given packet, including preamble, SFD and PHR.
Definition: lr-wpan-phy.cc:1259
ns3::LrWpanPhy::m_phyTxDropTrace
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
The trace source fired when the phy layer drops a packet as it tries to transmit it.
Definition: lr-wpan-phy.h:643
ns3::LrWpanPhy::m_trxStateLogger
TracedCallback< Time, LrWpanPhyEnumeration, LrWpanPhyEnumeration > m_trxStateLogger
The trace source fired when the phy layer changes the transceiver state.
Definition: lr-wpan-phy.h:676
ns3::IEEE_802_15_4_PHY_BUSY_TX
@ IEEE_802_15_4_PHY_BUSY_TX
Definition: lr-wpan-phy.h:109
ns3::LrWpanPhy::PlmeCcaRequest
void PlmeCcaRequest(void)
IEEE 802.15.4-2006 section 6.2.2.1 PLME-CCA.request Perform a CCA per section 6.9....
Definition: lr-wpan-phy.cc:598
ns3::LrWpanPhyPpduHeaderSymbolNumber
This data structure provides number of symbols for the PPDU headers: SHR and PHR See IEEE802....
Definition: lr-wpan-phy.h:76
ns3::LrWpanPhy::CancelEd
void CancelEd(LrWpanPhyEnumeration state)
Cancel an ongoing ED procedure.
Definition: lr-wpan-phy.cc:1066
ns3::phyTransmitPower
@ phyTransmitPower
Definition: lr-wpan-phy.h:144
ns3::LrWpanPhy::m_currentRxPacket
std::pair< Ptr< LrWpanSpectrumSignalParameters >, bool > m_currentRxPacket
Statusinformation of the currently received packet.
Definition: lr-wpan-phy.h:829
ns3::LrWpanPhy::GetErrorModel
Ptr< LrWpanErrorModel > GetErrorModel(void) const
get the error model in use
Definition: lr-wpan-phy.cc:1397
ns3::LrWpanPhyPibAttributes::phySHRDuration
uint32_t phySHRDuration
The duration of the synchronization header (SHR) in symbols.
Definition: lr-wpan-phy.h:165
ns3::LrWpanPhyOption
LrWpanPhyOption
This Phy option will be used to index various Tables in IEEE802.15.4-2006.
Definition: lr-wpan-phy.h:88
ns3::LrWpanPhy::PacketAndStatus
std::pair< Ptr< Packet >, bool > PacketAndStatus
The second is true if the first is flagged as error/invalid.
Definition: lr-wpan-phy.h:510
ns3::LrWpanPhy::SetPlmeEdConfirmCallback
void SetPlmeEdConfirmCallback(PlmeEdConfirmCallback c)
set the callback for the end of an ED, as part of the interconnections betweenthe PHY and the MAC.
Definition: lr-wpan-phy.cc:1021
ns3::LrWpanPhy::m_trxStatePending
LrWpanPhyEnumeration m_trxStatePending
The next pending state to applied after the current action of the PHY is completed.
Definition: lr-wpan-phy.h:746
ns3::phySHRDuration
@ phySHRDuration
Definition: lr-wpan-phy.h:148
ns3::LrWpanPhy::StartRx
virtual void StartRx(Ptr< SpectrumSignalParameters > params)
Notify the SpectrumPhy instance of an incoming waveform.
Definition: lr-wpan-phy.cc:277
ns3::LrWpanPhy::m_pdDataIndicationCallback
PdDataIndicationCallback m_pdDataIndicationCallback
This callback is used to notify incoming packets to the MAC layer.
Definition: lr-wpan-phy.h:753
ns3::LrWpanPhy::m_phyRxBeginTrace
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
Definition: lr-wpan-phy.h:651
ns3::LrWpanPhy::GetPpduHeaderTxTime
Time GetPpduHeaderTxTime(void)
Calculate the time required for sending the PPDU header, that is the preamble, SFD and PHR.
Definition: lr-wpan-phy.cc:1293
ns3::LrWpanPhy::SetMobility
void SetMobility(Ptr< MobilityModel > m)
Set the mobility model associated with this device.
Definition: lr-wpan-phy.cc:225
ns3::LrWpanPhy::m_signal
Ptr< LrWpanInterferenceHelper > m_signal
The accumulated signals currently received by the transceiver, including the signal of a possibly rec...
Definition: lr-wpan-phy.h:816
ns3::phyMaxFrameDuration
@ phyMaxFrameDuration
Definition: lr-wpan-phy.h:147
ns3::IEEE_802_15_4_915MHZ_ASK
@ IEEE_802_15_4_915MHZ_ASK
Definition: lr-wpan-phy.h:92
ns3::TracedValue< LrWpanPhyEnumeration >
ns3::LrWpanPhy::m_phyTxBeginTrace
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
The trace source fired when a packet begins the transmission process on the medium.
Definition: lr-wpan-phy.h:627
ns3::LrWpanPhy::SetAntenna
void SetAntenna(Ptr< AntennaModel > a)
Set the attached antenna.
Definition: lr-wpan-phy.cc:270
ns3::IEEE_802_15_4_868MHZ_OQPSK
@ IEEE_802_15_4_868MHZ_OQPSK
Definition: lr-wpan-phy.h:93
ns3::LrWpanPhy::m_noise
Ptr< const SpectrumValue > m_noise
The spectral density for for the noise.
Definition: lr-wpan-phy.h:724
ns3::LrWpanPhy::SetPdDataConfirmCallback
void SetPdDataConfirmCallback(PdDataConfirmCallback c)
set the callback for the end of a TX, as part of the interconnections betweenthe PHY and the MAC.
Definition: lr-wpan-phy.cc:1007
ns3::PlmeCcaConfirmCallback
Callback< void, LrWpanPhyEnumeration > PlmeCcaConfirmCallback
This method implements the PD SAP: PlmeCcaConfirm.
Definition: lr-wpan-phy.h:196
ns3::LrWpanPhy::PlmeEdRequest
void PlmeEdRequest(void)
IEEE 802.15.4-2006 section 6.2.2.3 PLME-ED.request Perform an ED per section 6.9.7.
Definition: lr-wpan-phy.cc:625
ns3::LrWpanPhy::GetMyPhyOption
LrWpanPhyOption GetMyPhyOption(void)
Get the currently configured PHY option.
Definition: lr-wpan-phy.cc:1357
ns3::LrWpanPhyPibAttributes::phyCurrentChannel
uint8_t phyCurrentChannel
The RF channel to use.
Definition: lr-wpan-phy.h:159
ns3::LrWpanEdPower::measurementLength
Time measurementLength
Total measurement period.
Definition: lr-wpan-phy.h:54
ns3::IEEE_802_15_4_INVALID_PHY_OPTION
@ IEEE_802_15_4_INVALID_PHY_OPTION
Definition: lr-wpan-phy.h:96
ns3::LrWpanPhy::m_random
Ptr< UniformRandomVariable > m_random
Uniform random variable stream.
Definition: lr-wpan-phy.h:862
ns3::LrWpanPhy::aMaxPhyPacketSize
static const uint32_t aMaxPhyPacketSize
The maximum packet size accepted by the PHY.
Definition: lr-wpan-phy.h:262
ns3::LrWpanPhy::SetPdDataIndicationCallback
void SetPdDataIndicationCallback(PdDataIndicationCallback c)
set the callback for the end of a RX, as part of the interconnections betweenthe PHY and the MAC.
Definition: lr-wpan-phy.cc:1000
ns3::IEEE_802_15_4_PHY_FORCE_TRX_OFF
@ IEEE_802_15_4_PHY_FORCE_TRX_OFF
Definition: lr-wpan-phy.h:110
ns3::LrWpanPhy::CheckInterference
void CheckInterference(void)
Check if the interference destroys a frame currently received.
Definition: lr-wpan-phy.cc:397
ns3::LrWpanPhy::m_pdDataConfirmCallback
PdDataConfirmCallback m_pdDataConfirmCallback
This callback is used to report packet transmission status to the MAC layer.
Definition: lr-wpan-phy.h:759
ns3::LrWpanPhy::m_pdDataRequest
EventId m_pdDataRequest
Scheduler event of a currently running data transmission request.
Definition: lr-wpan-phy.h:857
ns3::LrWpanPhy::m_phyOption
LrWpanPhyOption m_phyOption
The currently configured PHY type.
Definition: lr-wpan-phy.h:794
ns3::IEEE_802_15_4_PHY_BUSY_RX
@ IEEE_802_15_4_PHY_BUSY_RX
Definition: lr-wpan-phy.h:108
ns3::LrWpanPhy::m_plmeEdConfirmCallback
PlmeEdConfirmCallback m_plmeEdConfirmCallback
This callback is used to report ED status to the MAC.
Definition: lr-wpan-phy.h:771
ns3::TracedCallback
Forward calls to a chain of Callback.
Definition: traced-callback.h:53
ns3::LrWpanPhy::SetNoisePowerSpectralDensity
void SetNoisePowerSpectralDensity(Ptr< const SpectrumValue > noisePsd)
Set the noise power spectral density.
Definition: lr-wpan-phy.cc:1373
ns3::LrWpanPhy::m_mobility
Ptr< MobilityModel > m_mobility
The mobility model used by the PHY.
Definition: lr-wpan-phy.h:699
ns3::LrWpanPhy::PhyIsBusy
bool PhyIsBusy(void) const
Check if the PHY is busy, which is the case if the PHY is currently sending or receiving a frame.
Definition: lr-wpan-phy.cc:1057
ns3::LrWpanPhyPpduHeaderSymbolNumber::phr
double phr
Number of symbols for the PHR.
Definition: lr-wpan-phy.h:79
ns3::LrWpanPhy::SetErrorModel
void SetErrorModel(Ptr< LrWpanErrorModel > e)
set the error model to use
Definition: lr-wpan-phy.cc:1389
ns3::LrWpanPhy::PdDataRequest
void PdDataRequest(const uint32_t psduLength, Ptr< Packet > p)
IEEE 802.15.4-2006 section 6.2.1.1 PD-DATA.request Request to transfer MPDU from MAC (transmitting)
Definition: lr-wpan-phy.cc:523
ns3::IEEE_802_15_4_PHY_UNSPECIFIED
@ IEEE_802_15_4_PHY_UNSPECIFIED
Definition: lr-wpan-phy.h:119
ns3::phyChannelsSupported
@ phyChannelsSupported
Definition: lr-wpan-phy.h:143
ns3::LrWpanPhy::EndRx
void EndRx(Ptr< SpectrumSignalParameters > params)
Finish the reception of a frame.
Definition: lr-wpan-phy.cc:443
ns3::IEEE_802_15_4_868MHZ_BPSK
@ IEEE_802_15_4_868MHZ_BPSK
Definition: lr-wpan-phy.h:89
ns3::LrWpanPhy::SetMyPhyOption
void SetMyPhyOption(void)
Configure the PHY option according to the current channel and channel page.
Definition: lr-wpan-phy.cc:1311
ns3::LrWpanPhy::m_setTRXState
EventId m_setTRXState
Scheduler event of a currently running deferred transceiver state switch.
Definition: lr-wpan-phy.h:852
ns3::LrWpanPhy::m_currentTxPacket
PacketAndStatus m_currentTxPacket
Statusinformation of the currently transmitted packet.
Definition: lr-wpan-phy.h:837
ns3::LrWpanPhy::ppduHeaderSymbolNumbers
static const LrWpanPhyPpduHeaderSymbolNumber ppduHeaderSymbolNumbers[7]
The preamble, SFD, and PHR lengths in symbols for the different PHY options.
Definition: lr-wpan-phy.h:504
ns3::LrWpanEdPower::averagePower
double averagePower
Average measured power.
Definition: lr-wpan-phy.h:52
ns3::LrWpanPhy::m_device
Ptr< NetDevice > m_device
The configured net device.
Definition: lr-wpan-phy.h:704
ns3::LrWpanEdPower
Helper structure to manage the power measurement during ED.
Definition: lr-wpan-phy.h:51
ns3::IEEE_802_15_4_915MHZ_OQPSK
@ IEEE_802_15_4_915MHZ_OQPSK
Definition: lr-wpan-phy.h:94
ns3::LrWpanPhy::GetChannel
Ptr< SpectrumChannel > GetChannel(void)
Get the currently attached channel.
Definition: lr-wpan-phy.cc:241
ns3::LrWpanPhy::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition: lr-wpan-phy.cc:173
ns3::LrWpanPhy
Make LrWpanPhy a SpectrumPhy so we can enable the eventual modeling of device interference.
Definition: lr-wpan-phy.h:248
ns3::LrWpanPhy::m_edRequest
EventId m_edRequest
Scheduler event of a currently running ED request.
Definition: lr-wpan-phy.h:847