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

Removing state that ties a ChargePoint instance to a specific connected CP #1

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ben-garrett-ev-energy
Copy link
Collaborator

We want to be able to use the message parsing/creation and the @on annotations of the ocpp library, but we don't want to have ChargePoint objects tied to a specific connection - we want them to be stateless and able to handle messages for any connected CPs in a parallel architecture.

from abc import abstractmethod


class AsyncMessageHandler(ABC):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everyone loves their interfaces now! 😄

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exposure to Go is paying off!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go does not get the credit there I'm afraid ;)

@ben-garrett-ev-energy
Copy link
Collaborator Author

Looking at the changes here I think we could potentially make a subclass of ChargePoint that does what we want and then be able to use the ocpp library as-is (rather than include a forked version just for the kafka stuff), I will investigate further.

@thm35
Copy link

thm35 commented Oct 1, 2024

@ben-garrett-ev-energy please close this

@alexmclarty
Copy link

Agree @thm35, solid. 👯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants