订单流程修改--QThread事件循环导致的逻辑修改
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "productionservice.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <atomic>
|
||||
|
||||
class ProductionWorker : public QObject
|
||||
{
|
||||
@@ -11,6 +12,7 @@ class ProductionWorker : public QObject
|
||||
|
||||
public:
|
||||
explicit ProductionWorker(QObject *parent = nullptr);
|
||||
void requestStopImmediate();
|
||||
|
||||
public slots:
|
||||
void requestStart(int orderId);
|
||||
@@ -18,13 +20,17 @@ public slots:
|
||||
void requestResume();
|
||||
void requestStop();
|
||||
void requestReset();
|
||||
void requestClearAlarm();
|
||||
void requestRecover();
|
||||
void requestRetry();
|
||||
void requestMarkNg();
|
||||
void requestRestore();
|
||||
void requestShutdown();
|
||||
|
||||
signals:
|
||||
void stateChanged(ProductionService::State state, const QString &name);
|
||||
void deviceStatusChanged(const DeviceStatus &status);
|
||||
void deviceCommunicationError(const QString &error);
|
||||
void currentWorkpieceChanged(int workpieceId, const QString &barcode);
|
||||
void currentWorkpieceSnapshotChanged(const Workpiece &workpiece);
|
||||
void currentPositionChanged(int trayNo, int slotNo);
|
||||
@@ -35,12 +41,14 @@ signals:
|
||||
void timeoutWarning(const QString &state, int elapsedMs, int timeoutMs);
|
||||
void timeoutRecoveryRequired(const QString &state, const QString &message);
|
||||
void recoveryCompleted(const QString &mode);
|
||||
void shutdownReady();
|
||||
|
||||
private:
|
||||
void ensureService();
|
||||
void reportFailure(bool success, const QString &error);
|
||||
|
||||
ProductionService *m_service;
|
||||
std::atomic_bool m_stopRequested;
|
||||
};
|
||||
|
||||
#endif // PRODUCTIONWORKER_H
|
||||
|
||||
Reference in New Issue
Block a user