Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
diag_error_domain.h
1#ifndef DIAG_ERROR_DOMAIN_H
2#define DIAG_ERROR_DOMAIN_H
3
4#include <exception>
5#include "../core/error_domain.h"
6#include "../core/error_code.h"
7
8namespace ara
9{
10 namespace diag
11 {
14 {
15 kAlreadyOffered = 101,
18 kReportIgnored = 104,
19 kInvalidArgument = 105,
20 kNotOffered = 106,
21 kGenericError = 107,
22 kNoSuchDTC = 108,
23 kBusy = 109,
24 kFailed = 110,
25 kMemoryError = 111,
26 kWrongDtc = 112,
27 kRejected = 113,
29 kRequestFailed = 115
30 };
31
35 {
36 private:
37 static const ara::core::ErrorDomain::IdType cId{0x8000000000000401};
38 const char *cName{"Diag"};
39
40 static DiagErrorDomain *mInstnace;
41
42 constexpr DiagErrorDomain() noexcept : ara::core::ErrorDomain(cId)
43 {
44 }
45
46 public:
47 DiagErrorDomain(DiagErrorDomain &other) = delete;
48 void operator=(const DiagErrorDomain &) = delete;
49
50 const char *Name() const noexcept override;
51 const char *Message(ara::core::ErrorDomain::CodeType errorCode) const noexcept override;
52
57
63 };
64 }
65}
66
67#endif
A wrapper around the raw error code in a specific ErrorDomain.
Definition: error_code.h:13
A class that defines the domain of an ErrorCode to avoid code interferences.
Definition: error_domain.h:14
uint64_t IdType
Alias type of the domain ID.
Definition: error_domain.h:17
uint32_t CodeType
Alias type of the error code.
Definition: error_domain.h:19
Diagnostic Management error domain.
Definition: diag_error_domain.h:35
static ara::core::ErrorDomain * GetDiagDomain()
Get the global diagnostic error domain.
Definition: diag_error_domain.cpp:56
const char * Name() const noexcept override
Get the domain's name.
Definition: diag_error_domain.cpp:10
const char * Message(ara::core::ErrorDomain::CodeType errorCode) const noexcept override
Get error message of a specific error code.
Definition: diag_error_domain.cpp:15
ara::core::ErrorCode MakeErrorCode(DiagErrc code) noexcept
Make an error code based on the given giagnostic error type.
Definition: diag_error_domain.cpp:66
DiagErrc
Diagnostic Management interal error type.
Definition: diag_error_domain.h:14
@ kConfigurationMismatch
!< Already offered service
@ kMemoryError
!< Failed process
@ kReportIgnored
!< Invalid monitor debouncing configuration
@ kDebouncingConfigurationInconsistent
!< Configuration misalignment with DEXT
@ kInvalidArgument
!< Disabled control DTC setting
@ kBusy
!< Invalid DTC number
@ kGenericError
!< Request from a not offered service
@ kFailed
!< Busy interface call
@ kRequestFailed
!< Unsupported reset type by the Diagnostic Address instance
@ kWrongDtc
!< Memory error occurrance
@ kRejected
!< Incorrect passed DTC number
@ kNoSuchDTC
!< General error occurrance
@ kNotOffered
!< Invalid passed argument from caller
@ kResetTypeNotSupported
!< Request rejection