[[TracNav(WARPLab/TOC)]] = Utility Scripts = == wl_setup == File source: [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/wl_setup.m wl_setup.m] This function should be run whenever a WARPLab release is first set up. It will ask the user a series of prompts on the MATLAB command line and, based on responses to those prompts, form a 'wl_config.ini' file inside the {{{config}}} directory of a WARPLab Reference Design release. Additionally, a 'wl_config.ini' file already exists in the {{{config}}} folder, this function will use the configuration options specified there as the default values for creating the new script. As such, if users have complex configurations that they do not want to manually recreate every time they download a new WARPLab Reference Design release, they can copy their old configuration files into the new {{{config}}} folder before running 'wl_setup'. == wl_config_read == File source: [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/util/wl_config_read.m wl_config_read.m] This function will read the current configuration file and print its contents to the MATLAB command line. == wl_ver == File source: [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/util/wl_ver.m wl_ver.m] This function will print the version of the WARPLab framework that is currently configured in MATLAB. == wl_cmd_doc == File source: [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/util/wl_cmd_doc.m wl_cmd_doc.m] This function prints documentation for individual commands based on the command string provided as the argument. This is the same information that is present in [wiki:../Commands the online command documentation]. For example, typing {{{wl_cmd_doc('write_IQ')}}} into the MATLAB command line will print command documentation for the [wiki:../Commands/Baseband#write_iq write_IQ] command. == wl_cmd_list == File source: [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/util/wl_cmd_list.m wl_cmd_list.m] For the 'wl_cmd_doc' function, a user must know the command string they want documentation for. This function, 'wl_cmd_list', will print the command documentation for all commands in a given class. Examples: '''String:''' {{{ wl_cmd_list('wl_node') }}} Prints all commands/help for 'wl_node' class '''Class:''' {{{ wl_cmd_list(wl_node) }}} Prints all commands/help for 'wl_node' class '''Instance:''' {{{ n = wl_node; wl_cmd_list(n) }}} Prints all commands/help for 'wl_node' class {{{ wl_cmd_list(n.baseband) }}} Prints all commands/help for the node's baseband object == wl_initNodes == File source: [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/util/wl_initNodes.m wl_initNodes.m] This function is the best way to create [wiki:../Architecture/Classes#Node wl_node] objects and have them configured to communicate with WARP nodes in your network. There are two ways of calling wl_initNodes: 1. Single Argument Let {{{N}}} represent the number of nodes in the network. Then, {{{ nodes = wl_initNodes(N) }}} will create a vector of {{{N}}} wl_node objects in the variable {{{nodes}}} 2. Double Argument An optional second argument can be provided to assign specific node IDs to the created wl_node objects. {{{ nodes = wl_initNodes(N, 0:(N-1)) }}} results in precisely the same vector of wl_node objects as the single argument case. However, the optional second argument can be changed to an other vector of IDs to speak to boards configured with those IDs on their DIP switches.