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>
14namespace apra
15{
16
18 GenericError(), m_code(NO_ERROR)
19{
20}
21
22I2CError::I2CError(std::string message) :
23 GenericError(message), m_code(NO_ERROR)
24{
25
26}
27
28I2CError::I2CError(std::string message, I2C_ERROR_CODE code) :
29 GenericError(message), m_code(code)
30{
31}
32
34 GenericError(""), m_code(code)
35{
36}
37
38I2CError::I2CError(std::string message, std::string debugMessage) :
39 GenericError(message, debugMessage), m_code(NO_ERROR)
40{
41
42}
43I2CError::I2CError(std::string message, std::string debugMessage,
44 I2C_ERROR_CODE code) :
45 GenericError(message, debugMessage), m_code(code)
46{
47
48}
49I2CError::I2CError(I2C_ERROR_CODE code, std::string debugMessage) :
50 GenericError("", debugMessage), m_code(code)
51{
52
53}
54
56{
57 m_code = other.getCode();
59 m_isError = other.isError();
60 m_message = other.getMessage();
61 return *this;
62}
63
68
70{
71 // TODO Auto-generated destructor stub
72}
73
74} /* namespace apra */
std::string m_message
std::string getDebugMessage()
std::string m_debugMessage
std::string getMessage()
virtual ~I2CError()
Definition I2CError.cpp:69
I2C_ERROR_CODE m_code
Definition I2CError.h:40
I2CError & operator=(I2CError other)
Definition I2CError.cpp:55
I2C_ERROR_CODE getCode()
Definition I2CError.cpp:64
I2C_ERROR_CODE
Definition I2CError.h:21
@ NO_ERROR
Definition I2CError.h:22