mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-05 05:07:59 +00:00
wlan_capacity_calculator: remove redundant parentheses
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -49,32 +49,32 @@ def main():
|
|||||||
try:
|
try:
|
||||||
args = parse.parse_args()
|
args = parse.parse_args()
|
||||||
# Station
|
# Station
|
||||||
if (args.station is not None):
|
if args.station is not None:
|
||||||
Calculator_name = args.station
|
Calculator_name = args.station
|
||||||
else:
|
else:
|
||||||
Calculator_name = "11abg"
|
Calculator_name = "11abg"
|
||||||
|
|
||||||
# Traffic Type
|
# Traffic Type
|
||||||
if (args.traffic is not None):
|
if args.traffic is not None:
|
||||||
traffic_name = args.traffic
|
traffic_name = args.traffic
|
||||||
else:
|
else:
|
||||||
traffic_name = "Data"
|
traffic_name = "Data"
|
||||||
|
|
||||||
# PHY Bit Rate
|
# PHY Bit Rate
|
||||||
if (args.phy is not None):
|
if args.phy is not None:
|
||||||
phy_name = args.phy
|
phy_name = args.phy
|
||||||
else:
|
else:
|
||||||
phy_name = "54"
|
phy_name = "54"
|
||||||
|
|
||||||
# Encryption
|
# Encryption
|
||||||
if (args.encryption is not None):
|
if args.encryption is not None:
|
||||||
encryption_name = args.encryption
|
encryption_name = args.encryption
|
||||||
else:
|
else:
|
||||||
encryption_name = "None"
|
encryption_name = "None"
|
||||||
|
|
||||||
# QoS
|
# QoS
|
||||||
|
|
||||||
if (args.qos is not None):
|
if args.qos is not None:
|
||||||
qos_name = args.qos
|
qos_name = args.qos
|
||||||
else:
|
else:
|
||||||
if "11abg" in Calculator_name:
|
if "11abg" in Calculator_name:
|
||||||
@@ -84,35 +84,35 @@ def main():
|
|||||||
|
|
||||||
# 802.11 MAC Frame
|
# 802.11 MAC Frame
|
||||||
|
|
||||||
if (args.mac is not None):
|
if args.mac is not None:
|
||||||
mac_name = args.mac
|
mac_name = args.mac
|
||||||
else:
|
else:
|
||||||
mac_name = "1518"
|
mac_name = "1518"
|
||||||
|
|
||||||
# Basic Rate Set
|
# Basic Rate Set
|
||||||
|
|
||||||
if (args.basic is not None):
|
if args.basic is not None:
|
||||||
basic_name = args.basic
|
basic_name = args.basic
|
||||||
else:
|
else:
|
||||||
basic_name = ['1', '2', '5.5', '11', '6', '12', '24']
|
basic_name = ['1', '2', '5.5', '11', '6', '12', '24']
|
||||||
|
|
||||||
# Preamble value
|
# Preamble value
|
||||||
|
|
||||||
if (args.preamble is not None):
|
if args.preamble is not None:
|
||||||
preamble_name = args.preamble
|
preamble_name = args.preamble
|
||||||
else:
|
else:
|
||||||
preamble_name = "Short"
|
preamble_name = "Short"
|
||||||
|
|
||||||
# Slot Time
|
# Slot Time
|
||||||
|
|
||||||
if (args.slot is not None):
|
if args.slot is not None:
|
||||||
slot_name = args.slot
|
slot_name = args.slot
|
||||||
else:
|
else:
|
||||||
slot_name = "Short"
|
slot_name = "Short"
|
||||||
|
|
||||||
# Codec Type (Voice Traffic)
|
# Codec Type (Voice Traffic)
|
||||||
|
|
||||||
if (args.codec is not None):
|
if args.codec is not None:
|
||||||
codec_name = args.codec
|
codec_name = args.codec
|
||||||
else:
|
else:
|
||||||
if "11abg" in Calculator_name:
|
if "11abg" in Calculator_name:
|
||||||
@@ -124,14 +124,14 @@ def main():
|
|||||||
|
|
||||||
# RTS/CTS Handshake
|
# RTS/CTS Handshake
|
||||||
|
|
||||||
if (args.rts is not None):
|
if args.rts is not None:
|
||||||
rts_name = args.rts
|
rts_name = args.rts
|
||||||
else:
|
else:
|
||||||
rts_name = "No"
|
rts_name = "No"
|
||||||
|
|
||||||
# CTS - to - self(protection)
|
# CTS - to - self(protection)
|
||||||
|
|
||||||
if (args.cts is not None):
|
if args.cts is not None:
|
||||||
cts_name = args.cts
|
cts_name = args.cts
|
||||||
else:
|
else:
|
||||||
cts_name = "No"
|
cts_name = "No"
|
||||||
@@ -140,7 +140,7 @@ def main():
|
|||||||
|
|
||||||
# Data/Voice MCS Index
|
# Data/Voice MCS Index
|
||||||
|
|
||||||
if (args.data is not None):
|
if args.data is not None:
|
||||||
data_name = args.data
|
data_name = args.data
|
||||||
else:
|
else:
|
||||||
if "11n" in Calculator_name:
|
if "11n" in Calculator_name:
|
||||||
@@ -150,7 +150,7 @@ def main():
|
|||||||
|
|
||||||
# Channel Bandwidth
|
# Channel Bandwidth
|
||||||
|
|
||||||
if (args.channel is not None):
|
if args.channel is not None:
|
||||||
channel_name = args.channel
|
channel_name = args.channel
|
||||||
else:
|
else:
|
||||||
if "11n" in Calculator_name:
|
if "11n" in Calculator_name:
|
||||||
@@ -160,35 +160,35 @@ def main():
|
|||||||
|
|
||||||
# Guard Interval
|
# Guard Interval
|
||||||
|
|
||||||
if (args.guard is not None):
|
if args.guard is not None:
|
||||||
guard_name = args.guard
|
guard_name = args.guard
|
||||||
else:
|
else:
|
||||||
guard_name = "400"
|
guard_name = "400"
|
||||||
|
|
||||||
# Highest Basic MCS
|
# Highest Basic MCS
|
||||||
|
|
||||||
if (args.highest is not None):
|
if args.highest is not None:
|
||||||
highest_name = args.highest
|
highest_name = args.highest
|
||||||
else:
|
else:
|
||||||
highest_name = '1'
|
highest_name = '1'
|
||||||
|
|
||||||
# PLCP Configuration
|
# PLCP Configuration
|
||||||
|
|
||||||
if (args.plcp is not None):
|
if args.plcp is not None:
|
||||||
plcp_name = args.plcp
|
plcp_name = args.plcp
|
||||||
else:
|
else:
|
||||||
plcp_name = "Mixed"
|
plcp_name = "Mixed"
|
||||||
|
|
||||||
# IP Packets per A-MSDU
|
# IP Packets per A-MSDU
|
||||||
|
|
||||||
if (args.ip is not None):
|
if args.ip is not None:
|
||||||
ip_name = args.ip
|
ip_name = args.ip
|
||||||
else:
|
else:
|
||||||
ip_name = "0"
|
ip_name = "0"
|
||||||
|
|
||||||
# MAC Frames per A-MPDU
|
# MAC Frames per A-MPDU
|
||||||
|
|
||||||
if (args.mc is not None):
|
if args.mc is not None:
|
||||||
mc_name = args.mc
|
mc_name = args.mc
|
||||||
else:
|
else:
|
||||||
if "11n" in Calculator_name:
|
if "11n" in Calculator_name:
|
||||||
@@ -198,21 +198,21 @@ def main():
|
|||||||
|
|
||||||
# CWmin (leave alone for default)
|
# CWmin (leave alone for default)
|
||||||
|
|
||||||
if (args.cwin is not None):
|
if args.cwin is not None:
|
||||||
cwin_name = args.cwin
|
cwin_name = args.cwin
|
||||||
else:
|
else:
|
||||||
cwin_name = '15'
|
cwin_name = '15'
|
||||||
|
|
||||||
# Spatial Streams
|
# Spatial Streams
|
||||||
|
|
||||||
if (args.spatial is not None):
|
if args.spatial is not None:
|
||||||
spatial_name = args.spatial
|
spatial_name = args.spatial
|
||||||
else:
|
else:
|
||||||
spatial_name = '4'
|
spatial_name = '4'
|
||||||
|
|
||||||
# RTS/CTS Handshake and CTS-to-self
|
# RTS/CTS Handshake and CTS-to-self
|
||||||
|
|
||||||
if (args.rtscts is not None):
|
if args.rtscts is not None:
|
||||||
rtscts_name = args.rtscts
|
rtscts_name = args.rtscts
|
||||||
else:
|
else:
|
||||||
rtscts_name = 'No'
|
rtscts_name = 'No'
|
||||||
|
|||||||
Reference in New Issue
Block a user