F´ Flight Software - C/C++ Documentation  NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
ActiveLoggerImpl.hpp
Go to the documentation of this file.
1 /*
2  * ActiveLoggerImpl.hpp
3  *
4  * Created on: Mar 28, 2014
5  * Author: tcanham
6  */
7 
8 #ifndef ACTIVELOGGERIMPL_HPP_
9 #define ACTIVELOGGERIMPL_HPP_
10 
11 #include <Svc/ActiveLogger/ActiveLoggerComponentAc.hpp>
12 #include <Fw/Log/LogPacket.hpp>
13 #include <ActiveLoggerImplCfg.hpp>
14 
15 namespace Svc {
16 
17  class ActiveLoggerImpl: public ActiveLoggerComponentBase {
18  public:
19  ActiveLoggerImpl(const char* compName);
20  virtual ~ActiveLoggerImpl();
21  void init(
22  NATIVE_INT_TYPE queueDepth,
23  NATIVE_INT_TYPE instance
24  );
25  PROTECTED:
26  PRIVATE:
27  void LogRecv_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity& severity, Fw::LogBuffer &args);
28  void loqQueue_internalInterfaceHandler(FwEventIdType id, const Fw::Time &timeTag, const Fw::LogSeverity& severity, const Fw::LogBuffer &args);
29 
30  void SET_EVENT_FILTER_cmdHandler(
31  FwOpcodeType opCode,
32  U32 cmdSeq,
33  ActiveLogger_FilterSeverity filterLevel,
34  ActiveLogger_Enabled filterEnabled);
35 
36  void SET_ID_FILTER_cmdHandler(
37  FwOpcodeType opCode,
38  U32 cmdSeq,
39  U32 ID,
40  ActiveLogger_Enabled idFilterEnabled
41  );
42 
43  void DUMP_FILTER_STATE_cmdHandler(
44  FwOpcodeType opCode,
45  U32 cmdSeq
46  );
47 
50  void pingIn_handler(
51  const NATIVE_INT_TYPE portNum,
52  U32 key
53  );
54 
55  // Filter state
56  struct t_filterState {
57  ActiveLogger_Enabled enabled; //<! filter is enabled
58  } m_filterState[ActiveLogger_FilterSeverity::NUM_CONSTANTS];
59 
60  // Working members
61  Fw::LogPacket m_logPacket;
62  Fw::ComBuffer m_comBuffer;
63 
64  // array of filtered event IDs.
65  // value of 0 means no entry
66  FwEventIdType m_filteredIDs[TELEM_ID_FILTER_SIZE];
67 
68  };
69 
70 }
71 #endif /* ACTIVELOGGERIMPL_HPP_ */
Fw::Time
Definition: Time.hpp:10
Fw::LogBuffer
Definition: LogBuffer.hpp:22
Svc::ActiveLoggerImpl::ActiveLoggerImpl
ActiveLoggerImpl(const char *compName)
constructor
Definition: ActiveLoggerImpl.cpp:19
TELEM_ID_FILTER_SIZE
@ TELEM_ID_FILTER_SIZE
Size of telemetry ID filter.
Definition: ActiveLoggerImplCfg.hpp:26
Svc::ActiveLoggerImpl
Definition: ActiveLoggerImpl.hpp:17
ActiveLoggerImplCfg.hpp
FwOpcodeType
#define FwOpcodeType
Type representation for a command opcode.
Definition: FpConfig.hpp:58
Svc
Definition: ActiveRateGroupImplCfg.hpp:18
LogPacket.hpp
FwEventIdType
#define FwEventIdType
Type representation for an event id.
Definition: FpConfig.hpp:66
Fw::LogPacket
Definition: LogPacket.hpp:17
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
Fw::ComBuffer
Definition: ComBuffer.hpp:21
Svc::ActiveLoggerImpl::init
void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance)
initialization function
Definition: ActiveLoggerImpl.cpp:43
Svc::ActiveLoggerImpl::~ActiveLoggerImpl
virtual ~ActiveLoggerImpl()
destructor
Definition: ActiveLoggerImpl.cpp:40