8#ifndef SEN_KERNEL_BOOTLOADER_H
9#define SEN_KERNEL_BOOTLOADER_H
34 const std::filesystem::path& path,
35 bool printFinalConfig =
false);
40 SEN_NOCOPY_NOMOVE(Bootloader)
44 static std::unique_ptr<Bootloader>
fromYamlFile(
const std::filesystem::path& path,
bool printConfig);
47 static std::unique_ptr<Bootloader>
fromYamlString(
const std::string& config,
bool printConfig);
59 void loadConfigFromString(const
std::
string& content, const
std::filesystem::path& path,
bool printFinalConfig);
61 void loadConfigFromFile(const
std::filesystem::path& path,
bool printFinalConfig);
63 void loadKernelConfig(const
VarMap& data);
65 void loadComponents(const
VarMap& data);
67 void loadPipelines(const
VarMap& data);
69 void component(
std::string_view path, const
Var& data);
71 void pipeline(
std::string_view name, const
Var& data);
73 static
void fetchPipelineObjects(
KernelConfig::PipelineToLoad& pipelineConfig, const
VarMap& map);
75 static
void fetchPipelineComponentConfig(
KernelConfig::PipelineToLoad& pipelineConfig, const
Var& data);
77 static
void fetchPipelineExecPeriod(
KernelConfig::PipelineToLoad& pipelineConfig, const
VarMap& map);
79 static
void fetchPipelineUserDefinedParams(
KernelConfig::PipelineToLoad& pipelineConfig, const
VarMap& map);
Here we define a set of template meta-programming helpers to let the compiler take some decisions bas...
static std::unique_ptr< Bootloader > fromYamlString(const std::string &config, bool printConfig)
Reads the configuration from a string in YAML format.
static std::unique_ptr< Bootloader > fromYamlFile(const std::filesystem::path &path, bool printConfig)
Opens a YAML configuration file and stores it in a KernelConfig structure.
KernelConfig & getConfig() noexcept
The loaded configuration info.
Holds the kernel configuration information.
Definition kernel_config.h:33
VarMap getConfigAsVarFromYaml(const std::filesystem::path &path, bool printFinalConfig=false)
Loads a configuration YAML file and returns its contents as a sen::VarMap. This function does not val...
std::map< std::string, Var, std::less<> > VarMap
A map of vars to represent structures.
Definition var.h:107
Strong type for the unique identifier for a transport timer.
Definition native_object_impl.h:39
Can hold any supported value type. Wraps std::variant to allow recursion and implements some helpers.
Definition var.h:119