AutowareV2X/include/autoware_v2x/link_layer.hpp

29 lines
817 B
C++
Raw Permalink Normal View History

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>
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 */