Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
dad0ef4299
|
|||
cc6dfee0e2
|
|||
91d8eb03b3
|
|||
3bef73ce4b
|
|||
8d03926de4
|
|||
b34716ef93
|
|||
f75f2c57df
|
|||
18a35acf20
|
|||
ccc2b8120d
|
|||
ccc1c6033f
|
|||
c23364874e
|
|||
1e5020132f
|
|||
6bd02f1831
|
|||
923bff1117
|
|||
12be31ee49
|
|||
f8757b352d
|
|||
4567aed6d1
|
|||
4df3a83126
|
|||
5c66abfd87
|
|||
efe56672ff
|
@@ -133,7 +133,7 @@ PLUGIN_STATE ATBDeviceControllerPlugin::initDCPlugin(QObject *eventReceiver, con
|
|||||||
qCritical() << "ATBDeviceControllerPlugin: Set printer encoding to " << printerEncoding;
|
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;
|
this->pluginState = PLUGIN_STATE::INITIALIZED;
|
||||||
|
|
||||||
@@ -663,8 +663,6 @@ void ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()
|
|||||||
{
|
{
|
||||||
qCritical() << "ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()";
|
qCritical() << "ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()";
|
||||||
|
|
||||||
this->diag->diagReInit();
|
|
||||||
|
|
||||||
QTimer::singleShot(2000, this, SIGNAL(requestModeIDLE()));
|
QTimer::singleShot(2000, this, SIGNAL(requestModeIDLE()));
|
||||||
|
|
||||||
this->dbus->finishedBackgroundTask("DOOR_OPEN");
|
this->dbus->finishedBackgroundTask("DOOR_OPEN");
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
#include "support/JSON.h"
|
#include "support/JSON.h"
|
||||||
|
#include "src/ATBAPP/support/DBusControllerInterface.h"
|
||||||
|
|
||||||
|
|
||||||
DeviceControllerDiag::DeviceControllerDiag(PersistentData *pData, QObject *parent)
|
DeviceControllerDiag::DeviceControllerDiag(PersistentData *pData, QObject *parent)
|
||||||
@@ -17,6 +18,7 @@ DeviceControllerDiag::DeviceControllerDiag(PersistentData *pData, QObject *paren
|
|||||||
, eventReceiver(nullptr)
|
, eventReceiver(nullptr)
|
||||||
, isRequestRunning(false)
|
, isRequestRunning(false)
|
||||||
, flagInterruptDiag(false)
|
, flagInterruptDiag(false)
|
||||||
|
, isDiagBackgroundTask(false)
|
||||||
, lastState(DeviceController::State::INITIAL_STATE)
|
, lastState(DeviceController::State::INITIAL_STATE)
|
||||||
, _isErrorState(false)
|
, _isErrorState(false)
|
||||||
, pData(pData)
|
, 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->hw = hw;
|
||||||
this->eventReceiver = eventReceiver;
|
this->eventReceiver = eventReceiver;
|
||||||
|
this->dbus = dbus;
|
||||||
|
|
||||||
// make a system check on startup:
|
// make a system check on startup:
|
||||||
QTimer::singleShot(2000, this, &DeviceControllerDiag::diagRequest);
|
QTimer::singleShot(2000, this, &DeviceControllerDiag::diagRequest);
|
||||||
@@ -42,6 +45,7 @@ void DeviceControllerDiag::init(hwinf *hw, QObject* eventReceiver)
|
|||||||
void DeviceControllerDiag::diagReInit()
|
void DeviceControllerDiag::diagReInit()
|
||||||
{
|
{
|
||||||
this->machineEventSet.clear();
|
this->machineEventSet.clear();
|
||||||
|
this->previousMachineEventSet.clear();
|
||||||
this->_isErrorState = false;
|
this->_isErrorState = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,6 +62,7 @@ void DeviceControllerDiag::diagRequest()
|
|||||||
qCritical() << "DeviceControllerDiag::diagRequest() is already running";
|
qCritical() << "DeviceControllerDiag::diagRequest() is already running";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this->machineEventSet.clear();
|
||||||
this->isRequestRunning = true;
|
this->isRequestRunning = true;
|
||||||
this->diagRequestTimeoutTimer->start();
|
this->diagRequestTimeoutTimer->start();
|
||||||
|
|
||||||
@@ -92,8 +97,11 @@ bool DeviceControllerDiag::isOperatingState()
|
|||||||
return !this->_isErrorState;
|
return !this->_isErrorState;
|
||||||
}
|
}
|
||||||
|
|
||||||
QSet<DeviceController::State> DeviceControllerDiag::getCurrentMachineState()
|
QSet<DCMachineEvent> DeviceControllerDiag::getCurrentMachineState()
|
||||||
{
|
{
|
||||||
|
// ensure that currentMachineEventSet is delivered here
|
||||||
|
if (this->isRequestRunning) return this->previousMachineEventSet;
|
||||||
|
|
||||||
return this->machineEventSet;
|
return this->machineEventSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,11 +112,15 @@ void DeviceControllerDiag::private_startDiag()
|
|||||||
// check for DiagRequestTimeoutTimerTimeout:
|
// check for DiagRequestTimeoutTimerTimeout:
|
||||||
if (this->flagInterruptDiag) {
|
if (this->flagInterruptDiag) {
|
||||||
qCritical() << "DeviceControllerDiag::private_startDiag() interrupted!";
|
qCritical() << "DeviceControllerDiag::private_startDiag() interrupted!";
|
||||||
this->private_setDiagEvent(DeviceController::State::E255);
|
DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::E255);
|
||||||
this->isRequestRunning = false;
|
if (!this->previousMachineEventSet.contains(E255Event)) {
|
||||||
this->flagInterruptDiag = false;
|
machineEventSet.insert(E255Event);
|
||||||
|
private_sendDiagEvent(E255Event, DeviceController::Action::SET);
|
||||||
|
}
|
||||||
if (this->E255counter > 5) {
|
if (this->E255counter > 5) {
|
||||||
this->restartCArun();
|
this->restartCArun();
|
||||||
|
// try it again, until success:
|
||||||
|
QTimer::singleShot(1000, this, &DeviceControllerDiag::diagRequest);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this->E255counter++;
|
this->E255counter++;
|
||||||
@@ -121,6 +133,7 @@ void DeviceControllerDiag::private_startDiag()
|
|||||||
* - diag is called again in ModeOOO wokeup()
|
* - diag is called again in ModeOOO wokeup()
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
this->private_finishDiag();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,13 +142,21 @@ void DeviceControllerDiag::private_startDiag()
|
|||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
qCritical() << "DeviceControllerDiag::private_startDiag() DCdata is valid";
|
qCritical() << "DeviceControllerDiag::private_startDiag() DCdata is valid";
|
||||||
|
this->machineEventSet.remove(DCMachineEvent(DeviceController::State::E255));
|
||||||
|
this->machineEventSet.remove(DCMachineEvent(DeviceController::State::W255));
|
||||||
QTimer::singleShot(200, this, &DeviceControllerDiag::sys_superviseSystem);
|
QTimer::singleShot(200, this, &DeviceControllerDiag::sys_superviseSystem);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qCritical() << "DeviceControllerDiag::private_startDiag() DCdata is +++not+++ valid";
|
qCritical() << "DeviceControllerDiag::private_startDiag() DCdata is +++not+++ valid";
|
||||||
|
|
||||||
// try it again
|
|
||||||
hw->dc_autoRequest(true);
|
hw->dc_autoRequest(true);
|
||||||
|
|
||||||
|
if (! this->isDiagBackgroundTask) {
|
||||||
|
this->isDiagBackgroundTask = true;
|
||||||
|
this->dbus->startBackgroundTask("E255");
|
||||||
|
}
|
||||||
|
|
||||||
|
// try it again
|
||||||
QTimer::singleShot(200, this, &DeviceControllerDiag::private_startDiag);
|
QTimer::singleShot(200, this, &DeviceControllerDiag::private_startDiag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -153,11 +174,16 @@ void DeviceControllerDiag::sys_superviseSystem()
|
|||||||
// check for DiagRequestTimeoutTimerTimeout:
|
// check for DiagRequestTimeoutTimerTimeout:
|
||||||
if (this->flagInterruptDiag) {
|
if (this->flagInterruptDiag) {
|
||||||
qCritical() << "DeviceControllerDiag::sys_superviseSystem() interrupted!";
|
qCritical() << "DeviceControllerDiag::sys_superviseSystem() interrupted!";
|
||||||
this->private_setDiagEvent(DeviceController::State::E255);
|
// send
|
||||||
this->flagInterruptDiag = false;
|
DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::E255);
|
||||||
this->isRequestRunning = false;
|
if (!this->previousMachineEventSet.contains(E255Event)) {
|
||||||
|
machineEventSet.insert(E255Event);
|
||||||
|
private_sendDiagEvent(E255Event, DeviceController::Action::SET);
|
||||||
|
}
|
||||||
if (this->E255counter > 5) { this->restartCArun(); }
|
if (this->E255counter > 5) { this->restartCArun(); }
|
||||||
else { this->E255counter++; }
|
else { this->E255counter++; }
|
||||||
|
QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
|
||||||
|
this->private_finishDiag();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,11 +192,15 @@ void DeviceControllerDiag::sys_superviseSystem()
|
|||||||
// es gibt keinerlei gültige Daten vom DC
|
// es gibt keinerlei gültige Daten vom DC
|
||||||
qCritical() << "DeviceControllerDiag::sys_superviseSystem() no valid data!";
|
qCritical() << "DeviceControllerDiag::sys_superviseSystem() no valid data!";
|
||||||
hw->dc_autoRequest(true);
|
hw->dc_autoRequest(true);
|
||||||
this->private_setDiagEvent(DeviceController::State::M0254);
|
|
||||||
this->diagRequestTimeoutTimer->stop();
|
DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::M0254);
|
||||||
this->isRequestRunning = false;
|
machineEventSet.insert(E255Event);
|
||||||
|
private_sendDiagEvent(E255Event, DeviceController::Action::SET);
|
||||||
|
|
||||||
if (this->E255counter > 5) { this->restartCArun(); }
|
if (this->E255counter > 5) { this->restartCArun(); }
|
||||||
else { this->E255counter++; }
|
else { this->E255counter++; }
|
||||||
|
QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
|
||||||
|
this->private_finishDiag();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,44 +431,71 @@ void DeviceControllerDiag::sub_componentAssessment()
|
|||||||
this->private_setDiagEvent(DeviceController::State::W004);
|
this->private_setDiagEvent(DeviceController::State::W004);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag_sendOperate) {
|
|
||||||
this->private_setDiagEvent(DeviceController::State::O000);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// compare machineEventSets
|
// compare machineEventSets
|
||||||
// New events: present in current but not previous
|
// New events: present in current but not previous
|
||||||
QSet<DeviceController::State> newEvents = this->machineEventSet - this->previousMachineEventSet;
|
QSet<DCMachineEvent> newEvents = this->machineEventSet - this->previousMachineEventSet;
|
||||||
|
|
||||||
// Reset events: present in previous but not current
|
// Reset events: present in previous but not current
|
||||||
QSet<DeviceController::State> resetEvents = this->previousMachineEventSet - this->machineEventSet;
|
QSet<DCMachineEvent> resetEvents = this->previousMachineEventSet - this->machineEventSet;
|
||||||
|
|
||||||
|
// DEBUG EventSets:
|
||||||
|
qCritical() << "sub_componentAssessment():";
|
||||||
|
qCritical() << " newEvents: " << newEvents.size();
|
||||||
|
qCritical() << " resetEvents: " << resetEvents.size();
|
||||||
|
QStringList DeviceControllerStateStringList;
|
||||||
|
for (const DCMachineEvent& event : this->machineEventSet) {
|
||||||
|
DeviceControllerStateStringList.append(QMetaEnum::fromType<DeviceController::State>().valueToKey(event.state));
|
||||||
|
}
|
||||||
|
qCritical() << "diagReq result: " << DeviceControllerStateStringList;
|
||||||
|
|
||||||
// Triggering Actions
|
// Triggering Actions
|
||||||
// Iterate through the results
|
// Iterate through the results
|
||||||
for (const DeviceController::State& event : newEvents) {
|
// send SET:
|
||||||
|
for (const DCMachineEvent& event : newEvents) {
|
||||||
private_sendDiagEvent(event, DeviceController::Action::SET); // New event detected
|
private_sendDiagEvent(event, DeviceController::Action::SET); // New event detected
|
||||||
}
|
}
|
||||||
|
|
||||||
// Proposal: send reset
|
// send RESET:
|
||||||
/*
|
for (const DCMachineEvent& event : resetEvents) {
|
||||||
for (const DeviceController::State& event : resetEvents) {
|
|
||||||
private_sendDiagEvent(event, DeviceController::Action::RESET); // Event no longer present
|
private_sendDiagEvent(event, DeviceController::Action::RESET); // Event no longer present
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
// send Operate if there is no error
|
||||||
|
if (flag_sendOperate) {
|
||||||
|
// O000 must not be part of machineEventSet
|
||||||
|
DCMachineEvent O000DCMachineEvent = DCMachineEvent(DeviceController::State::O000);
|
||||||
|
this->private_sendDiagEvent(O000DCMachineEvent, DeviceController::Action::SET);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// finish diag
|
// finish diag
|
||||||
|
this->private_finishDiag();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DeviceControllerDiag::private_finishDiag
|
||||||
|
*
|
||||||
|
* Single point to finish a diag process:
|
||||||
|
* -
|
||||||
|
*/
|
||||||
|
void DeviceControllerDiag::private_finishDiag()
|
||||||
|
{
|
||||||
this->diagRequestTimeoutTimer->stop();
|
this->diagRequestTimeoutTimer->stop();
|
||||||
this->isRequestRunning = false;
|
this->isRequestRunning = false;
|
||||||
this->flagInterruptDiag = false;
|
this->flagInterruptDiag = false;
|
||||||
|
|
||||||
this->previousMachineEventSet = machineEventSet;
|
this->previousMachineEventSet.unite(machineEventSet); // add new elements from machineEventSet
|
||||||
this->machineEventSet.clear();
|
this->previousMachineEventSet.intersect(machineEventSet); // remove elements not in machineEventSet
|
||||||
|
|
||||||
|
if (this->isDiagBackgroundTask) {
|
||||||
|
this->isDiagBackgroundTask = false;
|
||||||
|
this->dbus->finishedBackgroundTask("E255");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief DeviceControllerDiag::private_setDiagEvent
|
* @brief DeviceControllerDiag::private_setDiagEvent
|
||||||
* @param result - result value from 'sub_componentAssessment()',
|
* @param result - result value from 'sub_componentAssessment()',
|
||||||
@@ -457,18 +514,29 @@ void DeviceControllerDiag::private_setDiagEvent(DeviceController::State result)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
machineEventSet.insert(result);
|
DCMachineEvent newState = DCMachineEvent(result);
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
qCritical() << "----> setDiagEvent: " << newState.state << " with id: " << newState.eventId;
|
||||||
|
|
||||||
|
machineEventSet.insert(newState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result, DeviceController::Action action)
|
|
||||||
{
|
|
||||||
QString eventId = QUuid::createUuid().toString(QUuid::WithoutBraces).mid(0, 8);
|
|
||||||
|
|
||||||
QString eventName = QMetaEnum::fromType<DeviceController::State>().valueToKey(result);;
|
/**
|
||||||
|
* @brief DeviceControllerDiag::private_sendDiagEvent
|
||||||
|
* @param result WXXX | EXXX | O000
|
||||||
|
* @param action SET|RESET
|
||||||
|
*/
|
||||||
|
void DeviceControllerDiag::private_sendDiagEvent(DCMachineEvent result, DeviceController::Action action)
|
||||||
|
{
|
||||||
|
QString eventId = result.eventId;
|
||||||
|
|
||||||
|
QString eventName = QMetaEnum::fromType<DeviceController::State>().valueToKey(result.state);
|
||||||
EVENT_CLASS eventClass = EVENT_CLASS::STATE;
|
EVENT_CLASS eventClass = EVENT_CLASS::STATE;
|
||||||
QString parameter;
|
QString parameter;
|
||||||
switch (result) {
|
switch (result.state) {
|
||||||
|
|
||||||
case DeviceController::State::INITIAL_STATE:
|
case DeviceController::State::INITIAL_STATE:
|
||||||
break;
|
break;
|
||||||
@@ -577,7 +645,6 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result,
|
|||||||
parameter = "no valid data from DeviceController";
|
parameter = "no valid data from DeviceController";
|
||||||
break;
|
break;
|
||||||
case DeviceController::State::O000: // everything is fine
|
case DeviceController::State::O000: // everything is fine
|
||||||
this->machineEventSet.clear();
|
|
||||||
this->_isErrorState = false;
|
this->_isErrorState = false;
|
||||||
eventClass = EVENT_CLASS::OPERATE;
|
eventClass = EVENT_CLASS::OPERATE;
|
||||||
parameter = "";
|
parameter = "";
|
||||||
@@ -612,7 +679,7 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->lastState = result;
|
this->lastState = result.state;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Variant: send 'parameter' as JSON:
|
* Variant: send 'parameter' as JSON:
|
||||||
@@ -646,6 +713,25 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result,
|
|||||||
void DeviceControllerDiag::restartCArun()
|
void DeviceControllerDiag::restartCArun()
|
||||||
{
|
{
|
||||||
this->E255counter = 0;
|
this->E255counter = 0;
|
||||||
this->private_setDiagEvent(DeviceController::State::W255);
|
|
||||||
|
|
||||||
|
DCMachineEvent W255Event = DCMachineEvent(DeviceController::State::W255);
|
||||||
|
machineEventSet.insert(W255Event);
|
||||||
|
private_sendDiagEvent(W255Event, DeviceController::Action::SET);
|
||||||
|
|
||||||
QProcess::startDetached("/bin/systemctl", {"restart", "carun"});
|
QProcess::startDetached("/bin/systemctl", {"restart", "carun"});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************************************************
|
||||||
|
*
|
||||||
|
* DCMachineEvent
|
||||||
|
*/
|
||||||
|
DCMachineEvent::DCMachineEvent(DeviceController::State state) : state(state)
|
||||||
|
{
|
||||||
|
this->eventId = QUuid::createUuid().toString(QUuid::WithoutBraces).mid(0, 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include "support/PersistentData.h"
|
#include "support/PersistentData.h"
|
||||||
|
|
||||||
|
class DBusControllerInterface;
|
||||||
|
|
||||||
namespace DeviceController {
|
namespace DeviceController {
|
||||||
Q_NAMESPACE
|
Q_NAMESPACE
|
||||||
@@ -72,6 +73,30 @@ namespace DeviceController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------- DCMachineEvent -----------------------------------------
|
||||||
|
|
||||||
|
class DCMachineEvent {
|
||||||
|
public:
|
||||||
|
DCMachineEvent() = default;
|
||||||
|
DCMachineEvent(DeviceController::State state);
|
||||||
|
|
||||||
|
DeviceController::State state;
|
||||||
|
QString eventId;
|
||||||
|
|
||||||
|
// Equality operator (required for QSet)
|
||||||
|
bool operator==(const DCMachineEvent& other) const {
|
||||||
|
return (state == other.state);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Hash function (required for QSet)
|
||||||
|
inline uint qHash(const DCMachineEvent& key, uint seed = 0) {
|
||||||
|
return qHash(static_cast<int>(key.state), seed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------ DeviceControllerDiag --------------------------------------
|
||||||
|
|
||||||
class DeviceControllerDiag : public QObject
|
class DeviceControllerDiag : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -79,7 +104,7 @@ class DeviceControllerDiag : public QObject
|
|||||||
public:
|
public:
|
||||||
DeviceControllerDiag(PersistentData *pData, QObject *parent = nullptr);
|
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::COIN_PROCESSOR coinProcessorType;
|
||||||
nsDeviceControllerInterface::BILL_ACCEPTOR billAcceptor;
|
nsDeviceControllerInterface::BILL_ACCEPTOR billAcceptor;
|
||||||
@@ -89,7 +114,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool isErrorState();
|
bool isErrorState();
|
||||||
bool isOperatingState();
|
bool isOperatingState();
|
||||||
QSet<DeviceController::State> getCurrentMachineState();
|
QSet<DCMachineEvent> getCurrentMachineState();
|
||||||
|
|
||||||
void setTimeout(int timeout);
|
void setTimeout(int timeout);
|
||||||
|
|
||||||
@@ -118,9 +143,11 @@ signals:
|
|||||||
private:
|
private:
|
||||||
QObject *eventReceiver;
|
QObject *eventReceiver;
|
||||||
hwinf* hw;
|
hwinf* hw;
|
||||||
|
DBusControllerInterface* dbus;
|
||||||
|
|
||||||
bool isRequestRunning;
|
bool isRequestRunning;
|
||||||
bool flagInterruptDiag;
|
bool flagInterruptDiag;
|
||||||
|
bool isDiagBackgroundTask;
|
||||||
|
|
||||||
QTimer *diagRequestTimeoutTimer;
|
QTimer *diagRequestTimeoutTimer;
|
||||||
|
|
||||||
@@ -129,8 +156,8 @@ private:
|
|||||||
int lastVoltage;
|
int lastVoltage;
|
||||||
|
|
||||||
DeviceController::State lastState;
|
DeviceController::State lastState;
|
||||||
QSet<DeviceController::State> machineEventSet;
|
QSet<DCMachineEvent> machineEventSet;
|
||||||
QSet<DeviceController::State> previousMachineEventSet;
|
QSet<DCMachineEvent> previousMachineEventSet;
|
||||||
bool _isErrorState;
|
bool _isErrorState;
|
||||||
|
|
||||||
PersistentData* pData;
|
PersistentData* pData;
|
||||||
@@ -142,7 +169,9 @@ private slots:
|
|||||||
|
|
||||||
void private_startDiag(); // diag entry method
|
void private_startDiag(); // diag entry method
|
||||||
void private_setDiagEvent(DeviceController::State result);
|
void private_setDiagEvent(DeviceController::State result);
|
||||||
void private_sendDiagEvent(DeviceController::State result, DeviceController::Action action);
|
void private_sendDiagEvent(DCMachineEvent result, DeviceController::Action action);
|
||||||
|
|
||||||
|
void private_finishDiag();
|
||||||
|
|
||||||
void sys_superviseSystem();
|
void sys_superviseSystem();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user