some more doc
This commit is contained in:
parent
8f8e98f8ed
commit
7f54ec65cc
1 changed files with 67 additions and 4 deletions
|
@ -33,7 +33,7 @@
|
||||||
* ScStwLibraries.file = shared-libraries/ScStwLibraries/ScStwLibraries.pro
|
* ScStwLibraries.file = shared-libraries/ScStwLibraries/ScStwLibraries.pro
|
||||||
* @endcode
|
* @endcode
|
||||||
*
|
*
|
||||||
* And in your MyProject.pro include the .pri file
|
* And in your MyProject.pro include the .pri file:
|
||||||
* @code{.pro}
|
* @code{.pro}
|
||||||
* include($$PWD/../shared-libraries/ScStwLibraries/ScStwLibraries.pri)
|
* include($$PWD/../shared-libraries/ScStwLibraries/ScStwLibraries.pri)
|
||||||
* @endcode
|
* @endcode
|
||||||
|
@ -45,13 +45,18 @@
|
||||||
class ScStw : public QObject {
|
class ScStw : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
/**
|
|
||||||
* Some global enums
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The RaceState enum contains all states a race can have
|
||||||
|
*/
|
||||||
enum RaceState { IDLE, STARTING, WAITING, RUNNING, STOPPED };
|
enum RaceState { IDLE, STARTING, WAITING, RUNNING, STOPPED };
|
||||||
Q_ENUM(RaceState)
|
Q_ENUM(RaceState)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The SignalKey enum contains all signal keys a client can subscribe to
|
||||||
|
*
|
||||||
|
* @see ScStw::signalKeyFromInt()
|
||||||
|
*/
|
||||||
enum SignalKey {
|
enum SignalKey {
|
||||||
InvalidSignal = -1,
|
InvalidSignal = -1,
|
||||||
RaceStateChanged = 9000,
|
RaceStateChanged = 9000,
|
||||||
|
@ -61,9 +66,20 @@ public:
|
||||||
};
|
};
|
||||||
Q_ENUM(SignalKey)
|
Q_ENUM(SignalKey)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The NextStartAction enum contains all action that occur before a race is started
|
||||||
|
*/
|
||||||
enum NextStartAction { AtYourMarks, Ready, Start, None };
|
enum NextStartAction { AtYourMarks, Ready, Start, None };
|
||||||
Q_ENUM(NextStartAction)
|
Q_ENUM(NextStartAction)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The BaseStationSetting enum contains all settings of the base station that can be changed by a client
|
||||||
|
*
|
||||||
|
* @see ScStw::baseStationSettingFromInt()
|
||||||
|
* @see ScStw::baseStationSettingToString()
|
||||||
|
* @see ScStw::baseStationSettingFromString()
|
||||||
|
* @see ScStw::baseStationSettings
|
||||||
|
*/
|
||||||
enum BaseStationSetting {
|
enum BaseStationSetting {
|
||||||
InvalidSetting = -1,
|
InvalidSetting = -1,
|
||||||
ReadySoundEnableSetting,
|
ReadySoundEnableSetting,
|
||||||
|
@ -74,6 +90,9 @@ public:
|
||||||
};
|
};
|
||||||
Q_ENUM(BaseStationSetting)
|
Q_ENUM(BaseStationSetting)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The ErrorCode enum contains all error codes that can occur when sending a command to the basestation
|
||||||
|
*/
|
||||||
enum ErrorCode {
|
enum ErrorCode {
|
||||||
Success = 200,
|
Success = 200,
|
||||||
|
|
||||||
|
@ -84,17 +103,61 @@ public:
|
||||||
};
|
};
|
||||||
Q_ENUM(ErrorCode)
|
Q_ENUM(ErrorCode)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SOCKET_MESSAGE_START_KEY contains the key, a message is supposed to start with
|
||||||
|
*/
|
||||||
static const char* SOCKET_MESSAGE_START_KEY;
|
static const char* SOCKET_MESSAGE_START_KEY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SOCKET_MESSAGE_END_KEY contains the key, a message is supposed to end with
|
||||||
|
*/
|
||||||
static const char* SOCKET_MESSAGE_END_KEY;
|
static const char* SOCKET_MESSAGE_END_KEY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief baseStationSettings contains a string with reference to all BaseStationSetting values
|
||||||
|
*
|
||||||
|
* @see ScStw::BaseStationSetting
|
||||||
|
* @see ScStw::baseStationSettingToString()
|
||||||
|
* @see ScStw::baseStationSettingFromString()
|
||||||
|
*/
|
||||||
static const QMap<QString, ScStw::BaseStationSetting> baseStationSettings;
|
static const QMap<QString, ScStw::BaseStationSetting> baseStationSettings;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Function to convert an int to a BaseStationSetting
|
||||||
|
* @param i the int to convert
|
||||||
|
* @return a BaseStationSetting
|
||||||
|
*
|
||||||
|
* @see ScStw::BaseStationSetting
|
||||||
|
*/
|
||||||
static BaseStationSetting baseStationSettingfromInt(int i);
|
static BaseStationSetting baseStationSettingfromInt(int i);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Function to convert a QString to a BaseStationSetting
|
||||||
|
* @param s the string to convert
|
||||||
|
* @return a BaseStationSetting
|
||||||
|
*
|
||||||
|
* @see ScStw::BaseStationSetting
|
||||||
|
* @see ScStw::baseStationSettingToString()
|
||||||
|
*/
|
||||||
static BaseStationSetting baseStationSettingFromString(QString s);
|
static BaseStationSetting baseStationSettingFromString(QString s);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Function to convert BaseStationSetting to a QString
|
||||||
|
* @param s the BaseStationSetting to convert
|
||||||
|
* @return a QString
|
||||||
|
*
|
||||||
|
* @see ScStw::BaseStationSetting
|
||||||
|
* @see ScStw::baseStationSettingFromString()
|
||||||
|
*/
|
||||||
static QString baseStationSettingToString(BaseStationSetting s);
|
static QString baseStationSettingToString(BaseStationSetting s);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Function to convert an int to a SignalKey
|
||||||
|
* @param i the int to convert
|
||||||
|
* @return a SignalKey
|
||||||
|
*
|
||||||
|
* @see ScStw::SignalKey
|
||||||
|
*/
|
||||||
static SignalKey signalKeyFromInt(int i);
|
static SignalKey signalKeyFromInt(int i);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Reference in a new issue