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

Kernel class only meant for unit testing your packages or components. It starts in virtual time mode. More...

#include <test_kernel.h>

Public Member Functions

 TestKernel (KernelConfig config)
 TestKernel (Component *component)
 ~TestKernel ()
void step (std::size_t count=1)
TimeStamp getTime () const
std::shared_ptr< ObjectSourcegetComponentBus (std::string_view componentName, const BusAddress &busAddress) const
std::optional< const ComponentContext * > getComponentContext (std::string_view componentName) const
CustomTypeRegistrygetTypes () const

Static Public Member Functions

static TestKernel fromYamlFile (const std::filesystem::path &configFilePath)
static TestKernel fromYamlString (const std::string &configString)

Detailed Description

Kernel class only meant for unit testing your packages or components. It starts in virtual time mode.

Constructor & Destructor Documentation

◆ TestKernel() [1/2]

sen::kernel::TestKernel::TestKernel ( KernelConfig config)
explicit

◆ TestKernel() [2/2]

sen::kernel::TestKernel::TestKernel ( Component * component)
explicit

◆ ~TestKernel()

sen::kernel::TestKernel::~TestKernel ( )

Member Function Documentation

◆ fromYamlFile()

TestKernel sen::kernel::TestKernel::fromYamlFile ( const std::filesystem::path & configFilePath)
static

◆ fromYamlString()

TestKernel sen::kernel::TestKernel::fromYamlString ( const std::string & configString)
static

◆ step()

void sen::kernel::TestKernel::step ( std::size_t count = 1)

◆ getTime()

TimeStamp sen::kernel::TestKernel::getTime ( ) const
nodiscard

◆ getComponentBus()

std::shared_ptr< ObjectSource > sen::kernel::TestKernel::getComponentBus ( std::string_view componentName,
const BusAddress & busAddress ) const
nodiscard

◆ getComponentContext()

std::optional< const ComponentContext * > sen::kernel::TestKernel::getComponentContext ( std::string_view componentName) const
nodiscard

◆ getTypes()

CustomTypeRegistry & sen::kernel::TestKernel::getTypes ( ) const
nodiscard

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