-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement SetChargingProfileRequest and basic database storage/loading (
#711) * smart_charging: Make profile and evse_id order consistent Signed-off-by: Christopher Davis <[email protected]> * charge_point: Make `handle_message` protected This makes it possible to use from our unit tests. Signed-off-by: Christopher Davis <[email protected]> * charge_point: Add SmartChargingHandler Signed-off-by: Christopher Davis <[email protected]> * smart_charging: Make SmartChargingHandler mockable Also add the mock class for it. Signed-off-by: Christopher Davis <[email protected]> * charge_point: Handle SetChargingProfileRequest Add a handler for SetChargingProfileRequest with unit tests that ensure that we add valid profiles - and only valid profiles. Signed-off-by: Christopher Davis <[email protected]> * doc: Update SmartCharging status Add functional requirements handled by the implementation of `handle_set_charging_profile_req()` and a few missed FRs covered by `validate_profile()`. Signed-off-by: Christopher Davis <[email protected]> * charge_point: Test that set_charging_profile callback is called Signed-off-by: Christopher Davis <[email protected]> * added ability to load profile from database Signed-off-by: Coury Richards <[email protected]> Signed-off-by: Christopher Davis <[email protected]> * charge_point: Reject ChargingStationExternalConstraints profiles in SetChargingProfileRequest Implements K01.FR.22 Signed-off-by: Christopher Davis <[email protected]> * updated database statements for tests Signed-off-by: Coury Richards <[email protected]> * added columns to database and updated equality checks Signed-off-by: Coury Richards <[email protected]> * smart_charging: Add combined validation and add method Signed-off-by: Christopher Davis <[email protected]> * Updated FR45 to use supplyPhases Signed-off-by: Peter Giavotto <[email protected]> * database_handler: Correct spelling in database tests Signed-off-by: Christopher Davis <[email protected]> * database_handler: Test profile equality Signed-off-by: Christopher Davis <[email protected]> * database_handler: Rename function to get all profiles grouped by evse id Signed-off-by: Christopher Davis <[email protected]> * moved charing profile equality to test since it is not a full comparison Signed-off-by: Coury Richards <[email protected]> * removed duplicate include Signed-off-by: Coury Richards <[email protected]> --------- Signed-off-by: Christopher Davis <[email protected]> Signed-off-by: Coury Richards <[email protected]> Signed-off-by: Peter Giavotto <[email protected]> Co-authored-by: Coury Richards <[email protected]> Co-authored-by: Peter Giavotto <[email protected]>
- Loading branch information
1 parent
8476c0d
commit 1c688a6
Showing
16 changed files
with
890 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP TABLE CHARGING_PROFILES; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE TABLE CHARGING_PROFILES ( | ||
ID INT PRIMARY KEY NOT NULL, | ||
EVSE_ID INT NOT NULL, | ||
STACK_LEVEL INT NOT NULL, | ||
CHARGING_PROFILE_PURPOSE TEXT NOT NULL, | ||
PROFILE TEXT NOT NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.