25#ifndef SIM_TO_DUT_INTERFACE_SIMTODUTINTERFACE_H
26#define SIM_TO_DUT_INTERFACE_SIMTODUTINTERFACE_H
28#include "DuT_Connectors/DuTConnector.h"
29#include "Sim_Communication/SimComHandler.h"
58 void addConnector(std::shared_ptr<dut_connector::DuTConnector> duTConnector);
92 std::shared_ptr<SharedQueue<SimEvent>> queueDuTToSim;
93 std::shared_ptr<SharedQueue<SimEvent>> queueSimToInterface;
95 std::list<std::shared_ptr<dut_connector::DuTConnector>> duTConnectors;
96 std::thread threadSimToInterface;
97 std::thread threadDuTToSim;
98 bool stopThreads =
true;
100 void sendEventToConnector(
const SimEvent &event);
102 void handleEventsFromSim();
104 void handleEventsFromDuT();
Handler between interface and simulation. Responsible for sending/receiving SimEvents to/from the sim...
Definition: SimComHandler.h:46
Event object used to communicate between simulation and DuTs.
Definition: SimEvent.h:47
An interface between a simulation and multiple DuT devices.
Definition: SimToDuTInterface.h:42
void run()
Definition: SimToDuTInterface.cpp:52
~SimToDuTInterface()
Definition: SimToDuTInterface.cpp:89
void addConnector(std::shared_ptr< dut_connector::DuTConnector > duTConnector)
Definition: SimToDuTInterface.cpp:33
SimToDuTInterface()
Definition: SimToDuTInterface.cpp:28
std::shared_ptr< SharedQueue< SimEvent > > getQueueDuTToSim()
Definition: SimToDuTInterface.cpp:57
friend std::ostream & operator<<(std::ostream &os, const SimToDuTInterface &interface)
Definition: SimToDuTInterface.cpp:43
void setSimComHandler(SimComHandler *simComHandler)
Definition: SimToDuTInterface.cpp:85
std::shared_ptr< SharedQueue< SimEvent > > getQueueSimToInterface()
Definition: SimToDuTInterface.cpp:61
Definition: CANConnector.cpp:29