20#include "ns3/antenna-model.h" 
   21#include "ns3/double.h" 
   22#include "ns3/error-model.h" 
   24#include "ns3/mobility-model.h" 
   25#include "ns3/net-device.h" 
   27#include "ns3/packet-burst.h" 
   28#include "ns3/packet.h" 
   29#include "ns3/pointer.h" 
   30#include "ns3/random-variable-stream.h" 
   31#include "ns3/simulator.h" 
   32#include "ns3/spectrum-channel.h" 
   33#include "ns3/spectrum-value.h" 
   95        os << 
"FORCE_TRX_OFF";
 
  101        os << 
"INVALID_PARAMETER";
 
 
  139        TypeId(
"ns3::lrwpan::LrWpanPhy")
 
  142            .SetGroupName(
"LrWpan")
 
  144            .AddAttribute(
"PostReceptionErrorModel",
 
  145                          "An optional packet error model can be added to the receive " 
  146                          "packet process after any propagation-based (SNR-based) error " 
  147                          "models have been applied. Typically this is used to force " 
  148                          "specific packet drops, for testing purposes.",
 
  152            .AddTraceSource(
"TrxStateValue",
 
  153                            "The state of the transceiver",
 
  155                            "ns3::TracedValueCallback::LrWpanPhyEnumeration")
 
  156            .AddTraceSource(
"TrxState",
 
  157                            "The state of the transceiver",
 
  159                            "ns3::lrwpan::LrWpanPhy::StateTracedCallback")
 
  160            .AddTraceSource(
"PhyTxBegin",
 
  161                            "Trace source indicating a packet has " 
  162                            "begun transmitting over the channel medium",
 
  164                            "ns3::Packet::TracedCallback")
 
  165            .AddTraceSource(
"PhyTxEnd",
 
  166                            "Trace source indicating a packet has been " 
  167                            "completely transmitted over the channel.",
 
  169                            "ns3::Packet::TracedCallback")
 
  170            .AddTraceSource(
"PhyTxDrop",
 
  171                            "Trace source indicating a packet has been " 
  172                            "dropped by the device during transmission",
 
  174                            "ns3::Packet::TracedCallback")
 
  175            .AddTraceSource(
"PhyRxBegin",
 
  176                            "Trace source indicating a packet has begun " 
  177                            "being received from the channel medium by the device",
 
  179                            "ns3::Packet::TracedCallback")
 
  180            .AddTraceSource(
"PhyRxEnd",
 
  181                            "Trace source indicating a packet has been " 
  182                            "completely received from the channel medium " 
  185                            "ns3::Packet::SinrTracedCallback")
 
  186            .AddTraceSource(
"PhyRxDrop",
 
  187                            "Trace source indicating a packet has been " 
  188                            "dropped by the device during reception",
 
  190                            "ns3::Packet::TracedCallback");
 
 
  234                            "Either install a MobilityModel on this object or ensure that this " 
  235                            "object is part of a Node and NetDevice");
 
  239            NS_LOG_WARN(
"Mobility not found, propagation models might not work properly");
 
 
  331        return m_txPsd->GetSpectrumModel();
 
 
  374        m_signal->AddSignal(spectrumRxParams->psd);
 
  392    Ptr<Packet> p = (lrWpanRxParams->packetBurst->GetPackets()).front();
 
  420        m_signal->AddSignal(lrWpanRxParams->psd);
 
  422        *interferenceAndNoise -= *lrWpanRxParams->psd;
 
  423        *interferenceAndNoise += *
m_noise;
 
  433        if (10 * log10(sinr) > -5)
 
  458        m_signal->AddSignal(lrWpanRxParams->psd);
 
  467        m_signal->AddSignal(lrWpanRxParams->psd);
 
 
  500        Ptr<Packet> currentPacket = currentRxParams->packetBurst->GetPackets().front();
 
  507            *interferenceAndNoise -= *currentRxParams->psd;
 
  508            *interferenceAndNoise += *
m_noise;
 
  514            double per = 1.0 - 
