55 lines
1.9 KiB
C
Raw Normal View History

2025-03-14 17:05:48 +08:00
#ifndef CAIALARMMSGINFO_H
#define CAIALARMMSGINFO_H
#include <QMetaType>
#include <QStringList>
#include <QSharedPointer>
#include "intelli_alm_api/CIntelliAlmApi4Clt.h"
#include <QVector>
#include <QString>
#include <CAlarmCommon.h>
enum E_AiALARM_LOGICSTATE
{
E_AiALM_IALS_NORMAL = 1, //正常
E_AIALM_IALS_DELETED = 2, //已删除
E_AIALM_IALS_BROKEN = 3, //不完整的
};
class CAiAlarmMsgInfo
{
public:
CAiAlarmMsgInfo();
CAiAlarmMsgInfo(const CAiAlarmMsgInfo &other);
void initialize(const kbd_idlfile::SIntelliAlmInfo &alarmInfo);
//< [优先级越小表示越大]-智能告警窗调用
bool ailessThan(const AlarmMsgPtr &info, E_ALARM_SORTKEY sortkey = E_SORT_PRIORITY);
bool aimoreThan(const AlarmMsgPtr &info, E_ALARM_SORTKEY sortkey = E_SORT_PRIORITY);
bool ailessThan(const AiAlarmMsgPtr &info, E_ALARM_SORTKEY sortkey = E_SORT_PRIORITY);
bool aimoreThan(const AiAlarmMsgPtr &info, E_ALARM_SORTKEY sortkey = E_SORT_PRIORITY);
E_AiALARM_LOGICSTATE logic_state; //< 状态
qint32 domain_id; //< 域ID
qint32 priority; //< 告警优先级id
quint64 time_stamp; //< 时标RFC1305、POSIX时标标准
QString uuid_base64; //< uuid 主键
QString content; //< 告警内容
QString disposal_plan; //< 处置预案
QVector<QString> raw_alm_uuid; //< 关联的原始告警uuid
//< Extend
qint32 priorityOrder; //< 优先级
bool deleteFlag; //< 是否被删除
bool brokenFlag; //< 是否不完整
bool releaseFlag; //< 是否被释放
bool m_needVideoAlm;
};
bool operator==(const CAiAlarmMsgInfo &source, const CAiAlarmMsgInfo &target);
Q_DECLARE_METATYPE(CAiAlarmMsgInfo)
Q_DECLARE_METATYPE(AiAlarmMsgPtr)
#endif // CAIALARMMSGINFO_H