/****************************************************************************
** Generated from 'Example.IVI.Climate.qface'
**
** Created by: The QFace generator (QtAS 5.12.8)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "climatecontrolbackend.h"#include <QDebug>#include <QtIviCore/QIviSimulationEngine>
ClimateControlZone::ClimateControlZone(constQString&zone, ClimateControlBackendInterface *parent)
: QObject(parent)
, m_parent(parent)
, m_zone(zone)
, m_airConditioning(true)
, m_heater(true)
, m_fanSpeedLevel(2)
, m_steeringWheelHeater(0)
, m_targetTemperature(0)
, m_seatCooler(0)
, m_seatHeater(0)
, m_outsideTemperature(int(0))
, m_outsideTemperatureLabel(QString())
, m_zoneSynchronization(false)
, m_defrost(false)
, m_recirculationMode(ClimateModule::RecirculationOff)
, m_recirculation(false)
, m_recirculationSensitivityLevel(0)
, m_climateMode(ClimateModule::ClimateOn)
, m_automaticClimateFanIntensityLevel(0)
, m_airflowDirections(ClimateModule::AirflowDirections())
{
}
bool ClimateControlZone::airConditioning() const
{
return m_airConditioning;
}
bool ClimateControlZone::heater() const
{
return m_heater;
}
int ClimateControlZone::fanSpeedLevel() const
{
return m_fanSpeedLevel;
}
int ClimateControlZone::steeringWheelHeater() const
{
return m_steeringWheelHeater;
}
qreal ClimateControlZone::targetTemperature() const
{
return m_targetTemperature;
}
int ClimateControlZone::seatCooler() const
{
return m_seatCooler;
}
int ClimateControlZone::seatHeater() const
{
return m_seatHeater;
}
int ClimateControlZone::outsideTemperature() const
{
return m_outsideTemperature;
}
QString ClimateControlZone::outsideTemperatureLabel() const
{
return m_outsideTemperatureLabel;
}
bool ClimateControlZone::zoneSynchronization() const
{
return m_zoneSynchronization;
}
bool ClimateControlZone::defrost() const
{
return m_defrost;
}
ClimateModule::RecirculationMode ClimateControlZone::recirculationMode() const
{
return m_recirculationMode;
}
bool ClimateControlZone::recirculation() const
{
return m_recirculation;
}
int ClimateControlZone::recirculationSensitivityLevel() const
{
return m_recirculationSensitivityLevel;
}
ClimateModule::ClimateMode ClimateControlZone::climateMode() const
{
return m_climateMode;
}
int ClimateControlZone::automaticClimateFanIntensityLevel() const
{
return m_automaticClimateFanIntensityLevel;
}
ClimateModule::AirflowDirections ClimateControlZone::airflowDirections() const
{
return m_airflowDirections;
}
void ClimateControlZone::setAirConditioning(bool airConditioning)
{
if (m_airConditioning == airConditioning)
return;
m_airConditioning = airConditioning;
emit airConditioningChanged(airConditioning);
emit m_parent->airConditioningChanged(airConditioning, m_zone);
}
void ClimateControlZone::setHeater(bool heater)
{
if (m_heater == heater)
return;
m_heater = heater;
emit heaterChanged(heater);
emit m_parent->heaterChanged(heater, m_zone);
}
void ClimateControlZone::setFanSpeedLevel(int fanSpeedLevel)
{
if (m_fanSpeedLevel == fanSpeedLevel)
return;
m_fanSpeedLevel = fanSpeedLevel;
emit fanSpeedLevelChanged(fanSpeedLevel);
emit m_parent->fanSpeedLevelChanged(fanSpeedLevel, m_zone);
}
void ClimateControlZone::setSteeringWheelHeater(int steeringWheelHeater)
{
if (m_steeringWheelHeater == steeringWheelHeater)
return;
m_steeringWheelHeater = steeringWheelHeater;
emit steeringWheelHeaterChanged(steeringWheelHeater);
emit m_parent->steeringWheelHeaterChanged(steeringWheelHeater, m_zone);
}
void ClimateControlZone::setTargetTemperature(qreal targetTemperature)
{
if (m_targetTemperature == targetTemperature)
return;
m_targetTemperature = targetTemperature;
emit targetTemperatureChanged(targetTemperature);
emit m_parent->targetTemperatureChanged(targetTemperature, m_zone);
}
void ClimateControlZone::setSeatCooler(int seatCooler)
{
if (m_seatCooler == seatCooler)
return;
m_seatCooler = seatCooler;
emit seatCoolerChanged(seatCooler);
emit m_parent->seatCoolerChanged(seatCooler, m_zone);
}
void ClimateControlZone::setSeatHeater(int seatHeater)
{
if (m_seatHeater == seatHeater)
return;
m_seatHeater = seatHeater;
emit seatHeaterChanged(seatHeater);
emit m_parent->seatHeaterChanged(seatHeater, m_zone);
}
void ClimateControlZone::setOutsideTemperature(int outsideTemperature)
{
if (m_outsideTemperature == outsideTemperature)
return;
m_outsideTemperature = outsideTemperature;
emit outsideTemperatureChanged(outsideTemperature);
emit m_parent->outsideTemperatureChanged(outsideTemperature, m_zone);
}
void ClimateControlZone::setOutsideTemperatureLabel(constQString&outsideTemperatureLabel)
{
if (m_outsideTemperatureLabel == outsideTemperatureLabel)
return;
m_outsideTemperatureLabel = outsideTemperatureLabel;
emit outsideTemperatureLabelChanged(outsideTemperatureLabel);
emit m_parent->outsideTemperatureLabelChanged(outsideTemperatureLabel, m_zone);
}
void ClimateControlZone::setZoneSynchronization(bool zoneSynchronization)
{
if (m_zoneSynchronization == zoneSynchronization)
return;
m_zoneSynchronization = zoneSynchronization;
emit zoneSynchronizationChanged(zoneSynchronization);
emit m_parent->zoneSynchronizationChanged(zoneSynchronization, m_zone);
}
void ClimateControlZone::setDefrost(bool defrost)
{
if (m_defrost == defrost)
return;
m_defrost = defrost;
emit defrostChanged(defrost);
emit m_parent->defrostChanged(defrost, m_zone);
}
void ClimateControlZone::setRecirculationMode(ClimateModule::RecirculationMode recirculationMode)
{
if (m_recirculationMode == recirculationMode)
return;
m_recirculationMode = recirculationMode;
emit recirculationModeChanged(recirculationMode);
emit m_parent->recirculationModeChanged(recirculationMode, m_zone);
}
void ClimateControlZone::setRecirculation(bool recirculation)
{
if (m_recirculation == recirculation)
return;
m_recirculation = recirculation;
emit recirculationChanged(recirculation);
emit m_parent->recirculationChanged(recirculation, m_zone);
}
void ClimateControlZone::setRecirculationSensitivityLevel(int recirculationSensitivityLevel)
{
if (m_recirculationSensitivityLevel == recirculationSensitivityLevel)
return;
m_recirculationSensitivityLevel = recirculationSensitivityLevel;
emit recirculationSensitivityLevelChanged(recirculationSensitivityLevel);
emit m_parent->recirculationSensitivityLevelChanged(recirculationSensitivityLevel, m_zone);
}
void ClimateControlZone::setClimateMode(ClimateModule::ClimateMode climateMode)
{
if (m_climateMode == climateMode)
return;
m_climateMode = climateMode;
emit climateModeChanged(climateMode);
emit m_parent->climateModeChanged(climateMode, m_zone);
}
void ClimateControlZone::setAutomaticClimateFanIntensityLevel(int automaticClimateFanIntensityLevel)
{
if (m_automaticClimateFanIntensityLevel == automaticClimateFanIntensityLevel)
return;
m_automaticClimateFanIntensityLevel = automaticClimateFanIntensityLevel;
emit automaticClimateFanIntensityLevelChanged(automaticClimateFanIntensityLevel);
emit m_parent->automaticClimateFanIntensityLevelChanged(automaticClimateFanIntensityLevel, m_zone);
}
void ClimateControlZone::setAirflowDirections(ClimateModule::AirflowDirections airflowDirections)
{
if (m_airflowDirections == airflowDirections)
return;
m_airflowDirections = airflowDirections;
emit airflowDirectionsChanged(airflowDirections);
emit m_parent->airflowDirectionsChanged(airflowDirections, m_zone);
}
/*!
\class ClimateControlBackend
\inmodule Example.IVI.Climate
The ClimateControl provides a QML interface to the climate control of the vehicle.
*/
ClimateControlBackend::ClimateControlBackend(QObject*parent)
: ClimateControlBackend(nullptr, parent)
{
}
ClimateControlBackend::ClimateControlBackend(QIviSimulationEngine*engine,QObject*parent)
: ClimateControlBackendInterface(parent)
, m_airConditioning(true)
, m_heater(true)
, m_fanSpeedLevel(2)
, m_steeringWheelHeater(0)
, m_targetTemperature(0)
, m_seatCooler(0)
, m_seatHeater(0)
, m_outsideTemperature(int(0))
, m_outsideTemperatureLabel(QString())
, m_zoneSynchronization(false)
, m_defrost(false)
, m_recirculationMode(ClimateModule::RecirculationOff)
, m_recirculation(false)
, m_recirculationSensitivityLevel(0)
, m_climateMode(ClimateModule::ClimateOn)
, m_automaticClimateFanIntensityLevel(0)
, m_airflowDirections(ClimateModule::AirflowDirections())
, m_zones(newQQmlPropertyMap(this))
{
//In some cases the engine is unused, this doesn't do any harm if it is still used
Q_UNUSED(engine)
qRegisterMetaType<QQmlPropertyMap*>();
ClimateModule::registerTypes();
}
ClimateControlBackend::~ClimateControlBackend()
{
}
/*!
\fn QStringList ClimateControlBackend::availableZones() const
Returns a list of supported zone names. This is called from the client
after having connected.
The returned names must be valid QML property names, i.e. \c {[a-z_][A-Za-z0-9_]*}.
\sa {Providing Available Zones}
*/QStringList ClimateControlBackend::availableZones() const
{
QStringList zones;
QIVI_SIMULATION_TRY_CALL_FUNC(ClimateControlBackend,"availableZones", zones = return_value.toStringList());
for (constQString&zone : zones)
const_cast<ClimateControlBackend*>(this)->addZone(zone);
return zones;
}
/*!
\fn void ClimateControlBackend::initialize()
Initializes the backend and informs about its current state by
emitting signals with the current status (property values).
*/void ClimateControlBackend::initialize()
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"initialize",void);
emit airConditioningChanged(m_airConditioning,QString());
emit heaterChanged(m_heater,QString());
emit fanSpeedLevelChanged(m_fanSpeedLevel,QString());
emit steeringWheelHeaterChanged(m_steeringWheelHeater,QString());
emit targetTemperatureChanged(m_targetTemperature,QString());
emit seatCoolerChanged(m_seatCooler,QString());
emit seatHeaterChanged(m_seatHeater,QString());
emit outsideTemperatureChanged(m_outsideTemperature,QString());
emit outsideTemperatureLabelChanged(m_outsideTemperatureLabel,QString());
emit zoneSynchronizationChanged(m_zoneSynchronization,QString());
emit defrostChanged(m_defrost,QString());
emit recirculationModeChanged(m_recirculationMode,QString());
emit recirculationChanged(m_recirculation,QString());
emit recirculationSensitivityLevelChanged(m_recirculationSensitivityLevel,QString());
emit climateModeChanged(m_climateMode,QString());
emit automaticClimateFanIntensityLevelChanged(m_automaticClimateFanIntensityLevel,QString());
emit airflowDirectionsChanged(m_airflowDirections,QString());
for (constQString&zone : m_zones->keys()) {
ClimateControlZone *zo = zoneAt(zone);
emit airConditioningChanged(zo->airConditioning(), zone);
emit heaterChanged(zo->heater(), zone);
emit fanSpeedLevelChanged(zo->fanSpeedLevel(), zone);
emit steeringWheelHeaterChanged(zo->steeringWheelHeater(), zone);
emit targetTemperatureChanged(zo->targetTemperature(), zone);
emit seatCoolerChanged(zo->seatCooler(), zone);
emit seatHeaterChanged(zo->seatHeater(), zone);
emit outsideTemperatureChanged(zo->outsideTemperature(), zone);
emit outsideTemperatureLabelChanged(zo->outsideTemperatureLabel(), zone);
emit zoneSynchronizationChanged(zo->zoneSynchronization(), zone);
emit defrostChanged(zo->defrost(), zone);
emit recirculationModeChanged(zo->recirculationMode(), zone);
emit recirculationChanged(zo->recirculation(), zone);
emit recirculationSensitivityLevelChanged(zo->recirculationSensitivityLevel(), zone);
emit climateModeChanged(zo->climateMode(), zone);
emit automaticClimateFanIntensityLevelChanged(zo->automaticClimateFanIntensityLevel(), zone);
emit airflowDirectionsChanged(zo->airflowDirections(), zone);
}
emit initializationDone();
}
void ClimateControlBackend::addZone(constQString&zone)
{
m_zones->insert(zone,QVariant::fromValue(new ClimateControlZone(zone,this)));
}
ClimateControlZone* ClimateControlBackend::zoneAt(constQString&zone)
{
return m_zones->value(zone).value<ClimateControlZone*>();
}
bool ClimateControlBackend::airConditioning() const
{
return m_airConditioning;
}
bool ClimateControlBackend::heater() const
{
return m_heater;
}
int ClimateControlBackend::fanSpeedLevel() const
{
return m_fanSpeedLevel;
}
int ClimateControlBackend::steeringWheelHeater() const
{
return m_steeringWheelHeater;
}
qreal ClimateControlBackend::targetTemperature() const
{
return m_targetTemperature;
}
int ClimateControlBackend::seatCooler() const
{
return m_seatCooler;
}
int ClimateControlBackend::seatHeater() const
{
return m_seatHeater;
}
int ClimateControlBackend::outsideTemperature() const
{
return m_outsideTemperature;
}
QString ClimateControlBackend::outsideTemperatureLabel() const
{
return m_outsideTemperatureLabel;
}
bool ClimateControlBackend::zoneSynchronization() const
{
return m_zoneSynchronization;
}
bool ClimateControlBackend::defrost() const
{
return m_defrost;
}
ClimateModule::RecirculationMode ClimateControlBackend::recirculationMode() const
{
return m_recirculationMode;
}
bool ClimateControlBackend::recirculation() const
{
return m_recirculation;
}
int ClimateControlBackend::recirculationSensitivityLevel() const
{
return m_recirculationSensitivityLevel;
}
ClimateModule::ClimateMode ClimateControlBackend::climateMode() const
{
return m_climateMode;
}
int ClimateControlBackend::automaticClimateFanIntensityLevel() const
{
return m_automaticClimateFanIntensityLevel;
}
ClimateModule::AirflowDirections ClimateControlBackend::airflowDirections() const
{
return m_airflowDirections;
}
/*!
\fn virtual void ClimateControlBackend::setAirConditioning(bool airConditioning, const QString &zone)
\brief Value is true if the air conditioning is enabled.
*/void ClimateControlBackend::setAirConditioning(bool airConditioning,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setAirConditioning",void, airConditioning, zone);
if (zone.isEmpty()) {
if (m_airConditioning == airConditioning)
return;
m_airConditioning = airConditioning;
emit airConditioningChanged(airConditioning,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setAirConditioning(airConditioning);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setHeater(bool heater, const QString &zone)
\brief value is true if the heater is enabled.
*/void ClimateControlBackend::setHeater(bool heater,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setHeater",void, heater, zone);
if (zone.isEmpty()) {
if (m_heater == heater)
return;
m_heater = heater;
emit heaterChanged(heater,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setHeater(heater);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setFanSpeedLevel(int fanSpeedLevel, const QString &zone)
\brief value holds the fan speed level, where the level can be between minimumValue(off) to maximumValue
(strongest).
*/void ClimateControlBackend::setFanSpeedLevel(int fanSpeedLevel,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setFanSpeedLevel",void, fanSpeedLevel, zone);
if (zone.isEmpty()) {
if (m_fanSpeedLevel == fanSpeedLevel)
return;
m_fanSpeedLevel = fanSpeedLevel;
emit fanSpeedLevelChanged(fanSpeedLevel,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setFanSpeedLevel(fanSpeedLevel);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setSteeringWheelHeater(int steeringWheelHeater, const QString &zone)
\brief value holds the steering wheel heater level, where the level can be between minimumValue(off) to
maximumValue (warmest).
*/void ClimateControlBackend::setSteeringWheelHeater(int steeringWheelHeater,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setSteeringWheelHeater",void, steeringWheelHeater, zone);
if (zone.isEmpty()) {
if (m_steeringWheelHeater == steeringWheelHeater)
return;
m_steeringWheelHeater = steeringWheelHeater;
emit steeringWheelHeaterChanged(steeringWheelHeater,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setSteeringWheelHeater(steeringWheelHeater);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setTargetTemperature(qreal targetTemperature, const QString &zone)
\brief value holds the target temperature of the zone expressed in centigrades, where the temperature can
be between minimumValue(coolest) to maximumValue (warmest).
*/void ClimateControlBackend::setTargetTemperature(qreal targetTemperature,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setTargetTemperature",void, targetTemperature, zone);
if (zone.isEmpty()) {
if (m_targetTemperature == targetTemperature)
return;
m_targetTemperature = targetTemperature;
emit targetTemperatureChanged(targetTemperature,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setTargetTemperature(targetTemperature);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setSeatCooler(int seatCooler, const QString &zone)
\brief value holds the seat cooler level, where the level can be between minimumValue(off) to maximumValue
(coolest).
*/void ClimateControlBackend::setSeatCooler(int seatCooler,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setSeatCooler",void, seatCooler, zone);
if (zone.isEmpty()) {
if (m_seatCooler == seatCooler)
return;
m_seatCooler = seatCooler;
emit seatCoolerChanged(seatCooler,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setSeatCooler(seatCooler);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setSeatHeater(int seatHeater, const QString &zone)
\brief value holds the seat heater level, where the level can be between minimumValue(off) to maximumValue
(warmest).
*/void ClimateControlBackend::setSeatHeater(int seatHeater,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setSeatHeater",void, seatHeater, zone);
if (zone.isEmpty()) {
if (m_seatHeater == seatHeater)
return;
m_seatHeater = seatHeater;
emit seatHeaterChanged(seatHeater,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setSeatHeater(seatHeater);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setOutsideTemperature(int outsideTemperature, const QString &zone)
\brief value holds the outside temperature of the zone expressed in centigrades, where the temperature can
be between minimumValue(coolest) to maximumValue (warmest).
*/void ClimateControlBackend::setOutsideTemperature(int outsideTemperature,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setOutsideTemperature",void, outsideTemperature, zone);
if (zone.isEmpty()) {
if (m_outsideTemperature == outsideTemperature)
return;
m_outsideTemperature = outsideTemperature;
emit outsideTemperatureChanged(outsideTemperature,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setOutsideTemperature(outsideTemperature);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setOutsideTemperatureLabel(const QString &outsideTemperatureLabel, const QString &zone)
\brief outside temp lable
*/void ClimateControlBackend::setOutsideTemperatureLabel(constQString&outsideTemperatureLabel,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setOutsideTemperatureLabel",void, outsideTemperatureLabel, zone);
if (zone.isEmpty()) {
if (m_outsideTemperatureLabel == outsideTemperatureLabel)
return;
m_outsideTemperatureLabel = outsideTemperatureLabel;
emit outsideTemperatureLabelChanged(outsideTemperatureLabel,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setOutsideTemperatureLabel(outsideTemperatureLabel);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setZoneSynchronization(bool zoneSynchronization, const QString &zone)
\brief value is true if the zone synchronization is enabled.
Which zones and properties are synchronized is controlled by the backend implementing it.
*/void ClimateControlBackend::setZoneSynchronization(bool zoneSynchronization,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setZoneSynchronization",void, zoneSynchronization, zone);
if (zone.isEmpty()) {
if (m_zoneSynchronization == zoneSynchronization)
return;
m_zoneSynchronization = zoneSynchronization;
emit zoneSynchronizationChanged(zoneSynchronization,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setZoneSynchronization(zoneSynchronization);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setDefrost(bool defrost, const QString &zone)
\brief value is true if defrost is enabled. Usually that means that the fans are on the highest level to
remove ice from the windshield.
*/void ClimateControlBackend::setDefrost(bool defrost,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setDefrost",void, defrost, zone);
if (zone.isEmpty()) {
if (m_defrost == defrost)
return;
m_defrost = defrost;
emit defrostChanged(defrost,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setDefrost(defrost);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setRecirculationMode(ClimateModule::RecirculationMode recirculationMode, const QString &zone)
\brief value holds the recirculation mode
*/void ClimateControlBackend::setRecirculationMode(ClimateModule::RecirculationMode recirculationMode,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setRecirculationMode",void, recirculationMode, zone);
if (zone.isEmpty()) {
if (m_recirculationMode == recirculationMode)
return;
m_recirculationMode = recirculationMode;
emit recirculationModeChanged(recirculationMode,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setRecirculationMode(recirculationMode);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setRecirculation(bool recirculation, const QString &zone)
\brief value is true if the recirculation is currently running.
*/void ClimateControlBackend::setRecirculation(bool recirculation,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setRecirculation",void, recirculation, zone);
if (zone.isEmpty()) {
if (m_recirculation == recirculation)
return;
m_recirculation = recirculation;
emit recirculationChanged(recirculation,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setRecirculation(recirculation);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setRecirculationSensitivityLevel(int recirculationSensitivityLevel, const QString &zone)
\brief value holds the sensitivity level of the recirculation system when the recirculationMode is set to
AutoRecirculation, where the level can be between minimumValue(least sensitive) to maximumValue(most
sensitive).
*/void ClimateControlBackend::setRecirculationSensitivityLevel(int recirculationSensitivityLevel,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setRecirculationSensitivityLevel",void, recirculationSensitivityLevel, zone);
if (zone.isEmpty()) {
if (m_recirculationSensitivityLevel == recirculationSensitivityLevel)
return;
m_recirculationSensitivityLevel = recirculationSensitivityLevel;
emit recirculationSensitivityLevelChanged(recirculationSensitivityLevel,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setRecirculationSensitivityLevel(recirculationSensitivityLevel);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setClimateMode(ClimateModule::ClimateMode climateMode, const QString &zone)
\brief value holds the climate mode
*/void ClimateControlBackend::setClimateMode(ClimateModule::ClimateMode climateMode,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setClimateMode",void, climateMode, zone);
if (zone.isEmpty()) {
if (m_climateMode == climateMode)
return;
m_climateMode = climateMode;
emit climateModeChanged(climateMode,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setClimateMode(climateMode);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setAutomaticClimateFanIntensityLevel(int automaticClimateFanIntensityLevel, const QString &zone)
\brief value holds the intensity level of the fan when the climateMode is set to AutoClimate, where the
level can be between minimumValue(least intensity) to maximumValue(most intensity).
*/void ClimateControlBackend::setAutomaticClimateFanIntensityLevel(int automaticClimateFanIntensityLevel,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setAutomaticClimateFanIntensityLevel",void, automaticClimateFanIntensityLevel, zone);
if (zone.isEmpty()) {
if (m_automaticClimateFanIntensityLevel == automaticClimateFanIntensityLevel)
return;
m_automaticClimateFanIntensityLevel = automaticClimateFanIntensityLevel;
emit automaticClimateFanIntensityLevelChanged(automaticClimateFanIntensityLevel,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setAutomaticClimateFanIntensityLevel(automaticClimateFanIntensityLevel);
elseqWarning() <<"No such Zone";
}
}
/*!
\fn virtual void ClimateControlBackend::setAirflowDirections(ClimateModule::AirflowDirections airflowDirections, const QString &zone)
\brief value holds the combination of flags indicating the areas where airflow is on.
*/void ClimateControlBackend::setAirflowDirections(ClimateModule::AirflowDirections airflowDirections,constQString&zone)
{
QIVI_SIMULATION_TRY_CALL(ClimateControlBackend,"setAirflowDirections",void, airflowDirections, zone);
if (zone.isEmpty()) {
if (m_airflowDirections == airflowDirections)
return;
m_airflowDirections = airflowDirections;
emit airflowDirectionsChanged(airflowDirections,QString());
} else {
ClimateControlZone *zo = zoneAt(zone);
if (zo)
zo->setAirflowDirections(airflowDirections);
elseqWarning() <<"No such Zone";
}
}