Compound Module NicLMAC

Package: org.mixim.modules.nic
File: modules/nic/NicLMac.ned

This module implements a LMAC network interface card using the "LMacLayer" MAC layer module

LMacLayer PhyLayerBattery

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Used in compound modules:

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

HostLMAC (compound module)

Example host module using a LMAC Network interface card.

Parameters:

Name Type Default value Description
sleepCurrent double

20 µA

rxCurrent double
decodingCurrentDelta double
txCurrent double
setupRxCurrent double
setupTxCurrent double
rxTxCurrent double
txRxCurrent double

Gates:

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

Unassigned submodule parameters:

Name Type Default value Description
mac.notAffectedByHostState bool false
mac.coreDebug bool

debug switch

mac.headerLength double

length of the MAC packet header (in bits)

mac.debug bool false

enable per module debug

mac.slotDuration double 100ms

how long is a slot?

mac.queueLength double 10

length of MAC header

mac.defaultChannel double 0

default channel

mac.bitrate double 19200bps

bit rate

mac.reservedMobileSlots int 2
mac.numSlots int 64
mac.txPower double 50
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.

phy.numActivities int 5

the number of different power consuming activities the phy layer has change this parameter if your decider or physical layer uses more than the default 5 activities (sleep, rx, tx, switching, decoding)

Source code:

//
// This module implements a LMAC network interface card using
// the "LMacLayer" MAC layer module
//
module NicLMAC like INic
{
    parameters:
        double sleepCurrent @unit(mA); // 20 µA
        double rxCurrent @unit(mA);
        double decodingCurrentDelta @unit(mA);
        double txCurrent @unit(mA);
        double setupRxCurrent @unit(mA);
        double setupTxCurrent @unit(mA);
        double rxTxCurrent @unit(mA);
        double txRxCurrent @unit(mA);

    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: LMacLayer {
            parameters:
                @display("p=96,87;i=block/layer");
        }

        phy: PhyLayerBattery {
            @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;

}