Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework of OCPP SmartCharging #65

Merged
merged 1 commit into from
Dec 20, 2022
Merged

Rework of OCPP SmartCharging #65

merged 1 commit into from
Dec 20, 2022

Conversation

Pietfried
Copy link
Contributor

  • Reworked handling for SetChargingProfile.req ClearChargingProfile.req and GetCompositeSchedule.req
  • Added class SmartChargingHandler which is responsible for maintaining profiles and calculating the composite schedule
  • Supporting all ChargingProfilePurposes and ChargingProfileKinds
  • Storing charging profiles persistently - added table CHARGING_PROFILES to database - ChargingProfiles are loaded on boot

Signed-off-by: pietfried [email protected]

Comment on lines 16 to 21
static const int LOW_VOLTAGE = 230;
static const int DEFAULT_AND_MAX_NUMBER_PHASES = 3;
static const int HOURS_PER_DAY = 24;
static const int SECONDS_PER_HOUR = 3600;
static const int SECONDS_PER_DAY = 86400;
static const int DAYS_PER_WEEK = 7;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using static here is not a good idea in general, because it will create an instance in every compilation unit (cpp file), that is including this header file.

@Pietfried Pietfried force-pushed the pg-smart-charging branch 7 times, most recently from 10d68eb to 5e24668 Compare December 14, 2022 13:58
@Pietfried Pietfried marked this pull request as ready for review December 14, 2022 14:03
- added class SmartChargingHandler
- supporting all ChargingProfilePurpose and ChargingProfileKind
- storing charging profiles persistently - added table CHARGING_PROFILES to database
- added database tests for charging profiles

Signed-off-by: pietfried <[email protected]>
@Pietfried Pietfried merged commit 7f4668f into main Dec 20, 2022
@Pietfried Pietfried deleted the pg-smart-charging branch December 20, 2022 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants