DoIP controller to route and handle DoIP messages.
More...
#include <doip_controller.h>
DoIP controller to route and handle DoIP messages.
◆ DoipController()
Constructor.
- Parameters
-
configuration | Controller configurtation |
◆ Register()
void DoipLib::DoipController::Register |
( |
PayloadType |
payloadType, |
|
|
MessageHandler * |
messageHandler |
|
) |
| |
Register a message handler to manage a specific payload type.
- Parameters
-
payloadType | Payload type to be managed via the handler |
messageHandler | Handler to manage the messages with a specific payload type |
◆ StartAnnoucement()
void DoipLib::DoipController::StartAnnoucement |
( |
std::function< void()> && |
callback | ) |
|
(Re)start initial vehicle announcement
- Parameters
-
callback | Delegate to be invoked at each annoucement tick |
- Note
- The function will block until the announcement process starts.
◆ TryHandle()
bool DoipLib::DoipController::TryHandle |
( |
const std::vector< uint8_t > & |
request, |
|
|
std::vector< uint8_t > & |
response |
|
) |
| const |
Try to handle a DoIP request.
- Parameters
-
[in] | request | DoIP request byte vector |
[out] | response | DoIP 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.