F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PassiveTextLoggerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PassiveTextLoggerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for PassiveTextLogger component base class
5 // ======================================================================
6 
7 #ifndef Svc_PassiveTextLoggerComponentAc_HPP
8 #define Svc_PassiveTextLoggerComponentAc_HPP
9 
11 #include "Fw/FPrimeBasicTypes.hpp"
12 #if FW_ENABLE_TEXT_LOGGING == 1
13 #include "Fw/Log/LogTextPortAc.hpp"
14 #endif
17 
18 namespace Svc {
19 
26  {
27 
28  // ----------------------------------------------------------------------
29  // Friend classes
30  // ----------------------------------------------------------------------
31 
36 
37  protected:
38 
39  // ----------------------------------------------------------------------
40  // Constants
41  // ----------------------------------------------------------------------
42 
44  enum {
46  };
47 
48  public:
49 
50  // ----------------------------------------------------------------------
51  // Component initialization
52  // ----------------------------------------------------------------------
53 
55  void init(
56  FwEnumStoreType instance = 0
57  );
58 
59  public:
60 
61  // ----------------------------------------------------------------------
62  // Getters for typed input ports
63  // ----------------------------------------------------------------------
64 
69  FwIndexType portNum
70  );
71 
72  protected:
73 
74  // ----------------------------------------------------------------------
75  // Component construction and destruction
76  // ----------------------------------------------------------------------
77 
80  const char* compName = ""
81  );
82 
85 
86  protected:
87 
88  // ----------------------------------------------------------------------
89  // Getters for numbers of typed input ports
90  // ----------------------------------------------------------------------
91 
97  }
98 
99  protected:
100 
101  // ----------------------------------------------------------------------
102  // Handlers to implement for typed input ports
103  // ----------------------------------------------------------------------
104 
106  virtual void TextLogger_handler(
107  FwIndexType portNum,
108  FwEventIdType id,
109  Fw::Time& timeTag,
110  const Fw::LogSeverity& severity,
111  Fw::TextLogString& text
112  ) = 0;
113 
114  protected:
115 
116  // ----------------------------------------------------------------------
117  // Port handler base-class functions for typed input ports
118  //
119  // Call these functions directly to bypass the corresponding ports
120  // ----------------------------------------------------------------------
121 
124  FwIndexType portNum,
125  FwEventIdType id,
126  Fw::Time& timeTag,
127  const Fw::LogSeverity& severity,
128  Fw::TextLogString& text
129  );
130 
131  private:
132 
133  // ----------------------------------------------------------------------
134  // Calls for messages received on typed input ports
135  // ----------------------------------------------------------------------
136 
138  static void m_p_TextLogger_in(
139  Fw::PassiveComponentBase* callComp,
140  FwIndexType portNum,
141  FwEventIdType id,
142  Fw::Time& timeTag,
143  const Fw::LogSeverity& severity,
144  Fw::TextLogString& text
145  );
146 
147  private:
148 
149  // ----------------------------------------------------------------------
150  // Typed input ports
151  // ----------------------------------------------------------------------
152 
154  Fw::InputLogTextPort m_TextLogger_InputPort[NUM_TEXTLOGGER_INPUT_PORTS];
155 
156  };
157 
158 }
159 
160 #endif
virtual void TextLogger_handler(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::TextLogString &text)=0
Handler for input port TextLogger.
I32 FwEnumStoreType
Auto-generated base for PassiveTextLogger component.
void init()
Object initializer.
Definition: ObjBase.cpp:24
friend class PassiveTextLoggerTesterBase
Friend class tester to support autocoded test harness.
FwIdType FwEventIdType
The type of an event identifier.
PassiveTextLoggerComponentBase(const char *compName="")
Construct PassiveTextLoggerComponentBase object.
static constexpr FwIndexType getNum_TextLogger_InputPorts()
Enum representing event severity.
Fw::InputLogTextPort * get_TextLogger_InputPort(FwIndexType portNum)
PlatformIndexType FwIndexType
virtual ~PassiveTextLoggerComponentBase()
Destroy PassiveTextLoggerComponentBase object.
RateGroupDivider component implementation.
friend class PassiveTextLoggerTester
Friend class tester implementation to support white-box testing.
void TextLogger_handlerBase(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::TextLogString &text)
Handler base-class function for input port TextLogger.