Changes between Version 10 and Version 11 of 802.11/wlan_exp/Extending


Ignore:
Timestamp:
Dec 15, 2015, 12:11:19 PM (8 years ago)
Author:
murphpo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 802.11/wlan_exp/Extending

    v10 v11  
    1515== User Commands ==
    1616
    17 The User Command flow provides a simple way to send custom commands and data from your Python script to the WARP v3 nodes in your experimental network. This flow presents a simple pipe for exchanging arbitrary commands and responses between a Python script and the upper-level MAC in a WARP node running the 802.11 Reference Design.
     17The User Command flow provides a simple way to send custom commands and data from your Python script to the WARP v3 nodes in your experimental network. This flow presents a pipe for exchanging arbitrary commands and responses between a Python script and the upper-level MAC in a WARP node running the 802.11 Reference Design.
    1818
    1919=== Python ===
     
    4747The 802.11 MAC code running on the WARP node handles user commands at two levels.
    4848
    49 If the command behavior is common to all MAC applications, the command is handled in the {{{process_user_cmd()}}} function in {{{wlan_exp_user.c}}}. You should modify {{{process_user_cmd()}}} to handle any new framework-level commands required for your application. Any command IDs not handled in {{{process_user_cmd()}}} will be passed through to the MAC application.
    50 
    51 If a command behavior depends on the upper-level MAC application, the command is handled in the {{{wlan_exp_process_user_cmd()}}} callback function in the top-level MAC. You should modify the {{{wlan_exp_process_user_cmd()}}} function in the {{{wlan_mac_ap.c}}}, {{{wlan_mac_sta.c}}} and {{{wlan_mac_ibss.c}}} files to implement any MAC-specific command behaviors.
    52 
    53 The implementations of command handlers are similar in {{{wlan_exp_user.c}}} (for common commands) and in top-level MACs (for MAC-specific behaviors). The command processing flow is:
    54  * Examine the command ID and deterine which code block ({{{case}}}) shoudl handle the command
     49 * '''Framework''': if the command behavior is common to all MAC applications, the command is handled in the {{{process_user_cmd()}}} function in {{{wlan_exp_user.c}}}. You should modify {{{process_user_cmd()}}} to handle any new framework-level commands required for your application. Any command IDs not handled in {{{process_user_cmd()}}} will be passed through to the MAC application.
     50
     51 * '''MAC Application''': if a command behavior depends on the upper-level MAC application, the command is handled in the {{{wlan_exp_process_user_cmd()}}} callback function in the top-level MAC. You should modify the {{{wlan_exp_process_user_cmd()}}} function in the {{{wlan_mac_ap.c}}}, {{{wlan_mac_sta.c}}} and {{{wlan_mac_ibss.c}}} files to implement any MAC-specific command behaviors.
     52
     53Command handlers in these functions share a common structure:
     54 * Examine the command ID and determine which code block ({{{case}}}) shoudl handle the command
    5555 * Implement the required command behavior
    5656 * If a response payload is required, populate the response values into the {{{response->args}}} array