72 lines
1.2 KiB
C++
72 lines
1.2 KiB
C++
/*********************************************************************
|
|
*
|
|
* ÎÄ ¼þ: AlarmMag.h Æô¶¯Îļþ
|
|
*
|
|
* °æÈ¨ËùÓÐ: Shanghai Baosight Software Co., Ltd.
|
|
*********************************************************************/
|
|
#ifndef _H_MAG_ALARM_h
|
|
#define _H_MAG_ALARM_h
|
|
|
|
#include <zlib/MemTable.hpp>
|
|
#include <glob/BinaryTele.h>
|
|
#include <zcus/ReadIHDB.h>
|
|
#include <zcus/RuleAlarm.h>
|
|
|
|
|
|
namespace baosight
|
|
{
|
|
const std::string TAG_HEAD = "ZD122_";
|
|
const string BR_NAMES[16]={"Power Loss",
|
|
"UnderVoltage",
|
|
"Motor OL",
|
|
"Load Loss",
|
|
"InPhaseLoss",
|
|
"OutPhaseLoss",
|
|
"Dec Inhibit",
|
|
"Shear Pin 1",
|
|
"Shear Pin 2",
|
|
"PriFdbkLoss",
|
|
"AltFdbkLoss",
|
|
"AuxFdbKLoss",
|
|
"PosFdbkLoss",
|
|
"Reserved",
|
|
"Gnd Warning",
|
|
"Reserved"};
|
|
|
|
struct BR
|
|
{
|
|
short event;
|
|
short index;
|
|
short id;
|
|
int count[16];
|
|
};
|
|
|
|
|
|
const int BR_ALARM_SIZE = 50;
|
|
|
|
|
|
class AlarmMag
|
|
{
|
|
public:
|
|
AlarmMag();
|
|
~AlarmMag();
|
|
public:
|
|
|
|
int Init();
|
|
int L1Alarm(void);
|
|
|
|
int BRAlarm(void);
|
|
|
|
private:
|
|
int BRAlarmStoreDB(int index,const string& item,const string& chinese,int count);
|
|
|
|
private:
|
|
|
|
BinaryTele* mp_btele;
|
|
map<string,BR> mp_brs;
|
|
RuleAlarm* mp_salarm;
|
|
};
|
|
}
|
|
|
|
#endif
|