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

K01 ChargePoint refactorings #831

Conversation

gberardi-pillar
Copy link
Contributor

This feature branch includes work that updates the ChargePoint constructor to take references instead of shared pointers as parameters, as well as provides a MessageQueueInterface to allow for the creation of a MessageQueueMock, which will make it possible to run tests faster as well as write and maintain tests more easily.

Checklist before requesting a review

DeviceModel and DatabaseHandler were being passed as smart pointers
but there is no need for SmartChargingHandler to manage the lifetime
of those objects. Instead we pass them as reference to communicate
clearly the intent.

Signed-off-by: Gianfranco Berardi <[email protected]>
By providing and using a MessageQueueInterface
the tests can now use a mock to avoid the cost
of the real message queue's initialization,
allowing tests to run faster and for tests to
be easier to write and maintain.

Signed-off-by: Gianfranco Berardi <[email protected]>
@gberardi-pillar gberardi-pillar force-pushed the feature/k01_chargepoint_refactor_continued branch from 558deb8 to b72a6f6 Compare October 11, 2024 18:06
Copy link

@shankari shankari left a comment

Choose a reason for hiding this comment

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

Again, a few high-level questions, for the record, that should be easy to answer.

include/ocpp/common/message_queue.hpp Show resolved Hide resolved
include/ocpp/common/message_queue.hpp Show resolved Hide resolved
include/ocpp/common/message_queue.hpp Show resolved Hide resolved
@hikinggrass
Copy link
Contributor

Closed in favor of #849 which will refactor the message dispatching. We will include parts of this PR either there or in another PR

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.

4 participants