|
| 1 | +#ifndef DEVELOPER_JOYOFENERGY_CPP_BEAST_CONFIGURATION_H |
| 2 | +#define DEVELOPER_JOYOFENERGY_CPP_BEAST_CONFIGURATION_H |
| 3 | + |
| 4 | +#include <domain/ElectricityReading.h> |
| 5 | +#include <domain/PricePlan.h> |
| 6 | + |
| 7 | +#include "generator.h" |
| 8 | + |
| 9 | +constexpr auto DR_EVILS_DARK_ENERGY_ENERGY_SUPPLIER = "Dr Evil's Dark Energy"; |
| 10 | +constexpr auto THE_GREEN_ECO_ENERGY_SUPPLIER = "The Green Eco"; |
| 11 | +constexpr auto POWER_FOR_EVERYONE_ENERGY_SUPPLIER = "Power for Everyone"; |
| 12 | + |
| 13 | +constexpr auto MOST_EVIL_PRICE_PLAN_ID = "price-plan-0"; |
| 14 | +constexpr auto RENEWABLES_PRICE_PLAN_ID = "price-plan-1"; |
| 15 | +constexpr auto STANDARD_PRICE_PLAN_ID = "price-plan-2"; |
| 16 | + |
| 17 | +constexpr auto SARAHS_SMART_METER_ID = "smart-meter-0"; |
| 18 | +constexpr auto PETERS_SMART_METER_ID = "smart-meter-1"; |
| 19 | +constexpr auto CHARLIES_SMART_METER_ID = "smart-meter-2"; |
| 20 | +constexpr auto ANDREAS_SMART_METER_ID = "smart-meter-3"; |
| 21 | +constexpr auto ALEXS_SMART_METER_ID = "smart-meter-4"; |
| 22 | + |
| 23 | +std::vector<PricePlan> price_plans() { |
| 24 | + // todo |
| 25 | + // pricePlans.add(new PricePlan(MOST_EVIL_PRICE_PLAN_ID, "Dr Evil's Dark Energy", BigDecimal.TEN, emptyList())); |
| 26 | + // pricePlans.add(new PricePlan(RENEWABLES_PRICE_PLAN_ID, "The Green Eco", BigDecimal.valueOf(2), emptyList())); |
| 27 | + // pricePlans.add(new PricePlan(STANDARD_PRICE_PLAN_ID, "Power for Everyone", BigDecimal.ONE, emptyList())); |
| 28 | + return {}; |
| 29 | +} |
| 30 | + |
| 31 | +std::unordered_map<std::string, std::string> smart_meter_to_price_plan_accounts() { |
| 32 | + return {{SARAHS_SMART_METER_ID, MOST_EVIL_PRICE_PLAN_ID}, |
| 33 | + {PETERS_SMART_METER_ID, RENEWABLES_PRICE_PLAN_ID}, |
| 34 | + {CHARLIES_SMART_METER_ID, MOST_EVIL_PRICE_PLAN_ID}, |
| 35 | + {ANDREAS_SMART_METER_ID, STANDARD_PRICE_PLAN_ID}, |
| 36 | + {ALEXS_SMART_METER_ID, RENEWABLES_PRICE_PLAN_ID}}; |
| 37 | +}; |
| 38 | + |
| 39 | +auto readings() { |
| 40 | + std::unordered_map<std::string, std::vector<ElectricityReading>> result; |
| 41 | + for (auto &[meter, plan] : smart_meter_to_price_plan_accounts()) { |
| 42 | + result[meter] = generator{}.generate(20); |
| 43 | + } |
| 44 | + return result; |
| 45 | +} |
| 46 | + |
| 47 | +#endif // DEVELOPER_JOYOFENERGY_CPP_BEAST_CONFIGURATION_H |
0 commit comments