Contention
Package: inet.linklayer.ieee80211.mac.contention
Contention
simple moduleThe default implementation of IContention.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Extends
| Name | Type | Description |
|---|---|---|
| SimpleModule | simple module |
Base module for all INET simple modules. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| displayStringTextFormat | string | "" |
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 | |
| display | i=block/timer | |
| defaultStatistic | stateChanged:vector |
Signals
| Name | Type | Unit | Description |
|---|---|---|---|
| channelAccessGranted | |||
| backoffStarted | simtime_t | ||
| backoffStopped | simtime_t | ||
| backoffPeriodGenerated | long | ||
| stateChanged | long |
Statistics
| Name | Title | Source | Record | Unit | Interpolation Mode | Description |
|---|---|---|---|---|---|---|
| backoffActive | backoff active | warmup(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 extends SimpleModule like IContention { parameters: @class(Contention); 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