Vendor Adaptor Templates

The Data Acquisition Toolbox™ SDK is installed with a set of source file stubs for an adaptor called VendorAdaptor. The source files are installed in the folder:


The basic components and structure of the source files for this adaptor are the same as those in the DemoAdaptor. If you need to create an adaptor from scratch, it is recommended that you use a copy of the VendorAdaptor source files. The following table indicates the purpose of each source file.

vendoradaptor.hpp, vendoradaptor.cppWraps device driver code in methods that allow you to configure, discover, and enumerate the hardware in MATLAB.
daqstream_analog.hpp, daqstream_analog.cppImplements a DAQStream object for an analog subsystem, that allows you to stream data to and from the hardware.
custom_vendor.cppDispatches custom calls from MATLAB to the adaptor. At a minimum this must contain a customizeMap function.

Typical Workflow to Create Adaptor

To create an adaptor from the set of template files in the folder VendorAdaptor, use the following steps. Assume that you want to name the adaptor MyAdaptor.

  1. Create a copy of the entire folder, and name it MyAdaptor.

  2. Working in the new folder called MyAdaptor, change the names of the files:

    Original NameNew Name
  3. Update the content of the files so that the new names are used for references to other files, the adaptor, devices, and vendor.

  4. Update the functions to use your driver code. For more information, see Adaptor API Reference.

  5. Build the adaptor with the buildAdaptor function.

Related Examples

More About