ITS
|
#include <ApplicationManagement.h>
Public Slots | |
void | situationChanged () |
situationChanged Slot used when GPS or CAN bus have a new value. More... | |
Signals | |
void | btMessageReceived (const QByteArray &message) |
btMessageReceived Signal used when data come through the Bluetooth socket. More... | |
void | udpMessageReceived (const QByteArray &message) |
udpMessageReceived Signal used when data come through the UDP socket. More... | |
void | utMessageReceived (const QByteArray &message) |
utMessageReceived Signal used when data come from the Uppertester. More... | |
Public Member Functions | |
ApplicationManagement (Manager *man, bool bt, bool ut, bool app) | |
ApplicationManagement ApplicationManagement constructor. More... | |
~ApplicationManagement () | |
~ApplicationManagement ApplicationManagement destructor More... | |
Private Slots | |
void | clientConnected () |
clientConnected Slot used when a new client is connected. More... | |
void | clientDisconnected () |
clientDisconnected Slot used when a client is disconnected. More... | |
void | readBtSocket () |
readBtSocket Slot used when data come to the Bluetooth socket. More... | |
void | readUdpSocket () |
readUdpSocket Slot used when data come to the UDP socket. More... | |
void | readUtSocket () |
readUtSocket Slot used when data come to the UpperTester socket. More... | |
void | sendMessageToFac (const QByteArray &message) |
sendMessageToFac Slot used to send message to the Facilities layer. More... | |
void | sendMessageToBt (const QByteArray &message) |
sendMessageToBt Slot used to send message through the Bluetooth socket. More... | |
Private Member Functions | |
QByteArray | transformMessageToBT (const QByteArray &message) |
transformMessageToBT Transform message from Facilities to send to the HMI. More... | |
quint16 | getUtPort (const char mt) |
getUtPort Get the UpperTester port from MessageType. More... | |
Private Attributes | |
FakeCANProvider * | m_can |
FakeGPSProvider * | m_gps |
ParameterUpperTester * | m_ut |
ParameterNetwork * | m_network |
QUdpSocket * | m_udpSocket |
QUdpSocket * | m_utSocket |
bool | m_hasUt |
quint16 | m_utPort |
bool | m_bt |
QBluetoothServer * | rfcommServer |
QBluetoothServiceInfo | serviceInfo |
QList< QBluetoothSocket * > | clientSockets |
Definition at line 26 of file ApplicationManagement.h.
ApplicationManagement::ApplicationManagement | ( | Manager * | man, |
bool | bt, | ||
bool | ut, | ||
bool | app | ||
) |
ApplicationManagement ApplicationManagement constructor.
man | Pointer to the Manager |
bt | Is there Bluetooth? |
ut | Is there an UpperTester? |
app | Is there the triggering conditions? |
Definition at line 3 of file ApplicationManagement.cpp.
References ParameterNetwork::addPort(), btMessageReceived(), clientConnected(), Manager::hashMap, m_bt, m_can, m_gps, m_hasUt, m_network, m_udpSocket, m_ut, m_utSocket, readUdpSocket(), readUtSocket(), rfcommServer, sendMessageToBt(), sendMessageToFac(), serviceInfo, situationChanged(), udpMessageReceived(), and utMessageReceived().
ApplicationManagement::~ApplicationManagement | ( | ) |
~ApplicationManagement ApplicationManagement destructor
Definition at line 137 of file ApplicationManagement.cpp.
References clientSockets, m_bt, rfcommServer, and serviceInfo.
|
signal |
btMessageReceived Signal used when data come through the Bluetooth socket.
message | The received data. |
Referenced by ApplicationManagement(), and readBtSocket().
|
privateslot |
clientConnected Slot used when a new client is connected.
Definition at line 154 of file ApplicationManagement.cpp.
References clientDisconnected(), clientSockets, readBtSocket(), and rfcommServer.
Referenced by ApplicationManagement().
|
privateslot |
clientDisconnected Slot used when a client is disconnected.
Definition at line 179 of file ApplicationManagement.cpp.
References clientSockets.
Referenced by clientConnected().
|
private |
getUtPort Get the UpperTester port from MessageType.
mt | The MessageType. |
Definition at line 287 of file ApplicationManagement.cpp.
References ParameterNetwork::internalPort(), m_network, m_ut, and ParameterUpperTester::upperTesterEventIndicationListenPort().
Referenced by sendMessageToBt().
|
privateslot |
readBtSocket Slot used when data come to the Bluetooth socket.
Definition at line 167 of file ApplicationManagement.cpp.
References btMessageReceived().
Referenced by clientConnected().
|
privateslot |
readUdpSocket Slot used when data come to the UDP socket.
Definition at line 220 of file ApplicationManagement.cpp.
References udpMessageReceived().
Referenced by ApplicationManagement().
|
privateslot |
readUtSocket Slot used when data come to the UpperTester socket.
Definition at line 250 of file ApplicationManagement.cpp.
References m_utPort, m_utSocket, and utMessageReceived().
Referenced by ApplicationManagement().
|
privateslot |
sendMessageToBt Slot used to send message through the Bluetooth socket.
message | The message to send. |
Definition at line 190 of file ApplicationManagement.cpp.
References clientSockets, getUtPort(), m_bt, m_hasUt, m_udpSocket, and transformMessageToBT().
Referenced by ApplicationManagement().
|
privateslot |
sendMessageToFac Slot used to send message to the Facilities layer.
message | The message to send. |
Definition at line 235 of file ApplicationManagement.cpp.
References ParameterNetwork::internalPort(), m_network, and m_udpSocket.
Referenced by ApplicationManagement().
|
slot |
situationChanged Slot used when GPS or CAN bus have a new value.
Definition at line 233 of file ApplicationManagement.cpp.
Referenced by ApplicationManagement().
|
private |
transformMessageToBT Transform message from Facilities to send to the HMI.
message | The message to transform. |
Definition at line 261 of file ApplicationManagement.cpp.
References asn_DEF_DENM, asn_fprint(), asn_INTEGER2ulong(), m_gps, FakeGPSProvider::timestamp(), AppDenmIndication::toBluetooth(), and uper_decode_complete().
Referenced by sendMessageToBt().
|
signal |
udpMessageReceived Signal used when data come through the UDP socket.
message | The received data. |
Referenced by ApplicationManagement(), and readUdpSocket().
|
signal |
utMessageReceived Signal used when data come from the Uppertester.
message | The received data. |
Referenced by ApplicationManagement(), and readUtSocket().
|
private |
List of Bluetooth clients.
Definition at line 113 of file ApplicationManagement.h.
Referenced by clientConnected(), clientDisconnected(), sendMessageToBt(), and ~ApplicationManagement().
|
private |
Is the Bluetooth used?
Definition at line 110 of file ApplicationManagement.h.
Referenced by ApplicationManagement(), sendMessageToBt(), and ~ApplicationManagement().
|
private |
Pointer to the CAN bus.
Definition at line 100 of file ApplicationManagement.h.
Referenced by ApplicationManagement().
|
private |
Pointer to the GPS.
Definition at line 101 of file ApplicationManagement.h.
Referenced by ApplicationManagement(), and transformMessageToBT().
|
private |
Is the UpperTester used?
Definition at line 106 of file ApplicationManagement.h.
Referenced by ApplicationManagement(), and sendMessageToBt().
|
private |
Pointer to the network parameters.
Definition at line 103 of file ApplicationManagement.h.
Referenced by ApplicationManagement(), getUtPort(), and sendMessageToFac().
|
private |
Socket used from Facilities to the Application layer.
Definition at line 104 of file ApplicationManagement.h.
Referenced by ApplicationManagement(), sendMessageToBt(), and sendMessageToFac().
|
private |
Pointer to the UpperTester parameters.
Definition at line 102 of file ApplicationManagement.h.
Referenced by ApplicationManagement(), and getUtPort().
|
private |
UpperTester port.
Definition at line 107 of file ApplicationManagement.h.
Referenced by readUtSocket().
|
private |
Socket used from the UpperTester to the Applicaiton layer.
Definition at line 105 of file ApplicationManagement.h.
Referenced by ApplicationManagement(), and readUtSocket().
|
private |
Bluetooth server.
Definition at line 111 of file ApplicationManagement.h.
Referenced by ApplicationManagement(), clientConnected(), and ~ApplicationManagement().
|
private |
Bluetooth service info.
Definition at line 112 of file ApplicationManagement.h.
Referenced by ApplicationManagement(), and ~ApplicationManagement().