-
Notifications
You must be signed in to change notification settings - Fork 57
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
EV369: Message queue buffering #284
EV369: Message queue buffering #284
Conversation
…nt dropping non-transactional; tests - Extract MessageQueue config into dedicated struct - add parameters for limiting queue size and Queueing all message types - add check for message sizes and removal logic - restructure unit tests (common executuable) Signed-off-by: Fabian Klemm <[email protected]>
Signed-off-by: Fabian Klemm <[email protected]>
Signed-off-by: Fabian Klemm <[email protected]>
Signed-off-by: Fabian Klemm <[email protected]>
Signed-off-by: Fabian Klemm <[email protected]>
Signed-off-by: Fabian Klemm <[email protected]>
lib/ocpp/v16/charge_point_impl.cpp
Outdated
[this](json message) -> bool { return this->websocket->send(message.dump()); }, | ||
MessageQueueConfig{this->configuration->getTransactionMessageAttempts(), | ||
this->configuration->getTransactionMessageRetryInterval(), | ||
this->configuration->getMessageQueueSizeThreshold().value_or(2E5), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2E5 should probably be defined in a constant
lib/ocpp/v201/charge_point.cpp
Outdated
this->device_model->get_value<int>(ControllerComponentVariables::MessageAttempts), | ||
this->device_model->get_value<int>(ControllerComponentVariables::MessageAttemptInterval), | ||
this->device_model->get_optional_value<int>(ControllerComponentVariables::MessageQueueSizeThreshold) | ||
.value_or(2E5), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reuse the (to be added) constant from ocpp 1.6 charge point
@@ -0,0 +1,362 @@ | |||
#include <gmock/gmock.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing the license header
#include <gmock/gmock.h> | |
// SPDX-License-Identifier: Apache-2.0 | |
// Copyright 2020 - 2023 Pionix GmbH and Contributors to EVerest | |
#include <gmock/gmock.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is also missing its license header
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 - 2023 Pionix GmbH and Contributors to EVerest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 just a few small things
Signed-off-by: Fabian Klemm <[email protected]>
Signed-off-by: Fabian Klemm <[email protected]>
* MessageQueue: add config struct; add parameters for queueing; implement dropping non-transactional; tests - Extract MessageQueue config into dedicated struct - add parameters for limiting queue size and Queueing all message types - add check for message sizes and removal logic - restructure unit tests (common executuable) * add v201 config var for queue size threshold * add queue config parameters * remove temporary tests * add missing test resources * clang format * add missing constants; add missing headers Signed-off-by: Fabian Klemm <[email protected]>
First PR addressing EV-369 to control the message buffer (addresses the "QueueAllMessages" configuration in OCPP 2.0.1.)
Implemented features:
Missing: This PR yet misses the capability to drop intermediate transaction events (in a follow-up PR)
Implementation details: