ApraLinuxUtils
1.0.0
C++ utility library for embedded Linux systems
Loading...
Searching...
No Matches
I2CError.cpp
Go to the documentation of this file.
1
/*
2
* I2CErrorCode.cpp
3
*
4
* Copyright (c) 2024 Apra Labs
5
*
6
* This file is part of ApraUtils.
7
*
8
* Licensed under the MIT License.
9
* See LICENSE file in the project root for full license information.
10
*/
11
12
#include <
models/I2CError.h
>
13
#include <
models/GenericError.h
>
14
namespace
apra
15
{
16
17
I2CError::I2CError
() :
18
GenericError
(), m_code(
NO_ERROR
)
19
{
20
}
21
22
I2CError::I2CError
(std::string message) :
23
GenericError
(message), m_code(
NO_ERROR
)
24
{
25
26
}
27
28
I2CError::I2CError
(std::string message,
I2C_ERROR_CODE
code) :
29
GenericError
(message), m_code(code)
30
{
31
}
32
33
I2CError::I2CError
(
I2C_ERROR_CODE
code) :
34
GenericError
(
""
), m_code(code)
35
{
36
}
37
38
I2CError::I2CError
(std::string message, std::string debugMessage) :
39
GenericError
(message, debugMessage), m_code(
NO_ERROR
)
40
{
41
42
}
43
I2CError::I2CError
(std::string message, std::string debugMessage,
44
I2C_ERROR_CODE
code) :
45
GenericError
(message, debugMessage), m_code(code)
46
{
47
48
}
49
I2CError::I2CError
(
I2C_ERROR_CODE
code, std::string debugMessage) :
50
GenericError
(
""
, debugMessage), m_code(code)
51
{
52
53
}
54
55
I2CError
&
I2CError::operator=
(
I2CError
other)
56
{
57
m_code
= other.
getCode
();
58
m_debugMessage
= other.
getDebugMessage
();
59
m_isError
= other.
isError
();
60
m_message
= other.
getMessage
();
61
return
*
this
;
62
}
63
64
I2C_ERROR_CODE
I2CError::getCode
()
65
{
66
return
m_code
;
67
}
68
69
I2CError::~I2CError
()
70
{
71
// TODO Auto-generated destructor stub
72
}
73
74
}
/* namespace apra */
GenericError.h
I2CError.h
apra::GenericError
Definition
GenericError.h:21
apra::GenericError::m_isError
bool m_isError
Definition
GenericError.h:33
apra::GenericError::m_message
std::string m_message
Definition
GenericError.h:31
apra::GenericError::getDebugMessage
std::string getDebugMessage()
Definition
GenericError.cpp:46
apra::GenericError::m_debugMessage
std::string m_debugMessage
Definition
GenericError.h:32
apra::GenericError::isError
bool isError()
Definition
GenericError.cpp:36
apra::GenericError::getMessage
std::string getMessage()
Definition
GenericError.cpp:41
apra::I2CError
Definition
I2CError.h:26
apra::I2CError::~I2CError
virtual ~I2CError()
Definition
I2CError.cpp:69
apra::I2CError::m_code
I2C_ERROR_CODE m_code
Definition
I2CError.h:40
apra::I2CError::I2CError
I2CError()
Definition
I2CError.cpp:17
apra::I2CError::operator=
I2CError & operator=(I2CError other)
Definition
I2CError.cpp:55
apra::I2CError::getCode
I2C_ERROR_CODE getCode()
Definition
I2CError.cpp:64
apra
Definition
EventCallbacks.h:16
apra::I2C_ERROR_CODE
I2C_ERROR_CODE
Definition
I2CError.h:21
apra::NO_ERROR
@ NO_ERROR
Definition
I2CError.h:22
src
models
I2CError.cpp
Generated by
1.9.8