Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::kernel::KernelConfig Class Referencefinal

Holds the kernel configuration information. More...

#include <kernel_config.h>

Classes

struct  ComponentPluginToLoad
 Information about a component to load from a plugin. More...
struct  ComponentToLoad
 Information about a component to load. More...
struct  ObjectConfig
 Information about how to create an object. More...
struct  PipelineToLoad
 Information about how to create a pipeline. More...

Public Member Functions

 KernelConfig ()=default
 ~KernelConfig () noexcept=default
void setParams (KernelParams params) noexcept
 Sets general parameters.
const KernelParams & getParams () const noexcept
 Gets the behavior of the kernel when calling run. By default it is blockUntilDone.
void addToLoad (ComponentPluginToLoad plugin)
 Adds a plugin to be loaded by the kernel upon startup. Overrides previous parameters in case of repeated plugins.
void addToLoad (ComponentToLoad component)
 Adds a component to be loaded by the kernel upon startup. Overrides previous parameters in case of repeated plugins.
void addToLoad (PipelineToLoad pipeline)
 Adds a pipeline to be loaded by the kernel upon startup. Overrides previous parameters in case of repeated plugins.
const std::vector< ComponentPluginToLoad > & getPluginsToLoad () const noexcept
 The components to be loaded from plugins on startup.
const std::vector< ComponentToLoad > & getComponentsToLoad () const noexcept
 The in-memory components to be loaded on startup.
const std::vector< PipelineToLoad > & getPipelinesToLoad () const noexcept
 The pipelines to be loaded on startup.
void setConfigFilePath (const std::filesystem::path &path) noexcept
 Sets the path to the configuration file's path used to construct the kernel.
std::filesystem::path getConfigFilePath () const noexcept
 Gets the path to the configuration file used to construct the kernel.

Detailed Description

Holds the kernel configuration information.


Class Documentation

◆ sen::kernel::KernelConfig::ComponentPluginToLoad

struct sen::kernel::KernelConfig::ComponentPluginToLoad

Information about a component to load from a plugin.

Class Members
const string path Path to the shared object.
ComponentConfig config Component configuration parameters.
VarMap params Dynamic user-defined parameters.

◆ sen::kernel::KernelConfig::ComponentToLoad

struct sen::kernel::KernelConfig::ComponentToLoad

Information about a component to load.

Class Members
ComponentContext component Component instance.
ComponentConfig config Component configuration parameters.
VarMap params Dynamic user-defined parameters.

◆ sen::kernel::KernelConfig::ObjectConfig

struct sen::kernel::KernelConfig::ObjectConfig

Information about how to create an object.

Class Members
string name The unique name of the object (process-wide).
string className The name of its class.
BusAddress bus The bus where to publish it, if any.
VarMap params Dynamic user-defined parameters.

◆ sen::kernel::KernelConfig::PipelineToLoad

struct sen::kernel::KernelConfig::PipelineToLoad

Information about how to create a pipeline.

Class Members
string name
ComponentConfig config The name of the pipeline.
StringList imports Config data (of the owning component).
vector< ObjectConfig > objects Libraries to import.
Duration period Objects to create.
VarMap params Time between updates (0 for event-triggered execution).

Constructor & Destructor Documentation

◆ KernelConfig()

sen::kernel::KernelConfig::KernelConfig ( )
default

◆ ~KernelConfig()

sen::kernel::KernelConfig::~KernelConfig ( )
defaultnoexcept

Member Function Documentation

◆ setParams()

void sen::kernel::KernelConfig::setParams ( KernelParams params)
noexcept

Sets general parameters.

◆ getParams()

const KernelParams & sen::kernel::KernelConfig::getParams ( ) const
nodiscardnoexcept

Gets the behavior of the kernel when calling run. By default it is blockUntilDone.

◆ addToLoad() [1/3]

void sen::kernel::KernelConfig::addToLoad ( ComponentPluginToLoad plugin)

Adds a plugin to be loaded by the kernel upon startup. Overrides previous parameters in case of repeated plugins.

◆ addToLoad() [2/3]

void sen::kernel::KernelConfig::addToLoad ( ComponentToLoad component)

Adds a component to be loaded by the kernel upon startup. Overrides previous parameters in case of repeated plugins.

◆ addToLoad() [3/3]

void sen::kernel::KernelConfig::addToLoad ( PipelineToLoad pipeline)

Adds a pipeline to be loaded by the kernel upon startup. Overrides previous parameters in case of repeated plugins.

◆ getPluginsToLoad()

const std::vector< ComponentPluginToLoad > & sen::kernel::KernelConfig::getPluginsToLoad ( ) const
nodiscardnoexcept

The components to be loaded from plugins on startup.

◆ getComponentsToLoad()

const std::vector< ComponentToLoad > & sen::kernel::KernelConfig::getComponentsToLoad ( ) const
nodiscardnoexcept

The in-memory components to be loaded on startup.

◆ getPipelinesToLoad()

const std::vector< PipelineToLoad > & sen::kernel::KernelConfig::getPipelinesToLoad ( ) const
nodiscardnoexcept

The pipelines to be loaded on startup.

◆ setConfigFilePath()

void sen::kernel::KernelConfig::setConfigFilePath ( const std::filesystem::path & path)
inlinenoexcept

Sets the path to the configuration file's path used to construct the kernel.

◆ getConfigFilePath()

std::filesystem::path sen::kernel::KernelConfig::getConfigFilePath ( ) const
inlinenodiscardnoexcept

Gets the path to the configuration file used to construct the kernel.


The documentation for this class was generated from the following file: