A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LR-WPAN models

This section documents the API of the IEEE 802.15.4-related models. More...

Classes

class  ns3::LrWpanCsmaCa
 This class is a helper for the LrWpanMac to manage the Csma/CA state machine according to IEEE 802.15.4-2006, section 7.5.1.4. More...
 
struct  ns3::LrWpanEdPower
 Helper structure to manage the power measurement during ED. More...
 
class  ns3::LrWpanErrorModel
 Model the error rate for IEEE 802.15.4 2.4 GHz AWGN channel for OQPSK the model description can be found in IEEE Std 802.15.4-2006, section E.4.1.7. More...
 
class  ns3::LrWpanHelper
 helps to manage and create IEEE 802.15.4 NetDevice objects More...
 
class  ns3::LrWpanInterferenceHelper
 This class provides helper functions for LrWpan interference handling. More...
 
class  ns3::LrWpanMac
 Class that implements the LR-WPAN Mac state machine. More...
 
class  ns3::LrWpanMacHeader
 Represent the Mac Header with the Frame Control and Sequence Number fields. More...
 
class  ns3::LrWpanMacTrailer
 Represent the Mac Trailer with the Frame Check Sequence field. More...
 
class  ns3::LrWpanNetDevice
 Network layer to device interface. More...
 
class  ns3::LrWpanPhy
 Make LrWpanPhy a SpectrumPhy so we can enable the eventual modeling of device interference. More...
 
struct  ns3::LrWpanPhyDataAndSymbolRates
 This data structure provides the Bit rate and Symbol rate for a given channel See IEEE802.15.4-2006 Table 1 and 2 in section 6.1.1 and 6.1.2. More...
 
struct  ns3::LrWpanPhyPibAttributes
 IEEE802.15.4-2006 PHY PIB Attributes Table 23 in section 6.4.2. More...
 
struct  ns3::LrWpanPhyPpduHeaderSymbolNumber
 This data structure provides number of symbols for the PPDU headers: SHR and PHR See IEEE802.15.4-2006 Figure 16, Table 19 and 20 in section 6.3. More...
 
class  ns3::LrWpanSpectrumModelInitializer
 Helper class used to automatically initialize the LrWpan Spectrum Model objects. More...
 
struct  ns3::LrWpanSpectrumSignalParameters
 Signal parameters for LrWpan. More...
 
class  ns3::LrWpanSpectrumValueHelper
 This class defines all functions to create spectrum model for LrWpan. More...
 
struct  ns3::McpsDataConfirmParams
 MCPS-DATA.confirm params. More...
 
struct  ns3::McpsDataIndicationParams
 MCPS-DATA.indication params. More...
 
struct  ns3::McpsDataRequestParams
 MCPS-DATA.request params. More...
 

Typedefs

typedef void(* ns3::TracedValueCallback::LrWpanMacState )(LrWpanMacState oldValue, LrWpanMacState newValue)
 TracedValue callback signature for LrWpanMacState. More...
 
typedef void(* ns3::TracedValueCallback::LrWpanPhyEnumeration )(LrWpanPhyEnumeration oldValue, LrWpanPhyEnumeration newValue)
 TracedValue callback signature for LrWpanPhyEnumeration. More...
 
typedef Callback< void,
McpsDataConfirmParams > 
ns3::McpsDataConfirmCallback
 This callback is called after a McpsDataRequest has been called from the higher layer. More...
 
typedef Callback< void,
McpsDataIndicationParams, Ptr
< Packet > > 
ns3::McpsDataIndicationCallback
 This callback is called after a Mcps has successfully received a frame and wants to deliver it to the higher layer. More...
 
typedef Callback< void,
LrWpanPhyEnumeration > 
ns3::PdDataConfirmCallback
 This method implements the PD SAP: PdDataConfirm. More...
 
typedef Callback< void,
uint32_t, Ptr< Packet >
, uint8_t > 
ns3::PdDataIndicationCallback
 This method implements the PD SAP: PdDataIndication. More...
 
typedef Callback< void,
LrWpanPhyEnumeration > 
ns3::PlmeCcaConfirmCallback
 This method implements the PD SAP: PlmeCcaConfirm. More...
 
typedef Callback< void,
LrWpanPhyEnumeration, uint8_t > 
ns3::PlmeEdConfirmCallback
 This method implements the PD SAP: PlmeEdConfirm. More...
 
