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