A Discrete-Event Network Simulator
API
ns3::LrWpanPhy Class Reference

Make LrWpanPhy a SpectrumPhy so we can enable the eventual modeling of device interference. More...

#include "lr-wpan-phy.h"

+ Inheritance diagram for ns3::LrWpanPhy:
+ Collaboration diagram for ns3::LrWpanPhy:

Public Types

typedef void(* StateTracedCallback) (Time time, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState)
 TracedCallback signature for Trx state change events. More...
 

Public Member Functions

 LrWpanPhy (void)
 Default constructor. More...
 
virtual ~LrWpanPhy (void)
 
int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
Ptr< SpectrumChannelGetChannel (void)
 Get the currently attached channel. More...
 
double GetDataOrSymbolRate (bool isData)
 implement PLME SetAttribute confirm SAP More...
 
Ptr< NetDeviceGetDevice (void) const
 Get the associated NetDevice instance. More...
 
Ptr< LrWpanErrorModelGetErrorModel (void) const
 get the error model in use More...
 
Ptr< MobilityModelGetMobility (void)
 Get the associated MobilityModel instance. More...
 
Ptr< const SpectrumValueGetNoisePowerSpectralDensity (void)
 Get the noise power spectral density. More...
 
uint64_t GetPhySHRDuration (void) const
 Get the duration of the SHR (preamble and SFD) in symbols, depending on the currently selected channel. More...
 
double GetPhySymbolsPerOctet (void) const
 Get the number of symbols per octet, depending on the currently selected channel. More...
 
Ptr< AntennaModelGetRxAntenna (void)
 Get the AntennaModel used by the NetDevice for reception. More...
 
virtual Ptr< const SpectrumModelGetRxSpectrumModel (void) const
 
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) More...
 
void PlmeCcaRequest (void)
 IEEE 802.15.4-2006 section 6.2.2.1 PLME-CCA.request Perform a CCA per section 6.9.9. More...
 
void PlmeEdRequest (void)
 IEEE 802.15.4-2006 section 6.2.2.3 PLME-ED.request Perform an ED per section 6.9.7. More...
 
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 section 6.4.2. More...
 
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 section 6.4.2. More...
 
void PlmeSetTRXStateRequest (LrWpanPhyEnumeration state)
 IEEE 802.15.4-2006 section 6.2.2.7 PLME-SET-TRX-STATE.request Set PHY state. More...
 
void SetAntenna (Ptr< AntennaModel > a)
 Set the attached antenna. More...
 
void SetChannel (Ptr< SpectrumChannel > c)
 Set the channel attached to this device. More...
 
void SetDevice (Ptr< NetDevice > d)
 Set the associated NetDevice instance. More...
 
void SetErrorModel (Ptr< LrWpanErrorModel > e)
 set the error model to use More...
 
void SetMobility (Ptr< MobilityModel > m)
 Set the mobility model associated with this device. More...
 
void SetNoisePowerSpectralDensity (Ptr< const SpectrumValue > noisePsd)
 Set the noise power spectral density. More...
 
void SetPdDataConfirmCallback (PdDataConfirmCallback c)
 set the callback for the end of a TX, as part of the interconnections betweenthe PHY and the MAC. More...
 
void SetPdDataIndicationCallback (PdDataIndicationCallback c)
 set the callback for the end of a RX, as part of the interconnections betweenthe PHY and the MAC. More...
 
void SetPlmeCcaConfirmCallback (PlmeCcaConfirmCallback c)
 set the callback for the end of a CCA, as part of the interconnections betweenthe PHY and the MAC. More...
 
void SetPlmeEdConfirmCallback (PlmeEdConfirmCallback c)
 set the callback for the end of an ED, as part of the interconnections betweenthe PHY and the MAC. More...
 
void SetPlmeGetAttributeConfirmCallback (PlmeGetAttributeConfirmCallback c)
 set the callback for the end of an GetAttribute, as part of the interconnections betweenthe PHY and the MAC. More...
 
void SetPlmeSetAttributeConfirmCallback (PlmeSetAttributeConfirmCallback c)
 set the callback for the end of an SetAttribute, as part of the interconnections betweenthe PHY and the MAC. More...
 
void SetPlmeSetTRXStateConfirmCallback (PlmeSetTRXStateConfirmCallback c)
 set the callback for the end of an SetTRXState, as part of the interconnections betweenthe PHY and the MAC. More...
 
void SetTxPowerSpectralDensity (Ptr< SpectrumValue > txPsd)
 Set the Power Spectral Density of outgoing signals in W/Hz. More...
 
virtual void StartRx (Ptr< SpectrumSignalParameters > params)
 Notify the SpectrumPhy instance of an incoming waveform. More...
 
- Public Member Functions inherited from ns3::SpectrumPhy
 SpectrumPhy ()
 
virtual ~SpectrumPhy ()
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Implement the GetInstanceTypeId method defined in ObjectBase. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::SpectrumPhy
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 Noop. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Static Public Attributes

static const uint32_t aMaxPhyPacketSize = 127
 The maximum packet size accepted by the PHY. More...
 
static const uint32_t aTurnaroundTime = 12
 The turnaround time for switching the transceiver from RX to TX or vice versa. More...
 

Static Protected Attributes

static const LrWpanPhyDataAndSymbolRates dataSymbolRates [7]
 The data and symbol rates for the different PHY options. More...
 
static const LrWpanPhyPpduHeaderSymbolNumber ppduHeaderSymbolNumbers [7]
 The preamble, SFD, and PHR lengths in symbols for the different PHY options. More...
 

Private Types

typedef std::pair< Ptr< Packet >, bool > PacketAndStatus
 The second is true if the first is flagged as error/invalid. More...
 

Private Member Functions

Time CalculateTxTime (Ptr< const Packet > packet)
 Calculate the time required for sending the given packet, including preamble, SFD and PHR. More...
 
void CancelEd (LrWpanPhyEnumeration state)
 Cancel an ongoing ED procedure. More...
 
