📄 pnrmsenv.h
字号:
/*
** Class PQNodeRMSEnvelope
** This class holds an RMS envelope produced by an RMS disturbance, a cold
** load pickup, or by periodic RMS sampling. Summary information and
** setup information is also kept with the envelope data.
**
*/
#ifndef PNRMSENV_DEF
#define PNRMSENV_DEF
class PQNodeRMSEnvelope
{
private:
protected:
int iChannel;
int iNumPoints;
float *pfTime;
float *pfRMSMin;
float *pfRMSAve;
float *pfRMSMax;
float fMinVal;
float fAveVal;
float fMaxVal;
float fTriggerTime;
float fDuration;
float fLoThresh;
float fHiThresh;
float fHyster;
float fArea;
BOOL bIsVariation;
int iNumEnvSeg;
float *pfSegInc;
int *piSegSize;
int *piSegIndecies;
public:
PQNodeRMSEnvelope()
{
pfTime = NULL;
pfRMSMin = NULL;
pfRMSAve = NULL;
pfRMSMax = NULL;
}
/*
** 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.
*/
PQNodeRMSEnvelope(int iChan, int iNumPnt,BOOL bIsTrigger, float *pfTimeVec,
float *pfMin,float *pfAve,float *pfMax,
float fMin,float fAve, float fMax,
float fDur,float fTrig,
float fLoTh,float fHiTh,float fHyst=0.0,
float fArea=0.0,int iNumSeg= 0,float *pSegInc = NULL,
int *pSegSize = NULL);
/*
** obsolete form of constructor
*/
PQNodeRMSEnvelope(BOOL bIsTrigger);
~PQNodeRMSEnvelope();
int GetNumEnvelopeSegments() {return iNumEnvSeg;}
/*
** Returns the min vector for the envelope. This is not a copy.
** The vector returned has GetDataSize() floating points.
*/
float *GetMinData() {return pfRMSMin;}
float *GetMinData(int iWhichSeg,int *piSize,float *pfInterval,float *pfStartTime);
/*
** Returns the max vector for the envelope. This is not a copy.
** The vector returned has GetDataSize() floating points.
*/
float *GetMaxData() {return pfRMSMax;}
float *GetMaxData(int iWhichSeg,int *piSize,float *pfInterval,float *pfStartTime);
/*
** Returns the average vector for the envelope. This is not a copy.
** The vector returned has GetDataSize() floating points.
*/
float *GetAveData() {return pfRMSAve;}
float *GetAveData(int iWhichSeg,int *piSize,float *pfInterval,float *pfStartTime);
/*
** Returns the a time vector for the envelope. Time is in seconds.
** This is not a copy.
** The vector returned has GetDataSize() floating points.
*/
float *GetTimeData() {return pfTime;}
/*
** Returns the a time vector for the envelope. Time is in scaled
** by the fScale parameter (ie 1000 gives msecs.) NOTE, you not
** being given a copy so the original envelope time data is modified.
*/
float *GetTimeData(float fScale);
/*
** Function to return the time at any index of the time vector.
*/
float GetTimePoint(int iTime) {return pfTime[iTime];}
/*
** Function return the trigger time in seconds from the first point in
** the record.
*/
float GetTrigTime() {return fTriggerTime;}
/*
** Function to return the duration of the rms devevation. See .cpp
** for method of calculating. It changes from time to time.
*/
float GetDuration() {return fDuration; }
/*
** Method for finding the minimum value of the envelope min curve.
*/
float GetMinMin() {return fMinVal;}
/*
** Method for finding the maximum value of the envelope max curve.
*/
float GetMaxMax() {return fMaxVal;}
/*
** Method for finding the average value of the envelope average curve.
*/
float GetAveAve() {return fAveVal;}
/*
** The following three function return the indicated setup information.
** These function are dumb parrots of the constructor's parameters so
** units for these depend upon who's doin the creating. See PNRMSDRC
** for a an example.
*/
float GetLoThresh() {return fLoThresh;}
float GetHiThresh() {return fHiThresh;}
float GetHysterysis() {return fHyster;}
float GetArea() {return fArea;}
/*
** what channel we own data for...
*/
int GetChannel() {return iChannel;}
/*
** How many data points in each curve makeing up the envelope. There
** are 3, min, max and average with time as the x axis for each.
*/
int GetDataSize() {return iNumPoints;}
/*
** Querry if this phase (channel) was detected as being in variation
** (out of the tolerances). At least one phase should be TRUE.
*/
BOOL IsInVariation() {return bIsVariation;}
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -