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