Sen API
Sen Libraries
Toggle main menu visibility
Loading...
Searching...
No Matches
kernel.h
Go to the documentation of this file.
1
// === kernel.h ========================================================================================================
2
// Sen Infrastructure
3
// Released under the Apache License v2.0 (SPDX-License-Identifier Apache-2.0).
4
// See the LICENSE.txt file for more information.
5
// © Airbus SAS, Airbus Helicopters, and Airbus Defence and Space SAU/GmbH/SAS.
6
// =====================================================================================================================
7
8
#ifndef SEN_KERNEL_KERNEL_H
9
#define SEN_KERNEL_KERNEL_H
10
11
// sen
12
#include "
sen/core/base/class_helpers.h
"
13
#include "
sen/core/meta/class_type.h
"
14
15
// kernel
16
#include "
sen/kernel/kernel_config.h
"
17
18
// generated code
19
#include "stl/sen/kernel/basic_types.stl.h"
20
21
// std
22
#include <filesystem>
23
#include <memory>
24
25
namespace
sen::kernel
26
{
27
28
// Forward declarations
29
class
TestKernel
;
30
32
enum class
KernelBlockMode
33
{
34
doNotBlock
,
35
doBlock
,
36
};
37
39
class
Kernel
final
40
{
41
SEN_NOCOPY_NOMOVE(
Kernel
)
42
43
public
:
44
explicit
Kernel
(
KernelConfig
config);
45
~Kernel
() noexcept;
46
47
public:
51
[[nodiscard]]
int
run
(
KernelBlockMode
blockMode =
KernelBlockMode
::
doBlock
);
52
55
void
requestStop
(
int
exitCode = 0);
56
59
[[nodiscard]] const
KernelConfig
&
getConfig
() const noexcept;
60
63
[[nodiscard]]
std
::filesystem::path
getConfigPath
() const noexcept;
64
66
[[nodiscard]] static const BuildInfo&
getBuildInfo
() noexcept;
67
69
static
void
registerTerminationHandler
();
70
71
private:
72
friend class
KernelApi
;
73
friend class
PreloadApi
;
74
friend class
UnloadApi
;
75
friend class impl::
Runner
;
76
friend class
TestKernel
;
77
78
private:
79
std
::unique_ptr<impl::KernelImpl> pimpl_;
80
};
81
82
}
// namespace sen::kernel
83
84
#endif
// SEN_KERNEL_KERNEL_H
class_helpers.h
Here we define a set of template meta-programming helpers to let the compiler take some decisions bas...
class_type.h
sen::kernel::KernelConfig
Holds the kernel configuration information.
Definition
kernel_config.h:33
sen::kernel::Kernel::getBuildInfo
static const BuildInfo & getBuildInfo() noexcept
Gets the kernel build information.
sen::kernel::Kernel::KernelApi
friend class KernelApi
Definition
kernel.h:72
sen::kernel::Kernel::getConfig
const KernelConfig & getConfig() const noexcept
Gets the configuration used to construct the kernel. This method is thread-safe.
sen::kernel::Kernel::Kernel
Kernel(KernelConfig config)
sen::kernel::Kernel::run
int run(KernelBlockMode blockMode=KernelBlockMode::doBlock)
Fire up the execution of the kernel. In case the is already running, -1 is returned....
sen::kernel::Kernel::PreloadApi
friend class PreloadApi
Definition
kernel.h:73
sen::kernel::Kernel::Runner
friend class impl::Runner
Definition
kernel.h:75
sen::kernel::Kernel::requestStop
void requestStop(int exitCode=0)
Stops the execution and deallocates runtime resources. This method is thread-safe.
sen::kernel::Kernel::registerTerminationHandler
static void registerTerminationHandler()
Registers the kernel termination handler.
sen::kernel::Kernel::getConfigPath
std::filesystem::path getConfigPath() const noexcept
Gets the path to the configuration file used to construct the kernel. This method is thread-safe.
sen::kernel::Kernel::TestKernel
friend class TestKernel
Definition
kernel.h:76
sen::kernel::Kernel::~Kernel
~Kernel() noexcept
sen::kernel::Kernel::UnloadApi
friend class UnloadApi
Definition
kernel.h:74
sen::kernel::TestKernel
Kernel class only meant for unit testing your packages or components. It starts in virtual time mode.
Definition
test_kernel.h:27
kernel_config.h
sen::kernel
Strong type for the unique identifier for a transport timer.
Definition
native_object_impl.h:39
sen::kernel::KernelBlockMode
KernelBlockMode
How to deal with the thread that calls the Kernel::run() function.
Definition
kernel.h:33
sen::kernel::KernelBlockMode::doNotBlock
@ doNotBlock
Does not block the caller thread.
Definition
kernel.h:34
sen::kernel::KernelBlockMode::doBlock
@ doBlock
Blocks the caller thread.
Definition
kernel.h:35
std
STL namespace.
libs
kernel
include
sen
kernel
kernel.h
Generated by
1.17.0