Commit 07368e3 1 parent 49f3df9 commit 07368e3 Copy full SHA for 07368e3
File tree 3 files changed +7
-1
lines changed
3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,7 @@ enum class IdentifierType {
372
372
};
373
373
374
374
struct SessionCostMessage {
375
+ std::optional<std::string> ocpp_transaction_id;
375
376
std::optional<std::string> identifier_id;
376
377
std::optional<IdentifierType> identifier_type;
377
378
std::vector<DisplayMessageContent> message;
Original file line number Diff line number Diff line change @@ -3136,6 +3136,10 @@ DataTransferResponse ChargePointImpl::handle_set_user_price(const std::optional<
3136
3136
} else {
3137
3137
identifier_id = t->get_session_id ();
3138
3138
identifier_type = IdentifierType::SessionId;
3139
+ const std::optional<int32_t > transaction_id = t->get_transaction_id ();
3140
+ if (transaction_id != std::nullopt) {
3141
+ session_cost_message.ocpp_transaction_id = std::to_string (transaction_id.value ());
3142
+ }
3139
3143
}
3140
3144
3141
3145
session_cost_message.identifier_id = identifier_id;
@@ -3153,7 +3157,7 @@ DataTransferResponse ChargePointImpl::handle_set_user_price(const std::optional<
3153
3157
data.at (" priceTextExtra" ).is_array ()) {
3154
3158
for (const json& j : data.at (" priceTextExtra" )) {
3155
3159
DisplayMessageContent message;
3156
- message. message = j;
3160
+ message = j;
3157
3161
3158
3162
messages.push_back (message);
3159
3163
}
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ void TariffAndCost::handle_cost_and_tariff(const TransactionEventResponse& respo
55
55
this ->session_cost_message_callback != nullptr ) {
56
56
SessionCostMessage session_cost_message;
57
57
session_cost_message.message = cost_messages;
58
+ session_cost_message.ocpp_transaction_id = original_message.transactionInfo .transactionId ;
58
59
session_cost_message.identifier_id = original_message.transactionInfo .transactionId ;
59
60
session_cost_message.identifier_type = IdentifierType::TransactionId;
60
61
this ->session_cost_message_callback .value ()({session_cost_message});
You can’t perform that action at this time.
0 commit comments