File: networks/p2p/P2PHost.ned
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
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.
BasicApplLayer | Basic class for the application layer |
BasicMobility | Basic module for all mobility modules. |
Blackboard | The Blackboard works as entity to enable inter layer / process communication. |
P2PNic | The nic (network interface card) is a compound module that contains the MAC and PHY of a host within the Mobility Framework |
SimpleArp | (no description) |
SimpleNetwLayer | Basic class for the network layer |
If a module type shows up more than once, that means it has been defined in more than one NED file.
P2PNetwork | A network only consisting of basic modules |
Name | Type | Description |
---|---|---|
applLayer | string | application layer type |
Name | Direction | Description |
---|---|---|
radioIn | input | gate for sendDirect |
Name | Type | Description |
---|---|---|
blackboard.coreDebug | numeric const | debug switch for core framework |
mobility.coreDebug | numeric const | debug switch for the core framework |
mobility.x | numeric const | x coordinate of the nodes' position (-1 = random) |
mobility.y | numeric const | y coordinate of the nodes' position (-1 = random) |
arp.debug | bool | |
appl.debug | bool | debug switch |
appl.headerLength | numeric const | length of the application message header (in bits) |
net.debug | numeric const | debug switch for the core framework |
net.headerLength | numeric const | length of the network packet header (in bits) |
nic.mac.debug | bool | debug switch |
nic.mac.headerLength | numeric const | level at which we consider medium busy |
nic.mac.queueLength | numeric const | length of the MAC queue |
nic.mac.bitrate | numeric const | bit rate in bit/s |
nic.mac.defaultChannel | numeric const | default channel |
nic.phy.coreDebug | numeric const | debug switch for the core framework |
nic.phy.pBit | numeric const | bit error rate |
nic.phy.bitrate | numeric const | bitrate (in bits/sec) |
nic.phy.transmitterPower | numeric const | power used to transmit messages (in mW) |
nic.phy.headerLength | numeric const | length (in bits) of the AirFrame header |
nic.radio.debug | bool | |
nic.radio.swSleep | numeric const | time parameters, how long does it take to switch to sleep mode |
nic.radio.swSend | numeric const | switch to send mode |
nic.radio.swRecv | numeric const | switch to recv mode |
module P2PHost parameters: applLayer : string; // application layer type gates: in: radioIn; // gate for sendDirect submodules: blackboard: Blackboard; display: "p=130,50;b=25,25;o=black"; mobility: BasicMobility; display: "p=130,150;i=cogwheel2"; arp: SimpleArp; display: "p=130,100;b=25,25"; appl: applLayer like BasicApplLayer; display: "b=35,26;p=60,50;i=app"; net: SimpleNetwLayer; display: "b=32,30;p=60,108;i=prot1"; nic: P2PNic; display: "b=32,30;p=60,166;i=iface"; connections: nic.uppergateOut --> net.lowergateIn; nic.uppergateIn <-- net.lowergateOut; nic.upperControlOut --> net.lowerControlIn; net.uppergateOut --> appl.lowergateIn; net.upperControlOut --> appl.lowerControlIn; net.uppergateIn <-- appl.lowergateOut; radioIn --> nic.radioIn; display: "p=10,10;b=180,200,rect;o=white"; endmodule