📄 pnwavdat.h
字号:
/*
** Class PQNodeWaveform
** This class holds a single channel of waveform information with
** summary infomation. Objects of this class are created by a number
** of the PQNode Raw Data File Decoders.
**
*/
#ifndef PNWAVDAT_INC
#define PNWAVDAT_INC
class PQNodeWaveform
{
private:
int iChannel;
float fMinVal;
float fMaxVal;
int iNumPoints;
float * pfTime;
float * pfData;
float fTriggerTime;
BOOL bIsTrigger;
BOOL bIsOverRange;
BOOL bIsUnderRange;
float FindMin();
float FindMax();
protected:
public:
/*
** Main form of the constructor usually called by one of the
** disturbance decoder modules. Not normally called by an app
** directly since app doesn't have direct access to some of the info.
*/
PQNodeWaveform(int iChan,int iNumPnt,BOOL bIsTrig,
float *pfTimeVec, float *pfDataVec,float fTrigTime,int iRange = 0);
virtual ~PQNodeWaveform();
/*
** Obtain a vector of time data points for the voltage or current data
** for the channel.
** THIS IS NOT A COPY. This object contiues to own the data.
*/
float *GetTimeData() { return pfTime; }
/*
** Obtain a vector of time data points for the voltage or current data
** for the channel scaled by the fScale parameter. Scale = 1000 will
** yield times in msec. THIS IS NOT A COPY. This object contiues to
** own the data. If a scale is applied, the time vector is perminently
** altered.
*/
float *GetTimeData(float fScale);
/*
** This method will return the time at a particular index in the
** time vector.
*/
float GetTimePoint(int iTime) {return pfTime[iTime];}
/*
** Obtain a vector of data points for the voltage or current data
** for the channel. For voltage channels the values will be scaled
** as indicated by the VoltPref parameter when the object was created.
** THIS IS NOT A COPY. This object contiues to own the data.
*/
float *GetWaveData() { return pfData; }
float GetTrigTime() {return fTriggerTime;}
/*
** Find out how many data points are in the record for the channel.
*/
int GetDataSize() {return iNumPoints;}
/*
** Find out how which channel this data belongs to.
*/
int GetChannel() {return iChannel;}
/*
** If this waveform came from a disturbance type that is triggered,
** was this the trigger channel.
*/
BOOL IsTrigger() {return bIsTrigger;}
/*
** Method to get the minimum value from the waveform.
*/
float GetMin() {return fMinVal;}
/*
** Method to get the maximum value from the waveform.
*/
float GetMax() {return fMaxVal;}
/*
** Next Two Not yet implemented.
*/
BOOL IsOverRange() {return bIsOverRange;}
BOOL IsUnderRange() {return bIsUnderRange;}
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -