-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathchronos.h
49 lines (41 loc) · 1.16 KB
/
chronos.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
#ifndef CHRONOS_H
#define CHRONOS_H
#include <QObject>
#include <QUdpSocket>
#include <QTimer>
#include <QElapsedTimer>
#include "tcpserversimple.h"
#include "packetinterface.h"
#include "chronoscomm.h"
class Chronos : public QObject
{
Q_OBJECT
public:
Chronos(QObject *parent = 0);
bool startServer(PacketInterface *packet, QHostAddress addr = QHostAddress::Any);
ChronosComm *comm();
private slots:
void startTimerSlot();
void connectionChanged(bool connected, QString address);
void stateReceived(quint8 id, CAR_STATE state);
void processTraj(chronos_traj traj);
void processOsem(chronos_osem osem);
void processOstm(chronos_ostm ostm);
void processStrt(chronos_strt strt);
void processHeab(chronos_heab heab);
void processSypm(chronos_sypm sypm);
void processMtsp(chronos_mtsp mtsp);
void processOpro(chronos_opro opro);
private:
PacketInterface *mPacket;
ChronosComm *mChronos;
QTimer *mStartTimer;
QElapsedTimer mScenarioTimer;
bool mIsArmed;
bool mIsStarted;
int mHeabPollCnt;
double mLlhRef[3];
QList<LocPoint> mRouteLast;
chronos_sypm mSypmLast;
};
#endif // CHRONOS_H