Compound Module NicCsma

File: NetworkInterfaces/MF80211/NicCsma.ned

The CsmaNic contains a csma-like MAC layer. The SnrEval module is used as the mac needs a RadioState to be published. However as still the BasicDecider is used all messages will be delivered to the MAC and no packets get lost

This nic is intended to be used in order to test the implementation of the csma protocol.

IMPORTANT:
In order to work with the ChannelControl module the snrEval module has to be called "snrEval" in the ned file.

See also: BasicMacLayer, BasicDecider, BasicSnrEval

Author: Marc Loebbers

mac: CSMAMacLayer decider: BasicDecider snrEval: SnrEval

Usage diagram:

The following diagram shows usage relationships between modules, networks and channels. Unresolved module (and channel) types are missing from the diagram. Click here to see the full picture.

Contains the following modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

BasicDecider

Module to decide whether a frame is received correctly or is lost due to bit errors, interference...

CSMAMacLayer

CSMA MAC protocol

SnrEval (no description)

Gates:

Name Direction Description
uppergateIn input

to upper layers

uppergateOut output

from upper layers

radioIn input

to receive AirFrames

Unassigned submodule parameters:

Name Type Description
mac.debug bool

debug switch

mac.headerLength numeric const
mac.queueLength numeric const
decider.coreDebug numeric const

debug switch for the core framework

snrEval.debug bool

debug switch

snrEval.transmitterPower numeric
snrEval.bitrate numeric
snrEval.headerLength numeric const
snrEval.carrierFrequency numeric
snrEval.thermalNoise numeric
snrEval.pathLossAlpha numeric
snrEval.sensitivity numeric

Source code:

module NicCsma
    gates:
        in: uppergateIn; // to upper layers
        out: uppergateOut; // from upper layers
        in: radioIn; // to receive AirFrames
     submodules:
        mac: CSMAMacLayer;
            display: "p=96,87;i=block/layer";
        decider: BasicDecider;
            display: "p=106,157;i=block/process_s";
        snrEval: SnrEval;
            display: "p=96,236;i=block/wrxtx";
    connections:
        radioIn --> snrEval.radioIn;
        decider.uppergateOut --> mac.lowergateIn display "m=m,50,50,75,0";
        snrEval.uppergateIn <-- mac.lowergateOut display "m=m,25,0,25,0";
        snrEval.uppergateOut --> decider.lowergateIn display "m=m,73,0,50,50";

        mac.uppergateOut --> uppergateOut;
        mac.uppergateIn <-- uppergateIn;
endmodule