28#ifndef SIM_TO_DUT_INTERFACE_V2XCONNECTOR_H
29#define SIM_TO_DUT_INTERFACE_V2XCONNECTOR_H
31#include "../DuTConnector.h"
34#include "V2XConnectorConfig.h"
82 void receiveCallback(
const std::vector<unsigned char> &msg);
95 void onReceive(
const boost::system::error_code &ec, std::size_t read_bytes);
103 static int getIfnameIndex(
const std::string &ifname);
108 boost::asio::io_service ioService;
113 boost::asio::generic::raw_protocol::socket _socket;
118 std::vector<unsigned char> receiveBuffer;
123 boost::asio::generic::raw_protocol::endpoint receiveEndpoint;
128 std::thread sockRunner;
133 unsigned short ethernetFrameType;
A thread save shared queue to communicate between multiple threads. The queue is a FIFO queue.
Definition: SharedQueue.h:40
Event object used to communicate between simulation and DuTs.
Definition: SimEvent.h:47
Some basic information about the connector device.
Definition: ConnectorInfo.h:37
Connector implementing all kinds of DuT devices.
Definition: DuTConnector.h:48
Configuration for the V2XConnector, contains all necessary setup configuration to open a raw socket a...
Definition: V2XConnectorConfig.h:40
Connector to a V2X network interface, opens a raw socket and passes received packages to simulation
Definition: V2XConnector.h:42
V2XConnector(std::shared_ptr< SharedQueue< SimEvent > > queueDuTToSim, const V2XConnectorConfig &config)
Definition: V2XConnector.cpp:37
~V2XConnector()
Definition: V2XConnector.cpp:77
ConnectorInfo getConnectorInfo() override
Definition: V2XConnector.cpp:122
void handleEventSingle(const SimEvent &e) override
Definition: V2XConnector.cpp:112
Definition: EthernetPacket.cpp:33