Changes between Version 17 and Version 18 of 802.11/wlan_exp/log/entry_types


Ignore:
Timestamp:
Jan 12, 2017, 1:58:20 PM (7 years ago)
Author:
murphpo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 802.11/wlan_exp/log/entry_types

    v17 v18  
    1313Users can define new log entry types or modify existing types to support their experiment. The requirements for this are documented below.
    1414
    15 == Reference Design Entry Types ==
    16 The sections below document the log entry types defined in the latest 802.11 Reference Design C and Python code.
     15== Pre-Defined Constants ==
    1716
    18 This listing is generated directly from the [source:/ReferenceDesigns/w3_802.11/python/wlan_exp/log/entry_types.py entry_types.py] file in the wlan_exp Python package. You can generate a text version of the entry type list with this code:
     17The values for some log entry fields are drawn from a pre-defined set of constants. For example, the {{{phy_mode}}} fields in Tx/Rx entries have integer values in {{{[0..2]}}} representing DSSS, NONHT or HTMF PHY modes.
     18
     19The log entry type definitions in Python include lists of the pre-defined constants for each field. You can access these pre-defined constants with the {{{get_entry_constants('Entry_Type')}}} method. This method returns an object with an attribute for each field with constant definitions; each per-field attribute has an attribute per constant. For example:
     20
    1921{{{#!python
    20 from wlan_exp.log.entry_types import log_entry_types as log_entry_types
     22import wlan_exp.log.util as log_util
    2123
    22 for tid in log_entry_types.keys():
    23     if(type(tid) is int and tid != 0): #only take int type IDs and skip NULL
    24         print(log_entry_types[tid].generate_entry_doc(fmt='txt'))
     24# Retrieve constants for TX_LOW entries
     25TX_CONSTS     = log_util.get_entry_constants('TX_LOW')
     26
     27# Filter an array of TX_LOW entries by pkt_type
     28#  Assumes tx_low is numpy array of TX_HIGH entries
     29tx_low_idx = (tx_low['pkt_type'] == TX_CONSTS.pkt_type.BEACON)
     30tx_low_beacons = tx_low[tx_low_idx]
    2531}}}
    2632
     33Here {{{TX_CONSTS.pkt_type.BEACON}}} encodes the constant value for the {{{pkt_type}}} field indicating the {{{TX_LOW}}} entry contains a Beacon packet.
     34
     35The entry type documentation below includes the full list of pre-defined constant names and values.
     36
     37----
    2738
    2839{{{#!comment
     40###########
     41START of entry type list
     42###########
     43
    2944Note to selves:
    3045
     
    3651
    3752}}}
    38 
    39 ----
    4053
    4154[[Include(source:/ReferenceDesigns/w3_802.11/python/wlan_exp/log/entry_type_wiki_docs.txt,  text/x-trac-wiki)]]
     
    97110|| s16 / signed short || h || int16 ||
    98111|| s32 / signed int || i || int32 ||
     112
     113----
     114== Reference Design Entry Types ==
     115The list of log entry types above is auto-generated from the [source:/ReferenceDesigns/w3_802.11/python/wlan_exp/log/entry_types.py entry_types.py] source code in the wlan_exp Python package. You can generate a text version of the entry type list with this code:
     116
     117{{{#!python
     118from wlan_exp.log.entry_types import log_entry_types as log_entry_types
     119
     120for tid in log_entry_types.keys():
     121    if(type(tid) is int and tid != 0): #only take int type IDs and skip NULL
     122        print(log_entry_types[tid].generate_entry_doc(fmt='txt'))
     123}}}