ITS
ApplicationManagement Class Reference

#include <ApplicationManagement.h>

Inheritance diagram for ApplicationManagement:
[legend]
Collaboration diagram for ApplicationManagement:
[legend]

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

FakeCANProviderm_can
 
FakeGPSProviderm_gps
 
ParameterUpperTesterm_ut
 
ParameterNetworkm_network
 
QUdpSocket * m_udpSocket
 
QUdpSocket * m_utSocket
 
bool m_hasUt
 
quint16 m_utPort
 
bool m_bt
 
QBluetoothServer * rfcommServer
 
QBluetoothServiceInfo serviceInfo
 
QList< QBluetoothSocket * > clientSockets
 

Detailed Description

Definition at line 26 of file ApplicationManagement.h.

Constructor & Destructor Documentation

◆ ApplicationManagement()

ApplicationManagement::ApplicationManagement ( Manager man,
bool  bt,
bool  ut,
bool  app 
)

ApplicationManagement ApplicationManagement constructor.

Parameters
manPointer to the Manager
btIs there Bluetooth?
utIs there an UpperTester?
appIs 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().

Here is the call graph for this function:

◆ ~ApplicationManagement()

ApplicationManagement::~ApplicationManagement ( )

~ApplicationManagement ApplicationManagement destructor

Definition at line 137 of file ApplicationManagement.cpp.

References clientSockets, m_bt, rfcommServer, and serviceInfo.

Member Function Documentation

◆ btMessageReceived

void ApplicationManagement::btMessageReceived ( const QByteArray &  message)
signal

btMessageReceived Signal used when data come through the Bluetooth socket.

Parameters
messageThe received data.

Referenced by ApplicationManagement(), and readBtSocket().

Here is the caller graph for this function:

◆ clientConnected

void ApplicationManagement::clientConnected ( )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clientDisconnected

void ApplicationManagement::clientDisconnected ( )
privateslot

clientDisconnected Slot used when a client is disconnected.

Definition at line 179 of file ApplicationManagement.cpp.

References clientSockets.

Referenced by clientConnected().

Here is the caller graph for this function:

◆ getUtPort()

quint16 ApplicationManagement::getUtPort ( const char  mt)
private

getUtPort Get the UpperTester port from MessageType.

Parameters
mtThe MessageType.
Returns
The UpperTester port.

Definition at line 287 of file ApplicationManagement.cpp.

References ParameterNetwork::internalPort(), m_network, m_ut, and ParameterUpperTester::upperTesterEventIndicationListenPort().

Referenced by sendMessageToBt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readBtSocket

void ApplicationManagement::readBtSocket ( )
privateslot

readBtSocket Slot used when data come to the Bluetooth socket.

Definition at line 167 of file ApplicationManagement.cpp.

References btMessageReceived().

Referenced by clientConnected().

Here is the caller graph for this function:

◆ readUdpSocket

void ApplicationManagement::readUdpSocket ( )
privateslot

readUdpSocket Slot used when data come to the UDP socket.

Definition at line 220 of file ApplicationManagement.cpp.

References udpMessageReceived().

Referenced by ApplicationManagement().

Here is the caller graph for this function:

◆ readUtSocket

void ApplicationManagement::readUtSocket ( )
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().

Here is the caller graph for this function:

◆ sendMessageToBt

void ApplicationManagement::sendMessageToBt ( const QByteArray &  message)
privateslot

sendMessageToBt Slot used to send message through the Bluetooth socket.

Parameters
messageThe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendMessageToFac

void ApplicationManagement::sendMessageToFac ( const QByteArray &  message)
privateslot

sendMessageToFac Slot used to send message to the Facilities layer.

Parameters
messageThe message to send.

Definition at line 235 of file ApplicationManagement.cpp.

References ParameterNetwork::internalPort(), m_network, and m_udpSocket.

Referenced by ApplicationManagement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ situationChanged

void ApplicationManagement::situationChanged ( )
slot

situationChanged Slot used when GPS or CAN bus have a new value.

