📄 pndbtype.h
字号:
#pragma pack(1)
/*
**
** File: pndbtype.h
**
** $NAME$
** PNDS Event database structures.
** $PATHS$
** PNDS Event database structures\General
** $1$
**
** - Defines structures used for the by pndxlate to store PQNode event
** data.
**
*/
#include "apptypes.h"
/*
**
** 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_SPARSEHARMONICS (0xC3)
/*
** 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;
/*
** 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
{
float fHarmNo;
float fMag;
float fAng;
} PNDBSPARSEENTRY;
typedef struct
{
BYTE bPhaseId;
BYTE bNumHarm;
PNDBSPARSEENTRY SparseData[1];
} PNDBSPARSESPECTRA;
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 */
float vfVoltSec[3];
} 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;
typedef struct DDEDeviceGenSetup_tag
{
ATOM atDevice; /* Global atom */
ATOM atDirId; /* Local atom -- not used by driver */
ATOM atDriverId; /* Local atom -- not used by driver */
char szLocation [41];
WORD wBaudRate;
WORD wNumRings;
WORD wSiteNumber;
/*
**
** Event setups
*/
PNGENERAL pngen; /* General */
PNIMPULSE pnimp; /* Impulse */
PNWAVEFORM pnwave; /* Waveform */
PNRMSDIST pnrms; /* RMS dist */
PNOUTAGE pnout; /* Outage */
PNCLPDIST pnclp; /* Cold Load Pickup */
PNSAMPLED pnsamp; /* Sampled */
} DDEDEVICEGENSETUP, FAR *PDDEDEVGEN;
/* $end$ */
#pragma pack()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -