SensESP
3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
resettable.cpp
Go to the documentation of this file.
1
#include "
sensesp.h
"
2
3
#include "
resettable.h
"
4
5
namespace
sensesp
{
6
7
std::priority_queue<Resettable*, std::vector<Resettable*>, ResettableCompare>
8
Resettable::reset_list;
9
10
Resettable::Resettable
(
int
priority) : priority(priority) {
11
reset_list.push(
this
);
12
}
13
14
void
Resettable::reset_all
() {
15
ESP_LOGI(__FILENAME__,
"Resetting all resettable objects"
);
16
while
(!reset_list.empty()) {
17
auto
& resettable = *reset_list.top();
18
resettable.reset();
19
reset_list.pop();
20
}
21
}
22
23
}
// namespace sensesp
sensesp::Resettable::reset_all
static void reset_all()
Definition
resettable.cpp:14
sensesp::Resettable::Resettable
Resettable(int priority=0)
Definition
resettable.cpp:10
sensesp
Definition
sensesp.cpp:7
resettable.h
sensesp.h
src
sensesp
system
resettable.cpp
Generated by
1.12.0