[upstream-fix] maxChargingCurrent uint→double + INCLUDEPATH energyplugin.pri + flip ETM vers pri
- tests/mocks/plugins/energymocks/integrationpluginenergymocks.json : maxChargingCurrent "type": "uint" → "type": "double" sur les 3 Thing classes (charger, chargerPhaseSwitching, simpleCharger) — nymea 1.15 a changé le type de l'interface evcharger. - energyplugin/energyplugin.pri : INCLUDEPATH += $$PWD — rend energyplugin/ accessible aux consommateurs du .pri (simulation, tests) qui compilent les sources ETM. - energyplugin/energyplugin.pro : le toggle ETM_ARBITRATOR déplacé dans energyplugin.pri (unique point de contrôle propagé à plugin ET simulation). - tests/auto/simulation/experience/energyexperienceenergymock.cpp : même flip que energypluginnymea.cpp — instancie EnergyArbitrator si ETM_ARBITRATOR est défini. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c3fedfe36b
commit
d8ebd65eba
@ -1,3 +1,12 @@
|
|||||||
|
# Rend les headers du répertoire energyplugin/ accessibles aux consommateurs
|
||||||
|
# (simulation, tests) qui incluent ce .pri depuis un autre répertoire.
|
||||||
|
INCLUDEPATH += $$PWD
|
||||||
|
|
||||||
|
# [ETM] Activate ETM arbitrator — replaces SmartChargingManager::update() with EnergyArbitrator.
|
||||||
|
# Propagé à tous les consommateurs du .pri (plugin + simulation + tests).
|
||||||
|
# Uncommenter pour activer. Commité DÉSACTIVÉ jusqu'à preuve iso (3b-iv).
|
||||||
|
# DEFINES += ETM_ARBITRATOR
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 5) {
|
greaterThan(QT_MAJOR_VERSION, 5) {
|
||||||
message("Building using Qt6 support")
|
message("Building using Qt6 support")
|
||||||
CONFIG *= c++17
|
CONFIG *= c++17
|
||||||
|
|||||||
@ -7,10 +7,6 @@ PKGCONFIG += nymea nymea-energy
|
|||||||
|
|
||||||
QT *= network
|
QT *= network
|
||||||
|
|
||||||
# [ETM] Activate ETM arbitrator — replaces SmartChargingManager::update() with EnergyArbitrator.
|
|
||||||
# Uncomment to enable. Committed DISABLED until iso-functional proof (3b-iv).
|
|
||||||
# DEFINES += ETM_ARBITRATOR
|
|
||||||
|
|
||||||
include(energyplugin.pri)
|
include(energyplugin.pri)
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
|
|||||||
@ -32,6 +32,9 @@
|
|||||||
#include "../../../energyplugin/nymeaenergyjsonhandler.h"
|
#include "../../../energyplugin/nymeaenergyjsonhandler.h"
|
||||||
#include "../../../energyplugin/energymanagerconfiguration.h"
|
#include "../../../energyplugin/energymanagerconfiguration.h"
|
||||||
#include "../../../energyplugin/spotmarket/spotmarketmanager.h"
|
#include "../../../energyplugin/spotmarket/spotmarketmanager.h"
|
||||||
|
#ifdef ETM_ARBITRATOR
|
||||||
|
#include "../../../energyplugin/etm/energyarbitrator.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <jsonrpc/jsonrpcserver.h>
|
#include <jsonrpc/jsonrpcserver.h>
|
||||||
#include <loggingcategories.h>
|
#include <loggingcategories.h>
|
||||||
@ -81,7 +84,14 @@ void ExperiencePluginEnergyMock::init()
|
|||||||
EnergyManagerConfiguration *configuration = new EnergyManagerConfiguration(this);
|
EnergyManagerConfiguration *configuration = new EnergyManagerConfiguration(this);
|
||||||
QNetworkAccessManager *networkManager = new QNetworkAccessManager(this);
|
QNetworkAccessManager *networkManager = new QNetworkAccessManager(this);
|
||||||
m_spotMarketManager = new SpotMarketManager(networkManager, this);
|
m_spotMarketManager = new SpotMarketManager(networkManager, this);
|
||||||
|
// [ETM] BEGIN — flip identique à energypluginnymea.cpp
|
||||||
|
#ifdef ETM_ARBITRATOR
|
||||||
|
qCDebug(dcEnergyExperience()) << "ETM_ARBITRATOR actif — EnergyArbitrator chargé (simulation).";
|
||||||
|
m_smartChargingManager = new EnergyArbitrator(m_energyManager, thingManager(), m_spotMarketManager, configuration, this);
|
||||||
|
#else
|
||||||
m_smartChargingManager = new SmartChargingManager(m_energyManager, thingManager(), m_spotMarketManager, configuration, this);
|
m_smartChargingManager = new SmartChargingManager(m_energyManager, thingManager(), m_spotMarketManager, configuration, this);
|
||||||
|
#endif
|
||||||
|
// [ETM] END
|
||||||
|
|
||||||
m_nymeaEnergyJsonHandler = new NymeaEnergyJsonHandler(m_spotMarketManager, m_smartChargingManager, this);
|
m_nymeaEnergyJsonHandler = new NymeaEnergyJsonHandler(m_spotMarketManager, m_smartChargingManager, this);
|
||||||
jsonRpcServer()->registerExperienceHandler(m_nymeaEnergyJsonHandler, 0, 2);
|
jsonRpcServer()->registerExperienceHandler(m_nymeaEnergyJsonHandler, 0, 2);
|
||||||
|
|||||||
@ -194,7 +194,7 @@
|
|||||||
"name": "maxChargingCurrent",
|
"name": "maxChargingCurrent",
|
||||||
"displayName": "Maximum charging current",
|
"displayName": "Maximum charging current",
|
||||||
"displayNameAction": "Set maximum charging current",
|
"displayNameAction": "Set maximum charging current",
|
||||||
"type": "uint",
|
"type": "double",
|
||||||
"defaultValue":6,
|
"defaultValue":6,
|
||||||
"minValue": 6,
|
"minValue": 6,
|
||||||
"maxValue": 32,
|
"maxValue": 32,
|
||||||
@ -387,7 +387,7 @@
|
|||||||
"name": "maxChargingCurrent",
|
"name": "maxChargingCurrent",
|
||||||
"displayName": "Maximum charging current",
|
"displayName": "Maximum charging current",
|
||||||
"displayNameAction": "Set maximum charging current",
|
"displayNameAction": "Set maximum charging current",
|
||||||
"type": "uint",
|
"type": "double",
|
||||||
"defaultValue":6,
|
"defaultValue":6,
|
||||||
"minValue": 6,
|
"minValue": 6,
|
||||||
"maxValue": 32,
|
"maxValue": 32,
|
||||||
@ -584,7 +584,7 @@
|
|||||||
"name": "maxChargingCurrent",
|
"name": "maxChargingCurrent",
|
||||||
"displayName": "Maximum charging current",
|
"displayName": "Maximum charging current",
|
||||||
"displayNameAction": "Set maximum charging current",
|
"displayNameAction": "Set maximum charging current",
|
||||||
"type": "uint",
|
"type": "double",
|
||||||
"defaultValue":6,
|
"defaultValue":6,
|
||||||
"minValue": 6,
|
"minValue": 6,
|
||||||
"maxValue": 32,
|
"maxValue": 32,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user