17 #include <QtCore/QReadWriteLock> 18 #include <QtCore/QString> void fail()
Set "failure" state.
Definition: deviceState.cpp:44
void start()
Set "starting" state. Possible only from "off" state.
Definition: deviceState.cpp:51
void ready()
Set "ready" state. Possible only from "off" and "starting" states.
Definition: deviceState.cpp:69
void resetFailure()
Clears "failed" state and returns state to "off".
Definition: deviceState.cpp:123
Device received command to turn on, but is starting now, and it may take some time.
bool isFailed() const
Returns true if device is in "failure" state.
Definition: deviceState.cpp:38
Helper class to track device state (off, starting, ready, stopping, fail).
Definition: deviceState.h:26
void off()
Set "off" state. Possible only from "ready" and "stopping" states.
Definition: deviceState.cpp:105
DeviceState(const QString &deviceName)
Constructor.
Definition: deviceState.cpp:21
void stop()
Set "stopping" state. Possible only from "ready" state.
Definition: deviceState.cpp:87
Status
Device status.
Definition: deviceInterface.h:33
Definition: trikCommunicator.h:27
QString deviceName() const
Returns name of the device for debug purposes.
Definition: deviceState.cpp:137
bool isReady() const
Returns true if device is in "ready" state.
Definition: deviceState.cpp:32
DeviceInterface::Status status() const
Returns current device state.
Definition: deviceState.cpp:26