1#ifndef DOIP_CONTROLLER_H
2#define DOIP_CONTROLLER_H
5#include "./announcement_timer.h"
6#include "./controller_config.h"
7#include "./message_handler.h"
15 const std::size_t cPayloadTypeOffset{2};
19 std::map<PayloadType, MessageHandler *> mHandlers;
21 void CreateGenericNack(
22 GenericNackType nackCode, std::vector<uint8_t> &response)
const;
40 const std::vector<uint8_t> &request,
41 std::vector<uint8_t> &response)
const;
A timer to announce the vehicle for a specific timer with a specific delay in between.
Definition: announcement_timer.h:12
DoIP controller to route and handle DoIP messages.
Definition: doip_controller.h:13
bool TryHandle(const std::vector< uint8_t > &request, std::vector< uint8_t > &response) const
Try to handle a DoIP request.
void Register(PayloadType payloadType, MessageHandler *messageHandler)
Register a message handler to manage a specific payload type.
void StartAnnoucement(std::function< void()> &&callback)
(Re)start initial vehicle announcement
DoipController(ControllerConfig &&configuration)
Constructor.
Callback wrapper to handle a DoIP message type at its reception.
Definition: message_handler.h:10
DoIP controller configuration data structure.
Definition: controller_config.h:11