void ChangeTrxState (LrWpanPhyEnumeration newState)
 Change the PHY state to the given new state, firing the state change trace. More...
 
bool ChannelSupported (uint8_t channel)
 Check if the given channel is supported by the PHY. More...
 
void CheckInterference (void)
 Check if the interference destroys a frame currently received. More...
 
virtual void DoDispose (void)
 Destructor implementation. More...
 
void EndCca (void)
 Called at the end of the CCA. More...
 
void EndEd (void)
 Called at the end of the ED procedure. More...
 
void EndRx (Ptr< SpectrumSignalParameters > params)
 Finish the reception of a frame. More...
 
void EndSetTRXState (void)
 Called after applying a deferred transceiver state switch. More...
 
void EndTx (void)
 Finish the transmission of a frame. More...
 
LrWpanPhyOption GetMyPhyOption (void)
 Get the currently configured PHY option. More...
 
Time GetPpduHeaderTxTime (void)
 Calculate the time required for sending the PPDU header, that is the preamble, SFD and PHR. More...
 
bool PhyIsBusy (void) const
 Check if the PHY is busy, which is the case if the PHY is currently sending or receiving a frame. More...
 
void SetMyPhyOption (void)
 Configure the PHY option according to the current channel and channel page. More...
 

Private Attributes

Ptr< AntennaModelm_antenna
 The antenna used by the transceiver. More...
 
double m_ccaPeakPower
 Helper value for the peak power value during CCA. More...
 
EventId m_ccaRequest
 Scheduler event of a currently running CCA request. More...
 
Ptr< SpectrumChannelm_channel
 The channel attached to this transceiver. More...
 
std::pair< Ptr< LrWpanSpectrumSignalParameters >, bool > m_currentRxPacket
 Statusinformation of the currently received packet. More...
 
PacketAndStatus m_currentTxPacket
 Statusinformation of the currently transmitted packet. More...
 
Ptr< NetDevicem_device
 The configured net device. More...
 
LrWpanEdPower m_edPower
 Helper value for tracking the average power during ED. More...
 
EventId m_edRequest
 Scheduler event of a currently running ED request. More...
 
Ptr< LrWpanErrorModelm_errorModel
 The error model describing the bit and packet error rates. More...
 
Ptr< MobilityModelm_mobility
 The mobility model used by the PHY. More...
 
Ptr< const SpectrumValuem_noise
 The spectral density for for the noise. More...
 
PdDataConfirmCallback m_pdDataConfirmCallback
 This callback is used to report packet transmission status to the MAC layer. More...
 
PdDataIndicationCallback m_pdDataIndicationCallback
 This callback is used to notify incoming packets to the MAC layer. More...
 
EventId m_pdDataRequest
 Scheduler event of a currently running data transmission request. More...
 
LrWpanPhyOption m_phyOption
 The currently configured PHY type. More...
 
LrWpanPhyPibAttributes m_phyPIBAttributes
 The current PHY PIB attributes. More...
 
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
 The trace source fired when a packet begins the reception process from the medium. More...
 
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
 The trace source fired when the phy layer drops a packet it has received. More...
 
TracedCallback< Ptr< const Packet >, double > m_phyRxEndTrace
 The trace source fired when a packet ends the reception process from the medium. More...
 
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
 The trace source fired when a packet begins the transmission process on the medium. More...
 
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
 The trace source fired when the phy layer drops a packet as it tries to transmit it. More...
 
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
 The trace source fired when a packet ends the transmission process on the medium. More...
 
PlmeCcaConfirmCallback m_plmeCcaConfirmCallback
 This callback is used to report CCA status to the MAC or CSMA/CA. More...
 
PlmeEdConfirmCallback m_plmeEdConfirmCallback
 This callback is used to report ED status to the MAC. More...
 
PlmeGetAttributeConfirmCallback m_plmeGetAttributeConfirmCallback
 This callback is used to report requested attribute values back to the MAC. More...
 
PlmeSetAttributeConfirmCallback m_plmeSetAttributeConfirmCallback
 This callback is used to report attribute set results back to the MAC. More...
 
PlmeSetTRXStateConfirmCallback m_plmeSetTRXStateConfirmCallback
 This callback is used to report transceiver state change status to the MAC. More...
 
Ptr< UniformRandomVariablem_random
 Uniform random variable stream. More...
 
Time m_rxLastUpdate
 Timestamp of the last calculation of the PER of a packet currently received. More...
 
double m_rxSensitivity
 The receiver sensitivity. More...
 
EventId m_setTRXState
 Scheduler event of a currently running deferred transceiver state switch. More...
 
Ptr< LrWpanInterferenceHelperm_signal
 The accumulated signals currently received by the transceiver, including the signal of a possibly received packet, as well as all signals considered noise. More...
 
TracedValue< LrWpanPhyEnumerationm_trxState
 The current transceiver state. More...
 
TracedCallback< Time, LrWpanPhyEnumeration, LrWpanPhyEnumerationm_trxStateLogger
 The trace source fired when the phy layer changes the transceiver state. More...
 
LrWpanPhyEnumeration m_trxStatePending
 The next pending state to applied after the current action of the PHY is completed. More...
 
Ptr< SpectrumValuem_txPsd
 The transmit power spectral density. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

Make LrWpanPhy a SpectrumPhy so we can enable the eventual modeling of device interference.

Config Paths

ns3::LrWpanPhy is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/DeviceList/[i]/$ns3::LrWpanNetDevice/Phy"

No Attributes are defined for this type.

TraceSources

Size of this type is 648 bytes (on a 64-bit architecture).

Definition at line 247 of file lr-wpan-phy.h.

Member Typedef Documentation

typedef std::pair<Ptr<Packet>, bool> ns3::LrWpanPhy::PacketAndStatus
private

The second is true if the first is flagged as error/invalid.

Definition at line 508 of file lr-wpan-phy.h.

typedef void(* ns3::LrWpanPhy::StateTracedCallback) (Time time, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState)

TracedCallback signature for Trx state change events.

Parameters
[in]timeThe time of the state change.
[in]oldStateThe old state.
[in]newStateThe new state.
Deprecated:
The LrWpanPhyEnumeration state is now accessible as the TracedValue TrxStateValue. The TrxState TracedCallback will be removed in a future release.

Definition at line 490 of file lr-wpan-phy.h.

Constructor & Destructor Documentation

ns3::LrWpanPhy::~LrWpanPhy ( void  )
virtual

Definition at line 168 of file lr-wpan-phy.cc.

Member Function Documentation

int64_t ns3::LrWpanPhy::AssignStreams ( int64_t  stream)

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 1419 of file lr-wpan-phy.cc.

References m_random, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

+ Here is the call graph for this function:

Time ns3::LrWpanPhy::CalculateTxTime ( Ptr< const Packet packet)
private

Calculate the time required for sending the given packet, including preamble, SFD and PHR.

Parameters
packetthe packet for which the transmission time should be calculated
Returns
the time required for transmitting the packet

Definition at line 1255 of file lr-wpan-phy.cc.

References GetDataOrSymbolRate(), GetPpduHeaderTxTime(), ns3::Packet::GetSize(), NS_LOG_FUNCTION, and ns3::Seconds().

Referenced by PdDataRequest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LrWpanPhy::CancelEd ( LrWpanPhyEnumeration  state)
private

Cancel an ongoing ED procedure.

This is called when the transceiver is switched off or set to TX mode. This calls the appropiate confirm callback of the MAC.

Parameters
statethe new state which is the cause for canceling ED

Definition at line 1062 of file lr-wpan-phy.cc.

References ns3::EventId::Cancel(), ns3::IEEE_802_15_4_PHY_TRX_OFF, ns3::IEEE_802_15_4_PHY_TX_ON, ns3::EventId::IsExpired(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_edRequest, m_plmeEdConfirmCallback, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by PlmeSetTRXStateRequest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LrWpanPhy::ChangeTrxState ( LrWpanPhyEnumeration  newState)
private

Change the PHY state to the given new state, firing the state change trace.

Parameters
newStatethe new state

Definition at line 1045 of file lr-wpan-phy.cc.

References m_trxState, m_trxStateLogger, ns3::Simulator::Now(), and NS_LOG_LOGIC.

Referenced by EndRx(), EndSetTRXState(), EndTx(), LrWpanPhy(), PdDataRequest(), PlmeSetTRXStateRequest(), and StartRx().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::LrWpanPhy::ChannelSupported ( uint8_t  channel)
private

Check if the given channel is supported by the PHY.

Parameters
channelthe channel to check
Returns
true, if the channel is supported, false otherwise

Definition at line 874 of file lr-wpan-phy.cc.

References m_phyPIBAttributes, NS_LOG_FUNCTION, and ns3::LrWpanPhyPibAttributes::phyChannelsSupported.

Referenced by PlmeSetAttributeRequest().

+ Here is the caller graph for this function:

void ns3::LrWpanPhy::CheckInterference ( void  )
private

Check if the interference destroys a frame currently received.

Called whenever a change in interference is detected.

Definition at line 397 of file lr-wpan-phy.cc.

References ns3::LrWpanLqiTag::Get(), GetDataOrSymbolRate(), ns3::UniformRandomVariable::GetValue(), ns3::IEEE_802_15_4_PHY_BUSY_RX, m_currentRxPacket, m_errorModel, m_noise, m_phyPIBAttributes, m_random, m_rxLastUpdate, m_signal, m_trxState, max, ns3::Time::MS, ns3::Simulator::Now(), NS_LOG_WARN, ns3::Packet::PeekPacketTag(), ns3::LrWpanPhyPibAttributes::phyCurrentChannel, ns3::Packet::ReplacePacketTag(), ns3::LrWpanLqiTag::Set(), and ns3::LrWpanSpectrumValueHelper::TotalAvgPower().

Referenced by EndRx(), and StartRx().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LrWpanPhy::DoDispose ( void  )
privatevirtual

Destructor implementation.

This method is called by 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.

Definition at line 173 of file lr-wpan-phy.cc.

References ns3::EventId::Cancel(), ns3::Object::DoDispose(), ns3::IEEE_802_15_4_PHY_IDLE, ns3::IEEE_802_15_4_PHY_TRX_OFF, m_channel, m_device, m_errorModel, m_mobility, m_noise, m_pdDataConfirmCallback, m_pdDataIndicationCallback, m_plmeCcaConfirmCallback, m_plmeEdConfirmCallback, m_plmeGetAttributeConfirmCallback, m_plmeSetAttributeConfirmCallback, m_plmeSetTRXStateConfirmCallback, m_setTRXState, m_signal, m_trxState, m_trxStatePending, m_txPsd, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::LrWpanPhy::EndCca ( void  )
private
void ns3::LrWpanPhy::EndEd ( void  )
private
void ns3::LrWpanPhy::EndRx ( Ptr< SpectrumSignalParameters params)
private

Finish the reception of a frame.

This is called at the end of a frame reception, applying possibly pending PHY state changes and fireing the appropriate trace sources and indication callbacks to the MAC. A frame destroyed by noise/interference is dropped here, but not during reception. This method is also called for every packet which only contributes to interference.

Parameters
paramssignal parameters of the packet

Definition at line 443 of file lr-wpan-phy.cc.

References ns3::LrWpanEdPower::averagePower, ChangeTrxState(), CheckInterference(), ns3::LrWpanLqiTag::Get(), ns3::Packet::GetSize(), ns3::Time::GetTimeStep(), ns3::IEEE_802_15_4_PHY_IDLE, ns3::IEEE_802_15_4_PHY_RX_ON, ns3::IEEE_802_15_4_PHY_SUCCESS, ns3::EventId::IsExpired(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), ns3::EventId::IsRunning(), ns3::LrWpanEdPower::lastUpdate, m_currentRxPacket, m_device, m_edPower, m_edRequest, m_pdDataIndicationCallback, m_phyPIBAttributes, m_phyRxDropTrace, m_phyRxEndTrace, m_plmeSetTRXStateConfirmCallback, m_setTRXState, m_signal, m_trxStatePending, max, ns3::LrWpanEdPower::measurementLength, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Packet::PeekPacketTag(), ns3::LrWpanPhyPibAttributes::phyCurrentChannel, and ns3::LrWpanSpectrumValueHelper::TotalAvgPower().

Referenced by StartRx().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LrWpanPhy::EndSetTRXState ( void  )
private

Called after applying a deferred transceiver state switch.

The result of the state switch is reported to the MAC.

Definition at line 1184 of file lr-wpan-phy.cc.

References ChangeTrxState(), ns3::IEEE_802_15_4_PHY_IDLE, ns3::IEEE_802_15_4_PHY_RX_ON, ns3::IEEE_802_15_4_PHY_TX_ON, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_plmeSetTRXStateConfirmCallback, m_trxState, m_trxStatePending, NS_ABORT_IF, and NS_LOG_FUNCTION.

Referenced by PlmeSetTRXStateRequest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LrWpanPhy::EndTx ( void  )
private

Finish the transmission of a frame.

This is called at the end of a frame transmission, applying possibly pending PHY state changes and fireing the appropriate trace sources and confirm callbacks to the MAC.

Definition at line 1199 of file lr-wpan-phy.cc.

References ChangeTrxState(), ns3::IEEE_802_15_4_PHY_BUSY_TX, ns3::IEEE_802_15_4_PHY_IDLE, ns3::IEEE_802_15_4_PHY_SUCCESS, ns3::IEEE_802_15_4_PHY_TRX_OFF, ns3::IEEE_802_15_4_PHY_TX_ON, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), ns3::EventId::IsRunning(), m_currentTxPacket, m_pdDataConfirmCallback, m_phyTxDropTrace, m_phyTxEndTrace, m_plmeSetTRXStateConfirmCallback, m_setTRXState, m_trxState, m_trxStatePending, NS_ABORT_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by PdDataRequest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< SpectrumChannel > ns3::LrWpanPhy::GetChannel ( void  )

Get the currently attached channel.

Returns
the channel

Definition at line 241 of file lr-wpan-phy.cc.

References m_channel, and NS_LOG_FUNCTION.

double ns3::LrWpanPhy::GetDataOrSymbolRate ( bool  isData)

implement PLME SetAttribute confirm SAP

Parameters
isDatais true for data rate or false for symbol rate
Returns
the rate value of this PHY

Definition at line 1268 of file lr-wpan-phy.cc.

References ns3::LrWpanPhyDataAndSymbolRates::bitRate, dataSymbolRates, ns3::IEEE_802_15_4_INVALID_PHY_OPTION, m_phyOption, NS_ASSERT, NS_LOG_FUNCTION, and ns3::LrWpanPhyDataAndSymbolRates::symbolRate.

Referenced by CalculateTxTime(), CheckInterference(), GetPpduHeaderTxTime(), PlmeCcaRequest(), PlmeEdRequest(), and PlmeSetTRXStateRequest().

+ Here is the caller graph for this function:

Ptr< NetDevice > ns3::LrWpanPhy::GetDevice ( void  ) const
virtual

Get the associated NetDevice instance.

Returns
a Ptr to the associated NetDevice instance

Implements ns3::SpectrumPhy.

Definition at line 201 of file lr-wpan-phy.cc.

References m_device, and NS_LOG_FUNCTION.

Ptr< LrWpanErrorModel > ns3::LrWpanPhy::GetErrorModel ( void  ) const

get the error model in use

Returns
pointer to LrWpanErrorModel in use

Definition at line 1393 of file lr-wpan-phy.cc.

References m_errorModel, and NS_LOG_FUNCTION.

Ptr< MobilityModel > ns3::LrWpanPhy::GetMobility ( void  )
virtual

Get the associated MobilityModel instance.

Returns
a Ptr to the associated MobilityModel instance

Implements ns3::SpectrumPhy.

Definition at line 209 of file lr-wpan-phy.cc.

References m_mobility, and NS_LOG_FUNCTION.

LrWpanPhyOption ns3::LrWpanPhy::GetMyPhyOption ( void  )
private

Get the currently configured PHY option.

See IEEE 802.15.4-2006, section 6.1.2, Table 2.

Returns
the PHY option

Definition at line 1353 of file lr-wpan-phy.cc.

References m_phyOption, and NS_LOG_FUNCTION.

Ptr< const SpectrumValue > ns3::LrWpanPhy::GetNoisePowerSpectralDensity ( void  )

Get the noise power spectral density.

Returns
the Noise Power Spectral Density

Definition at line 1378 of file lr-wpan-phy.cc.

References m_noise, and NS_LOG_FUNCTION.

uint64_t ns3::LrWpanPhy::GetPhySHRDuration ( void  ) const

Get the duration of the SHR (preamble and SFD) in symbols, depending on the currently selected channel.

Returns
the SHR duration in symbols

Definition at line 1400 of file lr-wpan-phy.cc.

References ns3::IEEE_802_15_4_INVALID_PHY_OPTION, m_phyOption, NS_ASSERT, NS_LOG_FUNCTION, ppduHeaderSymbolNumbers, ns3::LrWpanPhyPpduHeaderSymbolNumber::shrPreamble, and ns3::LrWpanPhyPpduHeaderSymbolNumber::shrSfd.

double ns3::LrWpanPhy::GetPhySymbolsPerOctet ( void  ) const

Get the number of symbols per octet, depending on the currently selected channel.

Returns
the number of symbols per octet

Definition at line 1410 of file lr-wpan-phy.cc.

References ns3::LrWpanPhyDataAndSymbolRates::bitRate, dataSymbolRates, ns3::IEEE_802_15_4_INVALID_PHY_OPTION, m_phyOption, NS_ASSERT, NS_LOG_FUNCTION, and ns3::LrWpanPhyDataAndSymbolRates::symbolRate.

Time ns3::LrWpanPhy::GetPpduHeaderTxTime ( void  )
private

Calculate the time required for sending the PPDU header, that is the preamble, SFD and PHR.

Definition at line 1289 of file lr-wpan-phy.cc.

References GetDataOrSymbolRate(), ns3::IEEE_802_15_4_INVALID_PHY_OPTION, m_phyOption, NS_ASSERT, NS_LOG_FUNCTION, ns3::LrWpanPhyPpduHeaderSymbolNumber::phr, ppduHeaderSymbolNumbers, ns3::Seconds(), ns3::LrWpanPhyPpduHeaderSymbolNumber::shrPreamble, and ns3::LrWpanPhyPpduHeaderSymbolNumber::shrSfd.

Referenced by CalculateTxTime().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< AntennaModel > ns3::LrWpanPhy::GetRxAntenna ( void  )
virtual

Get the AntennaModel used by the NetDevice for reception.

Returns
a Ptr to the AntennaModel used by the NetDevice for reception

Implements ns3::SpectrumPhy.

Definition at line 263 of file lr-wpan-phy.cc.

References m_antenna, and NS_LOG_FUNCTION.

Ptr< const SpectrumModel > ns3::LrWpanPhy::GetRxSpectrumModel ( void  ) const
virtual
Returns
returns the SpectrumModel that this SpectrumPhy expects to be used for all SpectrumValues that are passed to StartRx. If 0 is returned, it means that any model will be accepted.

Implements ns3::SpectrumPhy.

Definition at line 249 of file lr-wpan-phy.cc.

References ns3::SpectrumValue::GetSpectrumModel(), m_txPsd, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

TypeId ns3::LrWpanPhy::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 74 of file lr-wpan-phy.cc.

References m_phyRxBeginTrace, m_phyRxDropTrace, m_phyRxEndTrace, m_phyTxBeginTrace, m_phyTxDropTrace, m_phyTxEndTrace, m_trxState, m_trxStateLogger, ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

void ns3::LrWpanPhy::PdDataRequest ( const uint32_t  psduLength,
Ptr< Packet p 
)
bool ns3::LrWpanPhy::PhyIsBusy ( void  ) const
private

Check if the PHY is busy, which is the case if the PHY is currently sending or receiving a frame.

Returns
true, if the PHY is busy, false otherwise

Definition at line 1053 of file lr-wpan-phy.cc.

References ns3::IEEE_802_15_4_PHY_BUSY, ns3::IEEE_802_15_4_PHY_BUSY_RX, ns3::IEEE_802_15_4_PHY_BUSY_TX, m_trxState, and NS_LOG_FUNCTION.

Referenced by EndCca(), and PlmeSetAttributeRequest().

+ Here is the caller graph for this function:

void ns3::LrWpanPhy::PlmeCcaRequest ( void  )
void ns3::LrWpanPhy::PlmeGetAttributeRequest ( LrWpanPibAttributeIdentifier  id)

IEEE 802.15.4-2006 section 6.2.2.5 PLME-GET.request Get attributes per definition from Table 23 in section 6.4.2.

Parameters
idthe attributed identifier

Definition at line 651 of file lr-wpan-phy.cc.

References ns3::IEEE_802_15_4_PHY_SUCCESS, ns3::IEEE_802_15_4_PHY_UNSUPPORTED_ATTRIBUTE, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_phyPIBAttributes, m_plmeGetAttributeConfirmCallback, NS_LOG_FUNCTION, ns3::phyCCAMode, ns3::phyChannelsSupported, ns3::phyCurrentChannel, ns3::phyCurrentPage, ns3::phyMaxFrameDuration, ns3::phySHRDuration, ns3::phySymbolsPerOctet, and ns3::phyTransmitPower.

+ Here is the call graph for this function:

void ns3::LrWpanPhy::SetAntenna ( Ptr< AntennaModel a)

Set the attached antenna.

Parameters
athe antenna

Definition at line 270 of file lr-wpan-phy.cc.

References m_antenna, and NS_LOG_FUNCTION.

void ns3::LrWpanPhy::SetChannel ( Ptr< SpectrumChannel c)
virtual

Set the channel attached to this device.

Parameters
cthe channel

Implements ns3::SpectrumPhy.

Definition at line 233 of file lr-wpan-phy.cc.

References m_channel, and NS_LOG_FUNCTION.

Referenced by LrWpanPlmeAndPdInterfaceTestCase::DoRun().

+ Here is the caller graph for this function:

void ns3::LrWpanPhy::SetDevice ( Ptr< NetDevice d)
virtual

Set the associated NetDevice instance.

Parameters
dthe NetDevice instance

Implements ns3::SpectrumPhy.

Definition at line 217 of file lr-wpan-phy.cc.

References m_device, and NS_LOG_FUNCTION.

void ns3::LrWpanPhy::SetErrorModel ( Ptr< LrWpanErrorModel e)

set the error model to use

Parameters
epointer to LrWpanErrorModel to use

Definition at line 1385 of file lr-wpan-phy.cc.

References m_errorModel, NS_ASSERT, and NS_LOG_FUNCTION.

void ns3::LrWpanPhy::SetMobility ( Ptr< MobilityModel m)
virtual

Set the mobility model associated with this device.

Parameters
mthe mobility model

Implements ns3::SpectrumPhy.

Definition at line 225 of file lr-wpan-phy.cc.

References m_mobility, and NS_LOG_FUNCTION.

void ns3::LrWpanPhy::SetMyPhyOption ( void  )
private
void ns3::LrWpanPhy::SetNoisePowerSpectralDensity ( Ptr< const SpectrumValue noisePsd)

Set the noise power spectral density.

Parameters
noisePsdthe Noise Power Spectral Density in power units (Watt, Pascal...) per Hz.

Definition at line 1369 of file lr-wpan-phy.cc.

References m_noise, NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_INFO.

void ns3::LrWpanPhy::SetPdDataConfirmCallback ( PdDataConfirmCallback  c)

set the callback for the end of a TX, as part of the interconnections betweenthe PHY and the MAC.

The callback implements PD SAP.

Parameters
cthe callback

Definition at line 1003 of file lr-wpan-phy.cc.

References m_pdDataConfirmCallback, and NS_LOG_FUNCTION.

void ns3::LrWpanPhy::SetPdDataIndicationCallback ( PdDataIndicationCallback  c)

set the callback for the end of a RX, as part of the interconnections betweenthe PHY and the MAC.

The callback implements PD Indication SAP.

Parameters
cthe callback

Definition at line 996 of file lr-wpan-phy.cc.

References m_pdDataIndicationCallback, and NS_LOG_FUNCTION.

void ns3::LrWpanPhy::SetPlmeCcaConfirmCallback ( PlmeCcaConfirmCallback  c)

set the callback for the end of a CCA, as part of the interconnections betweenthe PHY and the MAC.

The callback implement PLME CCA confirm SAP

Parameters
cthe callback

Definition at line 1010 of file lr-wpan-phy.cc.

References m_plmeCcaConfirmCallback, and NS_LOG_FUNCTION.

void ns3::LrWpanPhy::SetPlmeEdConfirmCallback ( PlmeEdConfirmCallback  c)

set the callback for the end of an ED, as part of the interconnections betweenthe PHY and the MAC.

The callback implement PLME ED confirm SAP

Parameters
cthe callback

Definition at line 1017 of file lr-wpan-phy.cc.

References m_plmeEdConfirmCallback, and NS_LOG_FUNCTION.

void ns3::LrWpanPhy::SetPlmeGetAttributeConfirmCallback ( PlmeGetAttributeConfirmCallback  c)

set the callback for the end of an GetAttribute, as part of the interconnections betweenthe PHY and the MAC.

The callback implement PLME GetAttribute confirm SAP

Parameters
cthe callback

Definition at line 1024 of file lr-wpan-phy.cc.

References m_plmeGetAttributeConfirmCallback, and NS_LOG_FUNCTION.

void ns3::LrWpanPhy::SetPlmeSetAttributeConfirmCallback ( PlmeSetAttributeConfirmCallback  c)

set the callback for the end of an SetAttribute, as part of the interconnections betweenthe PHY and the MAC.

The callback implement PLME SetAttribute confirm SAP

Parameters
cthe callback

Definition at line 1038 of file lr-wpan-phy.cc.

References m_plmeSetAttributeConfirmCallback, and NS_LOG_FUNCTION.

void ns3::LrWpanPhy::SetPlmeSetTRXStateConfirmCallback ( PlmeSetTRXStateConfirmCallback  c)

set the callback for the end of an SetTRXState, as part of the interconnections betweenthe PHY and the MAC.

The callback implement PLME SetTRXState confirm SAP

Parameters
cthe callback

Definition at line 1031 of file lr-wpan-phy.cc.

References m_plmeSetTRXStateConfirmCallback, and NS_LOG_FUNCTION.

void ns3::LrWpanPhy::SetTxPowerSpectralDensity ( Ptr< SpectrumValue txPsd)

Set the Power Spectral Density of outgoing signals in W/Hz.

Parameters
txPsdthe Power Spectral Density value

Definition at line 1360 of file lr-wpan-phy.cc.

References m_txPsd, NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_INFO.

Member Data Documentation

const uint32_t ns3::LrWpanPhy::aMaxPhyPacketSize = 127
static

The maximum packet size accepted by the PHY.

See Table 22 in section 6.4.1 of IEEE 802.15.4-2006

Definition at line 262 of file lr-wpan-phy.h.

Referenced by ns3::LrWpanMac::McpsDataRequest(), and PdDataRequest().

const uint32_t ns3::LrWpanPhy::aTurnaroundTime = 12
static

The turnaround time for switching the transceiver from RX to TX or vice versa.

See Table 22 in section 6.4.1 of IEEE 802.15.4-2006

Definition at line 269 of file lr-wpan-phy.h.

Referenced by PlmeSetTRXStateRequest().

const LrWpanPhyDataAndSymbolRates ns3::LrWpanPhy::dataSymbolRates
staticprotected
Initial value:
= { { 20.0, 20.0},
{ 40.0, 40.0},
{ 250.0, 12.5},
{ 250.0, 50.0},
{ 100.0, 25.0},
{ 250.0, 62.5},
{ 250.0, 62.5}}

The data and symbol rates for the different PHY options.

See Table 2 in section 6.1.2 IEEE 802.15.4-2006

Definition at line 497 of file lr-wpan-phy.h.

Referenced by GetDataOrSymbolRate(), and GetPhySymbolsPerOctet().

Ptr<AntennaModel> ns3::LrWpanPhy::m_antenna
private

The antenna used by the transceiver.

Definition at line 693 of file lr-wpan-phy.h.

Referenced by GetRxAntenna(), PdDataRequest(), and SetAntenna().

double ns3::LrWpanPhy::m_ccaPeakPower
private

Helper value for the peak power value during CCA.

Definition at line 783 of file lr-wpan-phy.h.

Referenced by EndCca(), PlmeCcaRequest(), and StartRx().

EventId ns3::LrWpanPhy::m_ccaRequest
private

Scheduler event of a currently running CCA request.

Definition at line 821 of file lr-wpan-phy.h.

Referenced by PlmeCcaRequest(), PlmeSetTRXStateRequest(), and StartRx().

Ptr<SpectrumChannel> ns3::LrWpanPhy::m_channel
private

The channel attached to this transceiver.

Definition at line 688 of file lr-wpan-phy.h.

Referenced by DoDispose(), GetChannel(), PdDataRequest(), and SetChannel().

std::pair<Ptr<LrWpanSpectrumSignalParameters>, bool> ns3::LrWpanPhy::m_currentRxPacket
private

