Contention

Package: inet.linklayer.ieee80211.mac.contention

Contention

simple module

The default implementation of IContention.

Contention

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters

Name Type Default value Description
initialChannelBusy bool true

assume that 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 may be able to start transmitting immediately

Properties

Name Value Description
display i=block/timer

Signals

Name Type Unit
channelAccessGranted
backoffStarted simtime_t
backoffStopped simtime_t
backoffPeriodGenerated long
stateChanged long

Statistics

Name Title Source Record Unit Interpolation Mode
backoffActive backoff active count(backoffStarted)-count(backoffStopped) vector sample-hold
channelAccessGranted channel access granted count, vector?
backoffPeriodGenerated backoff periods vector none
stateChanged contention state changed count, vector? none

Source code

//
// The default implementation of IContention.
//
simple Contention like IContention
{
    parameters:
        bool initialChannelBusy = default(true); // assume that 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 may be 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); // TODO: enum=inet::ieee80211::Contention::State
        @statistic[backoffPeriodGenerated](title="backoff periods"; record=vector; interpolationmode=none);
        @statistic[backoffActive](title="backoff active"; source=count(backoffStarted)-count(backoffStopped); record=vector; interpolationmode=sample-hold);
        @statistic[channelAccessGranted](title="channel access granted"; record=count,vector?);
        @statistic[stateChanged](title="contention state changed"; record=count,vector?; interpolationmode=none);
}

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