typedef Callback< void,
LrWpanPhyEnumeration,
LrWpanPibAttributeIdentifier,
LrWpanPhyPibAttributes * > 
ns3::PlmeGetAttributeConfirmCallback
 This method implements the PD SAP: PlmeGetAttributeConfirm. More...
 
typedef Callback< void,
LrWpanPhyEnumeration,
LrWpanPibAttributeIdentifier > 
ns3::PlmeSetAttributeConfirmCallback
 This method implements the PD SAP: PlmeSetAttributeConfirm. More...
 
typedef Callback< void,
LrWpanPhyEnumeration > 
ns3::PlmeSetTRXStateConfirmCallback
 This method implements the PD SAP: PlmeSetTRXStateConfirm. More...
 

Enumerations

enum  ns3::LrWpanAddressMode { ns3::NO_PANID_ADDR = 0, ns3::ADDR_MODE_RESERVED = 1, ns3::SHORT_ADDR = 2, ns3::EXT_ADDR = 3 }
 table 80 of 802.15.4 More...
 
enum  ns3::LrWpanAssociationStatus {
  ns3::ASSOCIATED = 0, ns3::PAN_AT_CAPACITY = 1, ns3::PAN_ACCESS_DENIED = 2, ns3::ASSOCIATED_WITHOUT_ADDRESS = 0xfe,
  ns3::DISASSOCIATED = 0xff
}
 table 83 of 802.15.4 More...
 
enum  ns3::LrWpanMacState {
  ns3::MAC_IDLE, ns3::MAC_CSMA, ns3::MAC_SENDING, ns3::MAC_ACK_PENDING,
  ns3::CHANNEL_ACCESS_FAILURE, ns3::CHANNEL_IDLE, ns3::SET_PHY_TX_ON
}
 MAC states. More...
 
enum  ns3::LrWpanMcpsDataConfirmStatus {
  ns3::IEEE_802_15_4_SUCCESS = 0, ns3::IEEE_802_15_4_TRANSACTION_OVERFLOW = 1, ns3::IEEE_802_15_4_TRANSACTION_EXPIRED = 2, ns3::IEEE_802_15_4_CHANNEL_ACCESS_FAILURE = 3,
  ns3::IEEE_802_15_4_INVALID_ADDRESS = 4, ns3::IEEE_802_15_4_INVALID_GTS = 5, ns3::IEEE_802_15_4_NO_ACK = 6, ns3::IEEE_802_15_4_COUNTER_ERROR = 7,
  ns3::IEEE_802_15_4_FRAME_TOO_LONG = 8, ns3::IEEE_802_15_4_UNAVAILABLE_KEY = 9, ns3::IEEE_802_15_4_UNSUPPORTED_SECURITY = 10, ns3::IEEE_802_15_4_INVALID_PARAMETER = 11
}
 Table 42 of 802.15.4-2006. More...
 
enum  ns3::LrWpanPhyEnumeration {
  ns3::IEEE_802_15_4_PHY_BUSY = 0x00, ns3::IEEE_802_15_4_PHY_BUSY_RX = 0x01, ns3::IEEE_802_15_4_PHY_BUSY_TX = 0x02, ns3::IEEE_802_15_4_PHY_FORCE_TRX_OFF = 0x03,
  ns3::IEEE_802_15_4_PHY_IDLE = 0x04, ns3::IEEE_802_15_4_PHY_INVALID_PARAMETER = 0x05, ns3::IEEE_802_15_4_PHY_RX_ON = 0x06, ns3::IEEE_802_15_4_PHY_SUCCESS = 0x07,
  ns3::IEEE_802_15_4_PHY_TRX_OFF = 0x08, ns3::IEEE_802_15_4_PHY_TX_ON = 0x09, ns3::IEEE_802_15_4_PHY_UNSUPPORTED_ATTRIBUTE = 0xa, ns3::IEEE_802_15_4_PHY_READ_ONLY = 0xb,
  ns3::IEEE_802_15_4_PHY_UNSPECIFIED = 0xc
}
 IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3. More...
 
enum  ns3::LrWpanPhyOption {
  ns3::IEEE_802_15_4_868MHZ_BPSK = 0, ns3::IEEE_802_15_4_915MHZ_BPSK = 1, ns3::IEEE_802_15_4_868MHZ_ASK = 2, ns3::IEEE_802_15_4_915MHZ_ASK = 3,
  ns3::IEEE_802_15_4_868MHZ_OQPSK = 4, ns3::IEEE_802_15_4_915MHZ_OQPSK = 5, ns3::IEEE_802_15_4_2_4GHZ_OQPSK = 6, ns3::IEEE_802_15_4_INVALID_PHY_OPTION = 7
}
 This Phy option will be used to index various Tables in IEEE802.15.4-2006. More...
 
