File: contrib/nic/P2PNic.ned
The nic (network interface card) is a compound module that contains the MAC and PHY of a host within the Mobility Framework
The P2P nic only contains a simple phy layer which provides no snr evaluation but simple sends unicast messages and calculates the bit errors based on a bit error probability provided in omnetpp.ini
IMPORTANT:
In order to work with our ChannelControl module the phy
module has to be called "phy" in the ned file.
Author: Daniel Willkomm
The following diagram shows usage relationships between modules, networks and channels. Unresolved module (and channel) types are missing from the diagram. Click here to see the full picture.
If a module type shows up more than once, that means it has been defined in more than one NED file.
AlohaMacLayer | Aloha MAC protocol |
P2PPhyLayer | A very simple physical layer |
SingleChannelRadio | (no description) |
If a module type shows up more than once, that means it has been defined in more than one NED file.
P2PHost | The P2PHost is a compound module that implements a very simple peer to peer host. Instead of an "snrEval" and "decider" module it just contains a simple "phy" module that sends unicast messages |
Name | Direction | Description |
---|---|---|
uppergateIn | input | to upper layers |
upperControlOut | output | control to upper layers |
uppergateOut | output | from upper layers |
radioIn | input | gate for sendDirect |
Name | Type | Description |
---|---|---|
mac.debug | bool | debug switch |
mac.headerLength | numeric const | level at which we consider medium busy |
mac.queueLength | numeric const | length of the MAC queue |
mac.bitrate | numeric const | bit rate in bit/s |
mac.defaultChannel | numeric const | default channel |
phy.coreDebug | numeric const | debug switch for the core framework |
phy.pBit | numeric const | bit error rate |
phy.bitrate | numeric const | bitrate (in bits/sec) |
phy.transmitterPower | numeric const | power used to transmit messages (in mW) |
phy.headerLength | numeric const | length (in bits) of the AirFrame header |
radio.debug | bool | |
radio.swSleep | numeric const | time parameters, how long does it take to switch to sleep mode |
radio.swSend | numeric const | switch to send mode |
radio.swRecv | numeric const | switch to recv mode |
module P2PNic gates: in: uppergateIn; // to upper layers out: upperControlOut, // control to upper layers uppergateOut; // from upper layers in: radioIn; //gate for sendDirect submodules: mac: AlohaMacLayer; display: "b=32,30;p=60,50;i=prot2"; phy: P2PPhyLayer; display: "b=32,30;p=60,100;i=prot3"; radio: SingleChannelRadio; display: "p=90,50;b=32,30;o=red"; connections: phy.uppergateIn <-- mac.lowergateOut; phy.uppergateOut --> mac.lowergateIn; phy.upperControlOut --> mac.lowerControlIn; mac.uppergateOut --> uppergateOut; mac.upperControlOut --> upperControlOut; mac.uppergateIn <-- uppergateIn; radioIn --> phy.radioIn; display: "p=10,10;b=100,125,rect;o=white"; endmodule