DCDiag: add dbus interface
This commit is contained in:
parent
58c99753a9
commit
efe56672ff
@ -133,7 +133,7 @@ PLUGIN_STATE ATBDeviceControllerPlugin::initDCPlugin(QObject *eventReceiver, con
|
||||
qCritical() << "ATBDeviceControllerPlugin: Set printer encoding to " << printerEncoding;
|
||||
}
|
||||
|
||||
this->diag->init(this->hw, this->eventReceiver);
|
||||
this->diag->init(this->hw, this->dbus, this->eventReceiver);
|
||||
|
||||
this->pluginState = PLUGIN_STATE::INITIALIZED;
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <QProcess>
|
||||
|
||||
#include "support/JSON.h"
|
||||
#include "src/ATBAPP/support/DBusControllerInterface.h"
|
||||
|
||||
|
||||
DeviceControllerDiag::DeviceControllerDiag(PersistentData *pData, QObject *parent)
|
||||
@ -17,6 +18,7 @@ DeviceControllerDiag::DeviceControllerDiag(PersistentData *pData, QObject *paren
|
||||
, eventReceiver(nullptr)
|
||||
, isRequestRunning(false)
|
||||
, flagInterruptDiag(false)
|
||||
, isDiagBackgroundTask(false)
|
||||
, lastState(DeviceController::State::INITIAL_STATE)
|
||||
, _isErrorState(false)
|
||||
, pData(pData)
|
||||
@ -29,10 +31,11 @@ DeviceControllerDiag::DeviceControllerDiag(PersistentData *pData, QObject *paren
|
||||
}
|
||||
|
||||
|
||||
void DeviceControllerDiag::init(hwinf *hw, QObject* eventReceiver)
|
||||
void DeviceControllerDiag::init(hwinf *hw, DBusControllerInterface *dbus, QObject* eventReceiver)
|
||||
{
|
||||
this->hw = hw;
|
||||
this->eventReceiver = eventReceiver;
|
||||
this->dbus = dbus;
|
||||
|
||||
// make a system check on startup:
|
||||
QTimer::singleShot(2000, this, &DeviceControllerDiag::diagRequest);
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
#include "support/PersistentData.h"
|
||||
|
||||
class DBusControllerInterface;
|
||||
|
||||
namespace DeviceController {
|
||||
Q_NAMESPACE
|
||||
@ -79,7 +80,7 @@ class DeviceControllerDiag : public QObject
|
||||
public:
|
||||
DeviceControllerDiag(PersistentData *pData, QObject *parent = nullptr);
|
||||
|
||||
void init(hwinf* hw, QObject* eventReceiver);
|
||||
void init(hwinf* hw, DBusControllerInterface *dbus, QObject* eventReceiver);
|
||||
|
||||
nsDeviceControllerInterface::COIN_PROCESSOR coinProcessorType;
|
||||
nsDeviceControllerInterface::BILL_ACCEPTOR billAcceptor;
|
||||
@ -118,9 +119,11 @@ signals:
|
||||
private:
|
||||
QObject *eventReceiver;
|
||||
hwinf* hw;
|
||||
DBusControllerInterface* dbus;
|
||||
|
||||
bool isRequestRunning;
|
||||
bool flagInterruptDiag;
|
||||
bool isDiagBackgroundTask;
|
||||
|
||||
QTimer *diagRequestTimeoutTimer;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user