-
Notifications
You must be signed in to change notification settings - Fork 53
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
J01- Add evseId=0 meter values #191
Conversation
#187 must be merged first to rebase this branch |
lib/ocpp/v201/charge_point.cpp
Outdated
@@ -284,7 +295,18 @@ void ChargePoint::on_session_finished(const int32_t evse_id, const int32_t conne | |||
} | |||
|
|||
void ChargePoint::on_meter_value(const int32_t evse_id, const MeterValue& meter_value) { | |||
this->evses.at(evse_id)->on_meter_value(meter_value); | |||
std::lock_guard<std::mutex> lk(this->meter_value_mutex); |
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.
You only need to lock this in case your writing to this->meter_value
, not the evse because it has its own lock ;)
lib/ocpp/v201/charge_point.cpp
Outdated
EVLOG_debug << "Next meter value will be sent at: " << next_timestamp.value().to_rfc3339(); | ||
this->aligned_meter_values_timer.at( | ||
[this]() { | ||
[this, &transaction_active]() { |
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 don't think this is safe to do because at the time the lambda function will be called the boolean will be out of scope.
4794fc3
to
ebbee47
Compare
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Add a measurerand filter for evseID 0 Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
ebbee47
to
52390f4
Compare
config/v201/config.json
Outdated
"attributes": { | ||
"Actual": 42 | ||
} | ||
{ |
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.
So it seems like you made some more changes here during the rebase than intended ;)
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... sorry i think i made a mistake during the rebasing...
Co-authored-by: marcemmers <[email protected]> Signed-off-by: SNSubramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
No description provided.