-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSignalInterface.h
49 lines (43 loc) · 1.21 KB
/
SignalInterface.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
/*
** SignalInterface.h
** (ここに概要を記載)
** VICTORIA Vehicle Information Platform
** COPYRIGHT (C) 2016 MITSUBISHI ELECTRIC CORPORATION ALL RIGHTS RESERVED
** 適用元ファイル--------------------------------------------------------------
**
** 更新履歴--------------------------------------------------------------------
** Ver. 00.01: 2016.09.19 UserName : 新規作成
*/
#ifndef SIGNALINTERFACE_H
#define SIGNALINTERFACE_H
// #include "boost/asio.hpp"
//#include "crypto/cryptodev.h"
#include <QObject>
#include <QTimer>
#include "WebSocketClient.h"
class SignalInterface: public QObject
{
Q_OBJECT
public:
explicit SignalInterface(QObject *parent = 0);
~SignalInterface();
void sendMessageToQML(QString message);
void startTimer();
void setWsClient(WebSocketClient* wsCl){ wsClient = wsCl;}
QString ParseResponse(QString message);
protected:
QTimer *timer;
int number;
WebSocketClient* wsClient;
public slots:
void update();
// socket state slots
void onMessage(QString message);
void onOpen(QString message);
void onError(QString message);
void onClose(QString message);
signals:
void updateSpeed(QString speed);
void Send(QString message);
};
#endif // SIGNALINTERFACE_H