-
Notifications
You must be signed in to change notification settings - Fork 1
/
OxsyMain.h
71 lines (53 loc) · 1.74 KB
/
OxsyMain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef __MAIN_H__
#define __MAIN_H__
#include "OxsyLibrary.h"
#ifndef WIN32 // _LINUX
#include "OxsyLinuxEvent.h"
#endif
using namespace std;
class COxsyClassPointers;
class COxsyMain
{
public:
COxsyMain();
virtual ~COxsyMain();
// members functions
static void InitOxsyPlayerClasses(void);
static void InitOxsyPlayerVariables(void);
static void GetCommandLineParameters(int argc, char** argv);
static void CreateGameLogFile(void);
static void CloseGameLogFile(void);
static bool StartOxsyPlayer(void);
static void ExitOxsyPlayer(void);
// only for some tests purpose
static void Test(void);
// members variables
static COxsyClassPointers *m_pClassPointers;
static char m_strCurrentDirectory[FILE_PATH_LENGTH_MAX + 1];
static char m_strTeamName[TEAM_NAME_LENGTH_MAX + 1];
static char m_strPlayerID[BUFFER_SIZE_MAX / 256];
static char m_strServerIP[BUFFER_SIZE_MAX / 256];
static char m_strServerPort[BUFFER_SIZE_MAX / 512];
static char m_strServerVersion[BUFFER_SIZE_MAX / 512];
static bool m_bGameLogFileCreated;
static bool m_bRIThreadIsAlive;
static bool m_bSCCThreadIsAlive;
static bool m_bServerIsAlive;
#ifdef WIN32
static HANDLE m_hSCCEvent;
static HANDLE m_hRIThread;
static HANDLE m_hSCCThread;
#else // _LINUX
static OxsyLinuxEvent m_hSCCEvent;
static pthread_t m_hRIThread;
static pthread_t m_hSCCThread;
#endif
};
#ifdef WIN32
unsigned int WINAPI SimulationCycleControlerThreadProc(void* lpParameter);
unsigned int WINAPI ReceiveInformationThreadProc(void* lpParameter);
#else // _LINUX
void* SimulationCycleControlerThreadProc(void* lpParameter);
void* ReceiveInformationThreadProc(void* lpParameter);
#endif
#endif // __MAIN_H__