2021-10-27 21:56:21 +00:00
|
|
|
#ifndef LINK_LAYER_HPP_FGEK0QTH
|
|
|
|
#define LINK_LAYER_HPP_FGEK0QTH
|
|
|
|
|
|
|
|
#include "autoware_v2x/ethernet_device.hpp"
|
|
|
|
#include <vanetza/access/interface.hpp>
|
|
|
|
#include <vanetza/net/cohesive_packet.hpp>
|
|
|
|
#include <vanetza/net/ethernet_header.hpp>
|
|
|
|
#include <boost/asio/io_service.hpp>
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class LinkLayerIndication
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
using IndicationCallback = std::function<void(vanetza::CohesivePacket&&, const vanetza::EthernetHeader&)>;
|
|
|
|
|
|
|
|
virtual void indicate(IndicationCallback) = 0;
|
|
|
|
virtual ~LinkLayerIndication() = default;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LinkLayer : public vanetza::access::Interface, public LinkLayerIndication
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
std::unique_ptr<LinkLayer>
|
2024-09-04 15:18:20 +00:00
|
|
|
create_link_layer(boost::asio::io_service&, const EthernetDevice&, const std::string&, const std::string&);
|
2021-10-27 21:56:21 +00:00
|
|
|
|
|
|
|
#endif /* LINK_LAYER_HPP_FGEK0QTH */
|