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
|
||||
* @endcode
|
||||
*
|
||||
* And in your MyProject.pro include the .pri file
|
||||
* And in your MyProject.pro include the .pri file:
|
||||
* @code{.pro}
|
||||
* include($$PWD/../shared-libraries/ScStwLibraries/ScStwLibraries.pri)
|
||||
* @endcode
|
||||
|
@ -45,13 +45,18 @@
|
|||
class ScStw : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* Some global enums
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief The RaceState enum contains all states a race can have
|
||||
*/
|
||||
enum RaceState { IDLE, STARTING, WAITING, RUNNING, STOPPED };
|
||||
Q_ENUM(RaceState)
|
||||
|
||||
/**
|
||||
* @brief The SignalKey enum contains all signal keys a client can subscribe to
|
||||
*
|
||||
* @see ScStw::signalKeyFromInt()
|
||||
*/
|
||||
enum SignalKey {
|
||||
InvalidSignal = -1,
|
||||
RaceStateChanged = 9000,
|
||||
|
@ -61,9 +66,20 @@ public:
|
|||
};
|
||||
Q_ENUM(SignalKey)
|
||||
|
||||
/**
|
||||
* @brief The NextStartAction enum contains all action that occur before a race is started
|
||||
*/
|
||||
enum NextStartAction { AtYourMarks, Ready, Start, None };
|
||||
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 {
|
||||
InvalidSetting = -1,
|
||||
ReadySoundEnableSetting,
|
||||
|
@ -74,6 +90,9 @@ public:
|
|||
};
|
||||
Q_ENUM(BaseStationSetting)
|
||||
|
||||
/**
|
||||
* @brief The ErrorCode enum contains all error codes that can occur when sending a command to the basestation
|
||||
*/
|
||||
enum ErrorCode {
|
||||
Success = 200,
|
||||
|
||||
|
@ -84,17 +103,61 @@ public:
|
|||
};
|
||||
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;
|
||||
|
||||
/**
|
||||
* @brief SOCKET_MESSAGE_END_KEY contains the key, a message is supposed to end with
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* @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);
|
||||
|
||||
private:
|
||||
|
|
Reference in a new issue