4#include <ocpp/v2/ocpp_types.hpp>
13 std::optional<int32_t> numberPhases;
14 std::optional<int32_t> phaseToUse;
17using IntermediateProfile = std::vector<IntermediatePeriod>;
35 std::optional<std::int32_t> number_phases;
36 std::optional<std::int32_t> phase_to_use;
37 std::int32_t stack_level;
38 ChargingRateUnitEnum charging_rate_unit;
39 std::optional<float> min_charging_rate;
42 return (start == other.end) && (end == other.end) && (limit == other.limit) &&
43 (number_phases == other.number_phases) && (stack_level == other.stack_level) &&
44 (charging_rate_unit == other.charging_rate_unit) && (min_charging_rate == other.min_charging_rate);
60std::vector<DateTime> calculate_start(
const DateTime& now,
const DateTime& end,
61 const std::optional<DateTime>& session_start,
const ChargingProfile& profile);
71std::vector<period_entry_t> calculate_profile_entry(
const DateTime& now,
const DateTime& end,
72 const std::optional<DateTime>& session_start,
82std::vector<period_entry_t> calculate_profile(
const DateTime& now,
const DateTime& end,
83 const std::optional<DateTime>& session_start,
94std::vector<period_entry_t> calculate_all_profiles(
const DateTime& now,
const DateTime& end,
95 const std::optional<DateTime>& session_start,
96 const std::vector<ChargingProfile>& profiles,
97 ChargingProfilePurposeEnum purpose);
107IntermediateProfile generate_profile_from_periods(std::vector<period_entry_t>& periods,
const DateTime& now,
113IntermediateProfile merge_tx_profile_with_tx_default_profile(
const IntermediateProfile& tx_profile,
114 const IntermediateProfile& tx_default_profile);
117IntermediateProfile merge_profiles_by_lowest_limit(
const std::vector<IntermediateProfile>& profiles);
121IntermediateProfile merge_profiles_by_summing_limits(
const std::vector<IntermediateProfile>& profiles,
122 float current_default,
float power_default);
125void fill_gaps_with_defaults(IntermediateProfile& schedule,
float default_limit, int32_t default_number_phases);
130std::vector<ChargingSchedulePeriod>
131convert_intermediate_into_schedule(
const IntermediateProfile& profile, ChargingRateUnitEnum charging_rate_unit,
132 float default_limit, int32_t default_number_phases,
float supply_voltage);
Contains a DateTime implementation that can parse and create RFC 3339 compatible strings.
Definition: types.hpp:109
Definition: ocpp_types.hpp:755
Definition: ocpp_types.hpp:236
Returns elements from a specific ChargingProfile and ChargingSchedulePeriod for use in the calculatio...
Definition: profile.hpp:27
void init(const ocpp::DateTime &in_start, int in_duration, const ChargingSchedulePeriod &in_period, const ChargingProfile &in_profile)
populate a schedule period
Definition: profile.cpp:27