41 lines
796 B
C++
41 lines
796 B
C++
/*********************************************************************
|
|
*
|
|
* ÎÄ ¼þ: RuleAlarm.h Æô¶¯Îļþ
|
|
*
|
|
* °æÈ¨ËùÓÐ: Shanghai Baosight Software Co., Ltd.
|
|
*********************************************************************/
|
|
#ifndef _H_RULE_ALARM_h
|
|
#define _H_RULE_ALARM_h
|
|
|
|
#include <zlib/MemTable.hpp>
|
|
|
|
namespace baosight
|
|
{
|
|
|
|
class RuleAlarm
|
|
{
|
|
public:
|
|
RuleAlarm();
|
|
~RuleAlarm();
|
|
public:
|
|
|
|
|
|
int push(int id,const string& msg);
|
|
|
|
int storedb(void);
|
|
private:
|
|
int update(int id);
|
|
int insert(int id,const string& value);
|
|
int storedb(int id,const string& msg);
|
|
|
|
private:
|
|
static map<int,string> mp_alarms;
|
|
static map<int,time_t> mp_btime;
|
|
static map<int,time_t> mp_ptime;
|
|
time_t pretime;
|
|
string sql;
|
|
};
|
|
}
|
|
|
|
#endif
|