diff --git a/iso15118/secc/controller/interface.py b/iso15118/secc/controller/interface.py index db5bf516..b71cf1b0 100644 --- a/iso15118/secc/controller/interface.py +++ b/iso15118/secc/controller/interface.py @@ -1056,3 +1056,10 @@ async def session_ended(self, current_state: str, reason: str): Indicate the reason for stopping charging. """ raise NotImplementedError + + @abstractmethod + async def send_display_params(self): + """ + Share display params with CS. + """ + raise NotImplementedError diff --git a/iso15118/secc/controller/simulator.py b/iso15118/secc/controller/simulator.py index f85b62a9..20330597 100644 --- a/iso15118/secc/controller/simulator.py +++ b/iso15118/secc/controller/simulator.py @@ -1090,3 +1090,9 @@ async def session_ended(self, current_state: str, reason: str): @param last_message: The last message that was either sent/received. """ logger.info(f"Session ended in {current_state} ({reason}).") + + async def send_display_params(self): + """ + Share display params with CS. + """ + pass diff --git a/iso15118/secc/states/din_spec_states.py b/iso15118/secc/states/din_spec_states.py index 0300f0f3..9fc13b3c 100644 --- a/iso15118/secc/states/din_spec_states.py +++ b/iso15118/secc/states/din_spec_states.py @@ -840,7 +840,7 @@ async def process_message( await self.comm_session.evse_controller.get_evse_max_power_limit() ), ) - + await self.comm_session.evse_controller.send_display_params() self.create_next_message( None, current_demand_res, diff --git a/iso15118/secc/states/iso15118_20_states.py b/iso15118/secc/states/iso15118_20_states.py index 4b71355e..42423280 100644 --- a/iso15118/secc/states/iso15118_20_states.py +++ b/iso15118/secc/states/iso15118_20_states.py @@ -1473,7 +1473,7 @@ async def process_message( ), meter_info=meter_info, ) - + await self.comm_session.evse_controller.send_display_params() self.create_next_message( None, ac_charge_loop_res, @@ -1798,7 +1798,7 @@ async def process_message( ResponseCode.FAILED, ) return - + await self.comm_session.evse_controller.send_display_params() dc_charge_loop_res = await self._build_dc_charge_loop_res( dc_charge_loop_req.meter_info_requested ) diff --git a/iso15118/secc/states/iso15118_2_states.py b/iso15118/secc/states/iso15118_2_states.py index ae5b165a..ced5561f 100644 --- a/iso15118/secc/states/iso15118_2_states.py +++ b/iso15118/secc/states/iso15118_2_states.py @@ -2444,6 +2444,8 @@ async def process_message( ) return + await self.comm_session.evse_controller.send_display_params() + # We don't care about signed meter values from the EVCC, but if you # do, then set receipt_required to True and set the field meter_info evse_controller = self.comm_session.evse_controller diff --git a/tests/shared/messages/test_interface.py b/tests/shared/messages/test_interface.py index 5607f4b0..2805e9d4 100644 --- a/tests/shared/messages/test_interface.py +++ b/tests/shared/messages/test_interface.py @@ -140,6 +140,9 @@ def ready_to_charge(self): async def session_ended(self, _): pass + async def send_display_params(self): + pass + @pytest.fixture def evse_controller_interface():