port_probe.py : added HT equation

ct_us_001_scripts.json updated ip_variable_time.py test

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-10-26 07:11:00 -06:00
parent c0eb2c000e
commit 5d22de3824
2 changed files with 82 additions and 9 deletions

View File

@@ -54,9 +54,9 @@ class ProbePort(LFCliBase):
sleep(0.2)
response = self.json_get(self.probepath)
self.response = response
if self.debug:
print(self.probepath)
print(response)
#if self.debug:
print("probepath (eid): {probepath}".format(probepath=self.probepath))
print("Probe response: {response}".format(response=self.response))
text = self.response['probe-results'][0][self.eid_str]['probe results'].split('\n')
signals = [x.strip('\t').split('\t') for x in text if 'signal' in x]
keys = [x[0].strip(' ').strip(':') for x in signals]
@@ -186,7 +186,66 @@ class ProbePort(LFCliBase):
print(error)
print('mbit: %s, mcs: %s' % (mbit, mcs))
def ofdma_calculator(self, mbit, mcs):
df = self.df[self.df['VHT'] == mcs]
data_rate = (mbit * nbpscs * cding * nss) / (tdft + tgi)
return data_rate
def calculated_data_rate_HT(self,mcs):
# TODO compare with standard for 40 MHz if values change
N_sd = 0 # Number of Data Subcarriers based on modulation and bandwith
N_bpscs = 0# Number of coded bits per Subcarrier(Determined by the modulation, MCS)
R = 0 # coding , (Determined by the modulation, MCS )
N_ss = 0 # Number of Spatial Streams
T_dft = 3.2 * 10**-6 # Constant for HT
T_gi_short = .4 * 10**-6 # Guard index.
T_gi_long = .8 * 10**-6 # Guard index.
# Note the T_gi is not exactly know so need to calculate bothh with .4 and .8
# the nubmer of Data Subcarriers is based on modulation and bandwith
bw = 20
if bw == 20:
N_sd = 52
elif bw == 40:
N_sd = 108
elif bw == 80:
N_sd = 234
elif bw == 160:
N_sd = 468
else:
print("bw needs to be know")
exit(1)
# MCS (Modulation Coding Scheme) determines the constands
# MCS 0 == Modulation BPSK R = 1/2 , N_bpscs = 1,
if mcs == 0:
R = 1/2
N_bpscs = 1
# MCS 1 == Modulation QPSK R = 1/2 , N_bpscs = 2
elif mcs == 1:
R = 1/2
N_bpscs = 2
# MCS 2 == Modulation QPSK R = 3/4 , N_bpscs = 2
elif mcs == 2:
R = 3/4
N_bpscs = 2
# MCS 3 == Modulation 16-QAM R = 1/2 , N_bpscs = 4
elif mcs == 3:
R = 1/2
N_bpscs = 4
# MCS 4 == Modulation 16-QAM R = 3/4 , N_bpscs = 4
elif mcs == 4:
R = 3/4
N_bpscs = 4
# MCS 5 == Modulation 64-QAM R = 2/3 , N_bpscs = 6
elif mcs == 5:
R = 2/3
N_bpscs = 6
# MCS 6 == Modulation 64-QAM R = 3/4 , N_bpscs = 6
elif mcs == 6:
R = 3/4
N_bpscs = 6
# MCS 7 == Modulation 64-QAM R = 5/6 , N_bpscs = 6
elif mcs ==7:
R = 5/6
N_bpscs = 6
data_rate_gi_short = (N_sd * N_bpscs * R * N_ss) / (T_dft + T_gi_short)
print("data_rate gi_short {data_rate}".format(data_rate=data_rate_gi_short))
data_rate_gi_long = (N_sd * N_bpscs * R * N_ss) / (T_dft + T_gi_long)
print("data_rate gi_long {data_rate}".format(data_rate=data_rate_gi_long))
return data_rate_gi_short, data_rate_gi_long

View File

@@ -11,8 +11,22 @@
},
"test_suites":{
"suite_short":{
"create_l3":{"enabled":"TRUE","command":"create_l4.py","args":"--mgr 192.168.100.116 --radio wiphy0 --ssid SSID_5G_USED --passwd SSID_5G_PW_USED --security SECURITY_5G_USED --debug"},
"test_l3_longevity":{"enabled":"TRUE","command":"test_l3_longevity.py","args":"--mgr 192.168.100.116 --test_duration 15s --polling_interval 5s --upstream_port eth2 --radio 'radio==wiphy1,stations==4,ssid==asus11ax-5,ssid_pw==hello123,security==wpa2' --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"}
"test_ip_variable_time0-ipv4":{
"enabled":"TRUE",
"command":"test_ip_variable_time.py",
"args":"",
"args_list":[
" --mgr 192.168.100.116 --radio wiphy1 --ssid asus11ax-5 --passwd hello123 --security wpa2 --test_duration 15s",
" --output_format excel --layer3_cols name,tx_bytes,rx_bytes,dropped --traffic_type lf_udp --debug"]
},
"test_ip_variable_time1-ipv4":{
"enabled":"TRUE",
"command":"test_ip_variable_time.py",
"args":"",
"args_list":[
" --mgr 192.168.100.116 --radio wiphy1 --ssid asus11ax-5 --passwd hello123 --security wpa2 --test_duration 15s",
" --output_format csv --layer3_cols name,tx_bytes,rx_bytes,dropped --traffic_type lf_udp --debug"
]}
},
"suite_l3":{
"test_l3_longevity":{"enabled":"TRUE","load_db":"NONE","command":"test_l3_longevity.py","args":"--mgr 192.168.100.116 --test_duration 15s --polling_interval 5s --upstream_port eth2 --radio 'radio==wiphy1,stations==4,ssid==asus11ax-5,ssid_pw==hello123,security==wpa2' --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"}