Skip to content

Commit 928f678

Browse files
authored
Added necessary changes for the iso15118_charger interface refactor (#25)
Signed-off-by: Sebastian Lukas <sebastian.lukas@pionix.de>
1 parent a3852ba commit 928f678

3 files changed

Lines changed: 9 additions & 13 deletions

File tree

iso15118/secc/controller/simulator.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,15 +446,13 @@ async def is_authorized(
446446

447447
if id_token_type is AuthorizationTokenType.EXTERNAL:
448448

449-
eim_auth_status: bool = EVEREST_CHARGER_STATE.auth_okay_eim
450-
451-
if eim_auth_status is True:
449+
if EVEREST_CHARGER_STATE.auth_status == "Accepted":
452450
return AuthorizationStatus.ACCEPTED
453451

454452
elif id_token_type is AuthorizationTokenType.EMAID:
455453

456-
pnc_auth_status: str = EVEREST_CHARGER_STATE.auth_pnc_status
457-
certificate_status = EVEREST_CHARGER_STATE.auth_pnc_certificate_status
454+
pnc_auth_status: str = EVEREST_CHARGER_STATE.auth_status
455+
certificate_status = EVEREST_CHARGER_STATE.certificate_status
458456

459457
if pnc_auth_status == "Accepted" and certificate_status in ['Ongoing', 'Accepted']:
460458
return AuthorizationStatus.ACCEPTED

iso15118/secc/everest/charger_state.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ class ChargerState:
1212
ReceiptRequired = False
1313
FreeService = False
1414
EVSEEnergyToBeDelivered = 0
15-
debug_mode = 'None'
15+
debug_mode = False
1616
stop_charging = False
17-
auth_okay_eim = False
18-
auth_pnc_status = 'Ongoing'
19-
auth_pnc_certificate_status = 'Ongoing'
17+
auth_status = 'Ongoing'
18+
certificate_status = 'Ongoing'
2019
EVSE_UtilityInterruptEvent = False
2120
EVSE_EmergencyShutdown = False
2221
EVSE_Malfunction = False
@@ -49,9 +48,8 @@ class ChargerState:
4948
def reset(self):
5049
# Common
5150
self.stop_charging = False
52-
self.auth_okay_eim = False
53-
self.auth_pnc_status = 'Ongoing'
54-
self.auth_pnc_certificate_status = 'Ongoing'
51+
self.auth_status = 'Ongoing'
52+
self.certificate_status = 'Ongoing'
5553
self.EVSE_UtilityInterruptEvent = False
5654
self.EVSE_EmergencyShutdown = False
5755
self.EVSE_Malfunction = False

iso15118/shared/comm_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ def debugV2GMessages(decoded_message, v2gtp_msg):
565565
import base64
566566
from iso15118.shared.states import Base64
567567

568-
if EVEREST_CTX.charger_state.debug_mode == "Full":
568+
if EVEREST_CTX.charger_state.debug_mode:
569569

570570
if isinstance(decoded_message, Base64):
571571
return

0 commit comments

Comments
 (0)