source: ReferenceDesigns/w3_802.11/python/wlan_exp/docs/source/node.rst

Last change on this file was 6320, checked in by chunter, 5 years ago

1.8.0 release wlan-exp

File size: 8.1 KB
RevLine 
[6320]1.. _wlan_exp_node:
2
3.. include:: globals.rst
4
5############
6Node Classes
7############
8
9The ``WlanExpNode`` class represents one node in a network of nodes running the 802.11 Reference Design. This class
10is the primary interface for interacting with nodes by providing methods to send commands and read status
11of the node. This is the base class for all node types and provides the common functionality for all nodes.
12
13
14***************
15Base Node Class
16***************
17
18The ``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)
20for the recommend node initialization flow which returns a properly initialized ``WlanExpNode`` instance.
21
22The class attributes listed below should be considered read-only. The relevant attributes are given values during
23the initialization process. These values represent the identity and state of the node running the 802.11 Reference
24Design. Changing an attribute value does not change the corresponding state of the node, a mismatch that will distrupt
25normal operation of ``wlan_exp`` tools.
26
27.. autoclass:: wlan_exp.node.WlanExpNode
28
29
30****************
31Node Sub-Classes
32****************
33
34The AP, STA and IBSS node types are represented by dedicated subclasses of ``WlanExpNode``. The node objects in ``wlan_exp``
35scripts 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*******************
46Common Node Methods
47*******************
48
49The 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
52Node
53====
54
55These ``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
84Tx Power and Rate
85=================
86
87These commands configure the transmit power and rate selections at the node. Powers and rates are
88configured individually for various packet types. For unicast packets, Tx powers and rates can be
89configured 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
96Antenna Modes
97=============
98
99These 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
107Association State
108=================
109
110These ``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
120Tx/Rx Packet Counts
121===================
122
123These ``WlanExpNode`` commands are used to to interact with the counts framework. 
124Counts are kept for for each node in the station info list.  If promiscuous
125counts are enabled, then the node will keep counts for every MAC address
126overheard (whether the node is in the station info list or not).  In order to
127keep the maximum number of counts recorded on the node to a reasonable amount,
128there is a maximum number of counts implemented in the C code.  When that
129maximum is reached, then the oldest counts structure of an unassociated node
130will be overwritten.
131
132.. automethod:: wlan_exp.node.WlanExpNode.get_txrx_counts
133
134
135Local Traffic Generator (LTG)
136=============================
137
138These ``WlanExpNode`` commands interact with the node's LTG framework. LTGs provides local traffic sources with configurable
139destimations, payloads, and traffic loads. These traffic sources are ideal for running experiments without external
140traffic sources connected via Ethernet.
141
142Creating an LTG consumes memory in the node's heap. LTG creation can fail if the node's heap is full. Always
143remove LTGs you no longer need using the ``ltg_remove`` or ``ltg_remove_all`` methods.
144
145LTG traffic flows are configured with dedicated classes. See :doc:`ltg` for more information on how the payloads
146and 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
158Log
159===
160
161These ``WlanExpNode`` commands are used to interact with the logging framework. 
162The 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>`_ 
164for more information on the memory map; Use ``log_get_capacity()`` to see the
165number of bytes allocated for the log).
166
167The log has the ability to wrap to enable longer experiments.  By enabling
168wrapping and periodically pulling the logs, you can effectively log an
169experiment for an indefinite amount of time.  Also, the log can record the
170entire payload of the wireless packets.  Both the log wrapping and logging of
171full 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
186Network Scan
187============
188
189These ``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
Note: See TracBrowser for help on using the repository browser.