⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pnoutgrc.h

📁 PQDIF软件包(SDK,Software Development Kit),它能转换、生成并且显示PQDIF文件.对于开发电力系统的数据输出非常有用。
💻 H
字号:
#ifndef PNOUTGRC_INC
#define PNOUTGRC_INC

/*
** Outage Disturbance - Raw data decoder class for PQNode Outage disturance
**                      data files.
*/

/*
** include the definition for our base class.
*/
#include "pndisrec.h"

class OutageRecord : public PQNodeDistRec
    {
    private:
        LONG lStartTime;
        LONG lStopTime;
        WORD wPhases;
        WORD wRecSize;
        struct OutageDataHead_tag *pOutage;
        struct OutageDataHead_tag *pRestore;
        struct OutageInfoHead_tag *pOutageDataInfo;
        BOOL DecodeRawData(LPSTR pData,WORD wRecSize);
        BOOL SetGains();
    protected:
        BOOL DecodeData(void *pSetupHeader);
    public:

        /*
        ** Various forms of consturctor.  ALL CONSTRUCTORS COPY THE DATA EXCEPT
        ** THE OutageRecord(void *pData,DWORD dwDataSize) FORM.  THIS FORM
        ** is reserved for the file translator (pndxlate download time functions).
        **
        ** Constructing does not automatically force a decode to occur.  You must
        ** call DecodeData before using other methods. 
        */

        /*
        ** For the following constructors, the szTime is the Hex String format
        ** of the disturbance time.  The hex time is the only way to set the
        ** hundredths so the third form is not recommended.  The name parameters
        ** are self explanitory.  At the pointer, should be the data file as
        ** delivered by PNDS, or read directly from the file.  dwDataSize tells
        ** how big the memory block at pData is and is used to validate the
        ** decoding operations.
        */
        OutageRecord(LPSTR szTime, ATOM atName, void *pData, DWORD dwDataSize);
        OutageRecord(LPSTR szTime, LPSTR szName, void *pData, DWORD dwDataSize);
        OutageRecord(long tTime, LPSTR szName, void *pData, DWORD dwDataSize);

        /*
        ** Special constructor for pndxlate.  No copy of the data is made,
        ** much info is missing after the decode.
        */
        OutageRecord(void *pData, DWORD dwDataSize);
        OutageRecord() 
            {
            pOutage = NULL;
            pRestore = NULL;
            pOutageDataInfo = NULL;
            }

        virtual ~OutageRecord();

        /*
        ** Normal Decoder when data is comming from the data base.
        */
        BOOL DecodeData();

        /*
        ** The outage disturbance can have several variations.  Normaly,
        ** an outage record will contain both "outage record" and a
        ** "restoration record".  Under some conditions one or the other of
        ** these records may be lost from the data.  In that case, the access
        ** function for that value and the duration of outage will return as
        ** -1.
        */

        /* 
        ** Method to figure how long the outage was in seconds.  
        ** If not know, -1 will be returned.
        */
        long GetOutageDuration();

        /* 
        ** Method to return the restoration time for the outage.  Time is 
        ** given as standard c time.
        ** If not know, -1 will be returned.
        */
        long GetRestoreTime() {return lStopTime;}

        /* 
        ** Method to return the outage time for the outage.  Time is 
        ** given as standard c time.
        ** If not know, -1 will be returned.
        */
        long GetOutageTime()  {return lStartTime;}

        /*
        ** Method to determin if a particular phase is involed in this outage,
        ** Channel numbering is 0 = Va, 1 = Vb, 2 = Vc
        */
        BOOL IsPhaseInOutage(int iChannel);

        float GetChanPrefGain(int iChannel,VOLTDISPLAYS VoltPref);

        float GetBaseV();
        int GetTriggerChannel() { return idTrigger; }

    };    // end of class OutageRecord

#endif    // prevent multiple includes


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -