Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
condition.h
1#ifndef CONDITION_H
2#define CONDITION_H
3
4#include "../core/instance_specifier.h"
5#include "../core/result.h"
6
7namespace ara
8{
9 namespace diag
10 {
12 enum class ConditionType
13 {
14 kConditionFalse = 0x00,
15 kConditionTrue = 0x01
16 };
17
20 {
21 private:
22 const ara::core::InstanceSpecifier &mSpecifier;
23 ConditionType mCondition;
24
25 public:
28 explicit Condition(const ara::core::InstanceSpecifier &specifier);
29
30 ~Condition() noexcept = default;
31
35
40 };
41 }
42}
43
44#endif
AUTOSAR shortname-path wrapper.
Definition: instance_specifier.h:14
A wrapper around the callee's return value and its possible error.
Definition: result.h:16
A class that represents an enable condition for processing an event by DM.
Definition: condition.h:20
ara::core::Result< ConditionType > GetCondition()
Get the current condition status.
Definition: condition.cpp:12
ara::core::Result< void > SetCondition(ConditionType condition)
Set the current condtion status.
Definition: condition.cpp:18
Condition(const ara::core::InstanceSpecifier &specifier)
Constructor.
Definition: condition.cpp:7
ConditionType
Condition status type.
Definition: condition.h:13
@ kConditionFalse
Disabled condition.
@ kConditionTrue
Enabled condition.