Skip to content

Commit 43905b8

Browse files
Pietfriedcorneliusclaussen
authored andcommitted
refactor(EvseManager): Refactor Charger state machine to fix
pause/resume behaviour - Remove occurences of ChargingResumed - In Finishing: Stop session only if EV is unplugged - Remove evse_replug command from evse_board_support interface and all respective occurences in modules or the stable API - handle HLC charging without power and fix AC basic pause transitions - Add HLC no‑energy timeout and reuse power_available() Signed-off-by: Piet Gömpel <pietgoempel@gmail.com> Signed-off-by: Cornelius Claussen <cc@pionix.de>
1 parent b2edf32 commit 43905b8

File tree

46 files changed

+350
-540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+350
-540
lines changed

applications/pionix_chargebridge/include/charge_bridge/everest_api/evse_bsp_api.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ class evse_bsp_api : public everest::lib::io::event::fd_event_register_interface
7272
void receive_pwm_F(std::string const& payload);
7373
void receive_allow_power_on(std::string const& payload);
7474
void receive_ac_switch_three_phases_while_charging(std::string const& payload);
75-
void receive_evse_replug(std::string const& payload);
7675
void receive_ac_overcurrent_limit(std::string const& payload);
7776
void receive_lock();
7877
void receive_unlock();

applications/pionix_chargebridge/src/everest_api/evse_bsp_api.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ void evse_bsp_api::dispatch(std::string const& operation, std::string const& pay
119119
receive_allow_power_on(payload);
120120
} else if (operation == "ac_switch_three_phases_while_charging") {
121121
receive_ac_switch_three_phases_while_charging(payload);
122-
} else if (operation == "evse_replug") {
123-
receive_evse_replug(payload);
124122
} else if (operation == "ac_overcurrent_limit") {
125123
receive_ac_overcurrent_limit(payload);
126124
} else if (operation == "lock") {
@@ -393,9 +391,6 @@ void evse_bsp_api::receive_allow_power_on(std::string const& payload) {
393391
void evse_bsp_api::receive_ac_switch_three_phases_while_charging(std::string const&) {
394392
}
395393

396-
void evse_bsp_api::receive_evse_replug(std::string const&) {
397-
}
398-
399394
void evse_bsp_api::receive_ac_overcurrent_limit(std::string const&) {
400395
}
401396

docs/source/reference/EVerest_API/evse_board_support_API.yaml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ channels:
5959
messages:
6060
receive_ac_switch_three_phases_while_charging:
6161
$ref: '#/components/messages/receive_ac_switch_three_phases_while_charging'
62-
receive_evse_replug:
63-
address: 'e2m/evse_replug'
64-
messages:
65-
receive_evse_replug:
66-
$ref: '#/components/messages/receive_evse_replug'
6762
receive_ac_overcurrent_limit:
6863
address: 'e2m/ac_overcurrent_limit'
6964
messages:
@@ -194,12 +189,6 @@ operations:
194189
channel:
195190
$ref: '#/channels/receive_ac_switch_three_phases_while_charging'
196191
description: 'Direction: EVerest to Module'
197-
receive_evse_replug:
198-
title: 'Receive request for virtual replug sequence'
199-
action: receive
200-
channel:
201-
$ref: '#/channels/receive_evse_replug'
202-
description: 'Direction: EVerest to Module'
203192
receive_ac_overcurrent_limit:
204193
title: 'Receive over current limit'
205194
action: receive
@@ -369,23 +358,6 @@ components:
369358
- summary: ""
370359
payload:
371360
"ThreePhases"
372-
receive_evse_replug:
373-
name: receive_evse_replug
374-
title: 'Receive request for virtual replug sequence'
375-
summary: >-
376-
Optional, in case of doubt do not implement.
377-
Special command initiate a virtual replug sequence of adjustable duration without restarting
378-
session. Emits a EvseReplugStarted event if supported and started. BSP will
379-
take care to not emit other events such as CarPluggedIn/Out during that time.
380-
Once finished it will emit a EvseReplugFinished. This is mainly for testing purposes,
381-
don't implement for production use.
382-
contentType: application/json
383-
payload:
384-
$ref: '#/components/schemas/Duration'
385-
examples:
386-
- summary: ""
387-
payload:
388-
200
389361
receive_ac_overcurrent_limit:
390362
name: receive_ac_overcurrent_limit
391363
title: 'Receive over current limit'

docs/source/reference/EVerest_API/evse_manager_consumer_API.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ components:
13141314
charging_state_changed_event:
13151315
description: >-
13161316
Data for ChargingStateChangedEvent. Shall be set for the following SessionEventEnums:
1317-
ChargingStarted, ChargingResumed, ChargingPausedEV, Charging
1317+
ChargingStarted, ChargingPausedEV, Charging
13181318
type: object
13191319
$ref: '#/components/schemas/ChargingStateChangedEvent'
13201320
authorization_event:
@@ -1343,7 +1343,6 @@ components:
13431343
- ChargingPausedEV: Signaled when charging is paused by the EV
13441344
- WaitingForEnergy: Waiting for ernergy manager
13451345
- ChargingPausedEVSE: Signaled when charging is paused by the EVSE
1346-
- ChargingResumed: Charging has resumed from a pause
13471346
- StoppingCharging: EVSE has started to stop the charging process. DC: CurrentDemand has finished, now doing WeldingCheck etc, AC: Wait for car to return to state B or A
13481347
- ChargingFinished: Charging is finished. Essentially the same as TransactionFinished, but emitted for clarity
13491348
- TransactionFinished: Signaled when the transaction finished. Transaction finishes at the point where one of the preconditions for charging irrevocably becomes false: When a user swipes to stop the transaction and the stop is authorized.
@@ -1369,7 +1368,6 @@ components:
13691368
- ChargingPausedEV
13701369
- ChargingPausedEVSE
13711370
- WaitingForEnergy
1372-
- ChargingResumed
13731371
- StoppingCharging
13741372
- ChargingFinished
13751373
- TransactionFinished

interfaces/evse_board_support.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,6 @@ cmds:
4343
value:
4444
description: 'True: switch to 3ph, False: switch to 1ph'
4545
type: boolean
46-
evse_replug:
47-
description: >-
48-
Optional, in case of doubt do not implement.
49-
Special command initiate a virtual replug sequence without restarting
50-
session. Emits a EvseReplugStarted event if supported and started. BSP will
51-
take care to not emit other events such as CarPluggedIn/Out during that time.
52-
Once finished it will emit a EvseReplugFinished. This is mainly for testing purposes,
53-
don't implement for production use.
54-
arguments:
55-
value:
56-
description: Time in ms for the duration of the replug sequence
57-
type: integer
5846
ac_set_overcurrent_limit_A:
5947
description: >-
6048
Many chargers implement a fast over current shutdown directly in the hardware that triggers if the EV draws more current than

lib/everest/everest_api_types/include/everest_api_types/evse_manager/API.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,12 @@ enum class SessionEventEnum {
5757
ChargingStarted,
5858
ChargingPausedEV,
5959
ChargingPausedEVSE,
60-
WaitingForEnergy,
61-
ChargingResumed,
6260
StoppingCharging,
6361
ChargingFinished,
6462
TransactionFinished,
6563
SessionFinished,
6664
ReservationStart,
6765
ReservationEnd,
68-
ReplugStarted,
69-
ReplugFinished,
7066
PluginTimeout,
7167
SwitchingPhases,
7268
SessionResumed,

lib/everest/everest_api_types/src/everest_api_types/evse_manager/json_codec.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,6 @@ void to_json(json& j, SessionEventEnum const& k) noexcept {
260260
case SessionEventEnum::ChargingPausedEVSE:
261261
j = "ChargingPausedEVSE";
262262
return;
263-
case SessionEventEnum::WaitingForEnergy:
264-
j = "WaitingForEnergy";
265-
return;
266-
case SessionEventEnum::ChargingResumed:
267-
j = "ChargingResumed";
268-
return;
269263
case SessionEventEnum::StoppingCharging:
270264
j = "StoppingCharging";
271265
return;
@@ -284,12 +278,6 @@ void to_json(json& j, SessionEventEnum const& k) noexcept {
284278
case SessionEventEnum::ReservationEnd:
285279
j = "ReservationEnd";
286280
return;
287-
case SessionEventEnum::ReplugStarted:
288-
j = "ReplugStarted";
289-
return;
290-
case SessionEventEnum::ReplugFinished:
291-
j = "ReplugFinished";
292-
return;
293281
case SessionEventEnum::PluginTimeout:
294282
j = "PluginTimeout";
295283
return;
@@ -350,14 +338,6 @@ void from_json(json const& j, SessionEventEnum& k) {
350338
k = SessionEventEnum::ChargingPausedEVSE;
351339
return;
352340
}
353-
if (s == "WaitingForEnergy") {
354-
k = SessionEventEnum::WaitingForEnergy;
355-
return;
356-
}
357-
if (s == "ChargingResumed") {
358-
k = SessionEventEnum::ChargingResumed;
359-
return;
360-
}
361341
if (s == "StoppingCharging") {
362342
k = SessionEventEnum::StoppingCharging;
363343
return;
@@ -382,14 +362,6 @@ void from_json(json const& j, SessionEventEnum& k) {
382362
k = SessionEventEnum::ReservationEnd;
383363
return;
384364
}
385-
if (s == "ReplugStarted") {
386-
k = SessionEventEnum::ReplugStarted;
387-
return;
388-
}
389-
if (s == "ReplugFinished") {
390-
k = SessionEventEnum::ReplugFinished;
391-
return;
392-
}
393365
if (s == "PluginTimeout") {
394366
k = SessionEventEnum::PluginTimeout;
395367
return;

lib/everest/everest_api_types/src/everest_api_types/evse_manager/wrapper.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,6 @@ SessionEventEnum_Internal to_internal_api(SessionEventEnum_External const& val)
209209
return TarT::ChargingPausedEV;
210210
case SrcT::ChargingPausedEVSE:
211211
return TarT::ChargingPausedEVSE;
212-
case SrcT::WaitingForEnergy:
213-
return TarT::WaitingForEnergy;
214-
case SrcT::ChargingResumed:
215-
return TarT::ChargingResumed;
216212
case SrcT::StoppingCharging:
217213
return TarT::StoppingCharging;
218214
case SrcT::ChargingFinished:
@@ -225,10 +221,6 @@ SessionEventEnum_Internal to_internal_api(SessionEventEnum_External const& val)
225221
return TarT::ReservationStart;
226222
case SrcT::ReservationEnd:
227223
return TarT::ReservationEnd;
228-
case SrcT::ReplugStarted:
229-
return TarT::ReplugStarted;
230-
case SrcT::ReplugFinished:
231-
return TarT::ReplugFinished;
232224
case SrcT::PluginTimeout:
233225
return TarT::PluginTimeout;
234226
case SrcT::SwitchingPhases:
@@ -267,10 +259,6 @@ SessionEventEnum_External to_external_api(SessionEventEnum_Internal const& val)
267259
return TarT::ChargingPausedEV;
268260
case SrcT::ChargingPausedEVSE:
269261
return TarT::ChargingPausedEVSE;
270-
case SrcT::WaitingForEnergy:
271-
return TarT::WaitingForEnergy;
272-
case SrcT::ChargingResumed:
273-
return TarT::ChargingResumed;
274262
case SrcT::StoppingCharging:
275263
return TarT::StoppingCharging;
276264
case SrcT::ChargingFinished:
@@ -283,10 +271,6 @@ SessionEventEnum_External to_external_api(SessionEventEnum_Internal const& val)
283271
return TarT::ReservationStart;
284272
case SrcT::ReservationEnd:
285273
return TarT::ReservationEnd;
286-
case SrcT::ReplugStarted:
287-
return TarT::ReplugStarted;
288-
case SrcT::ReplugFinished:
289-
return TarT::ReplugFinished;
290274
case SrcT::PluginTimeout:
291275
return TarT::PluginTimeout;
292276
case SrcT::SwitchingPhases:

lib/everest/everest_api_types/tests/expected_interfaces_file_hashes.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interfaces/auth_token_validator.yaml,d4632713b49c9c4e20cf7e8d4d56de256ecff4a1a24
55
interfaces/connector_lock.yaml,5c2a746ba04eaf96657f98673927aa88038c209d8b845ad7b248d14e1d930234
66
interfaces/display_message.yaml,c840e9ac1983952d905d1ae7ce4fa179ccc6b7e90d9aeb4c685af1ea95a5b83f
77
interfaces/error_history.yaml,2b275797a7990976f5d4ee16c498190a03bc3e754adda04e58f0d34de18549a8
8-
interfaces/evse_board_support.yaml,0ca360933de007758cc20a278b9661abf8438c690213927942d1776edb619277
8+
interfaces/evse_board_support.yaml,f1b2bdaf9f425ac0399d1bdae0bd402d7b616c70d2e7cb0daa1c7ca836e51e33
99
interfaces/evse_manager.yaml,2627fd4b254dd4ad0ffa3753e43782160ed54718fcaf428d119cbe1f8d518313
1010
interfaces/external_energy_limits.yaml,e54e8b2c323073e62e072841a31f615501b22b26d461a421e9f83876b40c9d5b
1111
interfaces/isolation_monitor.yaml,ade92191ca86270b61f1b8719067dc862f011c8a6f21c22201ec9dc4aeebcd62

lib/everest/everest_api_types/tests/expected_types_file_hashes.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ types/energy.yaml,82b8d902618eb3927a7e34e8a641cb2a69db93e404c2b61320c62eab3c290d
88
types/energy_price_information.yaml,b2284d75a2fc695150cb72e7262b4efa11a05b11b1cca382451643a9bb2be624
99
types/error_history.yaml,6c49548f8020e807ca17f710d6cb69e53399b9da4ed2aaa5247dd695f42c3b50
1010
types/evse_board_support.yaml,cbbe41414102d45b4d24db661b4da2bbaef544c4f050db0981ba6e44946a3f79
11-
types/evse_manager.yaml,1239ef6fdc57cbec1f6788003c9c72bd80b899ca3a544cef03a3cf1a674b01d3
11+
types/evse_manager.yaml,50da7101c8f6aff7d39b8b2d8f6208d9ba2d0b1e0ad8f4baf0405f8babf641bd
1212
types/evse_security.yaml,a80c92d4663bda33412bd32788ba446bc0eafeebcddad706db38e1f988bd133b
1313
types/iso15118.yaml,74258b4fbf09357159fe4a5afc8364bbb9bbf9a9ed9a36e2f28c6cf7ce011fe3
1414
types/isolation_monitor.yaml,45d98b5072fa5d02a476860fe7d45a7b02f8a05eb6be94327f32dbe159d4ec40

0 commit comments

Comments
 (0)