m_errorModel->GetChunkSuccessRate(sinr, chunkSize);
 
  519            currentPacket->PeekPacketTag(tag);
 
  520            uint8_t lqi = tag.
Get();
 
  521            tag.
Set(lqi - (per * lqi));
 
  522            currentPacket->ReplacePacketTag(tag);
 
 
  557    if (currentRxParams == params)
 
  568                              << 
" Removing interferent: " << *(par->psd));
 
  573    if (currentRxParams == params)
 
  575        Ptr<Packet> currentPacket = currentRxParams->packetBurst->GetPackets().front();
 
  581            NS_LOG_DEBUG(
"Reception failed due to post-rx error model");
 
  587        currentPacket->PeekPacketTag(tag);
 
 
  634        NS_LOG_DEBUG(
"Drop packet because psduLength too long: " << psduLength);
 
  648            p->RemovePacketTag(lqiTag);
 
  661            txParams->packetBurst = pb;
 
  682                           << 
m_trxState << 
" should be added as a case");
 
 
  836        NS_LOG_DEBUG(
"Phy is busy; setting state pending to " << state);
 
  852            NS_LOG_DEBUG(
"Receiver has valid SFD; defer state change");
 
 
  985    bool retValue = 
false;
 
  989         (1 << channel)) != 0)
 
  991        return retValue = 
true;
 
 
 1003    bool retValue = 
false;
 
 1014    if (page == supportedPage)
 
 
 1070            if (attribute->phyCurrentPage == 0)
 
 1083                                        << 
",915 MHz BPSK PHY SET");
 
 1090                                        << 
", 2.4 Ghz O-QPSK PHY SET");
 
 1093            else if (attribute->phyCurrentPage == 1)
 
 1100                                        << 
", 868 MHz ASK PHY SET");
 
 1107                                        << 
", 915 MHz ASK PHY SET");
 
 1114                    NS_LOG_INFO(
"Channel no longer valid in new page " 
 1115                                << (
uint32_t)attribute->phyCurrentPage
 
 1116                                << 
", setting new default channel " 
 1121            else if (attribute->phyCurrentPage == 2)
 
 1128                                        << 
", 868 MHz O-QPSK PHY SET");
 
 1135                                        << 
