Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share display params with CS. #401

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions iso15118/secc/controller/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions iso15118/secc/controller/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
logger.info("Send display params to CS.")
2 changes: 1 addition & 1 deletion iso15118/secc/states/din_spec_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions iso15118/secc/states/iso15118_20_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
)
Expand Down
2 changes: 2 additions & 0 deletions iso15118/secc/states/iso15118_2_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions tests/shared/messages/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down