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

Transaction functional block. #972

Conversation

maaikez
Copy link
Contributor

@maaikez maaikez commented Jan 30, 2025

Describe your changes

Move transaction related functions (handlers and callbacks) to transaction functional block.

Note: this pull request will merge to a temporary branch where all previous functional blocks are combined, because those are all in pull request still and otherwise I could not continue. But once they are all merged, I will merge this pull request to main.

Issue ticket number and link

#971

Checklist before requesting a review

  • I have performed a self-review of my code
  • [n/a] I have made corresponding changes to the documentation
  • [n/a] If OCPP 2.0.1: I have updated the OCPP 2.0.1 status document
  • I read the contribution documentation and made sure that my changes meet its requirements

Comment on lines +89 to +97
TransactionBlock(MessageDispatcherInterface<MessageType>& message_dispatcher, DeviceModel& device_model,
ConnectivityManagerInterface& connectivity_manager, EvseManagerInterface& evse_manager,
MessageQueue<v201::MessageType>& message_queue, DatabaseHandlerInterface& database_handler,
AuthorizationInterface& authorization, AvailabilityInterface& availability,
SmartChargingInterface& smart_charging, TariffAndCostInterface& tariff_and_cost,
StopTransactionCallback stop_transaction_callback, PauseChargingCallback pause_charging_callback,
std::optional<TransactionEventCallback> transaction_event_callback,
std::optional<TransactionEventResponseCallback> transaction_event_response_callback,
ResetCallback reset_callback);
Copy link
Contributor

Choose a reason for hiding this comment

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

For now I think these large ctors (like in the other PRs) are ok, but we should probably try to reduce the number of arguments by grouping (at least) some of the callbacks into a struct

@Pietfried Pietfried self-assigned this Feb 13, 2025
@maaikez maaikez force-pushed the feature/move-transaction-callbacks-and-handlers-to-functional-block branch from 3353916 to 30ea474 Compare February 17, 2025 09:51
@maaikez maaikez changed the base branch from feature/temp-combine-functional-blocks to main February 17, 2025 09:51
@maaikez maaikez force-pushed the feature/move-transaction-callbacks-and-handlers-to-functional-block branch from 30ea474 to 7165b05 Compare February 17, 2025 10:01
Signed-off-by: Maaike Zijderveld, iolar <git.mail@iolar.nl>
@maaikez maaikez force-pushed the feature/move-transaction-callbacks-and-handlers-to-functional-block branch from 7165b05 to 6349a4b Compare February 17, 2025 10:02
@maaikez maaikez merged commit 88a3df9 into main Feb 17, 2025
7 of 8 checks passed
@maaikez maaikez deleted the feature/move-transaction-callbacks-and-handlers-to-functional-block branch February 17, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move 'Transaction' callbacks and handlers to functional block
3 participants