[deploy] §1.d banc hems : EcsRelayAdapter + SgReadyAdapter dans init()
Enregistre les adaptateurs ECS (3 relais R500/R1000/R2000) et SG-Ready (K1/K2) avec les ThingIds réels du banc hems dans EnergyPluginNymea::init(), compilé uniquement sous ETM_ARBITRATOR. Bloquant pour le cross-build arm64 Palier 1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fa3660fc60
commit
fb5c7fca10
@ -31,6 +31,8 @@
|
|||||||
// [ETM] BEGIN — EnergyArbitrator flip. Remove block to revert to upstream SmartChargingManager.
|
// [ETM] BEGIN — EnergyArbitrator flip. Remove block to revert to upstream SmartChargingManager.
|
||||||
#ifdef ETM_ARBITRATOR
|
#ifdef ETM_ARBITRATOR
|
||||||
#include "etm/energyarbitrator.h"
|
#include "etm/energyarbitrator.h"
|
||||||
|
#include "etm/adapters/ecsrelayadapter.h"
|
||||||
|
#include "etm/adapters/sgreadyadapter.h"
|
||||||
#endif
|
#endif
|
||||||
// [ETM] END
|
// [ETM] END
|
||||||
|
|
||||||
@ -52,6 +54,30 @@ void EnergyPluginNymea::init()
|
|||||||
#ifdef ETM_ARBITRATOR
|
#ifdef ETM_ARBITRATOR
|
||||||
qCDebug(dcNymeaEnergy()) << "ETM_ARBITRATOR actif — EnergyArbitrator chargé.";
|
qCDebug(dcNymeaEnergy()) << "ETM_ARBITRATOR actif — EnergyArbitrator chargé.";
|
||||||
EnergyArbitrator *chargingManager = new EnergyArbitrator(energyManager(), thingManager(), spotMarketManager, configuration, this);
|
EnergyArbitrator *chargingManager = new EnergyArbitrator(energyManager(), thingManager(), spotMarketManager, configuration, this);
|
||||||
|
|
||||||
|
// §1.d — Banc hems : adaptateurs ECS 3 relais + SG-Ready PAC (ThingIds briefing terrain).
|
||||||
|
{
|
||||||
|
ThingManager *tm = thingManager();
|
||||||
|
const QString R500 = "{8538782f-2c8c-4a30-bfce-c8140f791c9b}";
|
||||||
|
const QString R1000 = "{2ebe6bef-829b-4695-9d11-ddb4c16c5448}";
|
||||||
|
const QString R2000 = "{b033b212-1adb-4df0-ba2b-8fa477de52a2}";
|
||||||
|
auto *ecs = new EcsRelayAdapter(
|
||||||
|
tm, "ecs-terrain", "ECS banc",
|
||||||
|
QList<int>({0, 500, 1000, 1500, 2000, 2500, 3000, 3500}),
|
||||||
|
QList<QList<QString>>({ {}, {R500}, {R1000}, {R500,R1000},
|
||||||
|
{R2000}, {R500,R2000}, {R1000,R2000}, {R500,R1000,R2000} }),
|
||||||
|
60, 60, 1, chargingManager);
|
||||||
|
chargingManager->registerEcsAdapter(ecs);
|
||||||
|
|
||||||
|
const QString K1 = "{beaf92e1-aedc-4b84-9ce4-e423648638cc}";
|
||||||
|
const QString K2 = "{bf236e64-5ae7-4bf1-82a6-4ede03de75a6}";
|
||||||
|
auto *pac = new SgReadyAdapter(
|
||||||
|
tm, "pac-terrain", "PAC banc",
|
||||||
|
QHash<int,QList<QString>>({ {1,{K1}}, {2,{}}, {3,{K2}}, {4,{K1,K2}} }),
|
||||||
|
QHash<int,double>({ {1,0.0}, {2,0.0}, {3,1500.0}, {4,3000.0} }),
|
||||||
|
300, 2, chargingManager);
|
||||||
|
chargingManager->registerSgReadyAdapter(pac);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
SmartChargingManager *chargingManager = new SmartChargingManager(energyManager(), thingManager(), spotMarketManager, configuration, this);
|
SmartChargingManager *chargingManager = new SmartChargingManager(energyManager(), thingManager(), spotMarketManager, configuration, this);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user