Make LrWpanPhy a SpectrumPhy so we can enable the eventual modeling of device interference. More...
#include "lr-wpan-phy.h"
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< SpectrumChannel > | GetChannel (void) |
Get the currently attached channel. More... | |
double | GetDataOrSymbolRate (bool isData) |
implement PLME SetAttribute confirm SAP More... | |
Ptr< NetDevice > | GetDevice (void) const |
Get the associated NetDevice instance. More... | |
Ptr< LrWpanErrorModel > | GetErrorModel (void) const |
get the error model in use More... | |
Ptr< MobilityModel > | GetMobility (void) |
Get the associated MobilityModel instance. More... | |
Ptr< const SpectrumValue > | GetNoisePowerSpectralDensity (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< AntennaModel > | GetRxAntenna (void) |
Get the AntennaModel used by the NetDevice for reception. More... | |
virtual Ptr< const SpectrumModel > | GetRxSpectrumModel (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 |
Get the most derived TypeId for this Object. 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 () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. 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::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< AntennaModel > | m_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< SpectrumChannel > | m_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< NetDevice > | m_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< LrWpanErrorModel > | m_errorModel |
The error model describing the bit and packet error rates. More... | |
Ptr< MobilityModel > | m_mobility |
The mobility model used by the PHY. More... | |
Ptr< const SpectrumValue > | m_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< UniformRandomVariable > | m_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< LrWpanInterferenceHelper > | m_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< LrWpanPhyEnumeration > | m_trxState |
The current transceiver state. More... | |
TracedCallback< Time, LrWpanPhyEnumeration, LrWpanPhyEnumeration > | m_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< SpectrumValue > | m_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... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Make LrWpanPhy a SpectrumPhy so we can enable the eventual modeling of device interference.
ns3::LrWpanPhy is accessible through the following paths with Config::Set and Config::Connect:
No Attributes are defined for this type.
Size of this type is 712 bytes (on a 64-bit architecture).
Definition at line 247 of file lr-wpan-phy.h.
|
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.
[in] | time | The time of the state change. |
[in] | oldState | The old state. |
[in] | newState | The new state. |
TrxStateValue
. The TrxState
TracedCallback will be removed in a future release. Definition at line 490 of file lr-wpan-phy.h.
ns3::LrWpanPhy::LrWpanPhy | ( | void | ) |
Default constructor.
Definition at line 123 of file lr-wpan-phy.cc.
References ns3::LrWpanEdPower::averagePower, ChangeTrxState(), ns3::LrWpanSpectrumValueHelper::CreateNoisePowerSpectralDensity(), ns3::LrWpanSpectrumValueHelper::CreateTxPowerSpectralDensity(), ns3::IEEE_802_15_4_PHY_IDLE, ns3::IEEE_802_15_4_PHY_TRX_OFF, ns3::LrWpanEdPower::lastUpdate, m_currentRxPacket, m_currentTxPacket, m_edPower, m_errorModel, m_noise, m_phyPIBAttributes, m_random, m_rxLastUpdate, m_rxSensitivity, m_signal, m_trxState, m_trxStatePending, m_txPsd, ns3::LrWpanEdPower::measurementLength, ns3::LrWpanPhyPibAttributes::phyCCAMode, ns3::LrWpanPhyPibAttributes::phyChannelsSupported, ns3::LrWpanPhyPibAttributes::phyCurrentChannel, ns3::LrWpanPhyPibAttributes::phyCurrentPage, ns3::LrWpanPhyPibAttributes::phyTransmitPower, ns3::Seconds(), ns3::ObjectBase::SetAttribute(), and SetMyPhyOption().
|
virtual |
Definition at line 168 of file lr-wpan-phy.cc.
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.
stream | first stream index to use |
Definition at line 1420 of file lr-wpan-phy.cc.
References m_random, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().
Calculate the time required for sending the given packet, including preamble, SFD and PHR.
packet | the packet for which the transmission time should be calculated |
Definition at line 1256 of file lr-wpan-phy.cc.
References GetDataOrSymbolRate(), GetPpduHeaderTxTime(), ns3::Packet::GetSize(), NS_LOG_FUNCTION, and ns3::Seconds().
Referenced by PdDataRequest().
|
private |
Cancel an ongoing ED procedure.
This is called when the transceiver is switched off or set to TX mode. This calls the appropriate confirm callback of the MAC.
state | the new state which is the cause for canceling ED |
Definition at line 1063 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().
|
private |
Change the PHY state to the given new state, firing the state change trace.
newState | the new state |
Definition at line 1046 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().
|
private |
Check if the given channel is supported by the PHY.
channel | the channel to check |
Definition at line 875 of file lr-wpan-phy.cc.
References third::channel, m_phyPIBAttributes, NS_LOG_FUNCTION, and ns3::LrWpanPhyPibAttributes::phyChannelsSupported.
Referenced by PlmeSetAttributeRequest().
|
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().
|
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 overridden 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.
|
private |
Called at the end of the CCA.
The channel condition (busy or idle) is reported to the MAC or CSMA/CA.
Definition at line 1111 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_IDLE, ns3::IEEE_802_15_4_PHY_UNSPECIFIED, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_ccaPeakPower, m_phyPIBAttributes, m_plmeCcaConfirmCallback, m_rxSensitivity, m_signal, m_trxState, NS_ASSERT_MSG(), NS_LOG_FUNCTION, NS_LOG_LOGIC(), ns3::LrWpanPhyPibAttributes::phyCCAMode, ns3::LrWpanPhyPibAttributes::phyCurrentChannel, PhyIsBusy(), and ns3::LrWpanSpectrumValueHelper::TotalAvgPower().
Referenced by PlmeCcaRequest().
|
private |
Called at the end of the ED procedure.
The average energy detected is reported to the MAC.
Definition at line 1079 of file lr-wpan-phy.cc.
References ns3::LrWpanEdPower::averagePower, ns3::Time::GetTimeStep(), ns3::IEEE_802_15_4_PHY_SUCCESS, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), ns3::LrWpanEdPower::lastUpdate, m_edPower, m_phyPIBAttributes, m_plmeEdConfirmCallback, m_rxSensitivity, m_signal, ns3::LrWpanEdPower::measurementLength, ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::LrWpanPhyPibAttributes::phyCurrentChannel, and ns3::LrWpanSpectrumValueHelper::TotalAvgPower().
Referenced by PlmeEdRequest().
|
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.
params | signal 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().
|
private |
Called after applying a deferred transceiver state switch.
The result of the state switch is reported to the MAC.
Definition at line 1185 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().
|
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 1200 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().
Ptr< SpectrumChannel > ns3::LrWpanPhy::GetChannel | ( | void | ) |
Get the currently attached 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
isData | is true for data rate or false for symbol rate |
Definition at line 1269 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().
Get 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
Definition at line 1394 of file lr-wpan-phy.cc.
References m_errorModel, and NS_LOG_FUNCTION.
|
virtual |
Get the associated MobilityModel instance.
Implements ns3::SpectrumPhy.
Definition at line 209 of file lr-wpan-phy.cc.
References m_mobility, and NS_LOG_FUNCTION.
|
private |
Get the currently configured PHY option.
See IEEE 802.15.4-2006, section 6.1.2, Table 2.
Definition at line 1354 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.
Definition at line 1379 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.
Definition at line 1401 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.
Definition at line 1411 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.
|
private |
Calculate the time required for sending the PPDU header, that is the preamble, SFD and PHR.
Definition at line 1290 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().
|
virtual |
Get 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.
|
virtual |
Implements ns3::SpectrumPhy.
Definition at line 249 of file lr-wpan-phy.cc.
References ns3::SpectrumValue::GetSpectrumModel(), m_txPsd, and NS_LOG_FUNCTION.
|
static |
Get the type ID.
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().
IEEE 802.15.4-2006 section 6.2.1.1 PD-DATA.request Request to transfer MPDU from MAC (transmitting)
psduLength | number of bytes in the PSDU |
p | the packet to be transmitted |
Definition at line 523 of file lr-wpan-phy.cc.
References aMaxPhyPacketSize, CalculateTxTime(), ChangeTrxState(), EndTx(), ns3::IEEE_802_15_4_PHY_BUSY_TX, ns3::IEEE_802_15_4_PHY_RX_ON, ns3::IEEE_802_15_4_PHY_TRX_OFF, ns3::IEEE_802_15_4_PHY_TX_ON, ns3::IEEE_802_15_4_PHY_UNSPECIFIED, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), ns3::EventId::IsRunning(), m_antenna, m_channel, m_currentTxPacket, m_pdDataConfirmCallback, m_pdDataRequest, m_phyTxBeginTrace, m_phyTxDropTrace, m_setTRXState, m_trxState, m_txPsd, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Packet::RemovePacketTag(), and ns3::Simulator::Schedule().
Referenced by LrWpanPlmeAndPdInterfaceTestCase::DoRun(), and SendOnePacket().
|
private |
Check if the PHY is busy, which is the case if the PHY is currently sending or receiving a frame.
Definition at line 1054 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().
void ns3::LrWpanPhy::PlmeCcaRequest | ( | void | ) |
IEEE 802.15.4-2006 section 6.2.2.1 PLME-CCA.request Perform a CCA per section 6.9.9.
Definition at line 598 of file lr-wpan-phy.cc.
References EndCca(), GetDataOrSymbolRate(), ns3::IEEE_802_15_4_PHY_BUSY, ns3::IEEE_802_15_4_PHY_BUSY_RX, ns3::IEEE_802_15_4_PHY_RX_ON, ns3::IEEE_802_15_4_PHY_TRX_OFF, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_ccaPeakPower, m_ccaRequest, m_plmeCcaConfirmCallback, m_trxState, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and ns3::Seconds().
void ns3::LrWpanPhy::PlmeEdRequest | ( | void | ) |
IEEE 802.15.4-2006 section 6.2.2.3 PLME-ED.request Perform an ED per section 6.9.7.
Definition at line 625 of file lr-wpan-phy.cc.
References ns3::LrWpanEdPower::averagePower, EndEd(), GetDataOrSymbolRate(), ns3::IEEE_802_15_4_PHY_BUSY_RX, ns3::IEEE_802_15_4_PHY_BUSY_TX, 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(), ns3::LrWpanEdPower::lastUpdate, m_edPower, m_edRequest, m_plmeEdConfirmCallback, m_trxState, ns3::LrWpanEdPower::measurementLength, ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and ns3::Seconds().
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.
id | the attributed identifier |
Definition at line 652 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.
void ns3::LrWpanPhy::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.
id | the attributed identifier |
attribute | the attribute value |
Definition at line 893 of file lr-wpan-phy.cc.
References ns3::EventId::Cancel(), ChannelSupported(), ns3::LrWpanSpectrumValueHelper::CreateTxPowerSpectralDensity(), ns3::IEEE_802_15_4_PHY_IDLE, ns3::IEEE_802_15_4_PHY_INVALID_PARAMETER, ns3::IEEE_802_15_4_PHY_SUCCESS, ns3::IEEE_802_15_4_PHY_TRX_OFF, ns3::IEEE_802_15_4_PHY_UNSUPPORTED_ATTRIBUTE, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_currentRxPacket, m_currentTxPacket, m_pdDataConfirmCallback, m_pdDataRequest, m_phyPIBAttributes, m_plmeSetAttributeConfirmCallback, m_plmeSetTRXStateConfirmCallback, m_setTRXState, m_trxState, m_trxStatePending, m_txPsd, NS_ASSERT, NS_LOG_FUNCTION, ns3::phyCCAMode, ns3::LrWpanPhyPibAttributes::phyCCAMode, ns3::phyChannelsSupported, ns3::LrWpanPhyPibAttributes::phyChannelsSupported, ns3::phyCurrentChannel, ns3::LrWpanPhyPibAttributes::phyCurrentChannel, PhyIsBusy(), ns3::phyTransmitPower, and ns3::LrWpanPhyPibAttributes::phyTransmitPower.
void ns3::LrWpanPhy::PlmeSetTRXStateRequest | ( | LrWpanPhyEnumeration | state | ) |
IEEE 802.15.4-2006 section 6.2.2.7 PLME-SET-TRX-STATE.request Set PHY state.
state | in RX_ON,TRX_OFF,FORCE_TRX_OFF,TX_ON |
Definition at line 687 of file lr-wpan-phy.cc.
References aTurnaroundTime, ns3::EventId::Cancel(), CancelEd(), ChangeTrxState(), EndSetTRXState(), GetDataOrSymbolRate(), ns3::IEEE_802_15_4_PHY_BUSY, ns3::IEEE_802_15_4_PHY_BUSY_RX, ns3::IEEE_802_15_4_PHY_BUSY_TX, ns3::IEEE_802_15_4_PHY_FORCE_TRX_OFF, ns3::IEEE_802_15_4_PHY_IDLE, ns3::IEEE_802_15_4_PHY_RX_ON, ns3::IEEE_802_15_4_PHY_SUCCESS, 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_ccaRequest, m_currentRxPacket, m_currentTxPacket, m_plmeCcaConfirmCallback, m_plmeSetTRXStateConfirmCallback, m_setTRXState, m_trxState, m_trxStatePending, NS_ABORT_IF, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC(), ns3::Simulator::Schedule(), and ns3::Seconds().
void ns3::LrWpanPhy::SetAntenna | ( | Ptr< AntennaModel > | a | ) |
Set the attached antenna.
a | the antenna |
Definition at line 270 of file lr-wpan-phy.cc.
References m_antenna, and NS_LOG_FUNCTION.
|
virtual |
Set the channel attached to this device.
c | the 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().
Set the associated NetDevice instance.
d | the 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
e | pointer to LrWpanErrorModel to use |
Definition at line 1386 of file lr-wpan-phy.cc.
References m_errorModel, NS_ASSERT, and NS_LOG_FUNCTION.
|
virtual |
Set the mobility model associated with this device.
m | the mobility model |
Implements ns3::SpectrumPhy.
Definition at line 225 of file lr-wpan-phy.cc.
References m_mobility, and NS_LOG_FUNCTION.
|
private |
Configure the PHY option according to the current channel and channel page.
See IEEE 802.15.4-2006, section 6.1.2, Table 2.
Definition at line 1308 of file lr-wpan-phy.cc.
References ns3::IEEE_802_15_4_2_4GHZ_OQPSK, ns3::IEEE_802_15_4_868MHZ_ASK, ns3::IEEE_802_15_4_868MHZ_BPSK, ns3::IEEE_802_15_4_868MHZ_OQPSK, ns3::IEEE_802_15_4_915MHZ_ASK, ns3::IEEE_802_15_4_915MHZ_BPSK, ns3::IEEE_802_15_4_915MHZ_OQPSK, ns3::IEEE_802_15_4_INVALID_PHY_OPTION, m_phyOption, m_phyPIBAttributes, NS_LOG_FUNCTION, ns3::LrWpanPhyPibAttributes::phyCurrentChannel, and ns3::LrWpanPhyPibAttributes::phyCurrentPage.
Referenced by LrWpanPhy().
void ns3::LrWpanPhy::SetNoisePowerSpectralDensity | ( | Ptr< const SpectrumValue > | noisePsd | ) |
Set the noise power spectral density.
noisePsd | the Noise Power Spectral Density in power units (Watt, Pascal...) per Hz. |
Definition at line 1370 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.
c | the callback |
Definition at line 1004 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.
c | the callback |
Definition at line 997 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
c | the callback |
Definition at line 1011 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
c | the callback |
Definition at line 1018 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
c | the callback |
Definition at line 1025 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
c | the callback |
Definition at line 1039 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
c | the callback |
Definition at line 1032 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.
txPsd | the Power Spectral Density value |
Definition at line 1361 of file lr-wpan-phy.cc.
References m_txPsd, NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_INFO.
|
virtual |
Notify the SpectrumPhy instance of an incoming waveform.
params | the SpectrumSignalParameters associated with the incoming waveform |
Implements ns3::SpectrumPhy.
Definition at line 277 of file lr-wpan-phy.cc.
References ns3::LrWpanEdPower::averagePower, ChangeTrxState(), CheckInterference(), EndRx(), ns3::Time::GetTimeStep(), ns3::IEEE_802_15_4_PHY_BUSY_RX, ns3::IEEE_802_15_4_PHY_RX_ON, ns3::EventId::IsExpired(), ns3::EventId::IsRunning(), ns3::LrWpanEdPower::lastUpdate, m_ccaPeakPower, m_ccaRequest, m_currentRxPacket, m_edPower, m_edRequest, m_noise, m_phyPIBAttributes, m_phyRxBeginTrace, m_phyRxDropTrace, m_rxLastUpdate, m_setTRXState, m_signal, m_trxState, ns3::LrWpanEdPower::measurementLength, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::LrWpanPhyPibAttributes::phyCurrentChannel, ns3::Simulator::Schedule(), and ns3::LrWpanSpectrumValueHelper::TotalAvgPower().
|
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().
|
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().
|
staticprotected |
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().
|
private |
The antenna used by the transceiver.
Definition at line 694 of file lr-wpan-phy.h.
Referenced by GetRxAntenna(), PdDataRequest(), and SetAntenna().
|
private |
Helper value for the peak power value during CCA.
Definition at line 784 of file lr-wpan-phy.h.
Referenced by EndCca(), PlmeCcaRequest(), and StartRx().
|
private |
Scheduler event of a currently running CCA request.
Definition at line 822 of file lr-wpan-phy.h.
Referenced by PlmeCcaRequest(), PlmeSetTRXStateRequest(), and StartRx().
|
private |
The channel attached to this transceiver.
Definition at line 689 of file lr-wpan-phy.h.
Referenced by DoDispose(), GetChannel(), PdDataRequest(), and SetChannel().
|
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 809 of file lr-wpan-phy.h.
Referenced by CheckInterference(), EndRx(), LrWpanPhy(), PlmeSetAttributeRequest(), PlmeSetTRXStateRequest(), and StartRx().
|
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 817 of file lr-wpan-phy.h.
Referenced by EndTx(), LrWpanPhy(), PdDataRequest(), PlmeSetAttributeRequest(), and PlmeSetTRXStateRequest().
The configured net device.
Definition at line 684 of file lr-wpan-phy.h.
Referenced by DoDispose(), EndRx(), GetDevice(), and SetDevice().
|
private |
Helper value for tracking the average power during ED.
Definition at line 779 of file lr-wpan-phy.h.
Referenced by EndEd(), EndRx(), LrWpanPhy(), PlmeEdRequest(), and StartRx().
|
private |
Scheduler event of a currently running ED request.
Definition at line 827 of file lr-wpan-phy.h.
Referenced by CancelEd(), EndRx(), PlmeEdRequest(), and StartRx().
|
private |
The error model describing the bit and packet error rates.
Definition at line 709 of file lr-wpan-phy.h.
Referenced by CheckInterference(), DoDispose(), GetErrorModel(), LrWpanPhy(), and SetErrorModel().
|
private |
The mobility model used by the PHY.
Definition at line 679 of file lr-wpan-phy.h.
Referenced by DoDispose(), GetMobility(), and SetMobility().
|
private |
The spectral density for for the noise.
Definition at line 704 of file lr-wpan-phy.h.
Referenced by CheckInterference(), DoDispose(), GetNoisePowerSpectralDensity(), LrWpanPhy(), SetNoisePowerSpectralDensity(), and StartRx().
|
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 739 of file lr-wpan-phy.h.
Referenced by DoDispose(), EndTx(), PdDataRequest(), PlmeSetAttributeRequest(), and SetPdDataConfirmCallback().
|
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 733 of file lr-wpan-phy.h.
Referenced by DoDispose(), EndRx(), and SetPdDataIndicationCallback().
|
private |
Scheduler event of a currently running data transmission request.
Definition at line 837 of file lr-wpan-phy.h.
Referenced by PdDataRequest(), and PlmeSetAttributeRequest().
|
private |
The currently configured PHY type.
Definition at line 774 of file lr-wpan-phy.h.
Referenced by GetDataOrSymbolRate(), GetMyPhyOption(), GetPhySHRDuration(), GetPhySymbolsPerOctet(), GetPpduHeaderTxTime(), and SetMyPhyOption().
|
private |
The current PHY PIB attributes.
Definition at line 714 of file lr-wpan-phy.h.
Referenced by ChannelSupported(), CheckInterference(), EndCca(), EndEd(), EndRx(), LrWpanPhy(), PlmeGetAttributeRequest(), PlmeSetAttributeRequest(), SetMyPhyOption(), and StartRx().
|
private |
The trace source fired when a packet begins the reception process from the medium.
Definition at line 649 of file lr-wpan-phy.h.
Referenced by GetTypeId(), and StartRx().
|
private |
The trace source fired when the phy layer drops a packet it has received.
Definition at line 664 of file lr-wpan-phy.h.
Referenced by EndRx(), GetTypeId(), and StartRx().
|
private |
The trace source fired when a packet ends the reception process from the medium.
Second quantity is received SINR.
Definition at line 657 of file lr-wpan-phy.h.
Referenced by EndRx(), and GetTypeId().
|
private |
The trace source fired when a packet begins the transmission process on the medium.
Definition at line 625 of file lr-wpan-phy.h.
Referenced by GetTypeId(), and PdDataRequest().
|
private |
The trace source fired when the phy layer drops a packet as it tries to transmit it.
Definition at line 641 of file lr-wpan-phy.h.
Referenced by EndTx(), GetTypeId(), and PdDataRequest().
|
private |
The trace source fired when a packet ends the transmission process on the medium.
Definition at line 633 of file lr-wpan-phy.h.
Referenced by EndTx(), and GetTypeId().
|
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 745 of file lr-wpan-phy.h.
Referenced by DoDispose(), EndCca(), PlmeCcaRequest(), PlmeSetTRXStateRequest(), and SetPlmeCcaConfirmCallback().
|
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 751 of file lr-wpan-phy.h.
Referenced by CancelEd(), DoDispose(), EndEd(), PlmeEdRequest(), and SetPlmeEdConfirmCallback().
|
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 757 of file lr-wpan-phy.h.
Referenced by DoDispose(), PlmeGetAttributeRequest(), and SetPlmeGetAttributeConfirmCallback().
|
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 769 of file lr-wpan-phy.h.
Referenced by DoDispose(), PlmeSetAttributeRequest(), and SetPlmeSetAttributeConfirmCallback().
|
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 763 of file lr-wpan-phy.h.
Referenced by DoDispose(), EndRx(), EndSetTRXState(), EndTx(), PlmeSetAttributeRequest(), PlmeSetTRXStateRequest(), and SetPlmeSetTRXStateConfirmCallback().
|
private |
Uniform random variable stream.
Definition at line 842 of file lr-wpan-phy.h.
Referenced by AssignStreams(), CheckInterference(), and LrWpanPhy().
|
private |
Timestamp of the last calculation of the PER of a packet currently received.
Definition at line 801 of file lr-wpan-phy.h.
Referenced by CheckInterference(), LrWpanPhy(), and StartRx().
|
private |
The receiver sensitivity.
Definition at line 789 of file lr-wpan-phy.h.
Referenced by EndCca(), EndEd(), and LrWpanPhy().
|
private |
Scheduler event of a currently running deferred transceiver state switch.
Definition at line 832 of file lr-wpan-phy.h.
Referenced by DoDispose(), EndRx(), EndTx(), PdDataRequest(), PlmeSetAttributeRequest(), PlmeSetTRXStateRequest(), and StartRx().
|
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 796 of file lr-wpan-phy.h.
Referenced by CheckInterference(), DoDispose(), EndCca(), EndEd(), EndRx(), LrWpanPhy(), and StartRx().
|
private |
The current transceiver state.
Definition at line 720 of file lr-wpan-phy.h.
Referenced by ChangeTrxState(), CheckInterference(), DoDispose(), EndCca(), EndSetTRXState(), EndTx(), GetTypeId(), LrWpanPhy(), PdDataRequest(), PhyIsBusy(), PlmeCcaRequest(), PlmeEdRequest(), PlmeSetAttributeRequest(), PlmeSetTRXStateRequest(), and StartRx().
|
private |
The trace source fired when the phy layer changes the transceiver state.
TrxStateValue
. This TracedCallback will be removed in a future release. Definition at line 674 of file lr-wpan-phy.h.
Referenced by ChangeTrxState(), and GetTypeId().
|
private |
The next pending state to applied after the current action of the PHY is completed.
Definition at line 726 of file lr-wpan-phy.h.
Referenced by DoDispose(), EndRx(), EndSetTRXState(), EndTx(), LrWpanPhy(), PlmeSetAttributeRequest(), and PlmeSetTRXStateRequest().
|
private |
The transmit power spectral density.
Definition at line 699 of file lr-wpan-phy.h.
Referenced by DoDispose(), GetRxSpectrumModel(), LrWpanPhy(), PdDataRequest(), PlmeSetAttributeRequest(), and SetTxPowerSpectralDensity().
|
staticprotected |
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().