82 std::cout <<
"Car temperature value set to: " <<
car_temperature << std::endl;
112 Ice::PropertiesPtr properties = Ice::createProperties();
113 properties->setProperty(
"Ice.ThreadPool.Server.Size",
"10");
114 properties->setProperty(
"Ice.ThreadPool.Server.SizeMax",
"20");
117 Ice::InitializationData initData;
118 initData.properties = properties;
121 Ice::ObjectAdapterPtr adapter =
communicator->createObjectAdapterWithEndpoints(
122 "CarDataAdapter",
"tcp -h 127.0.0.1 -p 10000");
124 adapter->add(
this, Ice::stringToIdentity(
"carData"));
127 std::cout <<
"Server is running, press Ctrl+C to stop." << std::endl;
File containing the CarDataI class.
std::mutex joystick_mutex
void setCarTemperatureValue(double newValue, const Ice::Current &) override
Set the car temperature value.
std::mutex temperature_mutex
Ice::CommunicatorPtr communicator
void setJoystickValue(bool newValue, const Ice::Current &) override
Set the joystick value.
~CarDataI()
Destructor for the CarDataI class.
void runServer(int argc, char **argv)
Runs the Ice server.
CarDataI(QObject *parent=nullptr)
Constructor for the CarDataI class.
double getCarTemperatureValue()
Namespace for the car data.