Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
VehicleDataManager.hpp
Go to the documentation of this file.
1
15
16#ifndef VEHICLEDATAMANAGER_HPP
17#define VEHICLEDATAMANAGER_HPP
18
19#include <QObject>
20#include <QString>
21#include "enums.hpp"
22
27class VehicleDataManager : public QObject
28{
29 Q_OBJECT
30
31public:
32 explicit VehicleDataManager(QObject *parent = nullptr);
34
35public slots:
36 void handleRpmData(int rawRpm);
37 void handleSpeedData(float rawSpeed);
38 void handleDirectionData(CarDirection rawDirection);
39 void handleSteeringData(int rawAngle);
40 void handleMileageUpdate(double mileage);
41
42signals:
43 void canDataProcessed(float processedSpeed, int processedRpm);
44 void engineDataProcessed(CarDirection processedDirection, int processedAngle);
45 void mileageUpdated(double mileage);
46
47private:
48 float m_speed = 0.0f;
49 int m_rpm = 0;
52 double m_mileage = 0.0;
54};
55
56#endif // VEHICLEDATAMANAGER_HPP
CarDirection
Enum class for the car direction.
Definition enums.hpp:30
ClusterMetrics
Enum class for the cluster metrics.
Definition enums.hpp:28
void handleRpmData(int rawRpm)
Handle Rotation Per Minute data.
void handleSteeringData(int rawAngle)
Handle Steering data.
void canDataProcessed(float processedSpeed, int processedRpm)
void engineDataProcessed(CarDirection processedDirection, int processedAngle)
void handleSpeedData(float rawSpeed)
Handle Speed data.
~VehicleDataManager()
Destroy the VehicleDataManager::VehicleDataManager object.
ClusterMetrics m_clusterMetrics
void handleDirectionData(CarDirection rawDirection)
Handle Direction data.
VehicleDataManager(QObject *parent=nullptr)
Construct a new VehicleDataManager::VehicleDataManager object.
void handleMileageUpdate(double mileage)
Handle mileage data.
void mileageUpdated(double mileage)
Definition of the enums used in the application.