HM-SPMS/product/src/gui/plugin/AlarmWidget/CAiAlarmMsgInfo.h

61 lines
2.3 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>
#include <CAlarmMsgInfo.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);
2025-03-17 09:23:17 +08:00
void initialize(const iot_idl::SIntelliAlmInfo &alarmInfo);
2025-03-14 17:05:48 +08:00
//< [优先级越小表示越大]-智能告警窗调用
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; //< 状态
E_ALARM_LOGICSTATE main_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; //是否需要视频告警
qint32 app_id; //主原始告警应用id
QString main_uuid_base64; //主原始告警uuid
QString key_id_tag; //主原始告警标签
E_TAGNAME_TYPE m_tagname_type;
};
bool operator==(const CAiAlarmMsgInfo &source, const CAiAlarmMsgInfo &target);
Q_DECLARE_METATYPE(CAiAlarmMsgInfo)
Q_DECLARE_METATYPE(AiAlarmMsgPtr)
#endif // CAIALARMMSGINFO_H