Skip to content

Commit

Permalink
Rejecting OCPP1.6 reservation for connector#0
Browse files Browse the repository at this point in the history
Signed-off-by: pietfried <[email protected]>
  • Loading branch information
Pietfried committed Jan 31, 2024
1 parent 0ef3047 commit ef7cce2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/OCPP/OCPP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,12 @@ void OCPP::ready() {
this->charge_point->register_reserve_now_callback([this](int32_t reservation_id, int32_t connector,
ocpp::DateTime expiryDate, ocpp::CiString<20> idTag,
std::optional<ocpp::CiString<20>> parent_id) {

if (connector == 0) {
EVLOG_info << "Reservation for connector 0 is not supported";
return ocpp::v16::ReservationStatus::Rejected;
}

types::reservation::Reservation reservation;
reservation.id_token = idTag.get();
reservation.reservation_id = reservation_id;
Expand Down

0 comments on commit ef7cce2

Please sign in to comment.