Definition at line 233 of file ApplicationManagement.cpp.

Referenced by ApplicationManagement().

Here is the caller graph for this function:

◆ transformMessageToBT()

QByteArray ApplicationManagement::transformMessageToBT ( const QByteArray &  message)
private

transformMessageToBT Transform message from Facilities to send to the HMI.

Parameters
messageThe message to transform.
Returns
The transformed message.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ udpMessageReceived

void ApplicationManagement::udpMessageReceived ( const QByteArray &  message)
signal

udpMessageReceived Signal used when data come through the UDP socket.

Parameters
messageThe received data.

Referenced by ApplicationManagement(), and readUdpSocket().

Here is the caller graph for this function:

◆ utMessageReceived

void ApplicationManagement::utMessageReceived ( const QByteArray &  message)
signal

utMessageReceived Signal used when data come from the Uppertester.

Parameters
messageThe received data.

Referenced by ApplicationManagement(), and readUtSocket().

Here is the caller graph for this function:

Member Data Documentation

◆ clientSockets

QList<QBluetoothSocket *> ApplicationManagement::clientSockets
private

List of Bluetooth clients.

Definition at line 113 of file ApplicationManagement.h.

Referenced by clientConnected(), clientDisconnected(), sendMessageToBt(), and ~ApplicationManagement().

◆ m_bt

bool ApplicationManagement::m_bt
private

Is the Bluetooth used?

Definition at line 110 of file ApplicationManagement.h.

Referenced by ApplicationManagement(), sendMessageToBt(), and ~ApplicationManagement().

◆ m_can

FakeCANProvider* ApplicationManagement::m_can
private

Pointer to the CAN bus.

Definition at line 100 of file ApplicationManagement.h.

Referenced by ApplicationManagement().

◆ m_gps

FakeGPSProvider* ApplicationManagement::m_gps
private

Pointer to the GPS.

Definition at line 101 of file ApplicationManagement.h.

Referenced by ApplicationManagement(), and transformMessageToBT().

◆ m_hasUt

bool ApplicationManagement::m_hasUt
private

Is the UpperTester used?

Definition at line 106 of file ApplicationManagement.h.

Referenced by ApplicationManagement(), and sendMessageToBt().

◆ m_network

ParameterNetwork* ApplicationManagement::m_network
private

Pointer to the network parameters.

Definition at line 103 of file ApplicationManagement.h.

Referenced by ApplicationManagement(), getUtPort(), and sendMessageToFac().

◆ m_udpSocket

QUdpSocket* ApplicationManagement::m_udpSocket
private

Socket used from Facilities to the Application layer.

Definition at line 104 of file ApplicationManagement.h.

Referenced by ApplicationManagement(), sendMessageToBt(), and sendMessageToFac().

◆ m_ut

ParameterUpperTester* ApplicationManagement::m_ut
private

Pointer to the UpperTester parameters.

Definition at line 102 of file ApplicationManagement.h.

Referenced by ApplicationManagement(), and getUtPort().

◆ m_utPort

quint16 ApplicationManagement::m_utPort
private

UpperTester port.

Definition at line 107 of file ApplicationManagement.h.

Referenced by readUtSocket().

◆ m_utSocket

QUdpSocket* ApplicationManagement::m_utSocket
private

Socket used from the UpperTester to the Applicaiton layer.

Definition at line 105 of file ApplicationManagement.h.

Referenced by ApplicationManagement(), and readUtSocket().

◆ rfcommServer

QBluetoothServer* ApplicationManagement::rfcommServer
private

Bluetooth server.

Definition at line 111 of file ApplicationManagement.h.

Referenced by ApplicationManagement(), clientConnected(), and ~ApplicationManagement().

◆ serviceInfo

QBluetoothServiceInfo ApplicationManagement::serviceInfo
private

Bluetooth service info.

Definition at line 112 of file ApplicationManagement.h.

Referenced by ApplicationManagement(), and ~ApplicationManagement().


The documentation for this class was generated from the following files: