ITS
ApplicationManagement.h
Go to the documentation of this file.
1 
7 #ifndef APPLICATIONMANAGEMENT_H
8 #define APPLICATIONMANAGEMENT_H
9 
10 #include <Manager.h>
11 
12 #include <FakeCANProvider.h>
13 #include <FakeGPSProvider.h>
14 #include <ParameterUpperTester.h>
15 #include <ParameterNetwork.h>
16 
17 #include <QBluetoothLocalDevice>
18 #include <QBluetoothServer>
19 #include <QBluetoothServiceInfo>
20 #include <QList>
21 #include <QUdpSocket>
22 
23 #include <AppDenmIndication.h>
24 #include <AppDenmResultData.h>
25 
26 class ApplicationManagement : public QObject
27 {
28  Q_OBJECT
29 
30 public:
38  ApplicationManagement(Manager *man, bool bt, bool ut, bool app);
43 
44 public slots:
48  void situationChanged();
49 
50 private slots:
54  void clientConnected();
58  void clientDisconnected();
62  void readBtSocket();
66  void readUdpSocket();
70  void readUtSocket();
75  void sendMessageToFac(const QByteArray &message);
80  void sendMessageToBt(const QByteArray &message);
81 
82 signals:
87  void btMessageReceived(const QByteArray &message);
92  void udpMessageReceived(const QByteArray &message);
97  void utMessageReceived(const QByteArray &message);
98 
99 private:
104  QUdpSocket *m_udpSocket;
105  QUdpSocket *m_utSocket;
106  bool m_hasUt;
107  quint16 m_utPort;
109  /* BT parameters */
110  bool m_bt;
111  QBluetoothServer *rfcommServer;
112  QBluetoothServiceInfo serviceInfo;
113  QList<QBluetoothSocket *> clientSockets;
120  QByteArray transformMessageToBT(const QByteArray &message);
126  quint16 getUtPort(const char mt);
127 };
128 
129 #endif // APPLICATIONMANAGEMENT_H
Network configuration.
AppDenmIndication definition.
void clientConnected()
clientConnected Slot used when a new client is connected.
void sendMessageToBt(const QByteArray &message)
sendMessageToBt Slot used to send message through the Bluetooth socket.
AppDenmResult definition.
CAN provider for testing purposes.
ParameterNetwork * m_network
void btMessageReceived(const QByteArray &message)
btMessageReceived Signal used when data come through the Bluetooth socket.
Manager class.
QList< QBluetoothSocket * > clientSockets
QByteArray transformMessageToBT(const QByteArray &message)
transformMessageToBT Transform message from Facilities to send to the HMI.
void sendMessageToFac(const QByteArray &message)
sendMessageToFac Slot used to send message to the Facilities layer.
void udpMessageReceived(const QByteArray &message)
udpMessageReceived Signal used when data come through the UDP socket.
~ApplicationManagement()
~ApplicationManagement ApplicationManagement destructor
void readUdpSocket()
readUdpSocket Slot used when data come to the UDP socket.
QBluetoothServer * rfcommServer
QBluetoothServiceInfo serviceInfo
void utMessageReceived(const QByteArray &message)
utMessageReceived Signal used when data come from the Uppertester.
void clientDisconnected()
clientDisconnected Slot used when a client is disconnected.
quint16 getUtPort(const char mt)
getUtPort Get the UpperTester port from MessageType.
ApplicationManagement(Manager *man, bool bt, bool ut, bool app)
ApplicationManagement ApplicationManagement constructor.
void situationChanged()
situationChanged Slot used when GPS or CAN bus have a new value.
void readUtSocket()
readUtSocket Slot used when data come to the UpperTester socket.
ParameterUpperTester * m_ut
void readBtSocket()
readBtSocket Slot used when data come to the Bluetooth socket.
UpperTester configuration.
GPS provider for testing purposes.