📄 pnrmssum.h
字号:
/*
** Class PQNodeRMSSummary
** This class holds an RMS summary produced by an RMS disturbance, or
** a cold load pickup. Summary information includes type of disturbance
** (sag, swell) its duration and magnitude for all phases.
**
*/
#ifndef PNRMSSUM_DEF
#define PNRMSSUM_DEF
/*
** manifest constants used to describe the type of rms disturbance that is
** summarized.
*/
#define RMSSUM_UNCAT 0
#define RMSSUM_SAG 1
#define RMSSUM_SWELL 2
class PQNodeRMSSummary
{
private:
float fMinV;
float fAveV;
float fMaxV;
float fMaxExcur;
float fDuration;
float fArea;
float fThresh;
int iCategory;
BOOL bIsTrigger;
int iChannel;
protected:
public:
PQNodeRMSSummary() {ClassDebug("Construct PowerNode\r\n");}
/*
** 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.
*/
PQNodeRMSSummary(int iChan,int iCat, float fMin, float fAve,
float fMax, float fMaxEx, float fDur,BOOL
bIsTrig,float fVSArea = 0.0)
{ iChannel = iChan; iCategory = iCat; fMinV = fMin; fAveV = fAve;
fMaxV = fMax; fDuration = fDur; bIsTrigger = bIsTrig;
fArea = fVSArea; fMaxExcur = fMaxEx; }
/*
** Method to return the category of the rms disturbance, See RMSSUM_'s above.
** If UNCAT comes back, this is not a real disturbance (at least on
** this channel).
*/
int GetCategory() { return(iCategory); }
/*
** Method to return the channel for who's summary this is.
*/
int GetChannel() { return(iChannel); }
/*
** Get the lowest value from the min curve.
*/
float GetMinValue() { return(fMinV); }
/*
** Get the average of the average curve.
*/
float GetAveValue() { return(fAveV); }
/*
** Get the highest value from the max curve
*/
float GetMaxValue() { return(fMaxV); }
float GetMaxExcursion() {return fMaxExcur;}
/*
** Get the duration of the event. This is defined as from the time
** the voltage first goes out of spec until it comes back in for the
** last time.
*/
float GetDuration() { return(fDuration); }
/*
** Get area of the disturbance. This is the VOLT*Seconds above
** or below 100% Volts.
*/
float GetDistArea() { return(fArea); }
/*
** This method will pass back the setup threshold value for
** for this disturbance based upon the type of disturbance (sag or
** swell) and the voltage preference specified to the constructor.
*/
float GetThreshold() { return(fThresh); }
/*
** This method will tell if this channel was the triggering channel.
*/
BOOL IsTrigger() { return(bIsTrigger); }
/*
** This method determine if this channel of data is in variation, either
** swell or sag.
*/
BOOL IsInVariation() { return(iCategory != RMSSUM_UNCAT); }
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -