2 calling api functions, Calling api functions – Digilent WaveForms User Manual
Page 6
WaveForms™ SDK Reference Manual
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 6 of 85
1.2 Calling API Functions
The API functions are C style and return a Boolean value: TRUE if the call is successful, FALSE if unsuccessful. This
Boolean value is an integer type definition, not the standard c-type
bool
. In general, the API functions contain
variations of the following parameters:
Parameters
Parameter Function
*Info
Returns detailed information about the parameter support for the instrument (i.e.,
minimum/maximum values, supported modes, etc.)
*Set
Sets an instrument parameter. When the AutoConfigure is enabled (by default), the instrument is
reconfigured and stopped.
*Get
Gets the actual instrument parameter. Use this function to get the actual set value. For instance,
an arbitrary voltage offset is set and Get returns the real DAC output value.
*Status
Returns the parameter value from the device.
The API functions won’t fail when a parameter pointer is NULL or when a setting (*Set) parameter value is out of
limits. To verify the actual setting value, use the *Get API return the actual value.
The indices used in function parameters are zero based.
The supported discrete parameters are retrieved in bit field value. To decode the capabilities of the device use the
IsBitSet
macro.
int
fsfilter;
FDwfAnalogInChannelFilterInfo(h, &fsfilter)
if
(IsBitSet(fsfilter, filterAverage)){
FDwfAnalogInChannelFilterSet(hdwf, 0, filterAverage)
}