INFM HIL Interface
Interface between Artery simulation and DuTs
ConnectorConfig.h
1
26#ifndef SIM_TO_DUT_INTERFACE_CONNECTORCONFIG_H
27#define SIM_TO_DUT_INTERFACE_CONNECTORCONFIG_H
28
29#include <set>
30#include <map>
31#include <string>
32#include <stdexcept>
33
44 public:
45 explicit ConnectorConfig(std::set<std::string> operations, std::map<std::string, int> periodicOperations = {},
46 bool periodicTimerEnabled = false)
49 if (this->operations.empty()) {
50 throw std::invalid_argument("Set of operations cannot be empty");
51 }
52 for (const auto &periodicOperation: this->periodicOperations) {
53 if (this->operations.find(periodicOperation.first) == this->operations.end()) {
54 throw std::invalid_argument("Periodic operation not found in operations");
55 };
56 }
57 };
58
60 virtual ~ConnectorConfig() = default;
61
63 std::set<std::string> operations{};
64
66 std::map<std::string, int> periodicOperations{};
67
70 };
71}
72
73
74#endif //SIM_TO_DUT_INTERFACE_CONNECTORCONFIG_H
Configuration for a single DuTConnector
Definition: ConnectorConfig.h:43
std::map< std::string, int > periodicOperations
Definition: ConnectorConfig.h:66
std::set< std::string > operations
Definition: ConnectorConfig.h:63
bool periodicTimerEnabled
Definition: ConnectorConfig.h:69
Definition: CANConnector.cpp:29