-
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
Support configurable TxStart and TxStop points #546
Support configurable TxStart and TxStop points #546
Conversation
032fb2c
to
f32452a
Compare
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 think there are some use cases missing that we can support
e10059b
to
03a8f6f
Compare
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.
looks good, I agree with marcs comments, this could probably be addressed
* Now also handling TransactionEvent.conf for Updated (not only Started) * IdToken became optional for TransactionEvent(Started). To be able to support e.g. TxStartPoint EVConnected * Added on_authorized handler to report when an Evse has been authorized. This allows sending of TransactionEvent(Updated) with IdToken * Added trigger_reason as argument to on_charging_state_changed Co-authored-by: marcemmers <[email protected]> Signed-off-by: Piet Gömpel <[email protected]> Signed-off-by: pietfried <[email protected]>
…rom valuesList Signed-off-by: pietfried <[email protected]>
03a8f6f
to
a95e494
Compare
* Stopping transactions if running on multiple evses in case status is not Accepted Signed-off-by: pietfried <[email protected]>
lib/ocpp/v201/charge_point.cpp
Outdated
} else { | ||
// add every evse_id with active transaction and given token | ||
for (const auto& [evse_id, evse] : this->evses) { | ||
if (evse->get_transaction() != nullptr and evse->get_transaction()->id_token.has_value()) { |
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.
Nit: get the transaction just once and then use that temporary variable.
Signed-off-by: pietfried <[email protected]>
Changes to be able to support configurable TxStart and TxStop points: * Now also handling TransactionEvent.conf for Updated (not only Started) * IdToken became optional for TransactionEvent(Started). To be able to support e.g. TxStartPoint EVConnected * Added on_authorized handler to report when an Evse has been authorized. This allows sending of TransactionEvent(Updated) with IdToken * Added trigger_reason as argument to on_charging_state_changed * make TxStartPoint and TxStopPoint RW and remove ParkingBayOccupancy from valuesList --------- Signed-off-by: Piet Gömpel <[email protected]> Signed-off-by: pietfried <[email protected]> Co-authored-by: marcemmers <[email protected]>
Describe your changes
Changes to be able to support configurable TxStart and TxStop points.
This PR does not implement handling for configurable TxStart and TxStop points within libocpp, but it allows the consumer application to implement this by calling on_transaction_started and on_transaction_finished at the specified TxStart and TxStop points.
Issue ticket number and link
The companion PR in everest-core: EVerest/everest-core#611 . The actual support for configurable TxStart and TxStop points is implemented there. The transaction_handler.hpp could be moved to libocpp at a later stage, to have support actual for configurable TxStart and TxStop points within libocpp.
Checklist before requesting a review