Skip to content

Commit

Permalink
feat: Support for 15118-20 (#33)
Browse files Browse the repository at this point in the history
* feat: Support for 15118-20

* feat: Addressed comments. Fixed issue with wrong charge loop params being returned (AB#1770)

* 15118-20 service detail parameters are moved to a separate json file.

* Fixed black error in shared/settings.py

* feat: Updated simulator.py (AB#1770)

Condition that returned None for ScheduledExchangeRes Dynamic_SEResControlMode/Scheduled_SEResControlMode has been removed.

* feat: Addressed comments on PR (AB#1770)

* feat: changes to unpacking.(AB#1770)

* Updated secc/simulator.py
  • Loading branch information
shalinnijel2 authored Apr 29, 2022
1 parent 734e5ab commit 07ab679
Show file tree
Hide file tree
Showing 31 changed files with 4,893 additions and 529 deletions.
32 changes: 28 additions & 4 deletions iso15118/evcc/comm_session_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,17 @@
Namespace,
Protocol,
)
from iso15118.shared.messages.iso15118_2.datatypes import ChargingSession
from iso15118.shared.messages.iso15118_2.datatypes import (
ChargingSession as ChargingSessionV2,
)
from iso15118.shared.messages.iso15118_20.common_messages import (
ChargingSession as ChargingSessionV20,
)
from iso15118.shared.messages.iso15118_20.common_messages import (
ScheduleExchangeReq,
ScheduleExchangeRes,
)
from iso15118.shared.messages.iso15118_20.common_types import Processing
from iso15118.shared.messages.sdp import SDPRequest, SDPResponse, Security, Transport
from iso15118.shared.messages.timeouts import Timeouts
from iso15118.shared.messages.v2gtp import V2GTPMessage
Expand Down Expand Up @@ -99,10 +109,24 @@ def __init__(
# Once the timer is up, the EV will terminate the communication session.
# A value >= 0 means the timer is running, a value < 0 means it stopped.
self.ongoing_timer: float = -1
# Temporarily save the ScheduleExchangeReq, which need to be resent to the SECC
# if the response message's EVSEProcessing field is set to "Ongoing"
self.ongoing_schedule_exchange_req: Optional[ScheduleExchangeReq] = None
# Whether the EV is still processing to calculate the EVPowerProfile.
# That value is needed across states (ScheduleExchange and PowerDelivery)
# (ISO 15118-20)
self.ev_processing: Processing = Processing.FINISHED
# Temporarily save the ScheduleExchangeRes, in case the EVProcessing field of
# PowerDeliveryReq is set to "Ongoing", so we can access that response in the
# following PowerDelivery state (ISO 15118-20)
self.schedule_exchange_res: Optional[ScheduleExchangeRes] = None
# Whether to pause or terminate a charging session. Is set when sending
# a PowerDeliveryReq
self.charging_session_stop: Optional[ChargingSession] = None
# Whether or not a renegotiation was requested by the SECC (with either
# a PowerDeliveryReq (ISO 15118-2)
self.charging_session_stop_v2: Optional[ChargingSessionV2] = None
# Whether to pause, standby or terminate a charging session. Is set when sending
# a PowerDeliveryReq (ISO 15118-20)
self.charging_session_stop_v20: Optional[ChargingSessionV20] = None
# Whether a renegotiation was requested by the SECC (with either
# a MeteringReceiptRes, ChargingStatusRes, or CurrentDemandRes) or EVCC
self.renegotiation_requested = False
# The ID of the EVSE that controls the power flow to the EV
Expand Down
Loading

0 comments on commit 07ab679

Please sign in to comment.