blob: 2446ba69421cec7b6475815548ec1da355cc4987 [file] [log] [blame]
Ben Tynerb1ebfcb2020-05-08 18:52:48 -05001#pragma once
2
3#include <cstddef> // for size_t
4#include <map>
5#include <string>
6
7namespace attn
8{
9
10/** @brief Logging level types */
11enum level
12{
13 INFO
14};
15
16/** @brief Logging event types */
17enum class EventType
18{
19 Checkstop = 0,
20 Terminate = 1,
21 Vital = 2,
22 HwDiagsFail = 3,
23 AttentionFail = 4
24};
25
26/** @brief Maximum length of a single trace event message */
27static const size_t trace_msg_max_len = 255;
28
29/** @brief create trace message */
30template <level L>
31void trace(const char* i_message);
32
33/** @brief commit checkstop event to log */
34void eventCheckstop(std::map<std::string, std::string>& i_errors);
35
36/** @brief commit special attention TI event to log */
37void eventTerminate();
38
39/** @brief commit SBE vital event to log */
40void eventVital();
41
42/** @brief commit analyzer failure event to log */
43void eventHwDiagsFail(int i_error);
44
45/** @brief commit attention handler failure event to log */
46void eventAttentionFail(int i_error);
47
48} // namespace attn