⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 analysis.h

📁 此为某测试平台的上位机软件部分
💻 H
📖 第 1 页 / 共 5 页
字号:
/*============================================================================*/
/*                        L a b W i n d o w s / C V I                         */
/*----------------------------------------------------------------------------*/
/*    Copyright (c) National Instruments 1987-2005.  All Rights Reserved.     */
/*----------------------------------------------------------------------------*/
/*                                                                            */
/* Title:       analysis.h                                                    */
/* Purpose:     Include file for LabWindows CVI Advanced Analysis Library     */
/*                                                                            */
/*============================================================================*/


#ifndef _ANALYSIS_H
#define _ANALYSIS_H

#if defined(_CVI_) && !defined(__TPC__)
#pragma EnableLibraryRuntimeChecking
#endif

#include "cvidef.h"

#ifdef __cplusplus
extern "C" {
#endif


/* Error Codes */
typedef enum {
    NoAnlysErr              =      0,   // No Error.
    OutOfMemAnlysErr        = -20001,   // Out of memory error.
    EqSamplesAnlysErr       = -20002,   // Input sequences must be the same size.
    SamplesGTZeroAnlysErr   = -20003,   // Number of samples must be greater than zero.
    SamplesGEZeroAnlysErr   = -20004,   // Number of samples must be greater than or equal to zero.
    SamplesGEOneAnlysErr    = -20005,   // The number of samples must be greater than or equal to one.
    SamplesGETwoAnlysErr    = -20006,   // Number of samples must be greater than or equal to two.
    SamplesGEThreeAnlysErr  = -20007,   // Number of samples must be greater than or equal to three.
    ArraySizeAnlysErr       = -20008,   // Specified conditions on the input arrays have not been met.
    PowerOfTwoAnlysErr      = -20009,   // Size of the input array must be a valid power of two: size = 2m.
    MaxXformSizeAnlysErr    = -20010,   // The maximum allowable transform size has been exceeded.
    DutyCycleAnlysErr       = -20011,   // The duty cycle must meet: 0 <= duty cycle <= 100.
    CyclesAnlysErr          = -20012,   // Number of cycles must meet the condition 0 < cycles <= samples.
    WidthLTSamplesAnlysErr  = -20013,   // The width must meet: 0 < width < samples.
    DelayWidthAnlysErr      = -20014,   // Delay and width must meet the condition 0 <= (delay + width) < samples.
    DtGEZeroAnlysErr        = -20015,   // dt must be greater than or equal to zero.
    DtGTZeroAnlysErr        = -20016,   // dt or dx must be greater than zero.
    IndexLTSamplesAnlysErr  = -20017,   // Index must meet the condition 0 <= index < samples.
    IndexLengthAnlysErr     = -20018,   // The index and length must meet the condition 0 <= (index + length) < samples.
    UpperGELowerAnlysErr    = -20019,   // Upper value must be greater than or equal to the lower value.
    NyquistAnlysErr         = -20020,   // Cut-off frequency fc must meet the condition 0 <= fc <= (fs/2).
    OrderGTZeroAnlysErr     = -20021,   // Order must be greater than zero.
    DecFactAnlysErr         = -20022,   // Decimating factor must meet the condition 0 < decimating factor <= samples.
    BandSpecAnlysErr        = -20023,   // Invalid band specification. 
    RippleGTZeroAnlysErr    = -20024,   // Ripple must be greater than zero.
    AttenGTZeroAnlysErr     = -20025,   // Attenuation must be greater than zero.
    WidthGTZeroAnlysErr     = -20026,   // The width must be greater than zero.
    FinalGTZeroAnlysErr     = -20027,   // The final value must be greater than zero.
    AttenGTRippleAnlysErr   = -20028,   // Attenuation must be greater than the ripple amplitude.
    StepSizeAnlysErr        = -20029,   // The step-size parameter mu must meet 0 <= mu <= 0.1.
    LeakAnlysErr            = -20030,   // The leakage coefficient Leak must meet: 0 <= Leak <= mu.
    EqRplDesignAnlysErr     = -20031,   // Filter cannot be designed with the specified input parameters.
    RankAnlysErr            = -20032,   // The rank of the filter must meet 1 <= (2 rank +1) <= size.
    EvenSizeAnlysErr        = -20033,   // Number of coefficients must be odd for this filter.
    OddSizeAnlysErr         = -20034,   // Number of coefficients must be even for this filter.
    StdDevAnlysErr          = -20035,   // The standard deviation is zero. The normalization is impossible.
    MixedSignAnlysErr       = -20036,   // Second array must be all positive or negative and nonzero.
    SizeGTOrderAnlysErr     = -20037,   // Array size must be greater than the order.
    IntervalsAnlysErr       = -20038,   // The number of intervals must be greater than zero.
    MatrixMulAnlysErr       = -20039,   // The specified matrix multiplication cannot be performed.
    SquareMatrixAnlysErr    = -20040,   // Input matrix must be a square matrix. 
    SingularMatrixAnlysErr  = -20041,   // Input matrix is singular. The system of equations cannot be solved. 
    LevelsAnlysErr          = -20042,   // Number of levels is outside the allowable range. 
    FactorAnlysErr          = -20043,   // Level of factor is outside the allowable range. 
    ObservationsAnlysErr    = -20044,   // There must be at least one observation.
    DataAnlysErr            = -20045,   // Total number of data points must be equal to product of (levels/ each factor) x (observations/ cell).
    OverflowAnlysErr        = -20046,   // There is an overflow in the calculated F-value(ANOVA Fit).
    BalanceAnlysErr         = -20047,   // Data is unbalanced.
    ModelAnlysErr           = -20048,   // Random Effect model was requested when the Fixed Effect model is required. 
    DistinctAnlysErr        = -20049,   // x-values must be distinct.
    PoleAnlysErr            = -20050,   // Interpolating function has a pole at the requested value.
    ColumnAnlysErr          = -20051,   // First column in the X matrix must be all ones.
    FreedomAnlysErr         = -20052,   // The degree of freedom must be greater than zero and less than the length of the input sequence.
    ProbabilityAnlysErr     = -20053,   // Probability must meet the condition 0 < p < 1.
    InvProbAnlysErr         = -20054,   // The probability must meet the condition: 0 <= p < 1.
    CategoryAnlysErr        = -20055,   // Invalid number of categories or samples.
    TableAnlysErr           = -20056,   // Contingency table has a negative number. 
    BetaFuncAnlysErr        = -20057,   // Parameter to the beta function must meet the condition 0 < p < 1. 
    DimensionAnlysErr       = -20058,   // Invalid number of dimensions or dependent variables.
    NegNumAnlysErr          = -20059,   // Negative number.
    DivByZeroAnlysErr       = -20060,   // Divide by zero.
    InvSelectionAnlysErr    = -20061,   // Invalid selection.
    MaxIterAnlysErr         = -20062,   // Maximum iteration exceeded.
    PolyAnlysErr            = -20063,   // Invalid polynomial.
    InitStateAnlysErr       = -20064,   // Internal memory state not initialized correctly.
    ZeroVectorAnlysErr      = -20065,   // Elements of the vector cannot be all zero.
    IIRFilterInfoAnlysErr   = -20066,   // Information in the IIR filter structure is invalid.
    FFSRInvalidAnlysErr     = -20067,   // The input fundamental frequency or sampling rate is equal to zero.
    MatrixInfNanAnlysErr    = -20068,   // Input parameter has at least one element that is Inf or NaN or DBL_MIN or DBL_MAX.
    InvalidDoubleAnlysErr   = -20068,   // Input parameter has at least one element that is Inf or NaN or DBL_MIN or DBL_MAX.
    SamplesGEFourAnlysErr   = -20069,   // Number of samples must be greater than or equal to four.
    SameSizeAnlysErr        = -20070,   // Matrices must have the same size
    PosDefAnlysErr          = -20071,   // Input to Cholesky Decomposition was not positive definite.
    MatrixLnAnlysErr        = -20072,   // The logarithm of the input matrix can't be computed.
    CloseEgnValAnlysErr     = -20073,   // The eigenvalues can't be reordered because some eigenvalues are too close.
    EgnValChgedAnlysErr     = -20074,   // Reordering eigenvalues changed some complex eigenvalues.
    FltBuffOvflowAnlysErr   = -20075,   // The filter buffer overflows.
    RsmplBydInputAnlysErr   = -20076,   // The resample point can't be calculated with the signal behind that of input.
    TimeNotAscendAnlysErr   = -20077,   // Time points are not in ascending order.
    NotSupportedAnlysErr    = -20078,   // Functionality is not supported on this platform.
    BaseGETopAnlysErr       = -20101,   // Parameter must meet the condition: Top>Base.
    ShiftRangeAnlysErr      = -20102,   // The shifts must meet: |shifts| < samples.
    OrderGEZeroAnlysErr     = -20103,   // The order must be positive.
    InputNaNAnlysErr        = -20104,   // The inputs contain NaN.
    ZeroPolyAnlysErr        = -20111,   // Input Polynomial coefficients are all zero.
    StartIsRootAnlysErr     = -20112,   // Poly real zeros counter: start is a root.
    EndIsRootAnlysErr       = -20113,   // Poly real zeros counter: end is a root.
    StartGTEndAnlysErr      = -20114,   // Poly real zeros counter: start > end.
    FFTSizeGTZeroAnlysErr   = -20115,   // FFT size must be greater than zero.
    NegZeroNumAnlysErr      = -20140,   // The number is negtive or zero.
    ZeroNumAnlysErr         = -20141,   // The number is zero.
    ScopeOffsetAnlysErr     = -20307,   // Scope offset error.
    InternalAnlysErr        = -20999,   // Internal analysis library error.
    RankDeficient           =  20001,   // The matrix is rank deficient.
    SamplesGTZeroAnlysWarn  =  20002,   // The number of samples must be greater than zero.
    SingularMatrixAnlysWarn =  20003,   // The matrix is singular.
    SameSizeAnlysWarn       =  20004,   // Matrices or vectors don't have the same size.
    ReorderAnlysWarn        =  20005,   // The reorder procedure cannot be performed.
    AccuracyAnlysWarn       =  20006,   // The computation result might be inaccurate.
    ArraySizeAnlysWarn      =  20010,   // The specified conditions on the sizes of input arrays have not been met.
    InvStdDevAnlysWarn      =  20011,   // The input Standard Deviation is invalid.
    EmptyPolyAnlysWarn      =  20012,   // The input polynomial is empty.
    MatrixInfNanAnlysWarn   =  20030,   // Inf or NaN elements found in the input.
    
    LibraryNotFoundAnlysErr = -5093,    // The analysis library was not found.
    FunctionNotFoundAnlysErr= -5094,    // The function was not found in the analysis library.
    
    _unusedAnlysErr         = 0x7fffffff// Unused analysis error code.
} AnalysisLibErrType;

/* Filter types */
typedef enum {
    LOWPASS  = 0,       // Lowpass Filter
    HIGHPASS = 1,       // Highpass Filter
    BANDPASS = 2,       // Bandpass Filter
    BANDSTOP = 3        // Bandstop Filter
} AnalysisLibFilterType;

typedef enum {
    MULTIBAND      = 1, // multiband
    DIFFENTIATOR   = 2, // differen.
    HILBERT_FILTER = 3  // Hilbert
} AnalysisLibFilterType_;

/* Window types */
typedef enum {
    RECTANGLE       = 0,    // Rectangle
    HANNING         = 1,    // Hanning
    HAMMING         = 2,    // Hamming
    BLKHARRIS       = 3,    // Blackman-Harris
    EXBLKMAN        = 4,    // Exact Blackman
    BLKMAN          = 5,    // Blackman
    FLATTOP         = 6,    // Flat Top
    BH4TERM         = 7,    // 4-Term Blackman-Harris
    BH7TERM         = 8,    // 7-Term Blackman-Harris
    LOWSIDELB       = 9,    // Lowside LB
    BLKMANNUTTAL    = 11,   // Blackman-Nuttall
    TRIANGLE        = 30,   // Triangle
    KAISER          = 60,   // Kaiser
    DOLCHEBYSHEV    = 61,   // Dolph-Chebyshev
    GAUSSIAN        = 62    // Gaussian
} AnalysisLibWindowType;

typedef enum {
    RECTANGLE_      = 0,    // Rectangle
    HANNING_        = 1,    // Hanning
    HAMMING_        = 2,    // Hamming
    BLKHARRIS_      = 3,    // Blackman-Harris
    EXBLKMAN_       = 4,    // Exact Blackman
    BLKMAN_         = 5,    // Blackman
    FLATTOP_        = 6,    // Flat Top
    BH4TERM_        = 7,    // 4-Term Blackman-Harris
    BH7TERM_        = 8 // 7-Term Blackman-Harris
} AnalysisLibWindowType_;

typedef enum {
    NO_WINDOW__     = 0,    // None
    HANNING__       = 1,    // Hanning
    HAMMING__       = 2,    // Hamming
    BLKHARRIS__     = 3,    // Blackman-Harris
    EXBLKMAN__      = 4,    // Exact Blackman
    BLKMAN__        = 5,    // Blackman
    FLATTOP__       = 6,    // Flat Top
    BH4TERM__       = 7,    // 4-Term Blackman-Harris
    BH7TERM__       = 8 // 7-Term Blackman-Harris
} AnalysisLibWindowType__;

typedef enum {
    RECTANGLE___    = 0,    // Rectangle
    HANNING___      = 1,    // Hanning
    HAMMING___      = 2,    // Hamming
    BLKHARRIS___    = 3,    // Blackman-Harris
    EXBLKMAN___     = 4,    // Exact Blackman
    BLKMAN___       = 5,    // Blackman
    FLATTOP___      = 6,    // Flat Top
    BH4TERM___      = 7,    // 4-Term Blackman-Harris
    BH7TERM___      = 8,    // 7-Term Blackman-Harris
    LOWSIDELB___    = 9,    // Lowside LB
    BLKMANNUTTAL___ = 11    // Blackman-Nuttall
} AnalysisLibWindowType___;

typedef enum {
    RECTANGLE_FILTER    = 1,    // rectangular
    TRIANGLE_FILTER     = 2,    // triangle
    HANNING_FILTER      = 3,    // Hanning
    HAMMING_FILTER      = 4,    // Hamming
    BLKMAN_FILTER       = 5 // Blackman
} AnalysisLibWindowFilter;

/* Eigenvectors used by EigenVBack */
typedef enum {
    RIGHT_EIGEN     = 0,    // Right Side Eigenvectors
    LEFT_EIGEN      = 1     // Left Side Eigenvectors
} AnalysisLibEigenvectorType;

/* Eigenvalues and eigenvectors */
typedef enum {
    EIGEN_VALUES_ONLY    = 0,   // Only Eigen Values
    EIGEN_VALUES_VECTORS = 1    // Both Eigen Values and Eigen Vectors
} AnalysisLibEigenValueVectors;

/* Pivot used by QREx */
typedef enum {
    NOT_PIVOT       = 0,    // No Pivot
    PIVOT_VECTOR    = 1,    // Pivot as a Vector

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -