Simple Module SensorApplLayer

Package: org.mixim.modules.application
File: modules/application/SensorApplLayer.ned

C++ definition

@brief Application layer to test lower layer implementations. SensorApplLayer waits a time initializationTime, then starts sending nbPackets (of size headerLength) to host destAddr. The time intervals between two packets can follow three distributions: periodic (fixed), uniform or exponential.

@ingroup application

Author: Jerome Rousselot, Amre El-Hoiydi

SensorApplLayer

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.

Host802154_2400MHz (compound module)

This NED module defines a host using an IEEE 802.15.4 transceiver at 2.4GHz for wireless communications, that can be used to simulate wireless sensor networks.

Parameters:

Name Type Default value Description
debug bool false

debug switch

stats bool true

stats generation switch

trace bool false

activates detailed logging (per source latencies and vector logging). stats must be true.

broadcastPackets bool false

send packets in broadcast mode

nbPackets double 0
destAddr int 0
trafficType string "periodic"

Can be one of: periodic, uniform or exponential

trafficParam double 1

the mean time between two packets

initializationTime double 1 min

minimum time before generation of the first packet

headerLength int 2 byte

Gates:

Name Direction Size Description
lowerGateIn input

from network layer

lowerControlIn input
lowerGateOut output

to network layer

lowerControlOut output

Source code:

// @brief Application layer to test lower layer implementations. 
// SensorApplLayer waits a time initializationTime, then starts sending
// nbPackets (of size headerLength) to host destAddr. The time intervals
// between two packets can follow three distributions: periodic (fixed),
// uniform or exponential.
//
// @ingroup application
// @author Jerome Rousselot, Amre El-Hoiydi
simple SensorApplLayer like IBaseApplLayer
{
    parameters:
        bool debug = default(false); // debug switch
        bool stats = default(true);   // stats generation switch
        bool trace = default(false);  // activates detailed logging (per source latencies and vector logging). stats must be true.
        bool broadcastPackets = default(false); // send packets in broadcast mode
        double nbPackets = default(0);
        int destAddr = default(0);
        string trafficType = default("periodic");  	// Can be one of: periodic, uniform or exponential
        double trafficParam = default(1);			// the mean time between two packets
        double initializationTime @unit(s) = default(1 min); // minimum time before generation of the first packet
        int headerLength @unit(byte) = default(2 byte);
    gates:
        input lowerGateIn; // from network layer
        input lowerControlIn;
        output lowerGateOut; // to network layer
        output lowerControlOut;
}