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...
#include "lr-wpan-csmaca.h"
Public Member Functions | |
LrWpanCsmaCa () | |
Default constructor. | |
LrWpanCsmaCa (const LrWpanCsmaCa &)=delete | |
~LrWpanCsmaCa () override | |
int64_t | AssignStreams (int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. | |
void | Cancel () |
Cancel CSMA-CA algorithm. | |
void | CanProceed () |
In the slotted CSMA-CA, after random backoff, determine if the remaining CSMA-CA operation can proceed, i.e. | |
void | DeferCsmaTimeout () |
The CSMA algorithm call this function at the end of the CAP to return the MAC state back to to IDLE after a transmission was deferred due to the lack of time in the CAP. | |
bool | GetBatteryLifeExtension () const |
Get the value of the Battery Life Extension. | |
Ptr< LrWpanMac > | GetMac () const |
Get the MAC to which this CSMA/CA implementation is attached to. | |
uint8_t | GetMacMaxBE () const |
Get the maximum backoff exponent value. | |
uint8_t | GetMacMaxCSMABackoffs () const |
Get the maximum number of backoffs. | |
uint8_t | GetMacMinBE () const |
Get the minimum backoff exponent value. | |
uint8_t | GetNB () const |
Get the number of CSMA retries. | |
Time | GetTimeToNextSlot () const |
Locates the time to the next backoff period boundary in the SUPERFRAME and returns the amount of time left to this moment. | |
bool | IsSlottedCsmaCa () const |
Check if the slotted CSMA/CA version is being used. | |
bool | IsUnSlottedCsmaCa () const |
Check if the unslotted CSMA/CA version is being used. | |
LrWpanCsmaCa & | operator= (const LrWpanCsmaCa &)=delete |
void | PlmeCcaConfirm (PhyEnumeration status) |
IEEE 802.15.4-2006 section 6.2.2.2 PLME-CCA.confirm status. | |
void | RandomBackoffDelay () |
In step 2 of the CSMA-CA, perform a random backoff in the range of 0 to 2^BE -1. | |
void | RequestCCA () |
Request the Phy to perform CCA (Step 3) | |
void | SetBatteryLifeExtension (bool batteryLifeExtension) |
Set the value of the Battery Life Extension. | |
void | SetLrWpanMacStateCallback (LrWpanMacStateCallback macState) |
Set the callback function to the MAC. | |
void | SetLrWpanMacTransCostCallback (LrWpanMacTransCostCallback trans) |
Set the callback function to report a transaction cost in slotted CSMA-CA. | |
void | SetMac (Ptr< LrWpanMac > mac) |
Set the MAC to which this CSMA/CA implementation is attached to. | |
void | SetMacMaxBE (uint8_t macMaxBE) |
Set the maximum backoff exponent value. | |
void | SetMacMaxCSMABackoffs (uint8_t macMaxCSMABackoffs) |
Set the maximum number of backoffs. | |
void | SetMacMinBE (uint8_t macMinBE) |
Set the minimum backoff exponent value. | |
void | SetSlottedCsmaCa () |
Configure for the use of the slotted CSMA/CA version. | |
void | SetUnSlottedCsmaCa () |
Configure for the use of the unslotted CSMA/CA version. | |
void | Start () |
Start CSMA-CA algorithm (step 1), initialize NB, BE for both slotted and unslotted CSMA-CA. | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
void | UnidirectionalAggregateObject (Ptr< Object > other) |
Aggregate an Object to another Object. | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. | |
Private Member Functions | |
void | DoDispose () override |
Destructor implementation. | |
Time | GetTimeLeftInCap () |
Get the time left in the CAP portion of the Outgoing or Incoming superframe. | |
Private Attributes | |
uint8_t | m_BE |
Backoff exponent. | |
EventId | m_canProceedEvent |
Scheduler event for checking if we can complete the transmission before the end of the CAP. | |
bool | m_ccaRequestRunning |
Flag indicating that the PHY is currently running a CCA. | |
bool | m_coorDest |
Indicates whether the CSMA procedure is targeted for a message to be sent to the coordinator. | |
uint8_t | m_CW |
Contention window length (used in slotted ver only). | |
EventId | m_endCapEvent |
Scheduler event for the end of the current CAP. | |
bool | m_isSlotted |
Beacon-enabled slotted or nonbeacon-enabled unslotted CSMA-CA. | |
LrWpanMacStateCallback | m_lrWpanMacStateCallback |
The callback to inform the configured MAC of the CSMA/CA result. | |
LrWpanMacTransCostCallback | m_lrWpanMacTransCostCallback |
The callback to inform the cost of a transaction in slotted CSMA-CA. | |
Ptr< LrWpanMac > | m_mac |
The MAC instance for which this CSMA/CA implementation is configured. | |
bool | m_macBattLifeExt |
Battery Life Extension. | |
uint8_t | m_macMaxBE |
Maximum backoff exponent. | |
uint8_t | m_macMaxCSMABackoffs |
Maximum number of backoffs. | |
uint8_t | m_macMinBE |
Minimum backoff exponent. | |
uint8_t | m_NB |
Number of backoffs for the current transmission. | |
Ptr< UniformRandomVariable > | m_random |
Uniform random variable stream. | |
EventId | m_randomBackoffEvent |
Scheduler event for the start of the next random backoff/slot. | |
uint64_t | m_randomBackoffPeriodsLeft |
Count the number of remaining random backoff periods left to delay. | |
EventId | m_requestCcaEvent |
Scheduler event when to start the CCA after a random backoff. | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
Related Symbols inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
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.
Definition at line 50 of file lr-wpan-csmaca.h.
ns3::lrwpan::LrWpanCsmaCa::LrWpanCsmaCa | ( | ) |
Default constructor.
Definition at line 45 of file lr-wpan-csmaca.cc.
References ns3::CreateObject(), m_BE, m_ccaRequestRunning, m_coorDest, m_CW, m_isSlotted, m_macBattLifeExt, m_macMaxBE, m_macMaxCSMABackoffs, m_macMinBE, m_NB, m_random, and m_randomBackoffPeriodsLeft.
|
override |
Definition at line 63 of file lr-wpan-csmaca.cc.
References m_mac.
|
delete |
int64_t ns3::lrwpan::LrWpanCsmaCa::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 544 of file lr-wpan-csmaca.cc.
References m_random, and NS_LOG_FUNCTION.
void ns3::lrwpan::LrWpanCsmaCa::Cancel | ( | ) |
Cancel CSMA-CA algorithm.
Definition at line 261 of file lr-wpan-csmaca.cc.
References ns3::EventId::Cancel(), m_canProceedEvent, m_mac, m_randomBackoffEvent, and m_requestCcaEvent.
Referenced by DoDispose().
void ns3::lrwpan::LrWpanCsmaCa::CanProceed | ( | ) |
In the slotted CSMA-CA, after random backoff, determine if the remaining CSMA-CA operation can proceed, i.e.
can the entire transactions can be transmitted before the end of the CAP. This step is performed between step 2 and 3. This step is NOT performed for the unslotted CSMA-CA. If it can proceed function RequestCCA() is called.
Definition at line 362 of file lr-wpan-csmaca.cc.
References ns3::Time::As(), ns3::lrwpan::aTurnaroundTime, DeferCsmaTimeout(), ns3::Time::GetSeconds(), GetTimeLeftInCap(), ns3::Callback< R, UArgs >::IsNull(), m_CW, m_endCapEvent, m_lrWpanMacTransCostCallback, m_mac, m_randomBackoffPeriodsLeft, m_requestCcaEvent, NS_LOG_DEBUG, NS_LOG_FUNCTION, RequestCCA(), ns3::Time::S, ns3::Simulator::Schedule(), ns3::Simulator::ScheduleNow(), and ns3::Seconds().
Referenced by RandomBackoffDelay().
void ns3::lrwpan::LrWpanCsmaCa::DeferCsmaTimeout | ( | ) |
The CSMA algorithm call this function at the end of the CAP to return the MAC state back to to IDLE after a transmission was deferred due to the lack of time in the CAP.
Definition at line 445 of file lr-wpan-csmaca.cc.
References m_lrWpanMacStateCallback, ns3::lrwpan::MAC_CSMA_DEFERRED, and NS_LOG_FUNCTION.
Referenced by CanProceed(), and RandomBackoffDelay().
|
overrideprivatevirtual |
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 69 of file lr-wpan-csmaca.cc.
References Cancel(), m_lrWpanMacStateCallback, m_lrWpanMacTransCostCallback, m_mac, and ns3::MakeNullCallback().
bool ns3::lrwpan::LrWpanCsmaCa::GetBatteryLifeExtension | ( | ) | const |
Get the value of the Battery Life Extension.
Definition at line 558 of file lr-wpan-csmaca.cc.
References m_macBattLifeExt.
Get the MAC to which this CSMA/CA implementation is attached to.
Definition at line 85 of file lr-wpan-csmaca.cc.
References m_mac.
uint8_t ns3::lrwpan::LrWpanCsmaCa::GetMacMaxBE | ( | ) | const |
Get the maximum backoff exponent value.
See IEEE 802.15.4-2006, section 7.4.2, Table 86.
Definition at line 140 of file lr-wpan-csmaca.cc.
References m_macMaxBE, and NS_LOG_FUNCTION.
uint8_t ns3::lrwpan::LrWpanCsmaCa::GetMacMaxCSMABackoffs | ( | ) | const |
Get the maximum number of backoffs.
See IEEE 802.15.4-2006, section 7.4.2, Table 86.
Definition at line 155 of file lr-wpan-csmaca.cc.
References m_macMaxCSMABackoffs, and NS_LOG_FUNCTION.
uint8_t ns3::lrwpan::LrWpanCsmaCa::GetMacMinBE | ( | ) | const |
Get the minimum backoff exponent value.
See IEEE 802.15.4-2006, section 7.4.2, Table 86.
Definition at line 124 of file lr-wpan-csmaca.cc.
References m_macMinBE, and NS_LOG_FUNCTION.
uint8_t ns3::lrwpan::LrWpanCsmaCa::GetNB | ( | ) | const |
Get the number of CSMA retries.
Definition at line 552 of file lr-wpan-csmaca.cc.
References m_NB.
|
private |
Get the time left in the CAP portion of the Outgoing or Incoming superframe.
Definition at line 332 of file lr-wpan-csmaca.cc.
References m_coorDest, m_mac, ns3::Simulator::Now(), and ns3::Seconds().
Referenced by CanProceed(), and RandomBackoffDelay().
Time ns3::lrwpan::LrWpanCsmaCa::GetTimeToNextSlot | ( | ) | const |
Locates the time to the next backoff period boundary in the SUPERFRAME and returns the amount of time left to this moment.
Definition at line 162 of file lr-wpan-csmaca.cc.
References ns3::Time::As(), ns3::lrwpan::aUnitBackoffPeriod, ns3::Time::GetSeconds(), m_coorDest, m_mac, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Time::S, and ns3::Seconds().
Referenced by Start().
|
static |
Get the type ID.
Definition at line 35 of file lr-wpan-csmaca.cc.
References ns3::TypeId::AddDeprecatedName(), and ns3::TypeId::SetParent().
bool ns3::lrwpan::LrWpanCsmaCa::IsSlottedCsmaCa | ( | ) | const |
Check if the slotted CSMA/CA version is being used.
Definition at line 103 of file lr-wpan-csmaca.cc.
References m_isSlotted.
Referenced by PlmeCcaConfirm(), and Start().
bool ns3::lrwpan::LrWpanCsmaCa::IsUnSlottedCsmaCa | ( | ) | const |
Check if the unslotted CSMA/CA version is being used.
Definition at line 109 of file lr-wpan-csmaca.cc.
References m_isSlotted.
Referenced by RandomBackoffDelay().
|
delete |
void ns3::lrwpan::LrWpanCsmaCa::PlmeCcaConfirm | ( | PhyEnumeration | status | ) |
IEEE 802.15.4-2006 section 6.2.2.2 PLME-CCA.confirm status.
status | TRX_OFF, BUSY or IDLE |
When Phy has completed CCA, it calls back here which in turn execute the final steps of the CSMA-CA algorithm. It checks to see if the Channel is idle, if so check the Contention window before permitting transmission (step 5). If channel is busy, either backoff and perform CCA again or treat as channel access failure (step 4).
Definition at line 452 of file lr-wpan-csmaca.cc.
References ns3::lrwpan::CHANNEL_ACCESS_FAILURE, ns3::lrwpan::CHANNEL_IDLE, ns3::lrwpan::IEEE_802_15_4_PHY_IDLE, ns3::Callback< R, UArgs >::IsNull(), IsSlottedCsmaCa(), m_BE, m_ccaRequestRunning, m_CW, m_lrWpanMacStateCallback, m_macMaxBE, m_macMaxCSMABackoffs, m_NB, m_randomBackoffEvent, m_requestCcaEvent, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, RandomBackoffDelay(), RequestCCA(), and ns3::Simulator::ScheduleNow().
Referenced by ns3::lrwpan::LrWpanNetDevice::CompleteConfig().
void ns3::lrwpan::LrWpanCsmaCa::RandomBackoffDelay | ( | ) |
In step 2 of the CSMA-CA, perform a random backoff in the range of 0 to 2^BE -1.
Definition at line 270 of file lr-wpan-csmaca.cc.
References ns3::Time::As(), ns3::lrwpan::aUnitBackoffPeriod, CanProceed(), DeferCsmaTimeout(), ns3::Time::GetSeconds(), GetTimeLeftInCap(), IsUnSlottedCsmaCa(), m_BE, m_canProceedEvent, m_endCapEvent, m_mac, m_random, m_randomBackoffPeriodsLeft, m_requestCcaEvent, NS_LOG_DEBUG, NS_LOG_FUNCTION, RequestCCA(), ns3::Time::S, ns3::Simulator::Schedule(), and ns3::Seconds().
Referenced by PlmeCcaConfirm(), and Start().
void ns3::lrwpan::LrWpanCsmaCa::RequestCCA | ( | ) |
Request the Phy to perform CCA (Step 3)
Definition at line 437 of file lr-wpan-csmaca.cc.
References m_ccaRequestRunning, m_mac, and NS_LOG_FUNCTION.
Referenced by CanProceed(), PlmeCcaConfirm(), and RandomBackoffDelay().
void ns3::lrwpan::LrWpanCsmaCa::SetBatteryLifeExtension | ( | bool | batteryLifeExtension | ) |
Set the value of the Battery Life Extension.
batteryLifeExtension | the Battery Life Extension value active or inactive |
Definition at line 538 of file lr-wpan-csmaca.cc.
References m_macBattLifeExt.
void ns3::lrwpan::LrWpanCsmaCa::SetLrWpanMacStateCallback | ( | LrWpanMacStateCallback | macState | ) |
Set the callback function to the MAC.
Used at the end of a Channel Assessment, as part of the interconnections between the CSMA-CA and the MAC. The callback lets MAC know a channel is either idle or busy.
macState | the mac state callback |
Definition at line 531 of file lr-wpan-csmaca.cc.
References m_lrWpanMacStateCallback, and NS_LOG_FUNCTION.
void ns3::lrwpan::LrWpanCsmaCa::SetLrWpanMacTransCostCallback | ( | LrWpanMacTransCostCallback | trans | ) |
Set the callback function to report a transaction cost in slotted CSMA-CA.
The callback is triggered in CanProceed() after calculating the transaction cost (2 CCA checks,transmission cost, turnAroundTime, ifs) in the boundary of an Active Period.
trans | the transaction cost callback |
Definition at line 524 of file lr-wpan-csmaca.cc.
References m_lrWpanMacTransCostCallback, and NS_LOG_FUNCTION.
Set the MAC to which this CSMA/CA implementation is attached to.
mac | the used MAC |
Definition at line 79 of file lr-wpan-csmaca.cc.
References m_mac.
void ns3::lrwpan::LrWpanCsmaCa::SetMacMaxBE | ( | uint8_t | macMaxBE | ) |
Set the maximum backoff exponent value.
See IEEE 802.15.4-2006, section 7.4.2, Table 86.
macMaxBE | the maximum backoff exponent value |
Definition at line 131 of file lr-wpan-csmaca.cc.
References m_macMaxBE, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
void ns3::lrwpan::LrWpanCsmaCa::SetMacMaxCSMABackoffs | ( | uint8_t | macMaxCSMABackoffs | ) |
Set the maximum number of backoffs.
See IEEE 802.15.4-2006, section 7.4.2, Table 86.
macMaxCSMABackoffs | the maximum number of backoffs |
Definition at line 147 of file lr-wpan-csmaca.cc.
References m_macMaxCSMABackoffs, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
void ns3::lrwpan::LrWpanCsmaCa::SetMacMinBE | ( | uint8_t | macMinBE | ) |
Set the minimum backoff exponent value.
See IEEE 802.15.4-2006, section 7.4.2, Table 86.
macMinBE | the minimum backoff exponent value |
Definition at line 115 of file lr-wpan-csmaca.cc.
References m_macMaxBE, m_macMinBE, ns3::lrwpan::macMinBE, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
void ns3::lrwpan::LrWpanCsmaCa::SetSlottedCsmaCa | ( | ) |
Configure for the use of the slotted CSMA/CA version.
Definition at line 91 of file lr-wpan-csmaca.cc.
References m_isSlotted.
void ns3::lrwpan::LrWpanCsmaCa::SetUnSlottedCsmaCa | ( | ) |
Configure for the use of the unslotted CSMA/CA version.
Definition at line 97 of file lr-wpan-csmaca.cc.
References m_isSlotted.
void ns3::lrwpan::LrWpanCsmaCa::Start | ( | ) |
Start CSMA-CA algorithm (step 1), initialize NB, BE for both slotted and unslotted CSMA-CA.
For slotted CSMA-CA initializes CW and starts the backoff slot count.
Definition at line 216 of file lr-wpan-csmaca.cc.
References GetTimeToNextSlot(), IsSlottedCsmaCa(), m_BE, m_coorDest, m_CW, m_mac, m_macBattLifeExt, m_macMinBE, m_NB, m_randomBackoffEvent, NS_LOG_DEBUG, NS_LOG_FUNCTION, RandomBackoffDelay(), ns3::Simulator::Schedule(), and ns3::Simulator::ScheduleNow().
|
private |
Backoff exponent.
Definition at line 271 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), PlmeCcaConfirm(), RandomBackoffDelay(), and Start().
|
private |
Scheduler event for checking if we can complete the transmission before the end of the CAP.
Definition at line 312 of file lr-wpan-csmaca.h.
Referenced by Cancel(), and RandomBackoffDelay().
|
private |
Flag indicating that the PHY is currently running a CCA.
Used to prevent reporting the channel status to the MAC while canceling the CSMA algorithm.
Definition at line 317 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), PlmeCcaConfirm(), and RequestCCA().
|
private |
Indicates whether the CSMA procedure is targeted for a message to be sent to the coordinator.
Used to run slotted CSMA/CA on the incoming or outgoing superframe according to the target.
Definition at line 323 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), GetTimeLeftInCap(), GetTimeToNextSlot(), and Start().
|
private |
Contention window length (used in slotted ver only).
Definition at line 267 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), CanProceed(), PlmeCcaConfirm(), and Start().
|
private |
Scheduler event for the end of the current CAP.
Definition at line 303 of file lr-wpan-csmaca.h.
Referenced by CanProceed(), and RandomBackoffDelay().
|
private |
Beacon-enabled slotted or nonbeacon-enabled unslotted CSMA-CA.
Definition at line 255 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), IsSlottedCsmaCa(), IsUnSlottedCsmaCa(), SetSlottedCsmaCa(), and SetUnSlottedCsmaCa().
|
private |
The callback to inform the configured MAC of the CSMA/CA result.
Definition at line 251 of file lr-wpan-csmaca.h.
Referenced by DeferCsmaTimeout(), DoDispose(), PlmeCcaConfirm(), and SetLrWpanMacStateCallback().
|
private |
The callback to inform the cost of a transaction in slotted CSMA-CA.
Definition at line 247 of file lr-wpan-csmaca.h.
Referenced by CanProceed(), DoDispose(), and SetLrWpanMacTransCostCallback().
The MAC instance for which this CSMA/CA implementation is configured.
Definition at line 259 of file lr-wpan-csmaca.h.
Referenced by ~LrWpanCsmaCa(), Cancel(), CanProceed(), DoDispose(), GetMac(), GetTimeLeftInCap(), GetTimeToNextSlot(), RandomBackoffDelay(), RequestCCA(), SetMac(), and Start().
|
private |
Battery Life Extension.
Definition at line 275 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), GetBatteryLifeExtension(), SetBatteryLifeExtension(), and Start().
|
private |
Maximum backoff exponent.
3 - 8, default 5
Definition at line 283 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), GetMacMaxBE(), PlmeCcaConfirm(), SetMacMaxBE(), and SetMacMinBE().
|
private |
Maximum number of backoffs.
0 - 5, default 4
Definition at line 287 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), GetMacMaxCSMABackoffs(), PlmeCcaConfirm(), and SetMacMaxCSMABackoffs().
|
private |
Minimum backoff exponent.
0 - macMaxBE, default 3
Definition at line 279 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), GetMacMinBE(), SetMacMinBE(), and Start().
|
private |
Number of backoffs for the current transmission.
Definition at line 263 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), GetNB(), PlmeCcaConfirm(), and Start().
|
private |
Uniform random variable stream.
Definition at line 295 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), AssignStreams(), and RandomBackoffDelay().
|
private |
Scheduler event for the start of the next random backoff/slot.
Definition at line 299 of file lr-wpan-csmaca.h.
Referenced by Cancel(), PlmeCcaConfirm(), and Start().
|
private |
Count the number of remaining random backoff periods left to delay.
Definition at line 291 of file lr-wpan-csmaca.h.
Referenced by LrWpanCsmaCa(), CanProceed(), and RandomBackoffDelay().
|
private |
Scheduler event when to start the CCA after a random backoff.
Definition at line 307 of file lr-wpan-csmaca.h.
Referenced by Cancel(), CanProceed(), PlmeCcaConfirm(), and RandomBackoffDelay().