enum  ns3::LrWpanPibAttributeIdentifier {
  ns3::phyCurrentChannel = 0x00, ns3::phyChannelsSupported = 0x01, ns3::phyTransmitPower = 0x02, ns3::phyCCAMode = 0x03,
  ns3::phyCurrentPage = 0x04, ns3::phyMaxFrameDuration = 0x05, ns3::phySHRDuration = 0x06, ns3::phySymbolsPerOctet = 0x07
}
 IEEE802.15.4-2006 PHY PIB Attribute Identifiers Table 23 in section 6.4.2. More...
 
enum  ns3::LrWpanTxOption { ns3::TX_OPTION_NONE = 0, ns3::TX_OPTION_ACK = 1, ns3::TX_OPTION_GTS = 2, ns3::TX_OPTION_INDIRECT = 4 }
 Tx options. More...
 

Variables

class
ns3::LrWpanSpectrumModelInitializer 
ns3::g_LrWpanSpectrumModelInitializerInstance
 Global object used to initialize the LrWpan Spectrum Model. More...
 

Detailed Description

This section documents the API of the IEEE 802.15.4-related models.

For a generic functional description, please refer to the ns-3 manual.

Typedef Documentation

typedef void(* ns3::TracedValueCallback::LrWpanMacState)(LrWpanMacState oldValue, LrWpanMacState newValue)

TracedValue callback signature for LrWpanMacState.

Parameters
[in]oldValueoriginal value of the traced variable
[in]newValuenew value of the traced variable

Definition at line 87 of file lr-wpan-mac.h.

typedef void(* ns3::TracedValueCallback::LrWpanPhyEnumeration)(LrWpanPhyEnumeration oldValue, LrWpanPhyEnumeration newValue)

TracedValue callback signature for LrWpanPhyEnumeration.

Parameters
[in]oldValueoriginal value of the traced variable
[in]newValuenew value of the traced variable

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

typedef Callback<void, McpsDataConfirmParams> ns3::McpsDataConfirmCallback

This callback is called after a McpsDataRequest has been called from the higher layer.

It returns a status of the outcome of the transmission request

Definition at line 200 of file lr-wpan-mac.h.

typedef Callback<void, McpsDataIndicationParams, Ptr<Packet> > ns3::McpsDataIndicationCallback

This callback is called after a Mcps has successfully received a frame and wants to deliver it to the higher layer.

Todo:
for now, we do not deliver all of the parameters in section 7.1.1.3.1 but just send up the packet.

Definition at line 211 of file lr-wpan-mac.h.

typedef Callback< void, LrWpanPhyEnumeration > ns3::PdDataConfirmCallback

This method implements the PD SAP: PdDataConfirm.

Parameters
statusthe status to be transmitted

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

typedef Callback< void, uint32_t, Ptr<Packet>, uint8_t > ns3::PdDataIndicationCallback

This method implements the PD SAP: PdDataIndication.

Parameters
psduLengthnumber of bytes in the PSDU
pthe packet to be transmitted
lqiLink quality (LQI) value measured during reception of the PPDU

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

typedef Callback< void, LrWpanPhyEnumeration > ns3::PlmeCcaConfirmCallback

This method implements the PD SAP: PlmeCcaConfirm.

Parameters
statusthe status of CCA

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

typedef Callback< void, LrWpanPhyEnumeration,uint8_t > ns3::PlmeEdConfirmCallback

This method implements the PD SAP: PlmeEdConfirm.

Parameters
statusthe status of ED
energyLevelthe energy level of ED

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

typedef Callback< void, LrWpanPhyEnumeration, LrWpanPibAttributeIdentifier, LrWpanPhyPibAttributes* > ns3::PlmeGetAttributeConfirmCallback

This method implements the PD SAP: PlmeGetAttributeConfirm.

Parameters
statusthe status of PlmeGetAttributeRequest
idthe identifier of attribute
attributethe pointer to attribute struct

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

typedef Callback< void, LrWpanPhyEnumeration, LrWpanPibAttributeIdentifier > ns3::PlmeSetAttributeConfirmCallback

This method implements the PD SAP: PlmeSetAttributeConfirm.

Parameters
statusthe status of PlmeSetAttributeRequest
idthe identifier of attribute

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

typedef Callback< void, LrWpanPhyEnumeration > ns3::PlmeSetTRXStateConfirmCallback

This method implements the PD SAP: PlmeSetTRXStateConfirm.

Parameters
statusthe status of PlmeSetTRXStateRequest

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

Enumeration Type Documentation

table 80 of 802.15.4

Enumerator
NO_PANID_ADDR 
ADDR_MODE_RESERVED 
SHORT_ADDR 
EXT_ADDR 

Definition at line 97 of file lr-wpan-mac.h.

table 83 of 802.15.4

Enumerator
ASSOCIATED 
PAN_AT_CAPACITY 
PAN_ACCESS_DENIED 
ASSOCIATED_WITHOUT_ADDRESS 
DISASSOCIATED 

Definition at line 110 of file lr-wpan-mac.h.

MAC states.

Enumerator
MAC_IDLE 

MAC_IDLE.

MAC_CSMA 

MAC_CSMA.

MAC_SENDING 

MAC_SENDING.

MAC_ACK_PENDING 

MAC_ACK_PENDING.

CHANNEL_ACCESS_FAILURE 

CHANNEL_ACCESS_FAILURE.

CHANNEL_IDLE 

CHANNEL_IDLE.

SET_PHY_TX_ON 

SET_PHY_TX_ON.

Definition at line 67 of file lr-wpan-mac.h.

Table 42 of 802.15.4-2006.

Enumerator
IEEE_802_15_4_SUCCESS 
IEEE_802_15_4_TRANSACTION_OVERFLOW 
IEEE_802_15_4_TRANSACTION_EXPIRED 
IEEE_802_15_4_CHANNEL_ACCESS_FAILURE 
IEEE_802_15_4_INVALID_ADDRESS 
IEEE_802_15_4_INVALID_GTS 
IEEE_802_15_4_NO_ACK 
IEEE_802_15_4_COUNTER_ERROR 
IEEE_802_15_4_FRAME_TOO_LONG 
IEEE_802_15_4_UNAVAILABLE_KEY 
IEEE_802_15_4_UNSUPPORTED_SECURITY 
IEEE_802_15_4_INVALID_PARAMETER 

Definition at line 124 of file lr-wpan-mac.h.

IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3.

Enumerator
IEEE_802_15_4_PHY_BUSY 
IEEE_802_15_4_PHY_BUSY_RX 
IEEE_802_15_4_PHY_BUSY_TX 
IEEE_802_15_4_PHY_FORCE_TRX_OFF 
IEEE_802_15_4_PHY_IDLE 
IEEE_802_15_4_PHY_INVALID_PARAMETER 
IEEE_802_15_4_PHY_RX_ON 
IEEE_802_15_4_PHY_SUCCESS 
IEEE_802_15_4_PHY_TRX_OFF 
IEEE_802_15_4_PHY_TX_ON 
IEEE_802_15_4_PHY_UNSUPPORTED_ATTRIBUTE 
IEEE_802_15_4_PHY_READ_ONLY 
IEEE_802_15_4_PHY_UNSPECIFIED 

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

This Phy option will be used to index various Tables in IEEE802.15.4-2006.

Enumerator
IEEE_802_15_4_868MHZ_BPSK 
IEEE_802_15_4_915MHZ_BPSK 
IEEE_802_15_4_868MHZ_ASK 
IEEE_802_15_4_915MHZ_ASK 
IEEE_802_15_4_868MHZ_OQPSK 
IEEE_802_15_4_915MHZ_OQPSK 
IEEE_802_15_4_2_4GHZ_OQPSK 
IEEE_802_15_4_INVALID_PHY_OPTION 

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

IEEE802.15.4-2006 PHY PIB Attribute Identifiers Table 23 in section 6.4.2.

Enumerator
phyCurrentChannel 
phyChannelsSupported 
phyTransmitPower 
phyCCAMode 
phyCurrentPage 
phyMaxFrameDuration 
phySHRDuration 
phySymbolsPerOctet 

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

Tx options.

Enumerator
TX_OPTION_NONE 

TX_OPTION_NONE.

TX_OPTION_ACK 

TX_OPTION_ACK.

TX_OPTION_GTS 

TX_OPTION_GTS.

TX_OPTION_INDIRECT 

TX_OPTION_INDIRECT.

Definition at line 54 of file lr-wpan-mac.h.

Variable Documentation

class ns3::LrWpanSpectrumModelInitializer ns3::g_LrWpanSpectrumModelInitializerInstance

Global object used to initialize the LrWpan Spectrum Model.