F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ActiveTextLoggerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ActiveTextLoggerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for ActiveTextLogger component base class
5 // ======================================================================
6 
7 #ifndef Svc_ActiveTextLoggerComponentAc_HPP
8 #define Svc_ActiveTextLoggerComponentAc_HPP
9 
11 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Log/LogTextPortAc.hpp"
13 #if !FW_DIRECT_PORT_CALLS
15 #endif
16 #if !FW_DIRECT_PORT_CALLS
18 #endif
21 
22 namespace Svc {
23 
30  {
31 
32  // ----------------------------------------------------------------------
33  // Friend classes
34  // ----------------------------------------------------------------------
35 
39  friend class ActiveTextLoggerTester;
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  FwSizeType queueDepth,
61  FwEnumStoreType instance = 0
62  );
63 
64 #if !FW_DIRECT_PORT_CALLS
65 
66  public:
67 
68  // ----------------------------------------------------------------------
69  // Getters for typed input ports
70  // ----------------------------------------------------------------------
71 
76  FwIndexType portNum
77  );
78 
79 #endif
80 
81  protected:
82 
83  // ----------------------------------------------------------------------
84  // Component construction and destruction
85  // ----------------------------------------------------------------------
86 
89  const char* compName = ""
90  );
91 
94 
95  protected:
96 
97  // ----------------------------------------------------------------------
98  // Getters for numbers of typed input ports
99  // ----------------------------------------------------------------------
100 
106  }
107 
108  protected:
109 
110  // ----------------------------------------------------------------------
111  // Handlers to implement for typed input ports
112  // ----------------------------------------------------------------------
113 
115  virtual void TextLogger_handler(
116  FwIndexType portNum,
117  FwEventIdType id,
118  Fw::Time& timeTag,
119  const Fw::LogSeverity& severity,
120  Fw::TextLogString& text
121  ) = 0;
122 
123 #if FW_DIRECT_PORT_CALLS
124  public:
125 #else
126  protected:
127 #endif
128 
129  // ----------------------------------------------------------------------
130  // Port handler base-class functions for typed input ports
131  //
132  // Call these functions directly to bypass the corresponding ports
133  // ----------------------------------------------------------------------
134 
137  FwIndexType portNum,
138  FwEventIdType id,
139  Fw::Time& timeTag,
140  const Fw::LogSeverity& severity,
141  Fw::TextLogString& text
142  );
143 
144  protected:
145 
146  // ----------------------------------------------------------------------
147  // Internal interface handlers
148  // ----------------------------------------------------------------------
149 
152  const Fw::InternalInterfaceString& text
153  ) = 0;
154 
155  protected:
156 
157  // ----------------------------------------------------------------------
158  // Internal interface base-class functions
159  // ----------------------------------------------------------------------
160 
163  const Fw::InternalInterfaceString& text
164  );
165 
166  private:
167 
168  // ----------------------------------------------------------------------
169  // Message dispatch functions
170  // ----------------------------------------------------------------------
171 
173  virtual MsgDispatchStatus doDispatch();
174 
175  private:
176 
177  // ----------------------------------------------------------------------
178  // Calls for messages received on typed input ports
179  // ----------------------------------------------------------------------
180 
182  static void m_p_TextLogger_in(
183  Fw::PassiveComponentBase* callComp,
184  FwIndexType portNum,
185  FwEventIdType id,
186  Fw::Time& timeTag,
187  const Fw::LogSeverity& severity,
188  Fw::TextLogString& text
189  );
190 
191 #if !FW_DIRECT_PORT_CALLS
192 
193  private:
194 
195  // ----------------------------------------------------------------------
196  // Typed input ports
197  // ----------------------------------------------------------------------
198 
200  Fw::InputLogTextPort m_TextLogger_InputPort[NUM_TEXTLOGGER_INPUT_PORTS];
201 
202 #endif
203 
204  };
205 
206 }
207 
208 #endif
virtual void TextQueue_internalInterfaceHandler(const Fw::InternalInterfaceString &text)=0
Internal interface handler for TextQueue.
friend class ActiveTextLoggerTester
Friend class tester implementation to support white-box testing.
PlatformSizeType FwSizeType
I32 FwEnumStoreType
virtual void TextLogger_handler(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::TextLogString &text)=0
Handler for input port TextLogger.
ActiveTextLoggerComponentBase(const char *compName="")
Construct ActiveTextLoggerComponentBase object.
friend class ActiveTextLoggerTesterBase
Friend class tester to support autocoded test harness.
void init()
Object initializer.
Definition: ObjBase.cpp:24
FwIdType FwEventIdType
The type of an event identifier.
virtual ~ActiveTextLoggerComponentBase()
Destroy ActiveTextLoggerComponentBase object.
Fw::InputLogTextPort * get_TextLogger_InputPort(FwIndexType portNum)
Enum representing event severity.
Auto-generated base for ActiveTextLogger component.
PlatformIndexType FwIndexType
RateGroupDivider component implementation.
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.
static constexpr FwIndexType getNum_TextLogger_InputPorts()
void TextQueue_internalInterfaceInvoke(const Fw::InternalInterfaceString &text)
Internal interface base-class function for TextQueue.