-
Notifications
You must be signed in to change notification settings - Fork 48
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
Conversation
5d42967
to
02bd7ab
Compare
@@ -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; |
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.
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( |
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.
The network configuration priority should also be part of this caching I assume?
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.
Ah... yes..
void ConnectivityManager::cache_network_connection_profiles() { | ||
|
||
if (!this->network_connection_profiles.empty()) { | ||
EVLOG_info << " Network connection profiles already cached"; |
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.
I would remove this print, does not tell anybody anything useful IMHO.
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.
i'll make it debug
f670d3e
to
500971c
Compare
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
81e67f7
to
623250e
Compare
Signed-off-by: Soumya Subramanya <[email protected]>
623250e
to
642d46b
Compare
added a function to cache network connection profiles and priorities
Describe your changes
Issue ticket number and link
Checklist before requesting a review