1 #ifndef _NOVA_MSG_ANALYZER_DLG_H_
2 #define _NOVA_MSG_ANALYZER_DLG_H_
4 #include "ui_MsgAnalyzerDlg.h"
6 #include "ErrorHandler/Components/NodeInfo.h"
7 #include "ErrorHandler/Components/qt_rule_engine.h"
8 #include "ErrorHandler/MessageAnalyzer/ma_utils.h"
9 #include "mfextensions/Receivers/ReceiverManager.hh"
11 #include <QtCore/QMutex>
12 #include <QtCore/QSignalMapper>
13 #include <QtWidgets/QMenu>
15 #include <boost/regex.hpp>
16 #include <boost/shared_ptr.hpp>
23 namespace errorhandler {
25 typedef boost::regex regex_t;
26 typedef std::vector<regex_t> vregex_t;
28 typedef std::map<std::string, NodeInfo *> map_t;
41 MsgAnalyzerDlg(std::string
const &cfgfile,
int p, QDialog *parent = 0);
46 void closeEvent(QCloseEvent *event)
final;
51 void onNewSysMsg(sev_code_t, QString
const &msg);
53 void onNewAlarm(QString
const &rule_name, QString
const &msg);
54 void onConditionMatch(QString
const &name);
59 void onNodeClicked(QListWidgetItem *item);
61 void show_main_context_menu(
const QPoint &pos);
62 void show_dcm_context_menu(
const QPoint &pos);
63 void show_evb_context_menu(
const QPoint &pos);
65 void context_menu_reset();
66 void context_menu_warning();
67 void context_menu_error();
71 void rule_reset_selection();
72 void reset_rule(
int idx);
73 void reset_rule(QString);
75 void onRuleDesc(
bool checked)
77 rule_display = checked ? DESCRIPTION : EXPRESSION;
80 void onCondDesc(
bool checked)
82 cond_display = checked ? DESCRIPTION : EXPRESSION;
86 void onEstablishPartition(
int partition);
87 void onSetParticipants(QVector<QString>
const &dcm, QVector<QString>
const &bnevb);
90 void reset_node_status();
91 void reset_rule_engine();
93 void initNodeStatus();
94 void initParticipants();
95 void initRuleEngineTable();
96 void updateRuleDisplay();
97 void updateCondDisplay();
99 void publishMessage(message_type_t type, QString
const &msg)
const;
101 void show_context_menu(QPoint
const &pos, QListWidget *list);
102 bool check_node_aow(std::string
const &key);
103 bool check_node_aoe(std::string
const &key);
107 fhicl::ParameterSet pset;
119 std::map<QString, int> rule_idx_map;
120 std::map<QString, int> cond_idx_map;
123 display_field_t rule_display;
124 display_field_t cond_display;
130 QSignalMapper sig_mapper;
134 QMenu *rule_act_menu;
135 QMenu *cond_act_menu;
139 QAction *act_warning;
141 QAction *act_rule_enable;
142 QAction *act_rule_disable;
143 QAction *act_rule_reset;
146 QListWidgetItem *list_item;
Qt wrapper around MessageFacility message
The ReceiverManager loads one or more receiver plugins and displays messages received by those plugin...