From: Jérôme Benoit Date: Tue, 11 Jun 2024 18:46:32 +0000 (+0200) Subject: test(ocpp-server): add StatusNotification handler X-Git-Tag: v1.3.7~74 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=65c0600c2ca47b47559d3d9e7bc5e56b272dc615;p=e-mobility-charging-stations-simulator.git test(ocpp-server): add StatusNotification handler Signed-off-by: Jérôme Benoit --- diff --git a/tests/ocpp-server/server.py b/tests/ocpp-server/server.py index e507d4f4..2da30d37 100644 --- a/tests/ocpp-server/server.py +++ b/tests/ocpp-server/server.py @@ -40,6 +40,11 @@ class ChargePoint(ocpp.v201.ChargePoint): logging.info("Received Heartbeat") return ocpp.v201.call_result.Heartbeat(current_time=datetime.now(timezone.utc).isoformat()) + @on(Action.StatusNotification) + async def on_status_notification(self, charging_station, connector_id, status, **kwargs): + logging.info("Received StatusNotification") + return ocpp.v201.call_result.StatusNotification() + # Request handlers to emit OCPP messages. async def send_clear_cache(self): request = ocpp.v201.call.ClearCache()