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

cache network connection profiles #778

Merged
merged 9 commits into from
Sep 12, 2024
Merged

cache network connection profiles #778

merged 9 commits into from
Sep 12, 2024

Conversation

SNSubramanya
Copy link
Contributor

@SNSubramanya SNSubramanya commented Sep 9, 2024

Describe your changes

Issue ticket number and link

Checklist before requesting a review

@@ -111,6 +112,8 @@ class ConnectivityManager {
bool send_to_websocket(const std::string& message);

private:
/// @brief Local cached network connection profiles
std::vector<SetNetworkProfileRequest> network_connection_profiles;
Copy link
Contributor

Choose a reason for hiding this comment

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

We put the private variable at the top of the class ;)

@@ -133,6 +130,9 @@ void ConnectivityManager::init_websocket() {
EVLOG_AND_THROW(std::runtime_error("ChargePointId must not contain \':\'"));
}

// cache the network profiles on initialization
cache_network_connection_profiles();

const auto network_connection_priorities = ocpp::get_vector_from_csv(
Copy link
Contributor

Choose a reason for hiding this comment

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

The network configuration priority should also be part of this caching I assume?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah... yes..

void ConnectivityManager::cache_network_connection_profiles() {

if (!this->network_connection_profiles.empty()) {
EVLOG_info << " Network connection profiles already cached";
Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove this print, does not tell anybody anything useful IMHO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll make it debug

@marcemmers marcemmers self-assigned this Sep 11, 2024
@SNSubramanya SNSubramanya force-pushed the 754-cache-ncp branch 2 times, most recently from f670d3e to 500971c Compare September 11, 2024 15:11
@SNSubramanya SNSubramanya force-pushed the 754-cache-ncp branch 2 times, most recently from 81e67f7 to 623250e Compare September 12, 2024 09:15
@SNSubramanya SNSubramanya merged commit affafb7 into main Sep 12, 2024
3 of 4 checks passed
@SNSubramanya SNSubramanya deleted the 754-cache-ncp branch September 12, 2024 12:42
couryrr-afs pushed a commit to US-JOET/libocpp that referenced this pull request Sep 13, 2024
added a function to cache network connection profiles and priorities
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.

Improve handling of B10 and B09 remark 9 by 'caching' the network connection profiles on boot
2 participants