Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions py-scripts/test_l3.py
Original file line number Diff line number Diff line change
Expand Up @@ -3424,15 +3424,27 @@ def write_dl_port_csv(
atten, port_eid
]

# Normalize RSSI / Channel so the port CSV columns keep a single dtype.
sig_str = str(port_data.get('signal', '')).strip()
signal_val = sig_str.split(" ")[0] if "dBm" in sig_str else sig_str

chan_str = str(port_data.get('channel', '')).strip()
if chan_str in ('', '0', '-1'):
channel_val = 'NA'
elif '[channel:' in chan_str:
channel_val = chan_str.split(':')[1].replace(']', '').strip()
else:
channel_val = chan_str
Comment thread
Durga-CT marked this conversation as resolved.
Outdated

row = row + [port_data['bps rx'],
port_data['bps tx'],
port_data['rx-rate'],
port_data['tx-rate'],
port_data['signal'],
signal_val,
port_data['ap'],
port_data['mode'],
port_data['mac'],
port_data['channel'],
channel_val,
latency,
jitter,
total_ul_rate,
Expand Down Expand Up @@ -3486,15 +3498,27 @@ def write_ul_port_csv(
atten, port_eid
]

# Normalize RSSI / Channel so the port CSV columns keep a single dtype.
sig_str = str(port_data.get('signal', '')).strip()
signal_val = sig_str.split(" ")[0] if "dBm" in sig_str else sig_str

chan_str = str(port_data.get('channel', '')).strip()
if chan_str in ('', '0', '-1'):
channel_val = 'NA'
elif '[channel:' in chan_str:
channel_val = chan_str.split(':')[1].replace(']', '').strip()
else:
channel_val = chan_str

row = row + [port_data['bps rx'],
port_data['bps tx'],
port_data['rx-rate'],
port_data['tx-rate'],
port_data['signal'],
signal_val,
port_data['ap'],
port_data['mode'],
port_data['mac'],
port_data['channel'],
channel_val,
latency,
jitter,
total_ul_rate,
Expand Down
Loading