1 #ifndef _NOVA_MSG_ANALYZER_DLG_H_
2 #define _NOVA_MSG_ANALYZER_DLG_H_
4 #include "ui_MsgAnalyzerDlg.h"
6 #include "ErrorHandler/MessageAnalyzer/ma_utils.h"
7 #include "ErrorHandler/Components/NodeInfo.h"
8 #include "ErrorHandler/Components/qt_rule_engine.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;
30 enum display_field_t { DESCRIPTION, EXPRESSION };
38 , QDialog *parent = 0 );
43 void closeEvent(QCloseEvent *event)
final;
48 void onNewSysMsg(sev_code_t, QString
const & msg);
50 void onNewAlarm( QString
const & rule_name
51 , QString
const & msg );
52 void onConditionMatch( QString
const & name );
57 void onNodeClicked(QListWidgetItem * item);
59 void show_main_context_menu(
const QPoint & pos);
60 void show_dcm_context_menu(
const QPoint & pos);
61 void show_evb_context_menu(
const QPoint & pos);
63 void context_menu_reset();
64 void context_menu_warning();
65 void context_menu_error();
69 void rule_reset_selection( );
70 void reset_rule(
int idx);
71 void reset_rule(QString);
74 void onRuleDesc(
bool checked )
75 { rule_display = checked ? DESCRIPTION : EXPRESSION; updateRuleDisplay(); }
76 void onCondDesc(
bool checked )
77 { cond_display = checked ? DESCRIPTION : EXPRESSION; updateCondDisplay(); }
79 void onEstablishPartition(
int partition);
80 void onSetParticipants( QVector<QString>
const & dcm
81 , QVector<QString>
const & bnevb);
85 void reset_node_status();
86 void reset_rule_engine();
88 void initNodeStatus();
89 void initParticipants();
90 void initRuleEngineTable();
91 void updateRuleDisplay();
92 void updateCondDisplay();
94 void publishMessage( message_type_t type, QString
const & msg )
const;
96 void show_context_menu( QPoint
const & pos, QListWidget * list );
97 bool check_node_aow( std::string
const & key );
98 bool check_node_aoe( std::string
const & key );
103 fhicl::ParameterSet pset;
115 std::map<QString, int> rule_idx_map;
116 std::map<QString, int> cond_idx_map;
119 display_field_t rule_display;
120 display_field_t cond_display;
126 QSignalMapper sig_mapper;
129 QMenu * context_menu;
130 QMenu * rule_act_menu;
131 QMenu * cond_act_menu;
135 QAction * act_warning;
137 QAction * act_rule_enable;
138 QAction * act_rule_disable;
139 QAction * act_rule_reset;
142 QListWidgetItem * list_item;
Qt wrapper around MessageFacility message
The ReceiverManager loads one or more receiver plugins and displays messages received by those plugin...