Package: inet.linklayer.ideal
IdealWirelessNic
compound moduleHighly abstracted wireless NIC that consists of a unit disk radio and a trivial MAC protocol. It offers simplicity for scenarios where Layer 1 and 2 effects can be completely ignored, for example testing the basic functionality of a wireless ad-hoc routing protocol.
The most important parameter this model accepts is the transmission range. When a radio transmits a frame, all other radios within transmission range will receive the frame correctly, and radios out of range will not be affected at all.
This module requires an IdealRadioMedium instance in the network.
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 |
---|---|---|---|
interfaceTableModule | string | ||
energySourceModule | string | "" | |
bitrate | double | ||
queueType | string | "DropTailQueue" |
DropTailQueue, a Diffserv queue, etc. |
radioType | string | "IdealRadio" |
Properties
Name | Value | Description |
---|---|---|
display | i=block/ifcard;bgb=214,335;bgl=53 |
Gates
Name | Direction | Size | Description |
---|---|---|---|
upperLayerIn | input | ||
upperLayerOut | output | ||
radioIn | input |
Unassigned submodule parameters
Name | Type | Default value | Description |
---|---|---|---|
mac.interfaceTableModule | string | ||
mac.address | string | "auto" |
MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0. |
mac.bitrate | double | ||
mac.mtu | int | 4470B | |
mac.headerLength | int | 0B |
IdealMacFrame.byteLength = headerLength + packetFromUpperLayer.byteLength |
mac.promiscuous | bool | false | |
mac.fullDuplex | bool | true |
allows transmitting and receiving simultaneously (transceiver radio mode) |
mac.useAck | bool | true | |
mac.ackTimeout | double | 100ms |
Source code
// // Highly abstracted wireless NIC that consists of a unit disk radio and a trivial // MAC protocol. It offers simplicity for scenarios where Layer 1 and 2 effects // can be completely ignored, for example testing the basic functionality // of a wireless ad-hoc routing protocol. // // The most important parameter this model accepts is the transmission range. // When a radio transmits a frame, all other radios within transmission range // will receive the frame correctly, and radios out of range will not be // affected at all. // // This module requires an ~IdealRadioMedium instance in the network. // module IdealWirelessNic like IWirelessNic { parameters: @display("i=block/ifcard;bgb=214,335;bgl=53"); string interfaceTableModule; string energySourceModule = default(""); double bitrate @unit("bps"); string queueType = default("DropTailQueue"); // DropTailQueue, a Diffserv queue, etc. string radioType = default("IdealRadio"); *.interfaceTableModule = default(absPath(this.interfaceTableModule)); *.energySourceModule = default(absPath(this.energySourceModule)); **.bitrate = this.bitrate; gates: input upperLayerIn; output upperLayerOut; input radioIn @labels(IdealRadioFrame); submodules: queue: <queueType> like IOutputQueue { parameters: @display("p=23,125;q=l2queue"); } mac: IdealMac { parameters: @display("p=98,207"); } radio: <radioType> like IRadio { parameters: @display("p=98,278"); } connections: upperLayerIn --> { @display("m=n"); } --> queue.in; queue.out --> mac.upperLayerIn; mac.lowerLayerOut --> radio.upperLayerIn; mac.upperLayerOut --> { @display("m=n"); } --> upperLayerOut; radioIn --> { @display("m=s"); } --> radio.radioIn; radio.upperLayerOut --> mac.lowerLayerIn; }File: src/inet/linklayer/ideal/IdealWirelessNic.ned