Compare commits
	
		
			19 Commits
		
	
	
		
			2.7.2
			...
			improveDev
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    this->diag->init(this->hw, this->eventReceiver);
 | 
			
		||||
    this->diag->init(this->hw, this->dbus, this->eventReceiver);
 | 
			
		||||
 | 
			
		||||
    this->pluginState = PLUGIN_STATE::INITIALIZED;
 | 
			
		||||
 | 
			
		||||
@@ -663,8 +663,6 @@ void ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()
 | 
			
		||||
{
 | 
			
		||||
    qCritical() << "ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()";
 | 
			
		||||
 | 
			
		||||
    this->diag->diagReInit();
 | 
			
		||||
 | 
			
		||||
    QTimer::singleShot(2000, this, SIGNAL(requestModeIDLE()));
 | 
			
		||||
 | 
			
		||||
    this->dbus->finishedBackgroundTask("DOOR_OPEN");
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
@@ -42,6 +45,7 @@ void DeviceControllerDiag::init(hwinf *hw, QObject* eventReceiver)
 | 
			
		||||
void DeviceControllerDiag::diagReInit()
 | 
			
		||||
{
 | 
			
		||||
    this->machineEventSet.clear();
 | 
			
		||||
    this->previousMachineEventSet.clear();
 | 
			
		||||
    this->_isErrorState = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -58,6 +62,7 @@ void DeviceControllerDiag::diagRequest()
 | 
			
		||||
        qCritical() << "DeviceControllerDiag::diagRequest() is already running";
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    this->machineEventSet.clear();
 | 
			
		||||
    this->isRequestRunning = true;
 | 
			
		||||
    this->diagRequestTimeoutTimer->start();
 | 
			
		||||
 | 
			
		||||
@@ -92,8 +97,11 @@ bool DeviceControllerDiag::isOperatingState()
 | 
			
		||||
    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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -104,11 +112,15 @@ void DeviceControllerDiag::private_startDiag()
 | 
			
		||||
    // check for DiagRequestTimeoutTimerTimeout:
 | 
			
		||||
    if (this->flagInterruptDiag) {
 | 
			
		||||
        qCritical() << "DeviceControllerDiag::private_startDiag() interrupted!";
 | 
			
		||||
        this->private_setDiagEvent(DeviceController::State::E255);
 | 
			
		||||
        this->isRequestRunning  = false;
 | 
			
		||||
        this->flagInterruptDiag = false;
 | 
			
		||||
        DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::E255);
 | 
			
		||||
        if (!this->previousMachineEventSet.contains(E255Event)) {
 | 
			
		||||
            machineEventSet.insert(E255Event);
 | 
			
		||||
            private_sendDiagEvent(E255Event, DeviceController::Action::SET);
 | 
			
		||||
        }
 | 
			
		||||
        if (this->E255counter > 5) {
 | 
			
		||||
            this->restartCArun();
 | 
			
		||||
            // try it again, until success:
 | 
			
		||||
            QTimer::singleShot(1000, this, &DeviceControllerDiag::diagRequest);
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            this->E255counter++;
 | 
			
		||||
@@ -121,6 +133,7 @@ void DeviceControllerDiag::private_startDiag()
 | 
			
		||||
             * - diag is called again in ModeOOO wokeup()
 | 
			
		||||
             */
 | 
			
		||||
        }
 | 
			
		||||
        this->private_finishDiag();
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -129,13 +142,21 @@ void DeviceControllerDiag::private_startDiag()
 | 
			
		||||
 | 
			
		||||
    if (result) {
 | 
			
		||||
        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);
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        qCritical() << "DeviceControllerDiag::private_startDiag() DCdata is +++not+++ valid";
 | 
			
		||||
 | 
			
		||||
        // try it again
 | 
			
		||||
        hw->dc_autoRequest(true);
 | 
			
		||||
 | 
			
		||||
        if (! this->isDiagBackgroundTask) {
 | 
			
		||||
            this->isDiagBackgroundTask = true;
 | 
			
		||||
            this->dbus->startBackgroundTask("E255");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // try it again
 | 
			
		||||
        QTimer::singleShot(200, this, &DeviceControllerDiag::private_startDiag);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -153,11 +174,16 @@ void DeviceControllerDiag::sys_superviseSystem()
 | 
			
		||||
    // check for DiagRequestTimeoutTimerTimeout:
 | 
			
		||||
    if (this->flagInterruptDiag) {
 | 
			
		||||
        qCritical() << "DeviceControllerDiag::sys_superviseSystem() interrupted!";
 | 
			
		||||
        this->private_setDiagEvent(DeviceController::State::E255);
 | 
			
		||||
        this->flagInterruptDiag = false;
 | 
			
		||||
        this->isRequestRunning  = false;
 | 
			
		||||
        // send
 | 
			
		||||
        DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::E255);
 | 
			
		||||
        if (!this->previousMachineEventSet.contains(E255Event)) {
 | 
			
		||||
            machineEventSet.insert(E255Event);
 | 
			
		||||
            private_sendDiagEvent(E255Event, DeviceController::Action::SET);
 | 
			
		||||
        }
 | 
			
		||||
        if (this->E255counter > 5) { this->restartCArun(); }
 | 
			
		||||
                              else { this->E255counter++; }
 | 
			
		||||
        QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
 | 
			
		||||
        this->private_finishDiag();
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -166,11 +192,15 @@ void DeviceControllerDiag::sys_superviseSystem()
 | 
			
		||||
        // es gibt keinerlei gültige Daten vom DC
 | 
			
		||||
        qCritical() << "DeviceControllerDiag::sys_superviseSystem() no valid data!";
 | 
			
		||||
        hw->dc_autoRequest(true);
 | 
			
		||||
        this->private_setDiagEvent(DeviceController::State::M0254);
 | 
			
		||||
        this->diagRequestTimeoutTimer->stop();
 | 
			
		||||
        this->isRequestRunning  = false;
 | 
			
		||||
 | 
			
		||||
        DCMachineEvent E255Event = DCMachineEvent(DeviceController::State::M0254);
 | 
			
		||||
        machineEventSet.insert(E255Event);
 | 
			
		||||
        private_sendDiagEvent(E255Event, DeviceController::Action::SET);
 | 
			
		||||
 | 
			
		||||
        if (this->E255counter > 5) { this->restartCArun(); }
 | 
			
		||||
                              else { this->E255counter++; }
 | 
			
		||||
        QTimer::singleShot(400, this, &DeviceControllerDiag::diagRequest);
 | 
			
		||||
        this->private_finishDiag();
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -401,44 +431,71 @@ void DeviceControllerDiag::sub_componentAssessment()
 | 
			
		||||
        this->private_setDiagEvent(DeviceController::State::W004);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (flag_sendOperate) {
 | 
			
		||||
        this->private_setDiagEvent(DeviceController::State::O000);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    // compare machineEventSets
 | 
			
		||||
    // 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
 | 
			
		||||
    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
 | 
			
		||||
    // 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
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Proposal: send reset
 | 
			
		||||
    /*
 | 
			
		||||
    for (const DeviceController::State& event : resetEvents) {
 | 
			
		||||
    // send RESET:
 | 
			
		||||
    for (const DCMachineEvent& event : resetEvents) {
 | 
			
		||||
        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
 | 
			
		||||
    this->private_finishDiag();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief DeviceControllerDiag::private_finishDiag
 | 
			
		||||
 *
 | 
			
		||||
 * Single point to finish a diag process:
 | 
			
		||||
 *  -
 | 
			
		||||
 */
 | 
			
		||||
void DeviceControllerDiag::private_finishDiag()
 | 
			
		||||
{
 | 
			
		||||
    this->diagRequestTimeoutTimer->stop();
 | 
			
		||||
    this->isRequestRunning  = false;
 | 
			
		||||
    this->flagInterruptDiag = false;
 | 
			
		||||
 | 
			
		||||
    this->previousMachineEventSet = machineEventSet;
 | 
			
		||||
    this->machineEventSet.clear();
 | 
			
		||||
    this->previousMachineEventSet.unite(machineEventSet);      // add new elements from machineEventSet
 | 
			
		||||
    this->previousMachineEventSet.intersect(machineEventSet);  // remove elements not in machineEventSet
 | 
			
		||||
 | 
			
		||||
    if (this->isDiagBackgroundTask) {
 | 
			
		||||
        this->isDiagBackgroundTask = false;
 | 
			
		||||
        this->dbus->finishedBackgroundTask("E255");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief DeviceControllerDiag::private_setDiagEvent
 | 
			
		||||
 * @param result - result value from 'sub_componentAssessment()',
 | 
			
		||||
@@ -457,18 +514,29 @@ void DeviceControllerDiag::private_setDiagEvent(DeviceController::State result)
 | 
			
		||||
        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;
 | 
			
		||||
    QString parameter;
 | 
			
		||||
    switch (result) {
 | 
			
		||||
    switch (result.state) {
 | 
			
		||||
 | 
			
		||||
    case DeviceController::State::INITIAL_STATE:
 | 
			
		||||
        break;
 | 
			
		||||
@@ -577,7 +645,6 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result,
 | 
			
		||||
        parameter  = "no valid data from DeviceController";
 | 
			
		||||
        break;
 | 
			
		||||
    case DeviceController::State::O000:   // everything is fine
 | 
			
		||||
        this->machineEventSet.clear();
 | 
			
		||||
        this->_isErrorState = false;
 | 
			
		||||
        eventClass = EVENT_CLASS::OPERATE;
 | 
			
		||||
        parameter  = "";
 | 
			
		||||
@@ -612,7 +679,7 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result,
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    this->lastState = result;
 | 
			
		||||
    this->lastState = result.state;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Variant: send 'parameter' as JSON:
 | 
			
		||||
@@ -646,6 +713,25 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result,
 | 
			
		||||
void DeviceControllerDiag::restartCArun()
 | 
			
		||||
{
 | 
			
		||||
    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"});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/****************************************************************************************************
 | 
			
		||||
 *
 | 
			
		||||
 *                                 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"
 | 
			
		||||
 | 
			
		||||
class DBusControllerInterface;
 | 
			
		||||
 | 
			
		||||
namespace DeviceController {
 | 
			
		||||
    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
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
@@ -79,7 +104,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;
 | 
			
		||||
@@ -89,7 +114,7 @@ public:
 | 
			
		||||
     */
 | 
			
		||||
    bool isErrorState();
 | 
			
		||||
    bool isOperatingState();
 | 
			
		||||
    QSet<DeviceController::State> getCurrentMachineState();
 | 
			
		||||
    QSet<DCMachineEvent> getCurrentMachineState();
 | 
			
		||||
 | 
			
		||||
    void setTimeout(int timeout);
 | 
			
		||||
 | 
			
		||||
@@ -118,9 +143,11 @@ signals:
 | 
			
		||||
private:
 | 
			
		||||
    QObject *eventReceiver;
 | 
			
		||||
    hwinf* hw;
 | 
			
		||||
    DBusControllerInterface* dbus;
 | 
			
		||||
 | 
			
		||||
    bool isRequestRunning;
 | 
			
		||||
    bool flagInterruptDiag;
 | 
			
		||||
    bool isDiagBackgroundTask;
 | 
			
		||||
 | 
			
		||||
    QTimer *diagRequestTimeoutTimer;
 | 
			
		||||
 | 
			
		||||
@@ -129,8 +156,8 @@ private:
 | 
			
		||||
    int lastVoltage;
 | 
			
		||||
 | 
			
		||||
    DeviceController::State lastState;
 | 
			
		||||
    QSet<DeviceController::State> machineEventSet;
 | 
			
		||||
    QSet<DeviceController::State> previousMachineEventSet;
 | 
			
		||||
    QSet<DCMachineEvent> machineEventSet;
 | 
			
		||||
    QSet<DCMachineEvent> previousMachineEventSet;
 | 
			
		||||
    bool _isErrorState;
 | 
			
		||||
 | 
			
		||||
    PersistentData* pData;
 | 
			
		||||
@@ -142,7 +169,9 @@ private slots:
 | 
			
		||||
 | 
			
		||||
    void private_startDiag();                                    // diag entry method
 | 
			
		||||
    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();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user