$darkmode
nop_simulator.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2020 Robert Bosch GmbH
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * SPDX-License-Identifier: Apache-2.0
17  */
23 #pragma once
24 
25 #include <string> // for string
26 #include <vector> // for vector
27 
28 #include <cloe/simulator.hpp> // for Simulator, SimulatorFactory, ...
29 
30 namespace cloe::plugins {
31 
33  std::vector<std::string> vehicles{"default"};
34 
35  CONFABLE_SCHEMA(NopSimulatorConfiguration) {
36  return Schema{
37  {"vehicles", Schema(&vehicles, "list of vehicle names to make available")},
38  };
39  }
40 
41  void to_json(Json& j) const override {
42  j = Json{
43  {"vehicles", vehicles},
44  };
45  }
46 };
47 
48 DEFINE_SIMULATOR_FACTORY(NopSimulatorFactory, NopSimulatorConfiguration, "nop",
49  "stand-in no-operation simulator")
50 
51 } // namespace cloe::plugins
Definition: confable.hpp:98
Json to_json() const
Definition: confable.cpp:78
Definition: schema.hpp:173
#define DEFINE_SIMULATOR_FACTORY(xFactoryType, xConfigType, xName, xDescription)
Definition: simulator.hpp:48
Definition: nop_simulator.hpp:32