Skip to content

Commit

Permalink
session limits should not be updated (#392)
Browse files Browse the repository at this point in the history
* session limits should not be updated

* session limits should not be updated

* current types are set

* code quality

* code quality
  • Loading branch information
ikaratass authored Mar 27, 2024
1 parent 317071c commit 6e7c8c2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion iso15118/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.26.0"
__version__ = "0.26.1"
3 changes: 2 additions & 1 deletion iso15118/secc/states/din_spec_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from typing import Optional, Type, Union

from iso15118.secc.comm_session_handler import SECCCommunicationSession
from iso15118.secc.controller.evse_data import CurrentType
from iso15118.secc.states.secc_state import StateSECC
from iso15118.shared.messages.app_protocol import (
SupportedAppProtocolReq,
Expand Down Expand Up @@ -395,7 +396,7 @@ async def process_message(
dc_evse_charge_params = (
await self.comm_session.evse_controller.get_dc_charge_parameters_dinspec() # noqa
)
evse_data_context.update_dc_charge_parameters(dc_evse_charge_params)
evse_data_context.current_type = CurrentType.DC

sa_schedule_list = (
await self.comm_session.evse_controller.get_sa_schedule_list_dinspec(
Expand Down
14 changes: 4 additions & 10 deletions iso15118/secc/states/iso15118_20_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from iso15118.secc.comm_session_handler import SECCCommunicationSession
from iso15118.secc.controller.common import UnknownEnergyService
from iso15118.secc.controller.evse_data import EVSEDataContext
from iso15118.secc.controller.evse_data import CurrentType
from iso15118.secc.states.secc_state import StateSECC
from iso15118.shared.exi_codec import EXI
from iso15118.shared.messages.app_protocol import (
Expand Down Expand Up @@ -1348,12 +1348,8 @@ async def process_message(
self.charge_parameter_valid(ac_cpd_req.ac_params)
ev_data_context = self.comm_session.evse_controller.ev_data_context
ev_data_context.update_ac_charge_parameters_v20(energy_service, ac_cpd_req)
evse_data_context = (
self.comm_session.evse_controller.evse_data_context
) = EVSEDataContext()
evse_data_context.update_ac_charge_parameters_v20(
energy_service, ac_cpd_res
)
evse_data_context = self.comm_session.evse_controller.evse_data_context
evse_data_context.current_type = CurrentType.AC
except UnknownEnergyService:
self.stop_state_machine(
f"Invalid charge parameter for service {energy_service}",
Expand Down Expand Up @@ -1548,9 +1544,7 @@ async def process_message(
ev_data_context = self.comm_session.evse_controller.ev_data_context
ev_data_context.update_dc_charge_parameters_v20(energy_service, dc_cpd_req)
evse_data_context = self.comm_session.evse_controller.evse_data_context
evse_data_context.update_dc_charge_parameters_v20(
energy_service, dc_cpd_res
)
evse_data_context.current_type = CurrentType.DC
except UnknownEnergyService:
self.stop_state_machine(
f"Invalid charge parameter for service {energy_service}",
Expand Down
5 changes: 3 additions & 2 deletions iso15118/secc/states/iso15118_2_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from iso15118.secc.comm_session_handler import SECCCommunicationSession
from iso15118.secc.controller.ev_data import EVSessionContext15118
from iso15118.secc.controller.evse_data import CurrentType
from iso15118.secc.controller.interface import AuthorizationResponse
from iso15118.secc.states.secc_state import StateSECC
from iso15118.shared.exceptions import (
Expand Down Expand Up @@ -1366,15 +1367,15 @@ async def process_message(
ac_evse_charge_params = (
await self.comm_session.evse_controller.get_ac_charge_params_v2()
)
evse_data_context.update_ac_charge_parameters_v2(ac_evse_charge_params)
evse_data_context.current_type = CurrentType.AC
ev_data_context.update_ac_charge_parameters_v2(
charge_params_req.ac_ev_charge_parameter
)
else:
dc_evse_charge_params = (
await self.comm_session.evse_controller.get_dc_charge_parameters_v2()
)
evse_data_context.update_dc_charge_parameters(dc_evse_charge_params)
evse_data_context.current_type = CurrentType.DC
ev_data_context.update_dc_charge_parameters(
charge_params_req.dc_ev_charge_parameter
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "iso15118"
version = "0.26.0"
version = "0.26.1"
description = "Implementation of DIN SPEC 70121, ISO 15118-2 and -20 specs for SECC"
authors = ["André Duarte <[email protected]>",
"Dr. Marc Mültin <[email protected]>",
Expand Down

0 comments on commit 6e7c8c2

Please sign in to comment.