Statusinformation of the currently received packet.

The first parameter contains the frame, as well the signal power of the frame. The second parameter is set to false, if the frame is either invalid or destroyed due to interference.

Definition at line 808 of file lr-wpan-phy.h.

Referenced by CheckInterference(), EndRx(), LrWpanPhy(), PlmeSetAttributeRequest(), PlmeSetTRXStateRequest(), and StartRx().

PacketAndStatus ns3::LrWpanPhy::m_currentTxPacket
private

Statusinformation of the currently transmitted packet.

The first parameter contains the frame. The second parameter is set to false, if the frame not completely transmitted, in the event of a force transceiver switch, for example.

Definition at line 816 of file lr-wpan-phy.h.

Referenced by EndTx(), LrWpanPhy(), PdDataRequest(), PlmeSetAttributeRequest(), and PlmeSetTRXStateRequest().

Ptr<NetDevice> ns3::LrWpanPhy::m_device
private

The configured net device.

Definition at line 683 of file lr-wpan-phy.h.

Referenced by DoDispose(), EndRx(), GetDevice(), and SetDevice().

LrWpanEdPower ns3::LrWpanPhy::m_edPower
private

Helper value for tracking the average power during ED.

Definition at line 778 of file lr-wpan-phy.h.

Referenced by EndEd(), EndRx(), LrWpanPhy(), PlmeEdRequest(), and StartRx().

EventId ns3::LrWpanPhy::m_edRequest
private

Scheduler event of a currently running ED request.

Definition at line 826 of file lr-wpan-phy.h.

Referenced by CancelEd(), EndRx(), PlmeEdRequest(), and StartRx().

Ptr<LrWpanErrorModel> ns3::LrWpanPhy::m_errorModel
private

The error model describing the bit and packet error rates.

Definition at line 708 of file lr-wpan-phy.h.

Referenced by CheckInterference(), DoDispose(), GetErrorModel(), LrWpanPhy(), and SetErrorModel().

Ptr<MobilityModel> ns3::LrWpanPhy::m_mobility
private

The mobility model used by the PHY.

Definition at line 678 of file lr-wpan-phy.h.

Referenced by DoDispose(), GetMobility(), and SetMobility().

Ptr<const SpectrumValue> ns3::LrWpanPhy::m_noise
private

The spectral density for for the noise.

Definition at line 703 of file lr-wpan-phy.h.

Referenced by CheckInterference(), DoDispose(), GetNoisePowerSpectralDensity(), LrWpanPhy(), SetNoisePowerSpectralDensity(), and StartRx().

PdDataConfirmCallback ns3::LrWpanPhy::m_pdDataConfirmCallback
private

This callback is used to report packet transmission status to the MAC layer.

See IEEE 802.15.4-2006, section 6.2.1.2.

Definition at line 738 of file lr-wpan-phy.h.

Referenced by DoDispose(), EndTx(), PdDataRequest(), PlmeSetAttributeRequest(), and SetPdDataConfirmCallback().

PdDataIndicationCallback ns3::LrWpanPhy::m_pdDataIndicationCallback
private

This callback is used to notify incoming packets to the MAC layer.

See IEEE 802.15.4-2006, section 6.2.1.3.

Definition at line 732 of file lr-wpan-phy.h.

Referenced by DoDispose(), EndRx(), and SetPdDataIndicationCallback().

EventId ns3::LrWpanPhy::m_pdDataRequest
private

Scheduler event of a currently running data transmission request.

Definition at line 836 of file lr-wpan-phy.h.

Referenced by PdDataRequest(), and PlmeSetAttributeRequest().

LrWpanPhyOption ns3::LrWpanPhy::m_phyOption
private

The currently configured PHY type.

Definition at line 773 of file lr-wpan-phy.h.

Referenced by GetDataOrSymbolRate(), GetMyPhyOption(), GetPhySHRDuration(), GetPhySymbolsPerOctet(), GetPpduHeaderTxTime(), and SetMyPhyOption().

LrWpanPhyPibAttributes ns3::LrWpanPhy::m_phyPIBAttributes
private
TracedCallback<Ptr<const Packet> > ns3::LrWpanPhy::m_phyRxBeginTrace
private

The trace source fired when a packet begins the reception process from the medium.

See also
class CallBackTraceSource

Definition at line 648 of file lr-wpan-phy.h.

Referenced by GetTypeId(), and StartRx().

TracedCallback<Ptr<const Packet> > ns3::LrWpanPhy::m_phyRxDropTrace
private

The trace source fired when the phy layer drops a packet it has received.

See also
class CallBackTraceSource

Definition at line 663 of file lr-wpan-phy.h.

Referenced by EndRx(), GetTypeId(), and StartRx().

TracedCallback<Ptr<const Packet>, double > ns3::LrWpanPhy::m_phyRxEndTrace
private

The trace source fired when a packet ends the reception process from the medium.

Second quantity is received SINR.

See also
class CallBackTraceSource

Definition at line 656 of file lr-wpan-phy.h.

Referenced by EndRx(), and GetTypeId().

TracedCallback<Ptr<const Packet> > ns3::LrWpanPhy::m_phyTxBeginTrace
private

The trace source fired when a packet begins the transmission process on the medium.

See also
class CallBackTraceSource

Definition at line 624 of file lr-wpan-phy.h.

Referenced by GetTypeId(), and PdDataRequest().

TracedCallback<Ptr<const Packet> > ns3::LrWpanPhy::m_phyTxDropTrace
private

The trace source fired when the phy layer drops a packet as it tries to transmit it.

See also
class CallBackTraceSource

Definition at line 640 of file lr-wpan-phy.h.

Referenced by EndTx(), GetTypeId(), and PdDataRequest().

TracedCallback<Ptr<const Packet> > ns3::LrWpanPhy::m_phyTxEndTrace
private

The trace source fired when a packet ends the transmission process on the medium.

See also
class CallBackTraceSource

Definition at line 632 of file lr-wpan-phy.h.

Referenced by EndTx(), and GetTypeId().

PlmeCcaConfirmCallback ns3::LrWpanPhy::m_plmeCcaConfirmCallback
private

This callback is used to report CCA status to the MAC or CSMA/CA.

See IEEE 802.15.4-2006, section 6.2.2.2.

Definition at line 744 of file lr-wpan-phy.h.

Referenced by DoDispose(), EndCca(), PlmeCcaRequest(), PlmeSetTRXStateRequest(), and SetPlmeCcaConfirmCallback().

PlmeEdConfirmCallback ns3::LrWpanPhy::m_plmeEdConfirmCallback
private

This callback is used to report ED status to the MAC.

See IEEE 802.15.4-2006, section 6.2.2.4.

Definition at line 750 of file lr-wpan-phy.h.

Referenced by CancelEd(), DoDispose(), EndEd(), PlmeEdRequest(), and SetPlmeEdConfirmCallback().

PlmeGetAttributeConfirmCallback ns3::LrWpanPhy::m_plmeGetAttributeConfirmCallback
private

This callback is used to report requested attribute values back to the MAC.

See IEEE 802.15.4-2006, section 6.2.2.6.

Definition at line 756 of file lr-wpan-phy.h.

Referenced by DoDispose(), PlmeGetAttributeRequest(), and SetPlmeGetAttributeConfirmCallback().

PlmeSetAttributeConfirmCallback ns3::LrWpanPhy::m_plmeSetAttributeConfirmCallback
private

This callback is used to report attribute set results back to the MAC.

See IEEE 802.15.4-2006, section 6.2.2.10.

Definition at line 768 of file lr-wpan-phy.h.

Referenced by DoDispose(), PlmeSetAttributeRequest(), and SetPlmeSetAttributeConfirmCallback().

PlmeSetTRXStateConfirmCallback ns3::LrWpanPhy::m_plmeSetTRXStateConfirmCallback
private

This callback is used to report transceiver state change status to the MAC.

See IEEE 802.15.4-2006, section 6.2.2.8.

Definition at line 762 of file lr-wpan-phy.h.

Referenced by DoDispose(), EndRx(), EndSetTRXState(), EndTx(), PlmeSetAttributeRequest(), PlmeSetTRXStateRequest(), and SetPlmeSetTRXStateConfirmCallback().

Ptr<UniformRandomVariable> ns3::LrWpanPhy::m_random
private

Uniform random variable stream.

Definition at line 841 of file lr-wpan-phy.h.

Referenced by AssignStreams(), CheckInterference(), and LrWpanPhy().

Time ns3::LrWpanPhy::m_rxLastUpdate
private

Timestamp of the last calculation of the PER of a packet currently received.

Definition at line 800 of file lr-wpan-phy.h.

Referenced by CheckInterference(), LrWpanPhy(), and StartRx().

double ns3::LrWpanPhy::m_rxSensitivity
private

The receiver sensitivity.

Definition at line 788 of file lr-wpan-phy.h.

Referenced by EndCca(), EndEd(), and LrWpanPhy().

EventId ns3::LrWpanPhy::m_setTRXState
private

Scheduler event of a currently running deferred transceiver state switch.

Definition at line 831 of file lr-wpan-phy.h.

Referenced by DoDispose(), EndRx(), EndTx(), PdDataRequest(), PlmeSetAttributeRequest(), PlmeSetTRXStateRequest(), and StartRx().

Ptr<LrWpanInterferenceHelper> ns3::LrWpanPhy::m_signal
private

The accumulated signals currently received by the transceiver, including the signal of a possibly received packet, as well as all signals considered noise.

Definition at line 795 of file lr-wpan-phy.h.

Referenced by CheckInterference(), DoDispose(), EndCca(), EndEd(), EndRx(), LrWpanPhy(), and StartRx().

TracedCallback<Time, LrWpanPhyEnumeration, LrWpanPhyEnumeration> ns3::LrWpanPhy::m_trxStateLogger
private

The trace source fired when the phy layer changes the transceiver state.

See also
class CallBackTraceSource
Deprecated:
The LrWpanPhyEnumeration state is now accessible as the TracedValue TrxStateValue. This TracedCallback will be removed in a future release.

Definition at line 673 of file lr-wpan-phy.h.

Referenced by ChangeTrxState(), and GetTypeId().

LrWpanPhyEnumeration ns3::LrWpanPhy::m_trxStatePending
private

The next pending state to applied after the current action of the PHY is completed.

Definition at line 725 of file lr-wpan-phy.h.

Referenced by DoDispose(), EndRx(), EndSetTRXState(), EndTx(), LrWpanPhy(), PlmeSetAttributeRequest(), and PlmeSetTRXStateRequest().

Ptr<SpectrumValue> ns3::LrWpanPhy::m_txPsd
private

The transmit power spectral density.

Definition at line 698 of file lr-wpan-phy.h.

Referenced by DoDispose(), GetRxSpectrumModel(), LrWpanPhy(), PdDataRequest(), PlmeSetAttributeRequest(), and SetTxPowerSpectralDensity().

const LrWpanPhyPpduHeaderSymbolNumber ns3::LrWpanPhy::ppduHeaderSymbolNumbers
staticprotected
Initial value:
= { { 32.0, 8.0, 8.0},
{ 32.0, 8.0, 8.0},
{ 2.0, 1.0, 0.4},
{ 6.0, 1.0, 1.6},
{ 8.0, 2.0, 2.0},
{ 8.0, 2.0, 2.0},
{ 8.0, 2.0, 2.0}}

The preamble, SFD, and PHR lengths in symbols for the different PHY options.

See Table 19 and Table 20 in section 6.3 IEEE 802.15.4-2006

Definition at line 502 of file lr-wpan-phy.h.

Referenced by GetPhySHRDuration(), and GetPpduHeaderTxTime().


The documentation for this class was generated from the following files: