1 the api – Digilent WaveForms User Manual

Page 4

Advertising
background image

WaveForms™ SDK Reference Manual

Copyright Digilent, Inc. All rights reserved.

Other product and company names mentioned may be trademarks of their respective owners.

Page 4 of 85

1.1 The API

Everything needed to write custom applications is included in the WaveForms SDK, which provides the
header/library files and documentation to access the API for the DWF Library. A custom application must properly
link to these files to make the appropriate API function calls. Every function in the WaveForms public API is
declared in the dwf.h header file.

Basic usage of the WaveForms API can be broken down into the following steps:

1. Call enumeration functions to discover connected hardware devices.
2. Call FDwfDeviceOpen function to establish a connection to specific hardware device.
3. Call function to enable instrument within hardware device.
4. Call functions to configure instrument and acquire/generate signals.
5. Call function to disable instrument.
6. Call FDwfDeviceClose function to disconnect from device.

There are nine main groups of API functions, each named with different prefixes:

Main Groups of API Functions

Instrument Function

Prefix

Device Enumeration

Controls the enumeration of connected and supported
devices.

DwfEnum

Device Control

Controls opening and closing specific devices.

DwfDevice

AnalogIn (Oscilloscope)

Acquires samples from each enabled channel
synchronously.

DfwAnalogIn

AnalogOut (Arbitrary Waveform
Generator)

Drives signals from each channel independently.

DfwAnalogOut

AnalogIO

Acquires and drives various analog signals.

DfwAnalogIO

DigitalIn (Logic Analyzer)

Acquires samples from digital I/O pins.

DfwDigitalIn

DigitalOut (Pattern Generator)

Drives digital I/O signals.

DfwDigitalOut

DigitalIO

Acquires and drives digital I/O signals.

DfwDigitalIO

System

Obtain basic system information that is instrument
and device independent.

DfwGet

Advertising