Skip to content

lf_interop_ping_plotter.py : Test can now run on both real + virtual …#65

Open
KowshikVarma-CT wants to merge 1 commit into
masterfrom
plotter_vr
Open

lf_interop_ping_plotter.py : Test can now run on both real + virtual …#65
KowshikVarma-CT wants to merge 1 commit into
masterfrom
plotter_vr

Conversation

@KowshikVarma-CT
Copy link
Copy Markdown
Collaborator

@KowshikVarma-CT KowshikVarma-CT commented May 21, 2026

lf_interop_ping_plotter.py : Test can now run on both real + virtual clients and also existing stations

VERIFIED_CLI

1.python3 lf_interop_ping_plotter.py --mgr 192.168.207.78 --target www.google.com --clients_type both --ping_interval 5 --ping_duration 60s --server_ip 192.168.204.60 --use_existing_sta_list --existing_sta_list 1.1.sta1000,1.1.sta1001,1.1.sta1002,1.1.sta1003 --use_default_config

2.python3 lf_interop_ping_plotter.py --mgr 192.168.207.78 --target 142.250.76.206 --radio 1.1.wiphy0 --ping_interval 5 --ping_duration 1m --debug --ssid NETGEAR_2G_Open --passwd NA --security open --expected_passfail_value 5 --clients_type both --server_ip 192.168.204.60 --use_default_config

…clients and also existing stations

VERIFIED_CLI

1.python3 lf_interop_ping_plotter.py --mgr 192.168.207.78 --target www.google.com --clients_type both --ping_interval 5 --ping_duration 60s --server_ip 192.168.204.60 --use_existing_sta_list --existing_sta_list 1.1.sta1000,1.1.sta1001,1.1.sta1002,1.1.sta1003 --use_default_config

2.python3 lf_interop_ping_plotter.py --mgr 192.168.207.78  --target 142.250.76.206  --radio 1.1.wiphy0  --ping_interval 5 --ping_duration 1m --debug --ssid NETGEAR_2G_Open --passwd NA --security open --expected_passfail_value 5 --clients_type both --server_ip 192.168.204.60 --use_default_config

Signed-off-by: KowshikVarma-CT <kowshik.varma@candelatech.com>
Comment on lines +3692 to +3699
if len(result_data['last results']) != 0:
result = result_data['last results'].split('\n')
if len(result) > 1:
last_result = result[-2]
else:
last_result = result[-1]
else:
last_result = ""
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wht this is added ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment if neccesary

Comment on lines +4117 to +4150
# for writting the stopped status data into csv

h, m, s = map(int, ping.duration.split(":"))
duration = timedelta(hours=h, minutes=m, seconds=s)
timestamp = (ping.start_time + duration).strftime("%d/%m/%Y %H:%M:%S")

csv_dir = "csv_reports"

# print(ping.result_json)
# print(type(os), os)

for device_name, device_data in ping.result_json.items():
if device_data['os'] == "Virtual":
csv_file = os.path.join(csv_dir, f"sta_{device_name.replace('.', '_')}.csv")
else:
csv_file = os.path.join(csv_dir, f"device_{device_name.replace('.', '_')}.csv")
sent = device_data['sent']
received = device_data['recv']
dropped = device_data['dropped']
status = "Stopped"
siz = len(device_data['rtts'])
rtt = 0
try:
rtt = device_data['rtts'][siz]
except KeyError:
logger.info(f"rtts of the device {device_name} not found")
if "dBm" in device_data['rssi']:
device_data['rssi'] = device_data['rssi'].split(" ")[0]

with open(csv_file, 'a', newline='') as file:
writer = csv.writer(file)
writer.writerow([timestamp, rtt, sent, received, dropped, status, device_data['rssi'], device_data['channel'],
device_data['mode'], device_data['ssid'], device_data['bssid'], device_data['mac']])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this to seperate helper function.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep the main function clean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants