Rework machine diag:

- allways check for whole system state (all errors / warnings)
   -> e.g. an error does not hide an other error or warning
 - send machine event only once
 - store sent events in a QSet-container
 - clear this container if no error / warning is detected

Note: there is currently no message for releasing a certain single error
/ warning. So it is no worth in removing a single entry in
QSet-container. This is a task for later program versions.
This commit is contained in:
2023-07-26 18:11:41 +02:00
parent df3a83521f
commit 0fd20d1dc4
2 changed files with 128 additions and 90 deletions

View File

@@ -2,6 +2,7 @@
#define DEVICECONTROLLERDIAG_H
#include <QObject>
#include <QSet>
#include <QTimer>
#include "ATBMachineEvent.h"
@@ -78,17 +79,17 @@ private:
QTimer *diagRequestTimeoutTimer;
//uint8_t sub_componentAssessment();
DeviceController::State sub_componentAssessment();
DeviceController::State sys_getSystemErrors();
void sub_componentAssessment(); // diag exit method
int lastVoltage;
QSet<DeviceController::State> machineEventSet;
private slots:
void onDiagRequestTimeoutTimerTimeout();
void private_startDiag(); // diag entry method
void private_finishedDiag(DeviceController::State result); // diag exit method
void private_startDiag(); // diag entry method
void private_sendDiagEvent(DeviceController::State result);
void sys_superviseSystem();