1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
###############################################################################
# This file is part of openWNS (open Wireless Network Simulator)
# _____________________________________________________________________________
#
# Copyright (C) 2004-2008
# Chair of Communication Networks (ComNets)
# Kopernikusstr. 16, D-52074 Aachen, Germany
# phone: ++49-241-80-27910,
# fax: ++49-241-80-22242
# email: info@openwns.org
# www: http://www.openwns.org
# _____________________________________________________________________________
#
# openWNS is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License version 2 as published by the
# Free Software Foundation;
#
# openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
import openwns
import wifimac.support.Transceiver
from wifimac.lowerMAC.RateAdaptation import OpportunisticwithMIMO, SINRwithMIMO
#######################
# Simulation parameters
#
# Simulation of the string topology: all nodes are placed equidistantly
# on a string, on each end of the string, an AP is positioned
# Traffic is either DL only or bidirectional
#
simTime = 2.1
settlingTime = 2.0
commonLoggerLevel = 1
dllLoggerLevel = 2
# length of the string
numMPs = 0
numSTAs = 1
numAPs = 1
distanceBetweenMPs = 50
verticalDistanceSTAandMP = 50
# load
meanPacketSize = 1480 * 8
offeredDL = 50.0e6
offeredUL = 1.0e6
ulIsActive = False
dlIsActive = True
startDelayUL = 1.01
startDelayDL = 1.02
# wether MPs send/receive traffic
activeMPs = False
# Available frequencies for bss and backbone, in MHz
meshFrequency = 5500
bssFrequencies = [2400, 2440] #,2480]
# DraftN Configuration
numAntennas = 3
maxAggregation = 10
# End simulation parameters
###########################
rtscts = True
####################
# Node configuration
# configuration class for AP and MP mesh transceivers, with RTS/CTS
class MyMeshTransceiver(wifimac.support.Transceiver.DraftN):
def __init__(self, beaconDelay, frequency):
super(MyMeshTransceiver, self).__init__(frequency, numAntennas, maxAggregation)
self.layer2.beacon.enabled = True
self.layer2.beacon.delay = beaconDelay
self.layer2.ra.raStrategy = SINRwithMIMO()
#self.layer2.txop.txopLimit = 0.0
#self.layer2.rtscts.rtsctsOnTxopData = True
if(rtscts):
self.layer2.rtsctsThreshold = meanPacketSize/2
else:
self.layer2.rtsctsThreshold = meanPacketSize*self.layer2.aggregation.maxEntries*2
# configuration class for AP and MP BSS transceivers, without RTS/CTS
class MyBSSTransceiver(wifimac.support.Transceiver.DraftN):
def __init__(self, beaconDelay, frequency):
super(MyBSSTransceiver, self).__init__(frequency, numAntennas, maxAggregation)
self.layer2.beacon.enabled = True
self.layer2.beacon.delay = beaconDelay
#self.layer2.txop.txopLimit = 0.0
#self.layer2.rtscts.rtsctsOnTxopData = True
if(rtscts):
self.layer2.rtsctsThreshold = meanPacketSize/2
else:
self.layer2.rtsctsThreshold = meanPacketSize*self.layer2.aggregation.maxEntries*2
# configuration class for STAs
class MySTAConfig(wifimac.support.Transceiver.DraftNStation):
def __init__(self, initFrequency, position, scanFrequencies, scanDurationPerFrequency):
super(MySTAConfig, self).__init__(frequency = initFrequency,
position = position,
scanFrequencies = scanFrequencies,
scanDuration = scanDurationPerFrequency,
numAntennas = numAntennas,
maxAggregation = maxAggregation)
if(rtscts):
self.layer2.rtsctsThreshold = meanPacketSize/2
else:
self.layer2.rtsctsThreshold = meanPacketSize*self.layer2.aggregation.maxEntries*2
# End node configuration
########################
###########################################
# Scenario setup etc. is in configCommon.py
execfile('configCommon.py')
|