DCPlugin/src/ATBAPP/DeviceControllerDiag.h

50 lines
924 B
C++

#ifndef DEVICECONTROLLERDIAG_H
#define DEVICECONTROLLERDIAG_H
#include <QObject>
#include <QTimer>
#include "ATBMachineEvent.h"
#include "interfaces.h"
class DeviceControllerDiag : public QObject
{
Q_OBJECT
public:
DeviceControllerDiag(QObject *parent = nullptr);
void init(hwinf* hw, QObject* eventReceiver);
public slots:
void diagRequest();
signals:
void diagResponse(ATBMachineEvent* machineEvent);
private:
QObject *eventReceiver;
hwinf* hw;
bool isRequestRunning;
bool flagInterruptDiag;
QTimer *diagRequestTimeoutTimer;
uint8_t sub_componentAssessment();
uint8_t sys_getSystemErrors();
private slots:
void onDiagRequestTimeoutTimerTimeout();
void private_startDiag(); // diag entry method
void private_finishedDiag(uint8_t result); // diag exit method
void sys_superviseSystem();
};
#endif // DEVICECONTROLLERDIAG_H