SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
SensorErrorMixin.hpp
Go to the documentation of this file.
1
30#pragma once
31#include "SensorErr.hpp"
32
34{
35public:
37 {
38 return last_error_;
39 }
41 {
42 last_error_ = SENSOR_OK;
43 }
44
45protected:
47 {
48 last_error_ = e;
49 }
55
56private:
57 SENSOR_ERROR_CODE last_error_ = SENSOR_OK;
58};
@license MIT License
SENSOR_ERROR_CODE
Definition SensorErr.hpp:35
@ SENSOR_OK
Definition SensorErr.hpp:37
SENSOR_ERROR_CODE lastError() const
SENSOR_ERROR_CODE setErrorAndReturn(SENSOR_ERROR_CODE e)
void setError(SENSOR_ERROR_CODE e)