Skip to content

Commit

Permalink
review adjustments
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Klemm <[email protected]>
  • Loading branch information
klemmpnx committed Nov 9, 2023
1 parent d11d22a commit a2df450
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ def adjust_ocpp_configuration(config: dict) -> dict:
return OCPPConfigAdjustmentVisitorWrapper(adjust_ocpp_configuration)


class _DefaultOCPP201ConfigurationVisitor(OCPPConfigAdjustmentVisitor):
class _OCPP201NetworkConnectionProfileAdjustment(OCPPConfigAdjustmentVisitor):
""" Adjusts the OCPP 2.0.1 Network Connection Profile by injecting the right host, port and chargepoint id.
This is utilized by the `LibOCPP201ConfigurationHelper`.
"""

def __init__(self, central_system_port: int | str, central_system_host: str):
self._central_system_port = central_system_port
Expand Down Expand Up @@ -106,7 +111,7 @@ class LibOCPP201ConfigurationHelper(LibOCPPConfigurationHelperBase):

def _get_default_visitor(self, central_system_port: int | str,
central_system_host: str) -> OCPPConfigAdjustmentVisitor:
return _DefaultOCPP201ConfigurationVisitor(central_system_port, central_system_host)
return _OCPP201NetworkConnectionProfileAdjustment(central_system_port, central_system_host)

@staticmethod
def create_temporary_ocpp_configuration_db(libocpp_path: Path,
Expand Down

0 comments on commit a2df450

Please sign in to comment.