DCPlugin/src/ATBAPP/DeviceControllerDiag.h

53 lines
985 B
C
Raw Normal View History

#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);
2023-07-05 18:47:45 +02:00
void newVoltage(uint32_t voltage);
private:
QObject *eventReceiver;
hwinf* hw;
bool isRequestRunning;
bool flagInterruptDiag;
QTimer *diagRequestTimeoutTimer;
uint8_t sub_componentAssessment();
uint8_t sys_getSystemErrors();
2023-07-05 18:47:45 +02:00
int lastVoltage;
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