wiki:802.11/wlan_exp/log/util

Version 2 (modified by murphpo, 10 years ago) (diff)

--

Future home of wlan_exp_log.log_util documentation.

Log Index Filtering

The filter_log_index method applies filters to a raw log index, generating a new dictionary suitable for use by downstream utilities.

A few example uses of filter_log_index:

import warpnet.wlan_exp_log.log_util as log_util

#No filtering, just map entry_type_id values (log_index_raw keys) to entry type classes (log_index keys)
log_index = log_util.filter_log_index(log_index_raw)

#Create index with only RX_OFDM entries
log_index = log_util.filter_log_index(log_index_raw, include_only=['RX_OFDM'])

#Create index with only RX_OFDM and TX entries
log_index = log_util.filter_log_index(log_index_raw, include_only=['RX_OFDM', 'TX'])

#Create index for type RX_ALL composed of all RX_OFDM and RX_DSSS entries
log_index = log_util.filter_log_index(log_index_raw, merge={'RX_ALL':['RX_OFDM', 'RX_DSSS']})

#Create index for all TX and RX entries, with RX_OFDM and RX_DSSS entries merged into RX_ALL
log_index = log_util.filter_log_index(log_index_raw, include_only=['RX_ALL', 'TX'], merge={'RX_ALL':['RX_OFDM', 'RX_DSSS']})