📄 pndisrec.h
字号:
/*
** Base class for PQNode disturbance raw datafile managers. This class is
** pure virtual with no code.
*/
#ifndef PNDISTRB_INC
#define PNDISTRB_INC
/*
** We use the Event time class to manage our time for us.
*/
#include "pnevtime.h"
/*
** Included the enums for data preferences here since nearly all of our
** children require at least one of them.
*/
#include "pndatprf.h"
#define PNHEADERSIZE (32)
/*
** Define constants for "residual" psuedo channels. In the world of the \
** decoders there are realy only physical channels 0..7. These are used
** to get at the voltage or current residuals.
*/
#define IDCHAN_VOLTNET 254
#define IDCHAN_CURRNET 255
#define IDCHAN_VOLTRESIDUALS 256
#define IDCHAN_CURRRESIDUALS 257
/*
** forward declare gain class. Need a private member, but really dont want
** to include class declaration here.
*/
class PQNodeGains;
/*
** Forward declare wave calibrator class. It is used by a number of derived
** classes for private members so I declared it here.
*/
class PQNodeWaveCalib;
//#pragma warn -par
class PQNodeDistRec
{
private:
protected:
ATOM atName; // Name of the pqnode
int idType; // measurement type 0=wavedist, etc
PNEventTime *pEvTime; // PQNode Time Object.
WORD wRefCycle; // Reference cycle
float fNomFreq; //
int idPhases; // Phases Included
int idTrigger; // triggered channel 1..8
int idConnect; // PQNode Conection type.
BOOL bCalibrated; // True if data is calibrated.
void *pRawData; // A pointer to the raw data
DWORD dwRawDataSize; // size of above
BOOL bIsDecoded; // Flag indicating that the data is decoded.
BOOL bDataCopy; // Flag indicating that data has been copied.
PQNodeGains *pGains; // Gain object for this PQNode.
public:
/*
** Null Constructor for base class.
*/
PQNodeDistRec()
{
pEvTime = NULL;
pRawData = NULL;
pGains = NULL;
ClassDebug("Construct PQNodeDistRec\r\n");
}
/*
** Destructor for base class.
*/
virtual ~PQNodeDistRec() {ClassDebug("Destruct PQNodeDistRec\r\n");}
/*
** Methods for obtaining the time of this disturbance. The first
** gets just the seconds of ctime. The second returns the hundredths
** of seconds at the location pointed to by the pHund parameter. The
** final varient returns the hex string time representing the full
** disturbance time stamp as defined by PNDS (8 hex digits for ctime
** seconds and 1 for the tenths, which has now been changed to 16ths,
** somewhere there should be a discussion of the crazy time encoding
** used by PNDS).
*/
long GetTime() { return pEvTime->lTime; }
long GetTime(LPINT pHund) {*pHund = pEvTime->iTenths; return pEvTime->lTime; }
long GetTime(LPSTR szTime) { return pEvTime->HexStringTime(szTime); }
/*
** Return the Global atom of the device name for this disturbance.
*/
ATOM GetName() { return atName; }
/*
** Return the disturbance type for this disturbance. (Just in case
** you're using a container with different types in in). Types are
** as always 0 = Wavefault, 1 = impulse....
*/
int GetDistType() { return idType; }
/*
** Return the connection information from the setup record for this
** device when the disturbance was downloaded. Connections are:
** 0 - 4 wire
** 1 - 3 wire 3 phase
** 2 - split phase (1 phase)
** 3 - single phase
*/
int GetConnect() { return idConnect; }
/*
** Return the nominal frequency as determined from the raw data if
** possible. If not the nominal is taken from the setup information.
*/
float GetNomFreq() { return fNomFreq; }
/*
** Return the flag indicating that the raw data has been decoded and
** is available.
*/
BOOL DataIsValid() { return bIsDecoded; }
/*
** Return the flag that indicates that the data is fully calibrated.
** This should mean that the mcal and ical files are in date.
*/
BOOL DataIsCalibrated() { return bCalibrated; }
/*
** Return the reference cycle counter from the raw data.
*/
WORD GetRefCycle() { return wRefCycle; }
}; // end of class PQNodeDistRec
//#pragma warn .par
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -