Contention

Package: inet.linklayer.ieee80211.mac.contention

simple module Contention

The default implementation of IContention.

inet.linklayer.ieee80211.mac.contention.ContentionContentionsimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

Dcaf

compound module

Implements the DCAF (Distributed Channel Access Function) for IEEE 802.11.

Edcaf

compound module

Implements EDCAF (Enhanced Distributed Channel Access Function) for IEEE 802.11. EDCAF represents one access category within EDCA.

Extends

Name

Type

Description

SimpleModule

simple module

Base module for all INET simple modules.

Parameters

Name

Type

Default value

Description

displayStringTextFormat

string

“{fsmState}”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

initialChannelBusy

bool

true

Assume that the channel was busy before the simulation started

backoffOptimization

bool

true

We can pretend the frame has arrived into the queue a little bit earlier, and maybe able to start transmitting immediately

Properties

Name

Value

Description

class

Contention

defaultStatistic

stateChanged:vector

display

i=block/timer

Signals

Name

Type

Unit

Description

backoffPeriodGenerated

long

backoffStarted

simtime_t

backoffStopped

simtime_t

channelAccessGranted

stateChanged

long

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

backoffActive

backoff active

warmup(count(backoffStarted)-count(backoffStopped))

vector

sample-hold

backoffPeriodGenerated

backoff periods

vector

none

channelAccessGranted

channel access granted

count,vector?

stateChanged

contention state changed

count,vector

none

Source code

//
// The default implementation of IContention.
//
simple Contention extends SimpleModule like IContention
{
    parameters:
        @class(Contention);
        displayStringTextFormat = default("{fsmState}");
        bool initialChannelBusy = default(true); // Assume that the channel was busy before the simulation started
        bool backoffOptimization = default(true);    // We can pretend the frame has arrived into the queue a little bit earlier, and maybe able to start transmitting immediately
        @display("i=block/timer");
        @signal[backoffPeriodGenerated](type=long);
        @signal[backoffStarted](type=simtime_t);
        @signal[backoffStopped](type=simtime_t);
        @signal[channelAccessGranted];
        @signal[stateChanged](type=long; enum=inet::ieee80211::Contention::State);
        @statistic[backoffPeriodGenerated](title="backoff periods"; record=vector; interpolationmode=none);
        @statistic[backoffActive](title="backoff active"; source=warmup(count(backoffStarted)-count(backoffStopped)); record=vector; interpolationmode=sample-hold; autoWarmupFilter=false);
        @statistic[channelAccessGranted](title="channel access granted"; record=count,vector?);
        @statistic[stateChanged](title="contention state changed"; type=enum; enum=IDLE, DEFER, IFS_AND_BACKOFF; record=count,vector; interpolationmode=none);
        @defaultStatistic(stateChanged:vector);
}

File: src/inet/linklayer/ieee80211/mac/contention/Contention.ned