", 915 MHz O-QPSK PHY SET");
 
 1142                    NS_LOG_INFO(
"Channel no longer valid in new page " 
 1143                                << (
uint32_t)attribute->phyCurrentPage
 
 1144                                << 
", setting new default channel " 
 1149            else if (attribute->phyCurrentPage == 5)
 
 1156                                        << 
", 915 MHz O-QPSK PHY SET");
 
 1163                    NS_LOG_INFO(
"Channel no longer valid in new page " 
 1164                                << (
uint32_t)attribute->phyCurrentPage
 
 1165                                << 
", setting new default channel " 
 1170            else if (attribute->phyCurrentPage == 6)
 
 1177                                        << 
", 950 MHz BPSK PHY SET");
 
 1183                    NS_LOG_INFO(
"Channel no longer valid in new page " 
 1184                                << (
uint32_t)attribute->phyCurrentPage
 
 1185                                << 
", setting new default channel " 
 1245        if ((attribute->phyChannelsSupported[0] & 0xf8000000) != 0)
 
 1256        if (attribute->phyTransmitPower & 0xC0)
 
 1258            NS_LOG_LOGIC(
"LrWpanPhy::PlmeSetAttributeRequest error - can not change read-only " 
 1273        if ((attribute->phyCCAMode < 1) || (attribute->phyCCAMode > 3))
 
 
 1388    uint8_t energyLevel;
 
 1392    ratio = 10.0 * log10(ratio);
 
 1397    else if (ratio >= 40.0)
 
 1404        energyLevel = 
static_cast<uint8_t
>(((ratio - 10.0) / 30.0) * 255.0);
 
 
 1480    NS_LOG_LOGIC(
this << 
"channel sensed state: " << sensedChannelState);
 
 
 1601    return (rate * 1000.0);
 
 
 1609    bool isData = 
false;
 
 1610    double totalPpduHdrSymbols;
 
 
 1701    for (
int i = 1; i <= 31; i++)
 
 
 1730        if (dbmSensitivity > -92)
 
 1732            NS_ABORT_MSG(
"The minimum Rx sensitivity for this band should be at least -92 dBm");
 
 1737        if (dbmSensitivity > -85)
 
 1739            NS_ABORT_MSG(
"The minimum Rx sensitivity for this band should be at least -85 dBm");
 
 1753    double maxRxSensitivityW = 
DbmToW(-106.58);
 
 1760    long double noiseFactor = 
DbmToW(dbmSensitivity) / maxRxSensitivityW;
 
 
 1797    NS_LOG_INFO(
"\t computed noise_psd: " << *noisePsd);
 
 
 1849    return WToDbm(powerWatts);
 
 
 1869        nominalTxPower -= 32;
 
 1871    return nominalTxPower;
 
 
 1877    return (10 * log10(1000 * watt));
 
 
 1883    return (pow(10.0, dbm / 10.0) / 1000.0);
 
 
bool IsNull() const
Check for null implementation.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
bool IsPending() const
This method is syntactic sugar for !IsExpired().
bool IsExpired() const
This method is syntactic sugar for the ns3::Simulator::IsExpired method.
Keep track of the current position and velocity of an object.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
virtual void DoDispose()
Destructor implementation.
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static Time Now()
Return the current simulation virtual time.
Abstract base class for Spectrum-aware PHY layers.
Simulation virtual time values and global simulation resolution.
int64_t GetTimeStep() const
Get the raw time value, in the current resolution unit.
Trace classes with value semantics.
a unique identifier for an interface.
TypeId AddDeprecatedName(const std::string &name)
Add an deprecated name for a TypeId.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Represent the LQI (Link Quality Estination).
void Set(uint8_t lqi)
Set the LQI to the given value.
uint8_t Get() const
Get the LQI value.
Make LrWpanPhy a SpectrumPhy so we can enable the eventual modeling of device interference.
void PlmeEdRequest()
IEEE 802.15.4-2006 section 6.2.2.3 PLME-ED.request Perform an ED per section 6.9.7.
void PlmeSetAttributeRequest(PhyPibAttributeIdentifier id, Ptr< PhyPibAttributes > attribute)
IEEE 802.15.4-2006 section 6.2.2.9 PLME-SET.request Set attributes per definition from Table 23 in se...
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
void SetRxSensitivity(double dbmSensitivity)
Set the receiver power sensitivity used by this device in dBm.
EventId m_pdDataRequest
Scheduler event of a currently running data transmission request.
void EndRx(Ptr< SpectrumSignalParameters > params)
Finish the reception of a frame.
void SetTxPowerSpectralDensity(Ptr< SpectrumValue > txPsd)
Set the Power Spectral Density of outgoing signals in W/Hz.
Ptr< AntennaModel > m_antenna
The antenna used by the transceiver.
std::pair< Ptr< LrWpanSpectrumSignalParameters >, bool > m_currentRxPacket
Status information of the currently received packet.
Ptr< NetDevice > m_device
The configured net device.
bool ChannelSupported(uint8_t channel)
Check if the given channel is supported by the PHY.
void SetPlmeGetAttributeConfirmCallback(PlmeGetAttributeConfirmCallback c)
set the callback for the end of an GetAttribute, as part of the interconnections between the PHY and ...
int8_t GetNominalTxPowerFromPib(uint8_t phyTransmitPower)
Calculates the nominal transmit power of the device in decibels relative to 1 mW according to the rep...
void DoInitialize() override
Initialize() implementation.
void SetAntenna(Ptr< AntennaModel > a)
Set the attached antenna.
Ptr< const SpectrumModel > GetRxSpectrumModel() const override
void DoDispose() override
Destructor implementation.
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
The trace source fired when a packet begins the transmission process on the medium.
void EndCca()
Called at the end of the CCA.
Ptr< SpectrumChannel > m_channel
The channel attached to this transceiver.
void SetPostReceptionErrorModel(const Ptr< ErrorModel > em)
Attach a receive ErrorModel to the LrWpanPhy.
double GetRxSensitivity()
Get the receiver power sensitivity used by this device in dBm.
PhyOption GetMyPhyOption()
Get the currently configured PHY option.
PacketAndStatus m_currentTxPacket
Status information of the currently transmitted packet.
void EndSetTRXState()
Called after applying a deferred transceiver state switch.
PdDataConfirmCallback m_pdDataConfirmCallback
This callback is used to report packet transmission status to the MAC layer.
void SetChannel(Ptr< SpectrumChannel > c) override
Set the channel attached to this device.
void PlmeGetAttributeRequest(PhyPibAttributeIdentifier id)
IEEE 802.15.4-2006 section 6.2.2.5 PLME-GET.request Get attributes per definition from Table 23 in se...
void SetPdDataConfirmCallback(PdDataConfirmCallback c)
set the callback for the end of a TX, as part of the interconnections between the PHY and the MAC.
Ptr< LrWpanInterferenceHelper > m_signal
The accumulated signals currently received by the transceiver, including the signal of a possibly rec...
void SetPdDataIndicationCallback(PdDataIndicationCallback c)
set the callback for the end of a RX, as part of the interconnections between the PHY and the MAC.
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
The trace source fired when a packet ends the transmission process on the medium.
double WToDbm(double watt)
Transform watts (W) to decibels milliwatts (dBm).
uint8_t GetCurrentPage() const
Get The current channel page number in use in this PHY from the PIB attributes.
PhyPibAttributes m_phyPIBAttributes
The current PHY PIB attributes.
Ptr< MobilityModel > m_mobility
The mobility model used by the PHY.
void SetErrorModel(Ptr< LrWpanErrorModel > e)
set the error model to use
void SetMobility(Ptr< MobilityModel > m) override
Set the mobility model associated with this device.
PlmeSetTRXStateConfirmCallback m_plmeSetTRXStateConfirmCallback
This callback is used to report transceiver state change status to the MAC.
void SetNoisePowerSpectralDensity(Ptr< const SpectrumValue > noisePsd)
Set the noise power spectral density.
TracedCallback< Time, PhyEnumeration, PhyEnumeration > m_trxStateLogger
The trace source fired when the phy layer changes the transceiver state.
EdPower m_edPower
Helper value for tracking the average power during ED.
Time m_rxLastUpdate
Timestamp of the last calculation of the PER of a packet currently received.
EventId m_setTRXState
Scheduler event of a currently running deferred transceiver state switch.
Ptr< MobilityModel > GetMobility() const override
Get the associated MobilityModel instance.
void SetPlmeSetAttributeConfirmCallback(PlmeSetAttributeConfirmCallback c)
set the callback for the end of an SetAttribute, as part of the interconnections between the PHY and ...
void SetPhyOption(PhyOption phyOption)
Set the modulation option used by this PHY.
void PlmeCcaRequest()
IEEE 802.15.4-2006 section 6.2.2.1 PLME-CCA.request Perform a CCA per section 6.9....
TracedValue< PhyEnumeration > m_trxState
The current transceiver state.
void SetPlmeSetTRXStateConfirmCallback(PlmeSetTRXStateConfirmCallback c)
set the callback for the end of an SetTRXState, as part of the interconnections between the PHY and t...
double GetCurrentSignalPsd()
Get the current accumulated sum of signals in the transceiver including signals considered as interfe...
void SetPlmeCcaConfirmCallback(PlmeCcaConfirmCallback c)
set the callback for the end of a CCA, as part of the interconnections between the PHY and the MAC.
Ptr< LrWpanErrorModel > m_errorModel
The error model describing the bit and packet error rates.
void EndTx()
Finish the transmission of a frame.
void SetPlmeEdConfirmCallback(PlmeEdConfirmCallback c)
set the callback for the end of an ED, as part of the interconnections between the PHY and the MAC.
uint8_t GetCurrentChannelNum() const
Get The current channel number in use in this PHY from the PIB attributes.
void PlmeSetTRXStateRequest(PhyEnumeration state)
IEEE 802.15.4-2006 section 6.2.2.7 PLME-SET-TRX-STATE.request Set PHY state.
LrWpanPhy()
Default constructor.
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
The trace source fired when a packet begins the reception process from the medium.
PlmeSetAttributeConfirmCallback m_plmeSetAttributeConfirmCallback
This callback is used to report attribute set results back to the MAC.
PhyEnumeration m_trxStatePending
The next pending state to applied after the current action of the PHY is completed.
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
The trace source fired when the phy layer drops a packet it has received.
double GetPhySymbolsPerOctet() const
Get the number of symbols per octet, depending on the currently selected channel.
PdDataIndicationCallback m_pdDataIndicationCallback
This callback is used to notify incoming packets to the MAC layer.
Ptr< LrWpanErrorModel > GetErrorModel() const
get the error model in use
void StartRx(Ptr< SpectrumSignalParameters > params) override
Notify the SpectrumPhy instance of an incoming waveform.
double m_rxSensitivity
The receiver sensitivity.
void CcaCancel()
Cancel an ongoing CCA request.
void CheckInterference()
Check if the interference destroys a frame currently received.
EventId m_ccaRequest
Scheduler event of a currently running CCA request.
Ptr< SpectrumChannel > GetChannel()
Get the currently attached channel.
Ptr< ErrorModel > m_postReceptionErrorModel
Error model for receive packet events.
PlmeCcaConfirmCallback m_plmeCcaConfirmCallback
This callback is used to report CCA status to the MAC or CSMA/CA.
uint64_t GetPhySHRDuration() const
Get the duration of the SHR (preamble and SFD) in symbols, depending on the currently selected channe...
bool m_isRxCanceled
Indicates if the reception of frame has been canceled.
void CancelEd(PhyEnumeration state)
Cancel an ongoing ED procedure.
Ptr< NetDevice > GetDevice() const override
Get the associated NetDevice instance.
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)
double DbmToW(double dbm)
Transforms decibels milliwatts (dBm) to watts (W).
Ptr< UniformRandomVariable > m_random
Uniform random variable stream.
EventId m_edRequest
Scheduler event of a currently running ED request.
PhyOption m_phyOption
The currently configured PHY type.
Ptr< SpectrumValue > m_txPsd
The transmit power spectral density.
bool PageSupported(uint8_t page)
Check if the given page is supported by the PHY.
Time GetPpduHeaderTxTime()
Calculate the time required for sending the PPDU header, that is the preamble, SFD and PHR.
void EndEd()
Called at the end of the ED procedure.
void SetDevice(Ptr< NetDevice > d) override
Set the associated NetDevice instance.
double GetDataOrSymbolRate(bool isData)
implement PLME SetAttribute confirm SAP bit rate is in bit/s.
PlmeGetAttributeConfirmCallback m_plmeGetAttributeConfirmCallback
This callback is used to report requested attribute values back to the MAC.
Ptr< Object > GetAntenna() const override
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
The trace source fired when the phy layer drops a packet as it tries to transmit it.
TracedCallback< Ptr< const Packet >, double > m_phyRxEndTrace
The trace source fired when a packet ends the reception process from the medium.
double m_ccaPeakPower
Helper value for the peak power value during CCA.
Time CalculateTxTime(Ptr< const Packet > packet)
Calculate the time required for sending the given packet, including preamble, SFD and PHR.
Ptr< const SpectrumValue > GetNoisePowerSpectralDensity()
Get the noise power spectral density.
bool PhyIsBusy() const
Check if the PHY is busy, which is the case if the PHY is currently sending or receiving a frame.
PlmeEdConfirmCallback m_plmeEdConfirmCallback
This callback is used to report ED status to the MAC.
Ptr< const SpectrumValue > m_noise
The spectral density for for the noise.
void ChangeTrxState(PhyEnumeration newState)
Change the PHY state to the given new state, firing the state change trace.
static TypeId GetTypeId()
Get the type ID.
This class defines all functions to create spectrum model for LrWpan.
Ptr< SpectrumValue > CreateNoisePowerSpectralDensity(uint32_t channel)
create spectrum value for noise
static double TotalAvgPower(Ptr< const SpectrumValue > psd, uint32_t channel)
total average power of the signal is the integral of the PSD using the limits of the given channel
Ptr< SpectrumValue > CreateTxPowerSpectralDensity(double txPower, uint32_t channel)
create spectrum value
void SetNoiseFactor(double f)
Set the noise factor added to the thermal noise.
constexpr uint32_t aMaxPhyPacketSize
The maximum packet size accepted by the PHY.
constexpr uint32_t aTurnaroundTime
The turnaround time in symbol periods for switching the transceiver from RX to TX or vice-versa.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< AttributeChecker > MakePointerChecker()
Create a PointerChecker for a type.
Callback< R, Args... > MakeNullCallback()
#define NS_ABORT_MSG_UNLESS(cond, msg)
Abnormal program termination if a condition is false, with a message.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
PhyOption
This Phy option will be used to index various Tables in IEEE802.15.4-2011.
PhyEnumeration
IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3.
PhyPibAttributeIdentifier
IEEE802.15.4-2006 PHY PIB Attribute Identifiers Table 23 in section 6.4.2.
@ IEEE_802_15_4_915MHZ_OQPSK
@ IEEE_802_15_4_2_4GHZ_OQPSK
@ IEEE_802_15_4_915MHZ_ASK
@ IEEE_802_15_4_780MHZ_OQPSK
@ IEEE_802_15_4_868MHZ_OQPSK
@ IEEE_802_15_4_915MHZ_BPSK
@ IEEE_802_15_4_868MHZ_BPSK
@ IEEE_802_15_4_950MHZ_BPSK
@ IEEE_802_15_4_INVALID_PHY_OPTION
@ IEEE_802_15_4_868MHZ_ASK
@ IEEE_802_15_4_PHY_READ_ONLY
@ IEEE_802_15_4_PHY_BUSY_TX
@ IEEE_802_15_4_PHY_RX_ON
@ IEEE_802_15_4_PHY_TRX_OFF
@ IEEE_802_15_4_PHY_TX_ON
@ IEEE_802_15_4_PHY_INVALID_PARAMETER
@ IEEE_802_15_4_PHY_UNSUPPORTED_ATTRIBUTE
@ IEEE_802_15_4_PHY_SUCCESS
@ IEEE_802_15_4_PHY_FORCE_TRX_OFF
@ IEEE_802_15_4_PHY_BUSY_RX
@ IEEE_802_15_4_PHY_UNSPECIFIED
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time Seconds(double value)
Construct a Time in the indicated unit.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
static const PhyDataAndSymbolRates dataSymbolRates[IEEE_802_15_4_INVALID_PHY_OPTION]
The data and symbol rates for the different PHY options.
const PhyPpduHeaderSymbolNumber ppduHeaderSymbolNumbers[IEEE_802_15_4_INVALID_PHY_OPTION]
The preamble, SFD, and PHR lengths in symbols for the different PHY options.
std::ostream & operator<<(std::ostream &os, const SuperframeField &superframeField)
Stream insertion operator.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
double averagePower
Average measured power.
Time lastUpdate
Last update time.
Time measurementLength
Total measurement period.
This data structure provides the Bit rate and Symbol rate for a given channel See IEEE802....
double symbolRate
symbol rate
uint8_t phyCCAMode
CCA mode.
uint8_t phyCurrentChannel
The RF channel to use.
uint8_t phyCurrentPage
Current channel page.
uint8_t phyTransmitPower
2 MSB: tolerance on the transmit power, 6 LSB: Tx power in dBm relative to 1mW (signed int in 2-compl...
uint32_t phyChannelsSupported[32]
BitField representing the available channels supported by a channel page.