-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmemoryhandler.h
More file actions
43 lines (39 loc) · 916 Bytes
/
Copy pathmemoryhandler.h
File metadata and controls
43 lines (39 loc) · 916 Bytes
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
#ifndef MEMORYHANDLER_H
#define MEMORYHANDLER_H
#include <QObject>
#include <QDebug>
#include "FlightData.h"
#include <windows.h>
#include <tchar.h>
#include <conio.h>
#include <QStringList>
#include <QTimer>
#include <QProcess>
#include <QMap>
class MemoryHandler : public QObject
{
Q_OBJECT
public:
MemoryHandler();
bool isSharedMemoryMapped;
void initSharedMemory();
int getPilotsOnline();
QStringList getPilotNames();
QMap<int,QString> getPilotList();
int getPilotStatus(QString pilotName);
int getPilotStatus(int pilotId);
int getCurrentTime();
bool isBMSRunning();
private:
HANDLE dataFileHeader;
HANDLE data2FileHeader;
LPVOID dataHeader;
LPVOID data2Header;
FlightData* data;
FlightData2* data2;
QTimer mapTimer;
int getPilotIdByName(QString pilotName);
public slots:
void retryMemoryMapping();
};
#endif // MEMORYHANDLER_H