Simple Module BasicSnrEval

Package: inet.linklayer.mfcore
File: src/linklayer/mfcore/BasicSnrEval.ned

C++ definition

The basic class for all snrEval modules

The BasicSnrEval module provides functionality like en- and decapsulation of messages. If you use the standard message formats everythng should work fine. Before a packet is sent some information, e.g. transmission power, can be written to the AirFrame header. If you write your own snrEval, just subclass and redefine the handleUpperMsg function (see description of the function). After receiving a message it can be processed in handleLowerMsgStart. Then it is buffered for the time the transmission would last in reality, and then can be handled again. Again you can redefine the 1. handleLowerMsgStart and 2. handleLowerMsgEnd for your own needs (see description). So, the call of these functions represent the following events: 1. received a message (i.e. transmission startet) 2. message will be handed on to the upper layer (i.e. transmission time is over)

This component has been taken over from Mobility Framework 1.0a5.

See also: SnrEval

Author: Marc Loebbers

BasicSnrEval

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters:

Name Type Default value Description
coreDebug bool false

debug switch for the core framework

transmitterPower double

power used for transmission of messages

bitrate double

bitrate

headerLength int

header length of the AirFrame

Gates:

Name Direction Size Description
uppergateIn input

from the MAC layer

uppergateOut output

to the decider sub-module

radioIn input

to receive AirFrames

Source code:

//
// The basic class for all snrEval modules
//
// The BasicSnrEval module provides functionality like en- and
// decapsulation of messages. If you use the standard message formats
// everythng should work fine. Before a packet is sent some
// information, e.g. transmission power, can be written to the
// AirFrame header. If you write your own snrEval, just subclass and
// redefine the handleUpperMsg function (see description of the
// function). After receiving a message it can be processed in
// handleLowerMsgStart. Then it is buffered for the time the
// transmission would last in reality, and then can be handled
// again. Again you can redefine the 1. handleLowerMsgStart and
// 2. handleLowerMsgEnd for your own needs (see description). So, the
// call of these functions represent the following events: 1. received
// a message (i.e. transmission startet) 2. message will be handed on
// to the upper layer (i.e. transmission time is over)
//
// This component has been taken over from Mobility Framework 1.0a5.
//
// @see SnrEval
// @author Marc Loebbers
//
simple BasicSnrEval
{
    parameters:
        bool coreDebug = default(false); // debug switch for the core framework
        double transmitterPower @unit("mW"); // power used for transmission of messages
        double bitrate @unit("bps"); // bitrate
        int headerLength @unit(b);  // header length of the AirFrame
    gates:
        input uppergateIn; // from the MAC layer
        output uppergateOut; // to the decider sub-module
        input radioIn @labels(AirFrame); // to receive AirFrames
}