F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
EventManager.hpp
Go to the documentation of this file.
1 /*
2  * EventManager.hpp
3  *
4  * Created on: Mar 28, 2014
5  * Author: tcanham
6  */
7 
8 #ifndef Svc_EventManager_HPP_
9 #define Svc_EventManager_HPP_
10 
12 #include <Fw/Log/LogPacket.hpp>
13 #include <Os/Mutex.hpp>
16 #include <atomic>
17 #include <config/EventManagerCfg.hpp>
18 
19 namespace Svc {
20 
22  public:
23  EventManager(const char* compName);
24  virtual ~EventManager();
25 
26  private:
27  void LogRecv_handler(FwIndexType portNum,
28  FwEventIdType id,
29  Fw::Time& timeTag,
30  const Fw::LogSeverity& severity,
31  Fw::LogBuffer& args) override;
32 
33  void loqQueue_internalInterfaceHandler(FwEventIdType id,
34  const Fw::Time& timeTag,
35  const Fw::LogSeverity& severity,
36  const Fw::LogBuffer& args) override;
37 
38  void SET_EVENT_FILTER_cmdHandler(FwOpcodeType opCode,
39  U32 cmdSeq,
40  const EventManager_FilterSeverity& filterLevel,
41  const EventManager_Enabled& filterEnabled) override;
42 
43  void SET_ID_FILTER_cmdHandler(FwOpcodeType opCode,
44  U32 cmdSeq,
45  FwEventIdType ID,
46  const EventManager_Enabled& idFilterEnabled
47  ) override;
48 
49  void DUMP_FILTER_STATE_cmdHandler(FwOpcodeType opCode,
50  U32 cmdSeq
51  ) override;
52 
54  void run_handler(FwIndexType portNum, U32 context) override;
55 
57  void runInternal_internalInterfaceHandler() override;
58 
60  void runInternal_overflowHook() override;
61 
64  void pingIn_handler(const FwIndexType portNum,
65  U32 key
66  ) override;
67 
68  // Severity filter state (shared implementation)
69  EventSeverityFilter m_severityFilter;
70 
71  // Working members
72  Fw::LogPacket m_logPacket;
73  Fw::ComBuffer m_comBuffer;
74 
75  // Set of filtered event IDs.
77 
78  // Guards m_filteredIDs: read on the sync LogRecv path, mutated on the command thread
79  Os::Mutex m_idFilterLock;
80 
81  // True while a runInternal message is on the queue
82  std::atomic<bool> m_runQueued;
83 };
84 
85 } // namespace Svc
86 #endif /* Svc_EventManager_HPP_ */
Enabled and disabled state.
FwIdType FwOpcodeType
The type of a command opcode.
EventManager(const char *compName)
constructor
Link-time delegating Mutex implementation.
FwIdType FwEventIdType
The type of an event identifier.
Auto-generated base for EventManager component.
Enum representing event severity.
virtual ~EventManager()
destructor
Common severity-based event filtering utility.
PlatformIndexType FwIndexType
RateGroupDivider component implementation.