WirelessAPWithSink

Package: inet.examples.wireless.throughput

WirelessAPWithSink

compound module

Well, this models a 802.11 Access Point with a Sink.

interfaceTable : InterfaceTable

Keeps the table of network interfaces.

Source:
interfaceTable: InterfaceTable {
    parameters:
        @display("p=100,100;is=s");
} sink : PassivePacketSink

A passive packet sink which is pushed with packets by the connected packet producer.

Source:
sink: PassivePacketSink {
    parameters:
        @display("p=300,100");
} wlan : Ieee80211Interface

Implements an IEEE 802.11 network interface.

Source:
wlan: Ieee80211Interface {
    parameters:
        @display("p=250,200;q=queue");
        llc.typename = "Ieee80211Portal";
        mgmt.typename = "Ieee80211MgmtApSimplified";
        agent.typename = "";
} mobility : StationaryMobility

Mobility module for stationary nodes.

Source:
mobility: StationaryMobility {
    parameters:
        @display("p=100,200;is=s");
}

Usage diagram

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

Used in

Name Type Description
Throughput network (no description)

Properties

Name Value Description
networkNode
labels node
display i=device/accesspoint

Gates

Name Direction Size Description
radioIn input

Unassigned submodule parameters

Name Type Default value Description
interfaceTable.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

sink.displayStringTextFormat string "received %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

sink.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

sink.initialConsumptionOffset double 0s

Initial duration before which packets are not consumed

sink.consumptionInterval double 0s

Elapsed time between subsequent packets allowed to be pushed by the connected packet producer, 0 means any number of packets can be pushed at the same simulation time

sink.scheduleForAbsoluteTime bool true

When a clock is used, "relative" means that setting the clock will not affect the simulation time of the event

wlan.pcapRecorder.displayStringTextFormat string "rec: %n pks"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

wlan.pcapRecorder.verbose bool true

Whether to log packets on the module output

wlan.pcapRecorder.recordEmptyPackets bool true

Specifies if zero length packets are recorded or not

wlan.pcapRecorder.enableConvertingPackets bool true

Specifies if converting packets to link type is allowed or not

wlan.pcapRecorder.pcapFile string ""

The PCAP file to be written, suggested value: pcapFile = "${resultdir}/${configname}-#${runnumber}" + fullpath() + ".pcap"

wlan.pcapRecorder.fileFormat string "pcapng"
wlan.pcapRecorder.snaplen int 65535

Maximum number of bytes to record per packet

wlan.pcapRecorder.timePrecision int 6

Time precision in recorded file. pcap supports only 6 (usec) or 9 (nanosec), pcapng supports more values (see 'if_tsresol' option in pcapng file format).

wlan.pcapRecorder.dumpBadFrames bool true

Enable dump of frames with hasBitError

wlan.pcapRecorder.sendingSignalNames string "transmissionEnded"

Space-separated list of outbound packet signals to subscribe to

wlan.pcapRecorder.receivingSignalNames string "receptionEnded"

Space-separated list of inbound packet signals to subscribe to

wlan.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

Space-separated list of protocol names as defined in the Protocol class

wlan.pcapRecorder.packetFilter object "*"

Which packets are considered, matches all packets by default

wlan.pcapRecorder.helpers string ""

Usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

wlan.pcapRecorder.alwaysFlush bool false

Flush the pcapFile after each write to ensure that all packets are captured in case of a crash

wlan.mib.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

wlan.mgmt.macModule string

The path to the MAC module

mobility.displayStringTextFormat string "p: %p\nv: %v"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

mobility.subjectModule string "^"

The module path that determines the subject module, the motion of which this mobility model describes. The default value is the parent module

mobility.coordinateSystemModule string ""

The module path of the geographic coordinate system module

mobility.updateDisplayString bool true

Enables continuous update of the subject module's position by modifying its display string

mobility.constraintAreaMinX double -inf m

The minimum x position of the constraint area. It is unconstrained by default (negative infinity)

mobility.constraintAreaMinY double -inf m

The minimum y position of the constraint area. It is unconstrained by default (negative infinity)

mobility.constraintAreaMinZ double -inf m

The minimum z position of the constraint area. It is unconstrained by default (negative infinity)

mobility.constraintAreaMaxX double inf m

The maximum x position of the constraint area. It is unconstrained by default (positive infinity)

mobility.constraintAreaMaxY double inf m

The maximum y position of the constraint area. It is unconstrained by default (positive infinity)

mobility.constraintAreaMaxZ double inf m

The maximum z position of the constraint area. It is unconstrained by default (positive infinity)

mobility.initialX double uniform(this.constraintAreaMinX, this.constraintAreaMaxX)
mobility.initialY double uniform(this.constraintAreaMinY, this.constraintAreaMaxY)
mobility.initialZ double nanToZero(uniform(this.constraintAreaMinZ, this.constraintAreaMaxZ))
mobility.initialLatitude double nan deg
mobility.initialLongitude double nan deg
mobility.initialAltitude double 0m
mobility.initialHeading double 0deg
mobility.initialElevation double 0deg
mobility.initialBank double 0deg
mobility.initFromDisplayString bool true

Enables one-time initialization from the subject module's display string

mobility.updateFromDisplayString bool true

Enables continuous update from the subject module's display string for dragging and rotating it

Source code

//
// Well, this models a 802.11 Access Point with a Sink.
//
module WirelessAPWithSink
{
    parameters:
        @networkNode();
        @labels(node);
        @display("i=device/accesspoint");
        *.interfaceTableModule = "^.interfaceTable";
        wlan.radio.antenna.mobilityModule = default("^.^.^.mobility");
    gates:
        input radioIn @directIn;
    submodules:
        interfaceTable: InterfaceTable {
            parameters:
                @display("p=100,100;is=s");
        }
        sink: PassivePacketSink {
            parameters:
                @display("p=300,100");
        }
        wlan: Ieee80211Interface {
            parameters:
                @display("p=250,200;q=queue");
                llc.typename = "Ieee80211Portal";
                mgmt.typename = "Ieee80211MgmtApSimplified";
                agent.typename = "";
        }
        mobility: StationaryMobility {
            parameters:
                @display("p=100,200;is=s");
        }
    connections allowunconnected:
        radioIn --> { @display("m=s"); } --> wlan.radioIn;
        wlan.upperLayerOut --> sink.in;
}

File: examples/wireless/throughput/WirelessAPWithSink.ned