Callback wrapper to handle a DoIP message type at its reception.
More...
#include <message_handler.h>
Callback wrapper to handle a DoIP message type at its reception.
◆ 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] | request | Request to be handled |
[out] | response | Response 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.