presence: Make error time be per fan
Previously there was a global value for the amount of time a fan needed
to be missing before an event log was created. This commit changes it
so that instead the value is specified per fan in the JSON.
This way, the times can be different or left off completely on a fan to
fan basis. The ErrorReporter object will only be created if there is at
least one fan with a time value.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I53bb91c88ec1b0352df11b2e988064c2ec02af45
diff --git a/presence/templates/generated.mako.hpp b/presence/templates/generated.mako.hpp
index 6ba18dc..6395eac 100644
--- a/presence/templates/generated.mako.hpp
+++ b/presence/templates/generated.mako.hpp
@@ -4,6 +4,7 @@
#include <array>
#include <memory>
+#include <optional>
#include <string>
#include "anyof.hpp"
#include "fallback.hpp"
@@ -51,6 +52,7 @@
Fans::value_type{
"${f.name}"s,
"${f.path}"s,
+ std::nullopt
},
% endfor
}