| 141 | These constants are useful when filtering arrays of log entries. For example, assume {{{n_log_rx}}} is a numpy array of {{{RX_OFDM}}} entries: |
| 142 | {{{#!python |
| 143 | >>> c_rx = log_util.get_entry_constants('RX_OFDM') |
| 144 | |
| 145 | # Extract FCS Good Rx |
| 146 | >>> rx_good = n_log_rx[ (n_log_rx['flags'] & c_rx.flags['FCS_GOOD']) != 0) ] |
| 147 | |
| 148 | # Extract Beacon Rx |
| 149 | >>> rx_beacon = n_log_rx[ (n_log_rx['pkt_type'] == c_rx.pkt_type['BEACON']) ] |
| 150 | }}} |
| 151 | |
| 152 | The [../examples wlan_exp example scripts] have been updated to use the per-entry-type constants. |
| 153 | |