ApraLinuxUtils
1.0.0
C++ utility library for embedded Linux systems
Loading...
Searching...
No Matches
I2CError.h
Go to the documentation of this file.
1
/*
2
* I2CErrorCode.h
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
#ifndef INCLUDES_APRA_MODELS_I2CERROR_H_
13
#define INCLUDES_APRA_MODELS_I2CERROR_H_
14
15
#include <
models/GenericError.h
>
16
17
namespace
apra
18
{
19
20
enum
I2C_ERROR_CODE
21
{
22
NO_ERROR
,
OPEN_BUS_ERROR
,
WRITE_ERROR
,
READ_ERROR
,
BUS_UNOPENED
23
};
24
25
class
I2CError
:
public
GenericError
26
{
27
public
:
28
I2CError
();
29
I2CError
(std::string message);
30
I2CError
(std::string message,
I2C_ERROR_CODE
code);
31
I2CError
(
I2C_ERROR_CODE
code);
32
I2CError
(std::string message, std::string debugMessage);
33
I2CError
(std::string message, std::string debugMessage,
34
I2C_ERROR_CODE
code);
35
I2CError
(
I2C_ERROR_CODE
code, std::string debugMessage);
36
virtual
~I2CError
();
37
I2CError
&
operator=
(
I2CError
other);
38
I2C_ERROR_CODE
getCode
();
39
protected
:
40
I2C_ERROR_CODE
m_code
;
41
};
42
43
}
/* namespace apra */
44
45
#endif
/* INCLUDES_APRA_MODELS_I2CERROR_H_ */
GenericError.h
apra::GenericError
Definition
GenericError.h:21
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::READ_ERROR
@ READ_ERROR
Definition
I2CError.h:22
apra::WRITE_ERROR
@ WRITE_ERROR
Definition
I2CError.h:22
apra::OPEN_BUS_ERROR
@ OPEN_BUS_ERROR
Definition
I2CError.h:22
apra::NO_ERROR
@ NO_ERROR
Definition
I2CError.h:22
apra::BUS_UNOPENED
@ BUS_UNOPENED
Definition
I2CError.h:22
includes
models
I2CError.h
Generated by
1.9.8