Sen API
Sen Libraries
Toggle main menu visibility
Loading...
Searching...
No Matches
runtime_2/src/runtime.h
Go to the documentation of this file.
1
// === runtime.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_LIBS_KERNEL_TEST_INTEGRATION_RUNTIME_COMPATIBILITY_RUNTIME_2_SRC_RUNTIME_H
9
#define SEN_LIBS_KERNEL_TEST_INTEGRATION_RUNTIME_COMPATIBILITY_RUNTIME_2_SRC_RUNTIME_H
10
11
// test_helpers
12
#include "
sen/kernel/component_api.h
"
13
#include "stl/runtime/runtime.stl.h"
14
#include "stl/sen/kernel/kernel_objects.stl.h"
15
#include "test_helpers/test_helpers.stl.h"
16
17
// std
18
#include <bitset>
19
20
namespace
sen::test::runtime
21
{
22
23
class
TestClassImpl
final:
public
TestClassBase
24
{
25
public
:
26
SEN_NOCOPY_NOMOVE(TestClassImpl)
27
28
public
:
29
using
TestClassBase::TestClassBase;
30
~TestClassImpl
()
override
=
default
;
31
32
protected
:
// TestClassBase
33
std::string
testMethodImpl
(
const
std::string& arg2,
f64
arg1)
override
;
34
void
emitEventsImpl
()
override
;
35
};
36
37
class
TesterImpl
final:
public
TesterBase
38
{
39
public
:
40
SEN_NOCOPY_NOMOVE(
TesterImpl
)
41
42
public
:
43
using
TesterBase::TesterBase;
44
~TesterImpl
()
override
=
default
;
45
46
public
:
// NativeObject
47
void
registered
(
sen::kernel::RegistrationApi
& api)
override
;
48
void
unregistered
(
sen::kernel::RegistrationApi
& api)
override
;
49
50
protected
:
// TesterBase
51
void
doTestsImpl
(std::promise<TestResult>&& promise)
override
;
52
void
checkLocalStateImpl
(std::promise<TestResult>&& promise)
override
;
53
void
shutdownKernelImpl
()
override
;
54
55
private
:
56
void
checkRemote(
u32
flagToSet);
57
58
private
:
59
std::shared_ptr<TestClassImpl> localObj_;
60
std::shared_ptr<sen::Subscription<TestClassInterface>> remoteObjSub_;
61
TestClassInterface* remoteObj_ =
nullptr
;
62
std::promise<TestResult> promise_;
63
std::bitset<15> localFlags_;
64
std::bitset<17> remoteFlags_;
65
bool
testMethodPassed_ =
false
;
66
bool
testEventPassed_ =
false
;
67
std::shared_ptr<sen::Subscription<sen::kernel::KernelApiInterface>> kernelApiSub_;
68
sen::kernel::KernelApiInterface* kernelApiObj_ =
nullptr
;
69
};
70
71
}
// namespace sen::test::runtime
72
73
#endif
// SEN_LIBS_KERNEL_TEST_INTEGRATION_RUNTIME_COMPATIBILITY_RUNTIME_2_SRC_RUNTIME_H
sen::kernel::RegistrationApi
API for objects when registered.
Definition
component_api.h:212
sen::test::runtime::TestClassImpl
Definition
runtime_1/src/runtime.h:25
sen::test::runtime::TestClassImpl::~TestClassImpl
~TestClassImpl() override=default
sen::test::runtime::TestClassImpl::emitEventsImpl
void emitEventsImpl() override
sen::test::runtime::TestClassImpl::testMethodImpl
std::string testMethodImpl(const std::string &arg2, f64 arg1) override
sen::test::runtime::TesterImpl
Definition
runtime_1/src/runtime.h:40
sen::test::runtime::TesterImpl::unregistered
void unregistered(sen::kernel::RegistrationApi &api) override
sen::test::runtime::TesterImpl::shutdownKernelImpl
void shutdownKernelImpl() override
sen::test::runtime::TesterImpl::doTestsImpl
void doTestsImpl(std::promise< TestResult > &&promise) override
sen::test::runtime::TesterImpl::checkLocalStateImpl
void checkLocalStateImpl(std::promise< TestResult > &&promise) override
sen::test::runtime::TesterImpl::registered
void registered(sen::kernel::RegistrationApi &api) override
sen::test::runtime::TesterImpl::~TesterImpl
~TesterImpl() override=default
component_api.h
u32
uint32_t u32
Definition
numbers.h:25
f64
float64_t f64
Definition
numbers.h:29
sen::test::runtime
Definition
runtime_1/src/runtime.h:22
libs
kernel
test
integration
runtime_compatibility
runtime_2
src
runtime.h
Generated by
1.17.0