Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
CarDataI.hpp
Go to the documentation of this file.
1
15
16#ifndef CAR_DATA_I_HPP
17#define CAR_DATA_I_HPP
18
19#include <Ice/Ice.h>
20#include <mutex>
21#include <thread>
22#include <iostream>
23#include <QObject>
24#include "Joystick.h" // Generated by slice2cpp
25
30namespace Data
31{
32
37 class CarDataI : public QObject, public CarData
38 {
39 Q_OBJECT
40 private:
43
44 std::mutex joystick_mutex;
46 std::thread serverThread;
47 Ice::CommunicatorPtr communicator;
48
49 public:
50 explicit CarDataI(QObject *parent = nullptr);
51 ~CarDataI();
52
53 void setJoystickValue(bool newValue, const Ice::Current &) override;
54 bool getJoystickValue(const Ice::Current &) override;
55
56 void setCarTemperatureValue(double newValue, const Ice::Current &) override;
57 double getCarTemperatureValue(const Ice::Current &) override;
58
59 void runServer(int argc, char **argv);
60 };
61
62} // namespace Data
63
64#endif
std::mutex joystick_mutex
Definition CarDataI.hpp:44
void setCarTemperatureValue(double newValue, const Ice::Current &) override
Set the car temperature value.
Definition CarDataI.cpp:78
bool joystick_enable
Definition CarDataI.hpp:41
std::mutex temperature_mutex
Definition CarDataI.hpp:45
Ice::CommunicatorPtr communicator
Definition CarDataI.hpp:47
void setJoystickValue(bool newValue, const Ice::Current &) override
Set the joystick value.
Definition CarDataI.cpp:51
~CarDataI()
Destructor for the CarDataI class.
Definition CarDataI.cpp:36
std::thread serverThread
Definition CarDataI.hpp:46
void runServer(int argc, char **argv)
Runs the Ice server.
Definition CarDataI.cpp:109
double car_temperature
Definition CarDataI.hpp:42
CarDataI(QObject *parent=nullptr)
Constructor for the CarDataI class.
Definition CarDataI.cpp:29
double getCarTemperatureValue()
bool getJoystickValue()
Namespace for the car data.