Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::kernel::KernelApi Class Reference

User-facing kernel functions. More...

#include <component_api.h>

Inheritance diagram for sen::kernel::KernelApi:

Public Member Functions

 KernelApi (Kernel &kernel, impl::Runner *runner) noexcept
CustomTypeRegistrygetTypes () noexcept
 The types registered into the kernel.
void requestKernelStop (int exitCode=0)
 Issues an asynchronous request to stop the kernel. The request is ignored if a previous stop request was issued.
std::shared_ptr< ObjectSourcegetSource (const BusAddress &address)
 Gets an object source, where objects can be found and published.
std::shared_ptr< ObjectSourcegetSource (const std::string &address)
 Gets an object source, where objects can be found and published. The address parameter must be given as <session-name>.<bus-name>.
SessionsDiscoverergetSessionsDiscoverer () noexcept
 Object that allows discovering sessions and buses.
const ProcessInfo * fetchOwnerInfo (const Object *object) const noexcept
 Gets information about the process where an object is. Returns nullptr if the object resides in the current process.
const std::string & getAppName () const noexcept
 Gets the (optional) application name passed to the kernel as a configuration parameter.
::sen::impl::WorkQueue * getWorkQueue () const noexcept
 The work queue of this runner.
template<typename T, typename B>
std::shared_ptr< Subscription< T > > selectAllFrom (const B &bus)
std::filesystem::path getConfigFilePath () const noexcept
 Gets the path to the configuration file used to construct the kernel. It might be empty if the kernel is programmatically configured.

Detailed Description

User-facing kernel functions.

Constructor & Destructor Documentation

◆ KernelApi()

sen::kernel::KernelApi::KernelApi ( Kernel & kernel,
impl::Runner * runner )
noexcept

Member Function Documentation

◆ getTypes()

CustomTypeRegistry & sen::kernel::KernelApi::getTypes ( )
nodiscardnoexcept

The types registered into the kernel.

◆ requestKernelStop()

void sen::kernel::KernelApi::requestKernelStop ( int exitCode = 0)

Issues an asynchronous request to stop the kernel. The request is ignored if a previous stop request was issued.

◆ getSource() [1/2]

std::shared_ptr< ObjectSource > sen::kernel::KernelApi::getSource ( const BusAddress & address)
nodiscard

Gets an object source, where objects can be found and published.

◆ getSource() [2/2]

std::shared_ptr< ObjectSource > sen::kernel::KernelApi::getSource ( const std::string & address)
nodiscard

Gets an object source, where objects can be found and published. The address parameter must be given as <session-name>.<bus-name>.

◆ getSessionsDiscoverer()

SessionsDiscoverer & sen::kernel::KernelApi::getSessionsDiscoverer ( )
nodiscardnoexcept

Object that allows discovering sessions and buses.

◆ fetchOwnerInfo()

const ProcessInfo * sen::kernel::KernelApi::fetchOwnerInfo ( const Object * object) const
nodiscardnoexcept

Gets information about the process where an object is. Returns nullptr if the object resides in the current process.

◆ getAppName()

const std::string & sen::kernel::KernelApi::getAppName ( ) const
nodiscardnoexcept

Gets the (optional) application name passed to the kernel as a configuration parameter.

◆ getWorkQueue()

::sen::impl::WorkQueue * sen::kernel::KernelApi::getWorkQueue ( ) const
nodiscardnoexcept

The work queue of this runner.

◆ selectAllFrom()

template<typename T, typename B>
std::shared_ptr< Subscription< T > > sen::kernel::KernelApi::selectAllFrom ( const B & bus)
inlinenodiscard

◆ getConfigFilePath()

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

Gets the path to the configuration file used to construct the kernel. It might be empty if the kernel is programmatically configured.


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