NED File src/inet/linklayer/ieee80211/mac/contention/Contention.ned¶
Name |
Type |
Description |
|---|---|---|
simple module |
The default implementation of IContention. |
Source code¶
//
// Copyright (C) 2016 OpenSim Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
//
package inet.linklayer.ieee80211.mac.contention;
import inet.common.SimpleModule;
import inet.linklayer.ieee80211.mac.contract.IContention;
//
// 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);
}