Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
map.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <memory>
5#include <string>
6
11
12/*
13 * Map of adapters, with the key being the type of the adapter and the value being a lambda function
14 * that creates the adapter
15 */
16const std::map<std::string, std::function<std::shared_ptr<Adapter>(std::shared_ptr<SENode>)>,
17 std::less<>>
18 adapter_map = {{"fsds",
19 [](std::shared_ptr<SENode> se_node) -> std::shared_ptr<Adapter> {
20 return std::make_shared<FsdsAdapter>(se_node);
21 }},
22 {"eufs",
23 [](std::shared_ptr<SENode> se_node) -> std::shared_ptr<Adapter> {
24 return std::make_shared<EufsAdapter>(se_node);
25 }},
26 {"pacsim",
27 [](std::shared_ptr<SENode> se_node) -> std::shared_ptr<Adapter> {
28 return std::make_shared<PacsimAdapter>(se_node);
29 }},
30 {"vehicle", [](std::shared_ptr<SENode> se_node) -> std::shared_ptr<Adapter> {
31 return std::make_shared<VehicleAdapter>(se_node);
32 }}};
const std::map< std::string, std::function< std::shared_ptr< ControlNode >(const ControlParameters &)>, std::less<> > adapter_map
Definition map.hpp:18