This NED module defines a host using an IEEE 802.15.4 transceiver at 2.4GHz for wireless communications, that can be used to simulate wireless sensor networks.
For instance, you can use it to compare your own MAC protocol to the 802.15.4 non beacon enabled MAC protocol, or to evaluate IEEE 802.15.4 wireless sensor networks. It is also a good starting point to define your own Host file.
This model was independently validated on a wireless sensor network testbed. For more information, see Accurate Timeliness Simulations for Real-Time Wireless Sensor Networks, J. Rousselot, J.-D. Decotignie, M. Aoun, P. van der Stok, R. Serna Oliver, G. Fohler. In Proceedings of the 2009 Third UKSim European Symposium on Computer Modeling and Simulation. http://dx.doi.org/10.1109/EMS.2009.34.
Author: Jérôme Rousselot
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.
| WSNRouting (network) |
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. |
| Name | Type | Default value | Description |
|---|---|---|---|
| numHosts | double |
total number of hosts in the network |
|
| netwType | string | "DummyRoute" |
type of the network layer |
| Name | Value | Description |
|---|---|---|
| display | bgb=356,318,white;bgp=10,10;b=40,40,rect;i=device/usb |
| Name | Direction | Size | Description |
|---|---|---|---|
| radioIn | input |
| Name | Type | Default value | Description |
|---|---|---|---|
| utility.coreDebug | bool |
debug switch for the base framework |
|
| batteryStats.debug | bool |
write per-activity and per-device statistics to omnetpp.sca (if false, only total energy and lifetime are written) |
|
| batteryStats.detail | bool | false |
subscribe to battery status and record time series data in omnetpp.vec (resolution depends on battery's publishDelta) |
| batteryStats.timeSeries | bool | false | |
| battery.debug | bool | ||
| battery.nominal | double | 1000 mAh |
nominal battery capacity |
| battery.capacity | double | 1000 mAh |
battery capacity |
| battery.voltage | double | 3 V |
nominal voltage |
| battery.resolution | double | 60 s |
capacity is updated at least every resolution time |
| battery.publishDelta | double | 1 |
if > 0, capacity is published to the BB each publishTime interval |
| battery.publishTime | double | 60 s |
number of modules that will draw energy from the battery |
| battery.numDevices | int | 1 | |
| mobility.coreDebug | bool |
debug switch for the core framework |
|
| mobility.x | double |
x coordinate of the nodes' position (-1 = random) |
|
| mobility.y | double |
y coordinate of the nodes' position (-1 = random) |
|
| mobility.z | double |
z coordinate of the nodes' position (-1 = random) |
|
| nic.phy.coreDebug | bool |
debug switch for core framework |
|
| nic.phy.recordStats | bool | false |
enable/disable tracking of statistics (eg. cOutvectors) |
| nic.phy.usePropagationDelay | bool |
Should transmission delay be simulated? |
|
| nic.phy.useThermalNoise | bool |
should thermal noise be considered? |
|
| nic.phy.analogueModels | xml |
Specification of the analogue models to use and their parameters |
|
| nic.phy.sensitivity | double |
The sensitivity of the physical layer [dBm] |
|
| nic.phy.maxTXPower | double |
The maximum transimission power of the physical layer [mW] |
|
| nic.phy.initialRadioState | int | 0 |
state the radio is initially in |
| nic.phy.radioMinAtt | double | 1.0 |
radios gain factor (attenuation) while receiving |
| nic.phy.radioMaxAtt | double | 0.0 |
radios gain factor (attenuation) while not receiving |
| nic.phy.nbRadioChannels | int | 1 |
Number of available radio channels. Defaults to single channel radio. |
| nic.phy.initialRadioChannel | int | 0 |
Initial radio channel. |
| 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) |
| nic.mac.notAffectedByHostState | bool | false | |
| nic.mac.coreDebug | bool |
debug switch |
|
| nic.mac.debug | bool | false |
debug switch |
| nic.mac.stats | bool | true | |
| nic.mac.trace | bool | false | |
| nic.mac.queueLength | double | 100 |
size of the MAC queue (maximum number of packets in Tx buffer) |
| nic.mac.txPower | double | 1 mW |
tx power [mW] |
| nic.mac.useMACAcks | bool | true |
Send/Expect MAC acks for unicast traffic? |
| nic.mac.macMaxFrameRetries | double | 3 |
maximum number of frame retransmission only used when usage of MAC acks is enabled |
| nic.mac.macMaxCSMABackoffs | double | 4 |
maximum backoffs |
| nic.mac.contentionWindow | int | 2 |
# of backoff periods of the initial contention window (for linear and constant backoff method only) |
| nic.mac.macMinBE | double | 3 |
minimum backoff exponent (for exponential backoff method only) |
| nic.mac.macMaxBE | double | 5 |
maximum backoff exponent (for exponential backoff method only) |
| net.stats | bool |
stats switch |
|
| net.headerLength | double |
length of the network packet header (in bits) |
|
| transport.notAffectedByHostState | bool | false | |
| transport.trace | bool | false | |
| transport.stats | bool | true | |
| transport.headerLength | int | 2 byte | |
| 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. |
| transport.nbMaxPacketsPerAggregation | int | 10 |
maximum number of packets to aggregate per sending |
| arp.coreDebug | bool |
debug switch for the core framework |
|
| arp.debug | bool | false |
enable debugging for this module |
| arp.offset | int | 0 |
Adds an offset to node addresses |
| app.debug | bool | false |
debug switch |
| app.stats | bool | true |
stats generation switch |
| app.trace | bool | false |
activates detailed logging (per source latencies and vector logging). stats must be true. |
| app.broadcastPackets | bool | false |
send packets in broadcast mode |
| app.nbPackets | double | 0 | |
| app.destAddr | int | 0 | |
| app.trafficType | string | "periodic" |
Can be one of: periodic, uniform or exponential |
| app.trafficParam | double | 1 |
the mean time between two packets |
| app.initializationTime | double | 1 min |
minimum time before generation of the first packet |
| app.headerLength | int | 2 byte |
// // This NED module defines a host using an IEEE 802.15.4 transceiver at 2.4GHz // for wireless communications, that can be used to simulate wireless sensor // networks. // // For instance, you can use it to compare your own MAC protocol to // the 802.15.4 non beacon enabled MAC protocol, or to evaluate IEEE 802.15.4 // wireless sensor networks. It is also a good starting point to define your // own Host file. // // This model was independently validated on a wireless sensor network testbed. // For more information, see // Accurate Timeliness Simulations for Real-Time Wireless Sensor Networks, // J. Rousselot, J.-D. Decotignie, M. Aoun, P. van der Stok, R. Serna Oliver, // G. Fohler. In Proceedings of the 2009 Third UKSim European Symposium on Computer // Modeling and Simulation. <a href="http://dx.doi.org/10.1109/EMS.2009.34">http://dx.doi.org/10.1109/EMS.2009.34</a>. // // @author Jérôme Rousselot // module Host802154_2400MHz { parameters: double numHosts; // total number of hosts in the network string netwType = default("DummyRoute"); //type of the network layer @display("bgb=356,318,white;bgp=10,10;b=40,40,rect;i=device/usb"); gates: input radioIn; submodules: utility: BaseUtility { parameters: @display("p=292,60;i=block/blackboard"); } batteryStats: BatteryStats { @display("p=292,257;i=block/circle"); detail = default(false); timeSeries = default(false); } battery: SimpleBattery { @display("p=292,186;i=block/control"); nominal = default(1000 mAh); capacity = default(1000 mAh); voltage = default(3 V); resolution = default(60 s); publishDelta = default(1); publishTime = default(60 s); numDevices = default(1); } mobility: BaseMobility { parameters: @display("p=292,120;i=block/cogwheel"); } nic: Nic802154_TI_CC2420 { parameters: @display("b=32,30;p=86,265;i=block/ifcard"); } net: <netwType> like IBaseNetwLayer { parameters: @display("p=86,159"); } transport: Aggregation; arp: ArpHost { parameters: @display("p=202,186"); } app: SensorApplLayer { parameters: @display("p=86,60;i=block/app"); } connections: net.lowerGateOut --> nic.upperGateIn; net.lowerGateIn <-- nic.upperGateOut; net.lowerControlOut --> nic.upperControlIn; net.lowerControlIn <-- nic.upperControlOut; net.upperGateOut --> transport.lowerGateIn; net.upperGateIn <-- transport.lowerGateOut; net.upperControlOut --> transport.lowerControlIn; net.upperControlIn <-- transport.lowerControlOut; transport.upperGateOut --> app.lowerGateIn; transport.upperGateIn <-- app.lowerGateOut; transport.upperControlOut --> app.lowerControlIn; transport.upperControlIn <-- app.lowerControlOut; radioIn --> nic.radioIn; }