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
15 #if !FW_DIRECT_PORT_CALLS
17 #endif
18 #if !FW_DIRECT_PORT_CALLS
20 #endif
21 
22 namespace Svc {
23 
30  {
31 
32  // ----------------------------------------------------------------------
33  // Friend classes
34  // ----------------------------------------------------------------------
35 
40 
41  protected:
42 
43  // ----------------------------------------------------------------------
44  // Constants
45  // ----------------------------------------------------------------------
46 
48  enum {
50  };
51 
52  public:
53 
54  // ----------------------------------------------------------------------
55  // Component initialization
56  // ----------------------------------------------------------------------
57 
59  void init(
60  FwEnumStoreType instance = 0
61  );
62 
63 #if !FW_DIRECT_PORT_CALLS
64 
65  public:
66 
67  // ----------------------------------------------------------------------
68  // Getters for typed input ports
69  // ----------------------------------------------------------------------
70 
75  FwIndexType portNum
76  );
77 
78 #endif
79 
80  protected:
81 
82  // ----------------------------------------------------------------------
83  // Component construction and destruction
84  // ----------------------------------------------------------------------
85 
88  const char* compName = ""
89  );
90 
93 
94  protected:
95 
96  // ----------------------------------------------------------------------
97  // Getters for numbers of typed input ports
98  // ----------------------------------------------------------------------
99 
105  }
106 
107  protected:
108 
109  // ----------------------------------------------------------------------
110  // Handlers to implement for typed input ports
111  // ----------------------------------------------------------------------
112 
114  virtual void TextLogger_handler(
115  FwIndexType portNum,
116  FwEventIdType id,
117  Fw::Time& timeTag,
118  const Fw::LogSeverity& severity,
119  Fw::TextLogString& text
120  ) = 0;
121 
122 #if FW_DIRECT_PORT_CALLS
123  public:
124 #else
125  protected:
126 #endif
127 
128  // ----------------------------------------------------------------------
129  // Port handler base-class functions for typed input ports
130  //
131  // Call these functions directly to bypass the corresponding ports
132  // ----------------------------------------------------------------------
133 
136  FwIndexType portNum,
137  FwEventIdType id,
138  Fw::Time& timeTag,
139  const Fw::LogSeverity& severity,
140  Fw::TextLogString& text
141  );
142 
143  private:
144 
145  // ----------------------------------------------------------------------
146  // Calls for messages received on typed input ports
147  // ----------------------------------------------------------------------
148 
150  static void m_p_TextLogger_in(
151  Fw::PassiveComponentBase* callComp,
152  FwIndexType portNum,
153  FwEventIdType id,
154  Fw::Time& timeTag,
155  const Fw::LogSeverity& severity,
156  Fw::TextLogString& text
157  );
158 
159 #if !FW_DIRECT_PORT_CALLS
160 
161  private:
162 
163  // ----------------------------------------------------------------------
164  // Typed input ports
165  // ----------------------------------------------------------------------
166 
168  Fw::InputLogTextPort m_TextLogger_InputPort[NUM_TEXTLOGGER_INPUT_PORTS];
169 
170 #endif
171 
172  };
173 
174 }
175 
176 #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.