Woman, Life, Freedom


DoIP Library
Diagnostics over Internet Protocol (DoIP) C++ library
DoipLib::MessageHandler Class Referenceabstract

Callback wrapper to handle a DoIP message type at its reception. More...

#include <message_handler.h>

Public Member Functions

virtual MessageGetMessage ()=0
 Get an instance of the message for request handling. More...
 
virtual bool TryHandle (const Message *request, std::vector< uint8_t > &response) const =0
 Try to handle a request. More...
 

Detailed Description

Callback wrapper to handle a DoIP message type at its reception.

Member Function Documentation

◆ GetMessage()

virtual Message * DoipLib::MessageHandler::GetMessage ( )
pure virtual

Get an instance of the message for request handling.

Returns
Message instance that request byte vector is mapped into

◆ TryHandle()

virtual bool DoipLib::MessageHandler::TryHandle ( const Message request,
std::vector< uint8_t > &  response 
) const
pure virtual

Try to handle a request.

Parameters
[in]requestRequest to be handled
[out]responseResponse byte vector
Returns
True if the request is handled correctly, otherwise false
Note
In case of incorrect request handling, the passed response vector will be untouched.