[6320] | 1 | .. _wlan_exp_node: |
---|
| 2 | |
---|
| 3 | .. include:: globals.rst |
---|
| 4 | |
---|
| 5 | ############ |
---|
| 6 | Node Classes |
---|
| 7 | ############ |
---|
| 8 | |
---|
| 9 | The ``WlanExpNode`` class represents one node in a network of nodes running the 802.11 Reference Design. This class |
---|
| 10 | is the primary interface for interacting with nodes by providing methods to send commands and read status |
---|
| 11 | of the node. This is the base class for all node types and provides the common functionality for all nodes. |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | *************** |
---|
| 15 | Base Node Class |
---|
| 16 | *************** |
---|
| 17 | |
---|
| 18 | The ``WlanExpNode`` class implements the interface to an 802.11 Reference Design node. The ``WlanExpNode`` class should |
---|
| 19 | **not** be instantiated directly. Refer to the ``wlan_exp`` examples (http://warpproject.org/trac/wiki/802.11/wlan_exp/examples) |
---|
| 20 | for the recommend node initialization flow which returns a properly initialized ``WlanExpNode`` instance. |
---|
| 21 | |
---|
| 22 | The class attributes listed below should be considered read-only. The relevant attributes are given values during |
---|
| 23 | the initialization process. These values represent the identity and state of the node running the 802.11 Reference |
---|
| 24 | Design. Changing an attribute value does not change the corresponding state of the node, a mismatch that will distrupt |
---|
| 25 | normal operation of ``wlan_exp`` tools. |
---|
| 26 | |
---|
| 27 | .. autoclass:: wlan_exp.node.WlanExpNode |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | **************** |
---|
| 31 | Node Sub-Classes |
---|
| 32 | **************** |
---|
| 33 | |
---|
| 34 | The AP, STA and IBSS node types are represented by dedicated subclasses of ``WlanExpNode``. The node objects in ``wlan_exp`` |
---|
| 35 | scripts will be instances of these subclasses. Each subclass implements methods that are specific to a given node type. |
---|
| 36 | |
---|
| 37 | .. toctree:: |
---|
| 38 | :maxdepth: 1 |
---|
| 39 | |
---|
| 40 | node_ap.rst |
---|
| 41 | node_sta.rst |
---|
| 42 | node_ibss.rst |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | ******************* |
---|
| 46 | Common Node Methods |
---|
| 47 | ******************* |
---|
| 48 | |
---|
| 49 | The list below documents each node method implemented by the ``WlanExpNode`` class. These methods can be used with any |
---|
| 50 | ``wlan_exp`` node type (AP, STA, IBSS). |
---|
| 51 | |
---|
| 52 | Node |
---|
| 53 | ==== |
---|
| 54 | |
---|
| 55 | These ``WlanExpNode`` commands are used to interact with the node and control parameters associated with the node operation. |
---|
| 56 | |
---|
| 57 | .. automethod:: wlan_exp.node.WlanExpNode.reset_all |
---|
| 58 | .. automethod:: wlan_exp.node.WlanExpNode.reset |
---|
| 59 | .. automethod:: wlan_exp.node.WlanExpNode.get_wlan_mac_address |
---|
| 60 | .. automethod:: wlan_exp.node.WlanExpNode.set_mac_time |
---|
| 61 | .. automethod:: wlan_exp.node.WlanExpNode.get_mac_time |
---|
| 62 | .. automethod:: wlan_exp.node.WlanExpNode.get_system_time |
---|
| 63 | .. automethod:: wlan_exp.node.WlanExpNode.enable_beacon_mac_time_update |
---|
| 64 | .. automethod:: wlan_exp.node.WlanExpNode.set_radio_channel |
---|
| 65 | .. automethod:: wlan_exp.node.WlanExpNode.set_low_to_high_rx_filter |
---|
| 66 | .. automethod:: wlan_exp.node.WlanExpNode.set_low_param |
---|
| 67 | .. automethod:: wlan_exp.node.WlanExpNode.set_dcf_param |
---|
| 68 | .. automethod:: wlan_exp.node.WlanExpNode.configure_pkt_det_min_power |
---|
| 69 | .. automethod:: wlan_exp.node.WlanExpNode.set_phy_samp_rate |
---|
| 70 | .. automethod:: wlan_exp.node.WlanExpNode.set_random_seed |
---|
| 71 | .. automethod:: wlan_exp.node.WlanExpNode.enable_dsss |
---|
| 72 | .. automethod:: wlan_exp.node.WlanExpNode.set_print_level |
---|
| 73 | |
---|
| 74 | .. automethod:: wlan_exp.node.WlanExpNode.enable_ethernet_portal |
---|
| 75 | |
---|
| 76 | .. automethod:: wlan_exp.node.WlanExpNode.queue_tx_data_purge_all |
---|
| 77 | |
---|
| 78 | .. automethod:: wlan_exp.node.WlanExpNode.send_user_command |
---|
| 79 | |
---|
| 80 | .. automethod:: wlan_exp.node.WlanExpNode.identify |
---|
| 81 | .. automethod:: wlan_exp.node.WlanExpNode.ping |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | Tx Power and Rate |
---|
| 85 | ================= |
---|
| 86 | |
---|
| 87 | These commands configure the transmit power and rate selections at the node. Powers and rates are |
---|
| 88 | configured individually for various packet types. For unicast packets, Tx powers and rates can be |
---|
| 89 | configured for specific destination addresses as well. |
---|
| 90 | |
---|
| 91 | .. automethod:: wlan_exp.node.WlanExpNode.set_tx_power |
---|
| 92 | .. automethod:: wlan_exp.node.WlanExpNode.set_tx_power_ctrl |
---|
| 93 | .. automethod:: wlan_exp.node.WlanExpNode.set_tx_rate_data |
---|
| 94 | .. automethod:: wlan_exp.node.WlanExpNode.set_tx_rate_mgmt |
---|
| 95 | |
---|
| 96 | Antenna Modes |
---|
| 97 | ============= |
---|
| 98 | |
---|
| 99 | These commands control which RF interface is used for Tx and Rx of individual packet types. |
---|
| 100 | |
---|
| 101 | .. automethod:: wlan_exp.node.WlanExpNode.set_rx_ant_mode |
---|
| 102 | .. automethod:: wlan_exp.node.WlanExpNode.get_rx_ant_mode |
---|
| 103 | |
---|
| 104 | .. automethod:: wlan_exp.node.WlanExpNode.set_tx_ant_mode_data |
---|
| 105 | .. automethod:: wlan_exp.node.WlanExpNode.set_tx_ant_mode_mgmt |
---|
| 106 | |
---|
| 107 | Association State |
---|
| 108 | ================= |
---|
| 109 | |
---|
| 110 | These ``WlanExpNode`` commands are used to modify / query the association state of the node. |
---|
| 111 | |
---|
| 112 | .. automethod:: wlan_exp.node.WlanExpNode.configure_bss |
---|
| 113 | .. automethod:: wlan_exp.node.WlanExpNode.get_network_info |
---|
| 114 | .. automethod:: wlan_exp.node.WlanExpNode.get_bss_config |
---|
| 115 | .. automethod:: wlan_exp.node.WlanExpNode.get_bss_members |
---|
| 116 | .. automethod:: wlan_exp.node.WlanExpNode.get_station_info_list |
---|
| 117 | .. automethod:: wlan_exp.node.WlanExpNode.get_network_list |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | Tx/Rx Packet Counts |
---|
| 121 | =================== |
---|
| 122 | |
---|
| 123 | These ``WlanExpNode`` commands are used to to interact with the counts framework. |
---|
| 124 | Counts are kept for for each node in the station info list. If promiscuous |
---|
| 125 | counts are enabled, then the node will keep counts for every MAC address |
---|
| 126 | overheard (whether the node is in the station info list or not). In order to |
---|
| 127 | keep the maximum number of counts recorded on the node to a reasonable amount, |
---|
| 128 | there is a maximum number of counts implemented in the C code. When that |
---|
| 129 | maximum is reached, then the oldest counts structure of an unassociated node |
---|
| 130 | will be overwritten. |
---|
| 131 | |
---|
| 132 | .. automethod:: wlan_exp.node.WlanExpNode.get_txrx_counts |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | Local Traffic Generator (LTG) |
---|
| 136 | ============================= |
---|
| 137 | |
---|
| 138 | These ``WlanExpNode`` commands interact with the node's LTG framework. LTGs provides local traffic sources with configurable |
---|
| 139 | destimations, payloads, and traffic loads. These traffic sources are ideal for running experiments without external |
---|
| 140 | traffic sources connected via Ethernet. |
---|
| 141 | |
---|
| 142 | Creating an LTG consumes memory in the node's heap. LTG creation can fail if the node's heap is full. Always |
---|
| 143 | remove LTGs you no longer need using the ``ltg_remove`` or ``ltg_remove_all`` methods. |
---|
| 144 | |
---|
| 145 | LTG traffic flows are configured with dedicated classes. See :doc:`ltg` for more information on how the payloads |
---|
| 146 | and timing of LTG flows are controlled. |
---|
| 147 | |
---|
| 148 | .. automethod:: wlan_exp.node.WlanExpNode.ltg_configure |
---|
| 149 | .. automethod:: wlan_exp.node.WlanExpNode.ltg_get_status |
---|
| 150 | .. automethod:: wlan_exp.node.WlanExpNode.ltg_remove |
---|
| 151 | .. automethod:: wlan_exp.node.WlanExpNode.ltg_start |
---|
| 152 | .. automethod:: wlan_exp.node.WlanExpNode.ltg_stop |
---|
| 153 | .. automethod:: wlan_exp.node.WlanExpNode.ltg_remove_all |
---|
| 154 | .. automethod:: wlan_exp.node.WlanExpNode.ltg_start_all |
---|
| 155 | .. automethod:: wlan_exp.node.WlanExpNode.ltg_stop_all |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | Log |
---|
| 159 | === |
---|
| 160 | |
---|
| 161 | These ``WlanExpNode`` commands are used to interact with the logging framework. |
---|
| 162 | The log occupies a large portion of DRAM which is set in C code during runtime |
---|
| 163 | (see `wlan_mac_high.h <http://warpproject.org/trac/browser/ReferenceDesigns/w3_802.11/c/wlan_mac_high_framework/include/wlan_mac_high.h>`_ |
---|
| 164 | for more information on the memory map; Use ``log_get_capacity()`` to see the |
---|
| 165 | number of bytes allocated for the log). |
---|
| 166 | |
---|
| 167 | The log has the ability to wrap to enable longer experiments. By enabling |
---|
| 168 | wrapping and periodically pulling the logs, you can effectively log an |
---|
| 169 | experiment for an indefinite amount of time. Also, the log can record the |
---|
| 170 | entire payload of the wireless packets. Both the log wrapping and logging of |
---|
| 171 | full payloads is off by default and can be modified with the |
---|
| 172 | ``log_configure()`` command. |
---|
| 173 | |
---|
| 174 | .. automethod:: wlan_exp.node.WlanExpNode.log_configure |
---|
| 175 | .. automethod:: wlan_exp.node.WlanExpNode.log_get |
---|
| 176 | .. automethod:: wlan_exp.node.WlanExpNode.log_get_all_new |
---|
| 177 | .. automethod:: wlan_exp.node.WlanExpNode.log_get_size |
---|
| 178 | .. automethod:: wlan_exp.node.WlanExpNode.log_get_capacity |
---|
| 179 | .. automethod:: wlan_exp.node.WlanExpNode.log_get_indexes |
---|
| 180 | .. automethod:: wlan_exp.node.WlanExpNode.log_get_flags |
---|
| 181 | .. automethod:: wlan_exp.node.WlanExpNode.log_is_full |
---|
| 182 | .. automethod:: wlan_exp.node.WlanExpNode.log_write_exp_info |
---|
| 183 | .. automethod:: wlan_exp.node.WlanExpNode.log_write_time |
---|
| 184 | |
---|
| 185 | |
---|
| 186 | Network Scan |
---|
| 187 | ============ |
---|
| 188 | |
---|
| 189 | These ``WlanExpNode`` commands are used to to scan the node's environment. |
---|
| 190 | |
---|
| 191 | .. automethod:: wlan_exp.node.WlanExpNode.set_scan_parameters |
---|
| 192 | .. automethod:: wlan_exp.node.WlanExpNode.start_network_scan |
---|
| 193 | .. automethod:: wlan_exp.node.WlanExpNode.stop_network_scan |
---|
| 194 | .. automethod:: wlan_exp.node.WlanExpNode.is_scanning |
---|