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

📄 pndde.h

📁 PQDIF软件包(SDK,Software Development Kit),它能转换、生成并且显示PQDIF文件.对于开发电力系统的数据输出非常有用。
💻 H
字号:
#pragma pack(1)
/*
**
**  File:       pndde.h
**
**  $NAME$
**              PNDS DDE structures
**  $PATHS$
**              PNDS DDE structures\General
**  $1$
**
**  -   Defines structures used for the PndsBin clipboard
**      format.
*/

/*
**
**  Define a version number for the data file formats.
**
*/

//#define PNDS_RECORD_VERSION 0

/*
** Define the record types that are valid.
** First come the basic disturbance types.  These are the same as the PQNode
** raw data types with the high bit set (OR'ed with 0x80).
*/

//#define SDR_WAVEFAULT       (0x80)
//#define SDR_IMPULSE         (0x81)
//#define SDR_RMSDIST         (0x82)
//#define SDR_OUTAGE          (0x83)
//#define SDR_WAVESHAPE       (0x84)
//#define SDR_SSRMS           (0x85)
//#define SDR_COLDLOAD        (0x86)

/*
** Supplementary info record types begin at 0xC0
*/
//#define SDR_RAWPNDATA       (0xC0)
//#define SDR_RMSVOLTSUM      (0xC1)
//#define SDR_WAVEFAULTSUM    (0xC2)
//#define SDR_SPARCEHARMONICS (0xC3)

/*
**  These bit masks find bits in the PnGeneral PolarityFlags byte.
*/

#define VOLT_A_INVERTBIT    0x01
#define VOLT_B_INVERTBIT    0x02
#define VOLT_C_INVERTBIT    0x04
#define VOLT_N_INVERTBIT    0x08
                                
#define AMP_A_INVERTBIT     0x10
#define AMP_B_INVERTBIT     0x20
#define AMP_C_INVERTBIT     0x40
#define AMP_N_INVERTBIT     0x80

/*
** This sturcture is put in front of all records that are added to the raw
** pqnode datafiles.
*/

//typedef struct
//{
//    BYTE byRecordType;      /* See SDR_'s above */
//    BYTE byRecordVersion;   /* A record version stamp for conversion utils. */
//    WORD wRecordLength;     /* The record length so that app can bypass. */
//} PNDATARECORDHEADER;

typedef struct
{
    char        szNodeId [17];
    int         evType;
    char        szEvDt [10];
    int         pnp;
    long        lNumBytes;        //  We need this to deal with 0-length files
    char        szPQNFilename[13];
} EVENT;
typedef EVENT FAR *PEVENT;

typedef struct
{
    char    szNodeId [17];
    WORD    wEvId;
    char    szBegin [10];
    char    szEnd [10];
} BEGENDSTR;
typedef BEGENDSTR FAR *PBESTR;

/*
**
**  General setup structure (For setup struct and event headers)
**  Others for event headers and PNDS internal setup
*/
typedef struct
{
    WORD    wNumMma;
    WORD    baMmaCyc [3];   /* 0-65535 cycles */
    WORD    baMmaDur [3];   /* 0-65535 points */
} MINAVGMAX;
typedef MINAVGMAX FAR *PMINAVGMAX;


typedef struct
{
    WORD    wNumRings;
    WORD    wSiteNumber;
    WORD    waPtRat [4][2];
    WORD    waCtRat [4][2];
    float   fBaseV;
    WORD    waRangeVolt [4];    /* 250 or 1000 */
    WORD    waRangeAmps [4];    /* 5 or 25 */
    signed char bTimeZone;  /* Hours before or after GMT */
    BYTE    baActive [4][2];
    WORD    wConnections;
    float   fFrequency;     
    WORD    wRmsCycFilt;
    BYTE    bRmsWvOption;   /* 1 = Option installed */
    BYTE    bPolarityFlags; /* 8 bits indicate 8 channels, 1 = reversed */
    BYTE    bUnused1;
    WORD    wUnused1;
    DWORD   dwUnused2;
} PNGENERAL;


typedef struct
{
    BYTE    baEnable [4];
    float   faThrTol [4];
    float   faThrWin [4];
    WORD    wCycBef;
    WORD    wCycAft;
    DWORD   dwUnused1;
} PNWAVEFORM;

typedef struct
{
    BYTE    baEnable [4];
    float   faThrV [4];
    WORD    wCycBef;
    WORD    wCycAft;
    DWORD   dwUnused1;
} PNIMPULSE;

typedef struct
{
    BYTE    baEnable [4];
    float   faThrHi [4];    
    float   faThrLo [4];    
    float   fHysterysis;    
    WORD    waCycTrig [4];  
    WORD    waCycEnd [4];
    WORD    wCycRmsBef;
    WORD    wCycRmsAft;
    MINAVGMAX   mam;
    WORD    wCycBef;
    WORD    wCycAft;
    DWORD   dwUnused1;
} PNRMSDIST;




typedef struct
{
    BYTE    baEnable [4];
    float   fThrLow;
    WORD    wTrigSec;           /* Seconds to trigger */
    WORD    wEndSec;            /* Seconds to end */
    WORD    wAnyOrAll;          /* 0 = Any, 1 = All */
    DWORD   dwUnused1;
} PNOUTAGE;

typedef struct
{
    BYTE    baEnable [4];
    float   faThrLo [4];        
    WORD    waSecTrig [4];
    WORD    waSecEnd [4]; 
    WORD    wCycRmsBef;
    WORD    wCycRmsAft;
    MINAVGMAX   mam;
    WORD    wCycBef;
    WORD    wCycAft;
    DWORD   dwUnused1;
} PNCLPDIST;

typedef struct
{
    WORD    wMin;
    WORD    wCyc;
    WORD    wMamMin;
    WORD    wMamDur;
    DWORD   dwUnused1;
} PNSAMPLED;

/*
**  The following stucture defines the summary info record which may or 
**  may not follow a disturbance header record.  The application can detect
**  the presence of the record by looking at the byRecordType of HEADER.  
**  All record types >= 0x80 are reserved for us.  
*/

//typedef struct
//{
//    int   iDistPhase;
//    BOOL  vbChanEnable[3];
//    int   viRmsCategory[3];
//    float vfDistLenth[3];      /* the length of the disturbance in seconds */
//    float vfMinVolt[3];     /* the minimum voltage for each phase */
//    float vfAveVolt[3];     /* the average voltage for each phase */
//    float vfMaxVolt[3];     /* the maximum voltage for each phase */
//} PNRMSDISTSUMMARY;

/*
** Summary record for wavefaults.  
*/
//typedef struct
//{
//    int   iDistPhase;
//    BOOL  vbChanEnable[3];
//    int   viRmsCategory[3];
//    float vfDistLength[3];
//    float vfMinVolt[3];
//    float vfMaxVolt[3];
//    float vfRMSMin[3];
//    float vfRMSMax[3];
//    float vfRMSAve[3];
//    float vfVoltSec[3];
//} PNWAVEFAULTSUMMARY;


/*
**
**  Device setup structure passed via DDE
*/
typedef struct
{
    char    szNodeId [17];
    char    szDriverId [9];
    char    szLocation [41];
    PNGENERAL   pngen;
    char    szDevSpecSetup [1];     /* Pointer to driver setup data in CSV */
} DDEDEVSETUP;
typedef DDEDEVSETUP FAR *LPDDEDEVSETUP;

/*
**
**  The following structure is used for categorizing RMS disturbances.
*/
typedef struct
{
    float           fMinDuration;
    float           fMaxDuration;
    float           fMinMagnitude;
    float           fMaxMagnitude;
    char            szCategoryName[25];
} CATDATA;
typedef CATDATA FAR *LPCATDATA;


/* $end$ */

#pragma pack()

⌨️ 快捷键说明

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