3 | | = New Script Conventions in WARPLab 7.5 and Beyond = |
4 | | |
5 | | WARPLab 7.5 was designed to be fully compatible with unmodified WARPLab 7.4 scripts. No changes are necessary for these older scripts to run. There might, however, be a warning printed to the MATLAB console about deprecated behavior. In this documentation, we describe this deprecated behavior and explain the small changes required to adopt the new conventions. Users should adopt these conventions in their current scripts as the deprecated commands may be removed in a future release of WARPLab. |
| 3 | |
| 4 | = Changes in WARPLab 7.6 = |
| 5 | |
| 6 | WARPLab 7.6 adopts a new, cleaner syntax for handling the numeric IDs of RF interfaces and trigger inputs/outputs. The previous syntax is still supported in WARPLab 7.6 but will be removed in future releases. Refer to the code snippets below for details. All [wiki:../Examples WARPLab examples] have been updated with the new syntax. |
| 7 | |
| 8 | Refer to the reference design user guide for details of the new {{{[wiki:./Reference/Interface/X245 wl_getInterfaceIDs()]}}}, {{{[wiki:./Reference/TriggerManager/TriggerProcessor wl_getTriggerInputIDs()]}}}, and {{{[wiki:./Reference/TriggerManager/TriggerProcessor wl_getTriggerOutputIDs()]}}} methods. |
| 9 | |
| 10 | {{{#!html |
| 11 | <table border=1 width=600><tr valign=top><td width=50% align=left> |
| 12 | }}} |
| 13 | |
| 14 | {{{ |
| 15 | #!text/matlab |
| 16 | % WARPLab 7.5 |
| 17 | |
| 18 | % Read Trigger IDs into workspace |
| 19 | [T_IN_ETH_A, T_IN_ENERGY, T_IN_AGCDONE, T_IN_REG, T_IN_D0, T_IN_D1, T_IN_D2, T_IN_D3, T_IN_ETH_B] = wl_getTriggerInputIDs(nodes(1)); |
| 20 | [T_OUT_BASEBAND, T_OUT_AGC, T_OUT_D0, T_OUT_D1, T_OUT_D2, T_OUT_D3] = wl_getTriggerOutputIDs(nodes(1)); |
| 21 | |
| 22 | % Connect the ETH_A trigger input to the BASEBAND and AGC trigger outputs |
| 23 | wl_triggerManagerCmd(nodes, 'output_config_input_selection', [T_OUT_BASEBAND, T_OUT_AGC], [T_IN_ETH_A]); |
| 24 | |
| 25 | % Read RF interface IDs into the workspace |
| 26 | [RFA,RFB] = wl_getInterfaceIDs(nodes(1)); |
| 27 | |
| 28 | % Call some interface commands |
| 29 | wl_interfaceCmd(nodes, RFA, 'channel', 2.4, 11); |
| 30 | wl_interfaceCmd(nodes, RFB, 'channel', 2.4, 6); |
| 31 | wl_interfaceCmd(nodes, 'RF_ALL', 'tx_gains', 3, 20); |
| 32 | |
| 33 | |
| 34 | }}} |
| 35 | |
| 36 | {{{#!html |
| 37 | </td><td width=50% align=left> |
| 38 | }}} |
| 39 | |
| 40 | {{{ |
| 41 | #!text/matlab |
| 42 | |
| 43 | % WARPLab 7.6 |
| 44 | |
| 45 | % Read Trigger IDs into workspace |
| 46 | trig_in_ids = wl_getTriggerInputIDs(nodes(1)); |
| 47 | trig_out_ids = wl_getTriggerOutputIDs(nodes(1)); |
| 48 | |
| 49 | % Connect the ETH_A trigger input to the BASEBAND and AGC trigger outputs |
| 50 | wl_triggerManagerCmd(nodes, 'output_config_input_selection', [trig_out_ids.BASEBAND, trig_out_ids.AGC], [trig_in_ids.ETH_A]); |
| 51 | |
| 52 | % Read RF interface IDs into the workspace |
| 53 | ifc_ids = wl_getInterfaceIDs(nodes(1)); |
| 54 | |
| 55 | wl_interfaceCmd(nodes, ifc_ids.RF_A, 'channel', 2.4, 11); |
| 56 | wl_interfaceCmd(nodes, ifc_ids.RF_B, 'channel', 2.4, 6); |
| 57 | wl_interfaceCmd(nodes, ifc_ids.RF_ALL, 'tx_gains', 3, 20); |
| 58 | |
| 59 | }}} |
| 60 | |
| 61 | {{{#!html |
| 62 | </td></tr></table> |
| 63 | }}} |
| 64 | |
| 65 | ---- |
| 66 | |
| 67 | = Changes in WARPLab 7.5 = |
| 68 | |
| 69 | WARPLab 7.5 was designed to be fully compatible with unmodified WARPLab 7.4 scripts. Some syntax and behaviors from WARPLab 7.4 will be deprecated in future WARPLab releases. WARPLab 7.5 will print warnings when these features are encountered. In this documentation, we describe this deprecated behavior and explain the small changes required to adopt the new syntax. Users should adopt these conventions in their current scripts as the deprecated commands may be removed in a future release of WARPLab. |