Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
DataManager Class Reference

Class that manages the data received from the car's systems. QObject. More...

#include <DataManager.hpp>

Public Slots

void handleRpmData (int rawRpm)
 Handle CAN data.
 
void handleSpeedData (float rawSpeed)
 Handle Speed data.
 
void handleSteeringData (int rawAngle)
 Handle Steering data.
 
void handleDirectionData (CarDirection rawDirection)
 Handle Direction data.
 
void handleTimeData (const QString &currentDate, const QString &currentTime, const QString &currentDay)
 Handle Time data.
 
void handleWifiData (const QString &status, const QString &wifiName)
 Handle WiFi data.
 
void handleTemperatureData (const QString &temperature)
 Handle Temperature data.
 
void handleIpAddressData (const QString &ipAddress)
 Handle IP Address data.
 
void handleBatteryPercentage (float batteryPercentage)
 Handle Battery Percentage data.
 
void handleMileageUpdate (double mileage)
 Handle Engine data.
 
void toggleDrivingMode ()
 Toggle the driving mode.
 
void toggleClusterTheme ()
 Toggle the cluster theme.
 
void toggleClusterMetrics ()
 Toggle the cluster metrics.
 

Signals

void canDataProcessed (float processedSpeed, int processedRpm)
 
void engineDataProcessed (CarDirection processedDirection, int processedAngle)
 
void systemTimeUpdated (const QString &currentDate, const QString &currentTime, const QString &currentDay)
 
void systemWifiUpdated (const QString &status, const QString &wifiName)
 
void systemTemperatureUpdated (const QString &temperature)
 
void ipAddressUpdated (const QString &ipAddress)
 
void batteryPercentageUpdated (float batteryPercentage)
 
void mileageUpdated (double mileage)
 
void drivingModeUpdated (DrivingMode newMode)
 
void clusterThemeUpdated (ClusterTheme newTheme)
 
void clusterMetricsUpdated (ClusterMetrics newMetrics)
 

Public Member Functions

 DataManager (QObject *parent=nullptr)
 Construct a new DataManager::DataManager object.
 
 ~DataManager ()
 Destroy the DataManager::DataManager object.
 
VehicleDataManagergetVehicleDataManager ()
 
SystemDataManagergetSystemDataManager ()
 
ClusterSettingsManagergetClusterSettingsManager ()
 

Private Attributes

VehicleDataManagerm_vehicleDataManager
 
SystemDataManagerm_systemDataManager
 
ClusterSettingsManagerm_clusterSettingsManager
 

Detailed Description

Class that manages the data received from the car's systems. QObject.

Definition at line 31 of file DataManager.hpp.

Constructor & Destructor Documentation

◆ DataManager()

DataManager::DataManager ( QObject * parent = nullptr)
explicit

Construct a new DataManager::DataManager object.

Parameters
parentThe parent QObject.

This constructor initializes the DataManager object and the three managers: VehicleDataManager, SystemDataManager, and ClusterSettingsManager.

Definition at line 29 of file DataManager.cpp.

Here is the call graph for this function:

◆ ~DataManager()

DataManager::~DataManager ( )

Destroy the DataManager::DataManager object.

This destructor cleans up the resources used by the DataManager.

Definition at line 92 of file DataManager.cpp.

Member Function Documentation

◆ batteryPercentageUpdated

void DataManager::batteryPercentageUpdated ( float batteryPercentage)
signal
Here is the caller graph for this function:

◆ canDataProcessed

void DataManager::canDataProcessed ( float processedSpeed,
int processedRpm )
signal
Here is the caller graph for this function:

◆ clusterMetricsUpdated

void DataManager::clusterMetricsUpdated ( ClusterMetrics newMetrics)
signal
Here is the caller graph for this function:

◆ clusterThemeUpdated

void DataManager::clusterThemeUpdated ( ClusterTheme newTheme)
signal
Here is the caller graph for this function:

◆ drivingModeUpdated

void DataManager::drivingModeUpdated ( DrivingMode newMode)
signal
Here is the caller graph for this function:

◆ engineDataProcessed

void DataManager::engineDataProcessed ( CarDirection processedDirection,
int processedAngle )
signal
Here is the caller graph for this function:

◆ getClusterSettingsManager()

ClusterSettingsManager * DataManager::getClusterSettingsManager ( )
inline

Definition at line 40 of file DataManager.hpp.

◆ getSystemDataManager()

SystemDataManager * DataManager::getSystemDataManager ( )
inline

Definition at line 39 of file DataManager.hpp.

◆ getVehicleDataManager()

VehicleDataManager * DataManager::getVehicleDataManager ( )
inline

Definition at line 38 of file DataManager.hpp.

◆ handleBatteryPercentage

void DataManager::handleBatteryPercentage ( float batteryPercentage)
slot

Handle Battery Percentage data.

Parameters
batteryPercentageThe battery percentage.

This function processes the battery percentage data.

Definition at line 208 of file DataManager.cpp.

Here is the caller graph for this function:

◆ handleDirectionData

void DataManager::handleDirectionData ( CarDirection rawDirection)
slot

Handle Direction data.

Parameters
rawDirectionThe raw direction data.

This function processes the direction data by forwarding it to the VehicleDataManager.

Definition at line 140 of file DataManager.cpp.

Here is the caller graph for this function:

◆ handleIpAddressData

void DataManager::handleIpAddressData ( const QString & ipAddress)
slot

Handle IP Address data.

Parameters
ipAddressThe IP address.

This function processes the IP address data.

Definition at line 198 of file DataManager.cpp.

Here is the caller graph for this function:

◆ handleMileageUpdate

void DataManager::handleMileageUpdate ( double mileage)
slot

Handle Engine data.

Parameters
engineStatusThe engine status.

This function processes the engine data by forwarding it to the VehicleDataManager.

Definition at line 151 of file DataManager.cpp.

Here is the caller graph for this function:

◆ handleRpmData

void DataManager::handleRpmData ( int rawRpm)
slot

Handle CAN data.

Parameters
frameIDThe frame ID of the CAN message.
dataThe data of the CAN message.

This function processes the CAN data by forwarding it to the VehicleDataManager.

Definition at line 106 of file DataManager.cpp.

Here is the caller graph for this function:

◆ handleSpeedData

void DataManager::handleSpeedData ( float rawSpeed)
slot

Handle Speed data.

Parameters
rawSpeedThe raw speed data.

This function processes the speed data by forwarding it to the VehicleDataManager.

Definition at line 117 of file DataManager.cpp.

Here is the caller graph for this function:

◆ handleSteeringData

void DataManager::handleSteeringData ( int rawAngle)
slot

Handle Steering data.

Parameters
rawAngleThe raw angle data.

This function processes the steering data by forwarding it to the VehicleDataManager.

Definition at line 129 of file DataManager.cpp.

Here is the caller graph for this function:

◆ handleTemperatureData

void DataManager::handleTemperatureData ( const QString & temperature)
slot

Handle Temperature data.

Parameters
temperatureThe temperature data.

This function processes the temperature data.

Definition at line 188 of file DataManager.cpp.

Here is the caller graph for this function:

◆ handleTimeData

void DataManager::handleTimeData ( const QString & currentDate,
const QString & currentTime,
const QString & currentDay )
slot

Handle Time data.

Parameters
currentDateThe current date.
currentTimeThe current time.
currentDayThe current day.

This function processes the time data by forwarding it to the SystemDataManager.

Definition at line 164 of file DataManager.cpp.

Here is the caller graph for this function:

◆ handleWifiData

void DataManager::handleWifiData ( const QString & status,
const QString & wifiName )
slot

Handle WiFi data.

Parameters
statusThe WiFi status.
wifiNameThe WiFi name.

This function processes the WiFi data by forwarding it to the SystemDataManager.

Definition at line 178 of file DataManager.cpp.

Here is the caller graph for this function:

◆ ipAddressUpdated

void DataManager::ipAddressUpdated ( const QString & ipAddress)
signal
Here is the caller graph for this function:

◆ mileageUpdated

void DataManager::mileageUpdated ( double mileage)
signal
Here is the caller graph for this function:

◆ systemTemperatureUpdated

void DataManager::systemTemperatureUpdated ( const QString & temperature)
signal
Here is the caller graph for this function:

◆ systemTimeUpdated

void DataManager::systemTimeUpdated ( const QString & currentDate,
const QString & currentTime,
const QString & currentDay )
signal
Here is the caller graph for this function:

◆ systemWifiUpdated

void DataManager::systemWifiUpdated ( const QString & status,
const QString & wifiName )
signal
Here is the caller graph for this function:

◆ toggleClusterMetrics

void DataManager::toggleClusterMetrics ( )
slot

Toggle the cluster metrics.

This function toggles the cluster metrics between kilometers and miles by delegating the operation to the ClusterSettingsManager.

Definition at line 237 of file DataManager.cpp.

Here is the caller graph for this function:

◆ toggleClusterTheme

void DataManager::toggleClusterTheme ( )
slot

Toggle the cluster theme.

This function toggles the cluster theme between a light or dark theme.

Definition at line 226 of file DataManager.cpp.

Here is the caller graph for this function:

◆ toggleDrivingMode

void DataManager::toggleDrivingMode ( )
slot

Toggle the driving mode.

This function toggles the driving mode between day and night mode.

Definition at line 217 of file DataManager.cpp.

Here is the caller graph for this function:

Field Documentation

◆ m_clusterSettingsManager

ClusterSettingsManager* DataManager::m_clusterSettingsManager
private

Definition at line 79 of file DataManager.hpp.

◆ m_systemDataManager

SystemDataManager* DataManager::m_systemDataManager
private

Definition at line 78 of file DataManager.hpp.

◆ m_vehicleDataManager

VehicleDataManager* DataManager::m_vehicleDataManager
private

Definition at line 77 of file DataManager.hpp.


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