$darkmode
#include <minimator.hpp>
Public Member Functions | |
| CONFABLE_SCHEMA (MinimatorConfiguration) | |
Public Member Functions inherited from fable::Confable | |
| Confable (const Confable &) noexcept | |
| Confable (Confable &&) noexcept=default | |
| Confable & | operator= (const Confable &other) noexcept |
| Confable & | operator= (Confable &&other) noexcept |
| virtual void | reset_schema () |
| Schema & | schema () |
| const Schema & | schema () const |
| virtual void | validate_or_throw (const Conf &c) const |
| virtual bool | validate (const Conf &c, std::optional< SchemaError > &err) const |
| virtual void | from_conf (const Conf &c) |
| virtual void | to_json (Json &j) const |
| Json | to_json () const |
Public Attributes | |
| std::map< std::string, SensorMockupConfig > | vehicles |
Additional Inherited Members | |
Protected Member Functions inherited from fable::Confable | |
| virtual Schema | schema_impl () |
MinimatorConfiguration is what we use to configure Minimator from some JSON input.
The Cloe runtime takes care of reading the configuration from the stack file and passing it to the MinimatorFactory, which can then pass it to Minimator during construction.
So, the input will be deserialized from /simulators/N/args, where N is some entry in the simulators object:
{
"version": "4",
"simulators": [
{
"binding": "minimator"
"args": {
"vehicles": [
"ego1",
"ego2"
]
}
}
]
}
Since our minimalistic simulator doesn't do much yet, our configuration is quite simple: a number of names which will each become a vehicle.