NI Spectral Measurements Toolkit C Help

SmtCreateHandle

  • Updated2023-02-21
  • 1 minute(s) read

int CVIFUNC SmtCreateHandle (SmtHandle *handle);

Purpose

Creates a handle parameter that you must pass to the following functions that accept the handle parameter:

The handle parameter allows these functions to retain state information.

Create a unique handle for each data channel in your program. You can use the same handle for the SmtContZoomFFT, SmtAveragedFFTSpectrum, and SmtAveragedPowerSpectrum functions for computations on data from that channel.

The SmtAveragedFrequencyResponse and SmtAveragedCrossSpectrum functions act on spectrum data from two channels. You can pass the handle from any one of these channels to the handle parameter of these functions.

Call SmtDestroyHandle once for each handle created using SmtCreateHandle. Calling SmtDestroyHandle frees internal resources and discards the handle when you finish using it.

Parameters

Output
Name Type Description
handle SmtHandle* Returns a handle that identifies a data channel for computations using SMT functions.

Return Value

Name Type Description
status int Returns the status of the function. To obtain a text description of the status code, call the SMTGetErrorString function.

Log in to get a better experience