This repository has been archived on 2024-06-03. You can view files and clone it, but cannot push or open issues or pull requests.
shared-libraries/ScStwLibraries/ScStw.hpp

54 lines
1.1 KiB
C++
Raw Normal View History

#ifndef SCSTW_HPP
#define SCSTW_HPP
#include <QObject>
class ScStw : public QObject {
Q_OBJECT
public:
/**
* Some global enums
*/
enum RaceState { IDLE, STARTING, WAITING, RUNNING, STOPPED };
Q_ENUM(RaceState)
enum SignalKey {
RaceStateChanged = 9000,
TimersChanged = 9001,
ExtensionsChanged = 9002,
NextStartActionChanged = 9003 /*, ProfilesChanged*/
};
Q_ENUM(SignalKey)
enum NextStartAction { AtYourMarks, Ready, Start, None };
Q_ENUM(NextStartAction)
enum BaseStationSetting {
ReadySoundEnableSetting,
ReadySoundDelaySetting,
AtYourMarksSoundEnableSetting,
AtYourMarksSoundDelaySetting,
SoundVolumeSetting
};
Q_ENUM(BaseStationSetting)
enum ErrorCode {
Success = 200,
Error = 900,
NotConnectedError = 910,
TimeoutError = 911,
SettingNotAccessableError = 901
};
Q_ENUM(ErrorCode)
static const char* SOCKET_MESSAGE_START_KEY;
static const char* SOCKET_MESSAGE_END_KEY;
private:
ScStw() : QObject(nullptr) {};
};
#endif // SCSTW_HPP