This example shows how to simulate wireless sensor networks. Three different routing protocols are considered, for different traffic types: convergecast, with Wiseroute; network-level broadcast, with flooding; and probabilistic broadcast.
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.
| Name | Type | Default value | Description |
|---|---|---|---|
| playgroundSizeX | double |
x size of the area the nodes are in (in meters) |
|
| playgroundSizeY | double |
y size of the area the nodes are in (in meters) |
|
| playgroundSizeZ | double |
z size of the area the nodes are in (in meters) |
|
| numHosts | double |
total number of hosts in the network |
| Name | Value | Description |
|---|---|---|
| isNetwork | ||
| display | bgb=$playgroundSizeX,$playgroundSizeY,white,,;bgp=10,50 |
| Name | Type | Default value | Description |
|---|---|---|---|
| connectionManager.coreDebug | bool |
debug switch for core framework |
|
| connectionManager.sendDirect | bool |
send directly to the node or create separate gates for every connection |
|
| connectionManager.pMax | double |
maximum sending power used for this network [mW] |
|
| connectionManager.sat | double |
minimum signal attenuation threshold [dBm] |
|
| connectionManager.alpha | double |
minimum path loss coefficient |
|
| connectionManager.carrierFrequency | double |
minimum carrier frequency of the channel [Hz] |
|
| connectionManager.drawMaxIntfDist | bool | false |
should the maximum interference distance be displayed for each node? |
| world.coreDebug | bool |
debug switch for the base framework |
|
| world.useTorus | bool |
use the playground as torus? |
|
| world.use2D | bool |
use a 2-dimensional world? |
|
| node.utility.coreDebug | bool |
debug switch for the base framework |
|
| node.batteryStats.debug | bool |
write per-activity and per-device statistics to omnetpp.sca (if false, only total energy and lifetime are written) |
|
| node.batteryStats.detail | bool | false |
subscribe to battery status and record time series data in omnetpp.vec (resolution depends on battery's publishDelta) |
| node.batteryStats.timeSeries | bool | false | |
| node.battery.debug | bool | ||
| node.battery.nominal | double | 1000 mAh |
nominal battery capacity |
| node.battery.capacity | double | 1000 mAh |
battery capacity |
| node.battery.voltage | double | 3 V |
nominal voltage |
| node.battery.resolution | double | 60 s |
capacity is updated at least every resolution time |
| node.battery.publishDelta | double | 1 |
if > 0, capacity is published to the BB each publishTime interval |
| node.battery.publishTime | double | 60 s |
number of modules that will draw energy from the battery |
| node.battery.numDevices | int | 1 | |
| node.mobility.coreDebug | bool |
debug switch for the core framework |
|
| node.mobility.x | double |
x coordinate of the nodes' position (-1 = random) |
|
| node.mobility.y | double |
y coordinate of the nodes' position (-1 = random) |
|
| node.mobility.z | double |
z coordinate of the nodes' position (-1 = random) |
|
| node.nic.phy.coreDebug | bool |
debug switch for core framework |
|
| node.nic.phy.recordStats | bool | false |
enable/disable tracking of statistics (eg. cOutvectors) |
| node.nic.phy.usePropagationDelay | bool |
Should transmission delay be simulated? |
|
| node.nic.phy.useThermalNoise | bool |
should thermal noise be considered? |
|
| node.nic.phy.analogueModels | xml |
Specification of the analogue models to use and their parameters |
|
| node.nic.phy.sensitivity | double |
The sensitivity of the physical layer [dBm] |
|
| node.nic.phy.maxTXPower | double |
The maximum transimission power of the physical layer [mW] |
|
| node.nic.phy.initialRadioState | int | 0 |
state the radio is initially in |
| node.nic.phy.radioMinAtt | double | 1.0 |
radios gain factor (attenuation) while receiving |
| node.nic.phy.radioMaxAtt | double | 0.0 |
radios gain factor (attenuation) while not receiving |
| node.nic.phy.nbRadioChannels | int | 1 |
Number of available radio channels. Defaults to single channel radio. |
| node.nic.phy.initialRadioChannel | int | 0 |
Initial radio channel. |
| node.nic.phy.numActivities | int | 5 |
the number of different power consuming activities the phy layer has change this parameter if your decider or physical layer uses more than the default 5 activities (sleep, rx, tx, switching, decoding) |
| node.nic.mac.notAffectedByHostState | bool | false | |
| node.nic.mac.coreDebug | bool |
debug switch |
|
| node.nic.mac.debug | bool | false |
debug switch |
| node.nic.mac.stats | bool | true | |
| node.nic.mac.trace | bool | false | |
| node.nic.mac.queueLength | double | 100 |
size of the MAC queue (maximum number of packets in Tx buffer) |
| node.nic.mac.txPower | double | 1 mW |
tx power [mW] |
| node.nic.mac.useMACAcks | bool | true |
Send/Expect MAC acks for unicast traffic? |
| node.nic.mac.macMaxFrameRetries | double | 3 |
maximum number of frame retransmission only used when usage of MAC acks is enabled |
| node.nic.mac.macMaxCSMABackoffs | double | 4 |
maximum backoffs |
| node.nic.mac.contentionWindow | int | 2 |
# of backoff periods of the initial contention window (for linear and constant backoff method only) |
| node.nic.mac.macMinBE | double | 3 |
minimum backoff exponent (for exponential backoff method only) |
| node.nic.mac.macMaxBE | double | 5 |
maximum backoff exponent (for exponential backoff method only) |
| node.net.stats | bool |
stats switch |
|
| node.net.headerLength | double |
length of the network packet header (in bits) |
|
| node.transport.notAffectedByHostState | bool | false | |
| node.transport.trace | bool | false | |
| node.transport.stats | bool | true | |
| node.transport.headerLength | int | 2 byte | |
| node.transport.interPacketDelay | double | 0 s |
this class does not send more than two packets to the same destination in a time interPacketDelay to the lower layer. It is deactivated if this value is set to 0. |
| node.transport.nbMaxPacketsPerAggregation | int | 10 |
maximum number of packets to aggregate per sending |
| node.arp.coreDebug | bool |
debug switch for the core framework |
|
| node.arp.debug | bool | false |
enable debugging for this module |
| node.arp.offset | int | 0 |
Adds an offset to node addresses |
| node.app.debug | bool | false |
debug switch |
| node.app.stats | bool | true |
stats generation switch |
| node.app.trace | bool | false |
activates detailed logging (per source latencies and vector logging). stats must be true. |
| node.app.broadcastPackets | bool | false |
send packets in broadcast mode |
| node.app.nbPackets | double | 0 | |
| node.app.destAddr | int | 0 | |
| node.app.trafficType | string | "periodic" |
Can be one of: periodic, uniform or exponential |
| node.app.trafficParam | double | 1 |
the mean time between two packets |
| node.app.initializationTime | double | 1 min |
minimum time before generation of the first packet |
| node.app.headerLength | int | 2 byte |
// // This example shows how to simulate wireless sensor networks. // Three different routing protocols are considered, for different traffic // types: // convergecast, with Wiseroute; // network-level broadcast, with flooding; // and probabilistic broadcast. // network WSNRouting { parameters: double playgroundSizeX @unit(m); // x size of the area the nodes are in (in meters) double playgroundSizeY @unit(m); // y size of the area the nodes are in (in meters) double playgroundSizeZ @unit(m); // z size of the area the nodes are in (in meters) double numHosts; // total number of hosts in the network @display("bgb=$playgroundSizeX,$playgroundSizeY,white,,;bgp=10,50"); submodules: connectionManager: ConnectionManager { parameters: @display("p=225,40;b=42,42,rect,yellow;i=abstract/multicast"); } world: BaseWorldUtility { parameters: playgroundSizeX = playgroundSizeX; playgroundSizeY = playgroundSizeY; playgroundSizeZ = playgroundSizeZ; @display("p=30,0;i=misc/globe"); } node[numHosts]: Host802154_2400MHz { parameters: numHosts = numHosts; @display("p=75,130;b=42,42,rect,yellow;i=device/wifilaptop"); } connections allowunconnected: }