[[TracNav(WARPLab/TOC)]] = MATLAB Classes = A typical WARPLab experiment script contains a collection of {{{Node}}} objects and a single {{{Trigger}}} object. [[Image(typical.png,width=800)]] Attached to each {{{Node}}} is a number of different submodules: {{{Baseband}}}, {{{Interface Group}}}, {{{Transport}}}, {{{Trigger Manager}}}, and {{{User Extension}}}. Each of these modules are objects from different MATLAB classes. This document serves to explain each MATLAB class and what it is responsible for. === Node === [[Image(node.png,width=800)]] A {{{Node}}} is an object of the [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_node.m wl_node class]. The primary role of the node object is to broker commands to other modules within the node and collect responses to those commands to deliver back to the user. Furthermore, the methods within the wl_node class are able to deal with vector inputs of of multiple wl_node objects, allowing automatic iteration through the provided nodes to replicate a single command provided by the user script. Beyond being the access point for users to interact with all of the modules in a WARPLab node, the wl_node class processes a few node-level commands of its own (such as [wiki:../../Commands/Node#identify identify]-- a command to help users identify a particular node by blinking LEDs on the hardware). === Trigger === [[Image(trigger.png,width=800)]] A {{{Trigger}}} is an object from the [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_trigger.m wl_trigger.m] abstract class. Currently, the only class that subclasses from this abstract class is [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_trigger_eth_udp_broadcast.m wl_trigger_eth_udp_broadcast.m]. This is a simple class that contains an ID (provided by [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_trigger_IDs.m wl_trigger_IDs.m]) and a method for sending the trigger through a broadcast {{{Transport}}} object. === Transport === [[Image(transport.png,width=800)]] A {{{Transport}}} is an object from the [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_transport.m wl_transport] abstract class. Currently, four subclasses of wl_transport exist: Unicast Transports: * [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_transport_eth_udp_java.m wl_transport_eth_udp_java.m] * [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_transport_eth_udp_pnet.m wl_transport_eth_udp_pnet.m] Broadcast Transports: * [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_transport_eth_udp_java_bcast.m wl_transport_eth_udp_java_bcast.m] * [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_transport_eth_udp_pnet_bcast.m wl_transport_eth_udp_pnet_bcast.m] The pnet/java variants are functionally identical, but use either compiled Mex code or built-in java code, respectively, for opening UDP sockets. The unicast and broadcast variants serve different purposes: ==== Unicast Transport ==== A Unicast {{{Transport}}} object is attached to the {{{Node}}} and is responsible for sending to and receiving from a specific IP address and port associated with a WARP node. Additionally, the unicast objects will process [wiki:../../Commands/Transport#CommandListandDocumentation transport commands] brokered by the {{{Node}}}. ==== Broadcast Transport ==== A Broadcast {{{Transport}}} object does not process any commands, but contains a method for transmitting to more than one WARP node at once. This is used by the {{{Trigger}}} object as well as the [wiki:../../Utility#wl_initNodes wl_initNodes] utility function. === Interface Group === [[Image(interface.png,width=800)]] An {{{Interface Group}}} is an object from the [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_interface_group.m wl_interface_group.m] abstract class. Currently, the only subclass of wl_interface_group is [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_interface_group_X245.m wl_interface_group_X245.m], which allows control over the 2.4/5GHz transceivers available on WARP. An "interface group" is a collection of multiple identical interfaces. For example, on WARP v3 hardware, a single wl_interface_group_X245 object is used to control both of the on-board interfaces (RFA and RFB) and the two extra interfaces (RFC and RFD) provided by the [wiki:HardwareUsersGuides/FMC-RF-2X245 FMC-RF-2X245 card] if it is mounted on the WARP v3 carrier. === Baseband === [[Image(baseband.png,width=800)]] A {{{Baseband}}} is an object from the [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_baseband.m wl_baseband.m] abstract class. For the WARPLab Reference Design, we provide the [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_baseband_buffers.m wl_baseband_buffers.m] subclass that provides buffers for sending and receiving custom I/Q waveforms provided by MATLAB. [wiki:../../../Extensions#AdvancedExtensions Advanced user extensions] are intended to replace wl_baseband_buffers with custom classes that support user-added baseband processing running on WARP hardware. === Trigger Manager === [[Image(trigger_manager.png,width=800)]] A {{{Trigger Manager}}} is an object from the [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_trigger_manager.m wl_trigger_manager.m] class. This object allows WARPLab scripts to associate or deassociate particular triggers on particular WARP nodes. For example, a WARPLab script can create two {{{Trigger}}} objects and have a subset of nodes be sensitive to each. This way, a {{{Trigger}}} need not apply to every {{{Node}}} in the network -- it only applies to the ones whose {{{Trigger Manager}}} objects have been configured to allow the {{{Trigger}}}. == User Extension == [[Image(user.png,width=800)]] A {{{User Extension}}} is an object from the [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_user_ext.m wl_user_ext.m] abstract class. We do not provide any subclasses that implement this abstract; it is intended that users create their own subclasses for [wiki:../../../Extensions#SimpleExtensions:AddingNewCommandswithUserExtensionObjects extending WARPLab] with new commands.