mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 12:18:00 +00:00
port_probe.py updated for MCS values greater then 7
l3_csprofile.py removed the guard interval column for now Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -282,7 +282,7 @@ class L3CXProfile(LFCliBase):
|
|||||||
probe_results['TX MCS'] = probe_port.tx_mcs
|
probe_results['TX MCS'] = probe_port.tx_mcs
|
||||||
probe_results['TX NSS'] = probe_port.tx_nss
|
probe_results['TX NSS'] = probe_port.tx_nss
|
||||||
probe_results['TX MHz'] = probe_port.tx_mhz
|
probe_results['TX MHz'] = probe_port.tx_mhz
|
||||||
probe_results['TX guard interval'] = probe_port.tx_ns
|
#probe_results['TX guard interval'] = probe_port.tx_ns
|
||||||
probe_results['TX Mbps gi short'] = probe_port.tx_data_rate_gi_short_Mbps
|
probe_results['TX Mbps gi short'] = probe_port.tx_data_rate_gi_short_Mbps
|
||||||
probe_results['TX Mbps gi long'] = probe_port.tx_data_rate_gi_long_Mbps
|
probe_results['TX Mbps gi long'] = probe_port.tx_data_rate_gi_long_Mbps
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ class L3CXProfile(LFCliBase):
|
|||||||
probe_results['RX MCS'] = probe_port.rx_mcs
|
probe_results['RX MCS'] = probe_port.rx_mcs
|
||||||
probe_results['RX NSS'] = probe_port.rx_nss
|
probe_results['RX NSS'] = probe_port.rx_nss
|
||||||
probe_results['RX MHz'] = probe_port.rx_mhz
|
probe_results['RX MHz'] = probe_port.rx_mhz
|
||||||
probe_results['RX guard interval'] = probe_port.rx_ns
|
#probe_results['RX guard interval'] = probe_port.rx_ns
|
||||||
probe_results['RX Mbps gi short'] = probe_port.rx_data_rate_gi_short_Mbps
|
probe_results['RX Mbps gi short'] = probe_port.rx_data_rate_gi_short_Mbps
|
||||||
probe_results['RX Mbps gi long'] = probe_port.rx_data_rate_gi_long_Mbps
|
probe_results['RX Mbps gi long'] = probe_port.rx_data_rate_gi_long_Mbps
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ class ProbePort(LFCliBase):
|
|||||||
self.rx_mgt_6Mb_frame = None
|
self.rx_mgt_6Mb_frame = None
|
||||||
|
|
||||||
self.tx_bitrate = None
|
self.tx_bitrate = None
|
||||||
self.tx_actual_mcs = None
|
|
||||||
self.tx_mcs = None
|
self.tx_mcs = None
|
||||||
self.tx_nss = None
|
self.tx_nss = None
|
||||||
self.tx_mbit = None
|
self.tx_mbit = None
|
||||||
@@ -44,7 +43,6 @@ class ProbePort(LFCliBase):
|
|||||||
self.tx_data_rate_gi_long_Mbps = None
|
self.tx_data_rate_gi_long_Mbps = None
|
||||||
|
|
||||||
self.rx_bitrate = None
|
self.rx_bitrate = None
|
||||||
self.rx_actual_mcs = None
|
|
||||||
self.rx_mcs = None
|
self.rx_mcs = None
|
||||||
self.rx_nss = None
|
self.rx_nss = None
|
||||||
self.rx_mbit = None
|
self.rx_mbit = None
|
||||||
@@ -74,15 +72,13 @@ class ProbePort(LFCliBase):
|
|||||||
tx_bitrate = [x for x in text if 'tx bitrate' in x][0].replace('\t', ' ')
|
tx_bitrate = [x for x in text if 'tx bitrate' in x][0].replace('\t', ' ')
|
||||||
print("tx_bitrate {tx_bitrate}".format(tx_bitrate=tx_bitrate))
|
print("tx_bitrate {tx_bitrate}".format(tx_bitrate=tx_bitrate))
|
||||||
self.tx_bitrate = tx_bitrate.split(':')[-1].strip(' ')
|
self.tx_bitrate = tx_bitrate.split(':')[-1].strip(' ')
|
||||||
print("tx_nss {tx_nss}".format(tx_nss=self.tx_nss))
|
|
||||||
self.tx_mhz = [x.strip('\t') for x in text if 'tx bitrate' in x][0].split('MHz')[0].rsplit(' ')[-1].strip(' ')
|
self.tx_mhz = [x.strip('\t') for x in text if 'tx bitrate' in x][0].split('MHz')[0].rsplit(' ')[-1].strip(' ')
|
||||||
print("tx_mhz {tx_mhz}".format(tx_mhz=self.tx_mhz))
|
print("tx_mhz {tx_mhz}".format(tx_mhz=self.tx_mhz))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
tx_mcs = [x.strip('\t') for x in text if 'tx bitrate' in x][0].split(':')[1].strip('\t')
|
tx_mcs = [x.strip('\t') for x in text if 'tx bitrate' in x][0].split(':')[1].strip('\t')
|
||||||
self.tx_mcs = int(tx_mcs.split('MCS')[1].strip(' ').split(' ')[0])
|
self.tx_mcs = int(tx_mcs.split('MCS')[1].strip(' ').split(' ')[0])
|
||||||
self.tx_actual_mcs = self.tx_mcs & 8
|
print("self.tx_mcs {tx_mcs}".format(tx_mcs=self.tx_mcs))
|
||||||
print("self.tx_mcs {tx_mcs} self.tx_actual_mcs {tx_actual_mcs}".format(tx_mcs=self.tx_mcs,tx_actual_mcs=self.tx_actual_mcs))
|
|
||||||
try:
|
try:
|
||||||
self.tx_nss = [x.strip('\t') for x in text if 'tx bitrate' in x][0].split('NSS')[1].strip(' ')
|
self.tx_nss = [x.strip('\t') for x in text if 'tx bitrate' in x][0].split('NSS')[1].strip(' ')
|
||||||
except:
|
except:
|
||||||
@@ -95,7 +91,9 @@ class ProbePort(LFCliBase):
|
|||||||
self.tx_nss = 3
|
self.tx_nss = 3
|
||||||
elif 24 <= self.tx_mcs <= 31:
|
elif 24 <= self.tx_mcs <= 31:
|
||||||
self.tx_nss = 4
|
self.tx_nss = 4
|
||||||
|
print("tx_nss {tx_nss}".format(tx_nss=self.tx_nss))
|
||||||
self.tx_mbit = float(self.tx_bitrate.split(' ')[0])
|
self.tx_mbit = float(self.tx_bitrate.split(' ')[0])
|
||||||
|
print("tx_mbit {tx_mbit}".format(tx_mbit=self.tx_mbit))
|
||||||
self.calculated_data_rate_tx_HT()
|
self.calculated_data_rate_tx_HT()
|
||||||
|
|
||||||
except IndexError as error:
|
except IndexError as error:
|
||||||
@@ -106,8 +104,6 @@ class ProbePort(LFCliBase):
|
|||||||
self.rx_bitrate = rx_bitrate.split(':')[-1].strip(' ')
|
self.rx_bitrate = rx_bitrate.split(':')[-1].strip(' ')
|
||||||
# rx will received : 6Mbps encoding is legacy frame
|
# rx will received : 6Mbps encoding is legacy frame
|
||||||
try:
|
try:
|
||||||
self.rx_nss = [x.strip('\t') for x in text if 'rx bitrate' in x][0].split('NSS')[1].strip(' ')
|
|
||||||
print("rx_nss {rx_nss}".format(rx_nss=self.rx_nss))
|
|
||||||
self.rx_mhz = [x.strip('\t') for x in text if 'rx bitrate' in x][0].split('MHz')[0].rsplit(' ')[-1].strip(' ')
|
self.rx_mhz = [x.strip('\t') for x in text if 'rx bitrate' in x][0].split('MHz')[0].rsplit(' ')[-1].strip(' ')
|
||||||
print("rx_mhz {rx_mhz}".format(rx_mhz=self.rx_mhz))
|
print("rx_mhz {rx_mhz}".format(rx_mhz=self.rx_mhz))
|
||||||
self.rx_mgt_6Mb_frame = False
|
self.rx_mgt_6Mb_frame = False
|
||||||
@@ -120,8 +116,7 @@ class ProbePort(LFCliBase):
|
|||||||
try:
|
try:
|
||||||
rx_mcs = [x.strip('\t') for x in text if 'rx bitrate' in x][0].split(':')[1].strip('\t')
|
rx_mcs = [x.strip('\t') for x in text if 'rx bitrate' in x][0].split(':')[1].strip('\t')
|
||||||
self.rx_mcs = int(rx_mcs.split('MCS')[1].strip(' ').split(' ')[0])
|
self.rx_mcs = int(rx_mcs.split('MCS')[1].strip(' ').split(' ')[0])
|
||||||
self.rx_actual_mcs = self.rx_mcs & 8
|
print("self.rx_mcs {rx_mcs}".format(rx_mcs=self.rx_mcs))
|
||||||
print("self.rx_mcs {rx_mcs} self.rx_actual_mcs {rx_actual_mcs}".format(rx_mcs=self.rx_mcs,rx_actual_mcs=self.rx_actual_mcs))
|
|
||||||
try:
|
try:
|
||||||
self.rx_nss = [x.strip('\t') for x in text if 'rx bitrate' in x][0].split('NSS')[1].strip(' ')
|
self.rx_nss = [x.strip('\t') for x in text if 'rx bitrate' in x][0].split('NSS')[1].strip(' ')
|
||||||
except:
|
except:
|
||||||
@@ -136,6 +131,9 @@ class ProbePort(LFCliBase):
|
|||||||
self.rx_nss = 4
|
self.rx_nss = 4
|
||||||
|
|
||||||
self.rx_mbit = self.rx_bitrate.split(' ')[0]
|
self.rx_mbit = self.rx_bitrate.split(' ')[0]
|
||||||
|
print("rx_nss {rx_nss}".format(rx_nss=self.rx_nss))
|
||||||
|
self.rx_mbit = float(self.rx_bitrate.split(' ')[0])
|
||||||
|
print("rx_mbit {rx_mbit}".format(rx_mbit=self.rx_mbit))
|
||||||
self.calculated_data_rate_rx_HT()
|
self.calculated_data_rate_rx_HT()
|
||||||
if 'HE not supported' in [x.strip('\t') for x in text if 'HE' in x]:
|
if 'HE not supported' in [x.strip('\t') for x in text if 'HE' in x]:
|
||||||
self.he = False
|
self.he = False
|
||||||
@@ -187,52 +185,52 @@ class ProbePort(LFCliBase):
|
|||||||
else:
|
else:
|
||||||
print("For HT if cannot be read bw is assumed to be 20")
|
print("For HT if cannot be read bw is assumed to be 20")
|
||||||
N_sd = 52
|
N_sd = 52
|
||||||
self.rx_mhz = 20
|
self.tx_mhz = 20
|
||||||
|
|
||||||
# NSS
|
# NSS
|
||||||
N_ss = self.tx_nss
|
N_ss = self.tx_nss
|
||||||
# MCS (Modulation Coding Scheme) determines the constands
|
# MCS (Modulation Coding Scheme) determines the constands
|
||||||
# MCS 0 == Modulation BPSK R = 1/2 , N_bpscs = 1,
|
# MCS 0 == Modulation BPSK R = 1/2 , N_bpscs = 1,
|
||||||
# Only for HT configuration
|
# Only for HT configuration
|
||||||
if self.tx_actual_mcs == 0:
|
if self.tx_mcs == 0 or self.tx_mcs == 16 or self.tx_mcs == 24:
|
||||||
R = 1/2
|
R = 1/2
|
||||||
N_bpscs = 1
|
N_bpscs = 1
|
||||||
# MCS 1 == Modulation QPSK R = 1/2 , N_bpscs = 2
|
# MCS 1 == Modulation QPSK R = 1/2 , N_bpscs = 2
|
||||||
elif self.tx_actual_mcs == 1:
|
elif self.tx_mcs == 1 or self.tx_mcs == 17 or self.tx_mcs == 25:
|
||||||
R = 1/2
|
R = 1/2
|
||||||
N_bpscs = 2
|
N_bpscs = 2
|
||||||
# MCS 2 == Modulation QPSK R = 3/4 , N_bpscs = 2
|
# MCS 2 == Modulation QPSK R = 3/4 , N_bpscs = 2
|
||||||
elif self.tx_actual_mcs == 2:
|
elif self.tx_mcs == 2 or self.tx_mcs == 18 or self.tx_mcs == 26:
|
||||||
R = 3/4
|
R = 3/4
|
||||||
N_bpscs = 2
|
N_bpscs = 2
|
||||||
# MCS 3 == Modulation 16-QAM R = 1/2 , N_bpscs = 4
|
# MCS 3 == Modulation 16-QAM R = 1/2 , N_bpscs = 4
|
||||||
elif self.tx_actual_mcs == 3:
|
elif self.tx_mcs == 3 or self.tx_mcs == 19 or self.tx_mcs == 27:
|
||||||
R = 1/2
|
R = 1/2
|
||||||
N_bpscs = 4
|
N_bpscs = 4
|
||||||
# MCS 4 == Modulation 16-QAM R = 3/4 , N_bpscs = 4
|
# MCS 4 == Modulation 16-QAM R = 3/4 , N_bpscs = 4
|
||||||
elif self.tx_actual_mcs == 4:
|
elif self.tx_mcs == 4 or self.tx_mcs == 20 or self.tx_mcs == 28:
|
||||||
R = 3/4
|
R = 3/4
|
||||||
N_bpscs = 4
|
N_bpscs = 4
|
||||||
# MCS 5 == Modulation 64-QAM R = 2/3 , N_bpscs = 6
|
# MCS 5 == Modulation 64-QAM R = 2/3 , N_bpscs = 6
|
||||||
elif self.tx_actual_mcs == 5:
|
elif self.tx_mcs == 5 or self.tx_mcs == 21 or self.tx_mcs == 29:
|
||||||
R = 2/3
|
R = 2/3
|
||||||
N_bpscs = 6
|
N_bpscs = 6
|
||||||
# MCS 6 == Modulation 64-QAM R = 3/4 , N_bpscs = 6
|
# MCS 6 == Modulation 64-QAM R = 3/4 , N_bpscs = 6
|
||||||
elif self.tx_actual_mcs == 6:
|
elif self.tx_mcs == 6 or self.tx_mcs == 22 or self.tx_mcs == 30:
|
||||||
R = 3/4
|
R = 3/4
|
||||||
N_bpscs = 6
|
N_bpscs = 6
|
||||||
# MCS 7 == Modulation 64-QAM R = 5/6 , N_bpscs = 6
|
# MCS 7 == Modulation 64-QAM R = 5/6 , N_bpscs = 6
|
||||||
elif self.tx_actual_mcs == 7:
|
elif self.tx_mcs == 7 or self.tx_mcs == 23 or self.tx_mcs == 31:
|
||||||
R = 5/6
|
R = 5/6
|
||||||
N_bpscs = 6
|
N_bpscs = 6
|
||||||
|
|
||||||
print("mcs {mcs} N_sd {N_sd} N_bpscs {N_bpscs} R {R} N_ss {N_ss} T_dft {T_dft} T_gi_short {T_gi_short}".format(
|
print("tx: mcs {mcs} N_sd {N_sd} N_bpscs {N_bpscs} R {R} N_ss {N_ss} T_dft {T_dft} T_gi_short {T_gi_short}".format(
|
||||||
mcs=self.tx_mcs,N_sd=N_sd,N_bpscs=N_bpscs,R=R,N_ss=N_ss,T_dft=T_dft,T_gi_short=T_gi_short))
|
mcs=self.tx_mcs,N_sd=N_sd,N_bpscs=N_bpscs,R=R,N_ss=N_ss,T_dft=T_dft,T_gi_short=T_gi_short))
|
||||||
|
|
||||||
self.tx_data_rate_gi_short_Mbps = ((N_sd * N_bpscs * R * float(N_ss)) / (T_dft + T_gi_short))/1000000
|
self.tx_data_rate_gi_short_Mbps = ((N_sd * N_bpscs * R * float(N_ss)) / (T_dft + T_gi_short))/1000000
|
||||||
print("data_rate gi_short {data_rate} Mbit/s".format(data_rate=self.tx_data_rate_gi_short_Mbps))
|
print("tx_data_rate gi_short {data_rate} Mbit/s".format(data_rate=self.tx_data_rate_gi_short_Mbps))
|
||||||
|
|
||||||
print("mcs {mcs} N_sd {N_sd} N_bpscs {N_bpscs} R {R} N_ss {N_ss} T_dft {T_dft} T_gi_long {T_gi_long}".format(
|
print("tx: mcs {mcs} N_sd {N_sd} N_bpscs {N_bpscs} R {R} N_ss {N_ss} T_dft {T_dft} T_gi_long {T_gi_long}".format(
|
||||||
mcs=self.tx_mcs,N_sd=N_sd,N_bpscs=N_bpscs,R=R,N_ss=N_ss,T_dft=T_dft,T_gi_long=T_gi_long))
|
mcs=self.tx_mcs,N_sd=N_sd,N_bpscs=N_bpscs,R=R,N_ss=N_ss,T_dft=T_dft,T_gi_long=T_gi_long))
|
||||||
|
|
||||||
self.tx_data_rate_gi_long_Mbps = ((N_sd * N_bpscs * R * float(N_ss)) / (T_dft + T_gi_long))/1000000
|
self.tx_data_rate_gi_long_Mbps = ((N_sd * N_bpscs * R * float(N_ss)) / (T_dft + T_gi_long))/1000000
|
||||||
@@ -278,35 +276,35 @@ class ProbePort(LFCliBase):
|
|||||||
# MCS (Modulation Coding Scheme) determines the constands
|
# MCS (Modulation Coding Scheme) determines the constands
|
||||||
# MCS 0 == Modulation BPSK R = 1/2 , N_bpscs = 1,
|
# MCS 0 == Modulation BPSK R = 1/2 , N_bpscs = 1,
|
||||||
# Only for HT configuration
|
# Only for HT configuration
|
||||||
if self.rx_actual_mcs == 0:
|
if self.rx_mcs == 0 or self.rx_mcs == 16 or self.rx_mcs == 24:
|
||||||
R = 1/2
|
R = 1/2
|
||||||
N_bpscs = 1
|
N_bpscs = 1
|
||||||
# MCS 1 == Modulation QPSK R = 1/2 , N_bpscs = 2
|
# MCS 1 == Modulation QPSK R = 1/2 , N_bpscs = 2
|
||||||
elif self.rx_actual_mcs == 1:
|
elif self.rx_mcs == 1 or self.rx_mcs == 17 or self.rx_mcs == 25:
|
||||||
R = 1/2
|
R = 1/2
|
||||||
N_bpscs = 2
|
N_bpscs = 2
|
||||||
# MCS 2 == Modulation QPSK R = 3/4 , N_bpscs = 2
|
# MCS 2 == Modulation QPSK R = 3/4 , N_bpscs = 2
|
||||||
elif self.rx_actual_mcs == 2:
|
elif self.rx_mcs == 2 or self.rx_mcs == 18 or self.rx_mcs == 26:
|
||||||
R = 3/4
|
R = 3/4
|
||||||
N_bpscs = 2
|
N_bpscs = 2
|
||||||
# MCS 3 == Modulation 16-QAM R = 1/2 , N_bpscs = 4
|
# MCS 3 == Modulation 16-QAM R = 1/2 , N_bpscs = 4
|
||||||
elif self.rx_actual_mcs == 3:
|
elif self.rx_mcs == 3 or self.rx_mcs == 19 or self.rx_mcs == 27:
|
||||||
R = 1/2
|
R = 1/2
|
||||||
N_bpscs = 4
|
N_bpscs = 4
|
||||||
# MCS 4 == Modulation 16-QAM R = 3/4 , N_bpscs = 4
|
# MCS 4 == Modulation 16-QAM R = 3/4 , N_bpscs = 4
|
||||||
elif self.rx_actual_mcs == 4:
|
elif self.rx_mcs == 4 or self.rx_mcs == 20 or self.rx_mcs == 28:
|
||||||
R = 3/4
|
R = 3/4
|
||||||
N_bpscs = 4
|
N_bpscs = 4
|
||||||
# MCS 5 == Modulation 64-QAM R = 2/3 , N_bpscs = 6
|
# MCS 5 == Modulation 64-QAM R = 2/3 , N_bpscs = 6
|
||||||
elif self.rx_actual_mcs == 5:
|
elif self.rx_mcs == 5 or self.rx_mcs == 21 or self.rx_mcs == 29:
|
||||||
R = 2/3
|
R = 2/3
|
||||||
N_bpscs = 6
|
N_bpscs = 6
|
||||||
# MCS 6 == Modulation 64-QAM R = 3/4 , N_bpscs = 6
|
# MCS 6 == Modulation 64-QAM R = 3/4 , N_bpscs = 6
|
||||||
elif self.rx_actual_mcs == 6:
|
elif self.rx_mcs == 6 or self.rx_mcs == 22 or self.rx_mcs == 30:
|
||||||
R = 3/4
|
R = 3/4
|
||||||
N_bpscs = 6
|
N_bpscs = 6
|
||||||
# MCS 7 == Modulation 64-QAM R = 5/6 , N_bpscs = 6
|
# MCS 7 == Modulation 64-QAM R = 5/6 , N_bpscs = 6
|
||||||
elif self.rx_actual_mcs == 7:
|
elif self.rx_mcs == 7 or self.rx_mcs == 23 or self.rx_mcs == 31:
|
||||||
R = 5/6
|
R = 5/6
|
||||||
N_bpscs = 6
|
N_bpscs = 6
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user