Skip to content

Commit

Permalink
Implemented missing handle_message in display message functional block (
Browse files Browse the repository at this point in the history
#956)

Signed-off-by: Piet Gömpel <[email protected]>
  • Loading branch information
Pietfried authored Jan 28, 2025
1 parent 828ce61 commit ab89f47
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/ocpp/v201/functional_blocks/display_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ DisplayMessageBlock::DisplayMessageBlock(MessageDispatcherInterface<MessageType>
}

void DisplayMessageBlock::handle_message(const ocpp::EnhancedMessage<MessageType>& message) {
const auto& json_message = message.message;
switch (message.messageType) {
case MessageType::GetDisplayMessages:
this->handle_get_display_message(json_message);
break;
case MessageType::SetDisplayMessage:
this->handle_set_display_message(json_message);
break;
case MessageType::ClearDisplayMessage:
this->handle_clear_display_message(json_message);
break;
default:
throw MessageTypeNotImplementedException(message.messageType);
}
}

void DisplayMessageBlock::handle_get_display_message(const Call<GetDisplayMessagesRequest> call) {
Expand Down

0 comments on commit ab89f47

Please sign in to comment.