use of io.openems.api.device.nature.charger.ChargerNature in project openems by OpenEMS.
the class SimulatorAsymmetricEss method getCharger.
private void getCharger() {
if (chargerList != null) {
for (ChargerNature charger : chargerList) {
soc.removeChannel(charger.getActualPower());
}
chargerList.clear();
if (charger.valueOptional().isPresent()) {
JsonArray ids = charger.valueOptional().get();
for (JsonElement e : ids) {
Optional<Thing> t = repo.getThingById(e.getAsString());
if (t.isPresent()) {
if (t.get() instanceof ChargerNature) {
ChargerNature charger = (ChargerNature) t.get();
chargerList.add(charger);
soc.addChannel(charger.getActualPower());
}
}
}
}
}
}
use of io.openems.api.device.nature.charger.ChargerNature in project openems by OpenEMS.
the class SimulatorSymmetricEss method getCharger.
private void getCharger() {
if (chargerList != null) {
for (ChargerNature charger : chargerList) {
soc.removeChannel(charger.getActualPower());
}
chargerList.clear();
if (charger.valueOptional().isPresent()) {
JsonArray ids = charger.valueOptional().get();
for (JsonElement e : ids) {
Optional<Thing> t = repo.getThingById(e.getAsString());
if (t.isPresent()) {
if (t.get() instanceof ChargerNature) {
ChargerNature charger = (ChargerNature) t.get();
chargerList.add(charger);
soc.addChannel(charger.getActualPower());
}
}
}
}
}
}
Aggregations