This module implements a CSMA network interface card using the "csma" MAC layer module
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.
| Name | Type | Default value | Description |
|---|---|---|---|
| connectionManagerName | string | "" |
name of the ConnectionManager module |
| Name | Direction | Size | Description |
|---|---|---|---|
| upperGateIn | input |
to upper layers |
|
| upperGateOut | output |
from upper layers |
|
| upperControlOut | output |
control information |
|
| upperControlIn | input |
control information |
|
| radioIn | input |
radioIn gate for sendDirect |
| Name | Type | Default value | Description |
|---|---|---|---|
| mac.notAffectedByHostState | bool | false | |
| mac.coreDebug | bool |
debug switch |
|
| mac.headerLength | double | 72 bit |
length of the MAC packet header (in bits) |
| mac.debug | bool | false |
debug switch |
| mac.stats | bool | true | |
| mac.trace | bool | false | |
| mac.queueLength | double | 100 |
size of the MAC queue (maximum number of packets in Tx buffer) |
| mac.bitrate | double | 250000 bps |
bit rate |
| mac.ccaDetectionTime | double | 0.000128 s |
Clear Channel Assessment detection time |
| mac.rxSetupTime | double |
Time to setup radio to reception state |
|
| mac.aTurnaroundTime | double | 0.000192 s |
Time to switch radio from Rx to Tx state |
| mac.txPower | double |
tx power [mW] |
|
| mac.useMACAcks | bool |
Send/Expect MAC acks for unicast traffic? |
|
| mac.macMaxFrameRetries | double | 3 |
maximum number of frame retransmission only used when usage of MAC acks is enabled |
| mac.macAckWaitDuration | double | 0.00056 s |
time to wait for an acknowledgement after transmitting a unicast frame. only used when usage of MAC acks is enabled |
| mac.ackLength | double | 40 bit |
complete MAC ack message length (in bits) (! headerLength is not added to this) only used when usage of MAC acks is enabled |
| mac.sifs | double | 0.000192 s |
simple interframe space. Time to wait between receiving a frame and acknowledging it. Should be bigger than the maximum time for switching between Tx and Rx at the receiver. only used when usage of MAC acks is enabled |
| mac.backoffMethod | string | "linear" |
backoff method to use: constant, linear or exponential |
| mac.macMaxCSMABackoffs | double | 5 |
maximum backoffs |
| mac.aUnitBackoffPeriod | double | 0.00032 s |
base unit for all backoff calculations |
| mac.contentionWindow | int | 2 |
# of backoff periods of the initial contention window (for linear and constant backoff method only) |
| mac.macMinBE | double | 3 |
minimum backoff exponent (for exponential backoff method only) |
| mac.macMaxBE | double | 8 |
maximum backoff exponent (for exponential backoff method only) |
| phy.coreDebug | bool |
debug switch for core framework |
|
| phy.recordStats | bool | false |
enable/disable tracking of statistics (eg. cOutvectors) |
| phy.headerLength | int | 0 |
defines the length of the phy header (/preamble) |
| phy.usePropagationDelay | bool |
Should transmission delay be simulated? |
|
| phy.thermalNoise | double |
the strength of the thermal noise [dBm] |
|
| phy.useThermalNoise | bool |
should thermal noise be considered? |
|
| phy.analogueModels | xml |
Specification of the analogue models to use and their parameters |
|
| phy.decider | xml |
Specification of the decider to use and its parameters |
|
| phy.sensitivity | double |
The sensitivity of the physical layer [dBm] |
|
| phy.maxTXPower | double |
The maximum transimission power of the physical layer [mW] |
|
| phy.timeRXToTX | double | 0 |
switchTimes [s]: |
| phy.timeRXToSleep | double | 0 | |
| phy.timeTXToRX | double | 0 | |
| phy.timeTXToSleep | double | 0 | |
| phy.timeSleepToRX | double | 0 | |
| phy.timeSleepToTX | double | 0 | |
| phy.initialRadioState | int | 0 |
state the radio is initially in |
| phy.radioMinAtt | double | 1.0 |
radios gain factor (attenuation) while receiving |
| phy.radioMaxAtt | double | 0.0 |
radios gain factor (attenuation) while not receiving |
| phy.nbRadioChannels | int | 1 |
Number of available radio channels. Defaults to single channel radio. |
| phy.initialRadioChannel | int | 0 |
Initial radio channel. |
// // This module implements a CSMA network interface card using // the "csma" MAC layer module // module NicCSMA like INic { parameters: string connectionManagerName = default(""); //name of the ConnectionManager module gates: input upperGateIn; // to upper layers output upperGateOut; // from upper layers output upperControlOut; // control information input upperControlIn; // control information input radioIn; // radioIn gate for sendDirect submodules: mac: csma { @display("p=96,87;i=block/layer"); } phy: PhyLayer { @display("p=106,157;i=block/process_s"); } connections: mac.upperGateOut --> { @display("ls=black;m=m,25,50,25,0"); } --> upperGateOut; mac.upperGateIn <-- { @display("ls=black;m=m,15,50,15,0"); } <-- upperGateIn; mac.upperControlOut --> { @display("ls=red;m=m,75,50,75,0"); } --> upperControlOut; mac.upperControlIn <-- { @display("ls=red;m=m,85,0,85,0"); } <-- upperControlIn; phy.upperGateOut --> { @display("ls=black;m=m,25,50,25,0"); } --> mac.lowerGateIn; phy.upperGateIn <-- { @display("ls=black;m=m,15,50,15,0"); } <-- mac.lowerGateOut; phy.upperControlOut --> { @display("ls=red;m=m,75,50,75,0"); } --> mac.lowerControlIn; phy.upperControlIn <-- { @display("ls=red;m=m,85,0,85,0"); } <-- mac.lowerControlOut; radioIn --> phy.radioIn; }