270 | | The wlan_exp Python node object implements a {{{node.set_low_param(pramID, paramVal)}}} method. Your Python script can call this method for any initialized node. The parameter ID/value pair will be sent to the node via Ethernet, passed from CPU High to CPU Low via the mailbox and (eventually) |
| 270 | The wlan_exp Python node object implements a {{{node.set_low_param(param_id, param_values)}}} method. Your Python script can call this method for any initialized node. The parameter ID and list of values will be sent to the node via Ethernet, passed from CPU High to CPU Low via the mailbox and (eventually) processed by the MAC Low Framework. CPU High acknowledges the command immediately, allowing the Python script to continue execution. There are no guarantees on how long CPU Low might take to actually apply the parameter update. |
| 271 | |
| 272 | |
| 273 | '''C Code'''[[BR]] |
| 274 | Adding a new Low Parameter requires new C code for CPU Low. No changes are required in CPU High. |
| 275 | |
| 276 | CPU Low handles Low Parameter messages in two places. |
| 277 | * '''Framework''': the MAC Low Framework handles parameters in the {{{case IPC_MBOX_LOW_PARAM:}}} clause of the IPC mailbox reception handler. This code is responsible for any framework or PHY parameters which are used by any low-level MAC. In the Reference Design code this handler is implemented in the {{{wlan_mac_low_process_ipc_msg()}}} function in [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_low_framework/wlan_mac_low.c#L544 wlan_mac_low.c]. |
| 278 | |
| 279 | * '''MAC''': the lower MAC handles parameters specific to the MAC application. Each lower-level MAC implements a callback function which processes any MAc-specific parameters. The framework executes this callback for any parameter not handled by the framework itself. The Reference Design code implements these callbacks in {{{wlan_dcf_process_low_param()}}} in [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_low_dcf/wlan_mac_dcf.c#L1423 wlan_mac_dcf.c] and {{{wlan_nomac_process_low_param()}}} in [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_low_nomac/wlan_mac_nomac.c#L296 wlan_mac_nomac.c]. |
| 280 | |
| 281 | When adding a new parameter you should add a new {{{case}}} to either the framework handler or the MAC code's handler. |