2023-06-21 10:55:12 +02:00
|
|
|
#ifndef ATBMACHINECONDITIONEVENT_H
|
|
|
|
#define ATBMACHINECONDITIONEVENT_H
|
|
|
|
|
|
|
|
#include <QEvent>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
enum class EVENT_CLASS : quint8;
|
|
|
|
|
|
|
|
const QEvent::Type ATB_MACHINE_EVENT = static_cast<QEvent::Type>(QEvent::User + 2);
|
|
|
|
|
|
|
|
|
|
|
|
class ATBMachineEvent : public QEvent
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit ATBMachineEvent(const QString & id,
|
|
|
|
const QString & deviceName, // PTU/PRINTER/DC/...
|
|
|
|
EVENT_CLASS eventClass, // reason of event: Error/Warning/Alarm
|
|
|
|
const QString & name, // 'Event': "E001", "W003"
|
|
|
|
const int state,
|
|
|
|
const QString & parameter,
|
|
|
|
const QString & secondLevelInfo
|
|
|
|
);
|
|
|
|
|
|
|
|
QString eventId;
|
|
|
|
QString deviceName;
|
|
|
|
EVENT_CLASS machineEventClass;
|
|
|
|
QString eventName;
|
|
|
|
int eventState;
|
2023-06-26 19:46:22 +02:00
|
|
|
QString timestampString;
|
2023-06-21 10:55:12 +02:00
|
|
|
QString parameterString;
|
|
|
|
QString secondLevelInfoString;
|
|
|
|
|
|
|
|
static QString getEventClassString(EVENT_CLASS eventClass);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
enum class EVENT_CLASS : quint8 {
|
|
|
|
WARNING,
|
|
|
|
ERROR,
|
|
|
|
ALARM,
|
|
|
|
DEBUG,
|
|
|
|
STATE,
|
2023-07-24 15:15:38 +02:00
|
|
|
OPERATE,
|
2023-06-21 10:55:12 +02:00
|
|
|
NOT_DEFINED
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ATBMACHINEEVENT_H
|