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 #if FW_ENABLE_TEXT_LOGGING == 1
13 #include "Fw/Log/LogTextPortAc.hpp"
14 #endif
19 
20 namespace Svc {
21 
28  {
29 
30  // ----------------------------------------------------------------------
31  // Friend classes
32  // ----------------------------------------------------------------------
33 
37  friend class ActiveTextLoggerTester;
38 
39  protected:
40 
41  // ----------------------------------------------------------------------
42  // Constants
43  // ----------------------------------------------------------------------
44 
46  enum {
48  };
49 
50  public:
51 
52  // ----------------------------------------------------------------------
53  // Component initialization
54  // ----------------------------------------------------------------------
55 
57  void init(
58  FwSizeType queueDepth,
59  FwEnumStoreType instance = 0
60  );
61 
62  public:
63 
64  // ----------------------------------------------------------------------
65  // Getters for typed input ports
66  // ----------------------------------------------------------------------
67 
72  FwIndexType portNum
73  );
74 
75  protected:
76 
77  // ----------------------------------------------------------------------
78  // Component construction and destruction
79  // ----------------------------------------------------------------------
80 
83  const char* compName = ""
84  );
85 
88 
89  protected:
90 
91  // ----------------------------------------------------------------------
92  // Getters for numbers of typed input ports
93  // ----------------------------------------------------------------------
94 
100  }
101 
102  protected:
103 
104  // ----------------------------------------------------------------------
105  // Handlers to implement for typed input ports
106  // ----------------------------------------------------------------------
107 
109  virtual void TextLogger_handler(
110  FwIndexType portNum,
111  FwEventIdType id,
112  Fw::Time& timeTag,
113  const Fw::LogSeverity& severity,
114  Fw::TextLogString& text
115  ) = 0;
116 
117  protected:
118 
119  // ----------------------------------------------------------------------
120  // Port handler base-class functions for typed input ports
121  //
122  // Call these functions directly to bypass the corresponding ports
123  // ----------------------------------------------------------------------
124 
127  FwIndexType portNum,
128  FwEventIdType id,
129  Fw::Time& timeTag,
130  const Fw::LogSeverity& severity,
131  Fw::TextLogString& text
132  );
133 
134  protected:
135 
136  // ----------------------------------------------------------------------
137  // Internal interface handlers
138  // ----------------------------------------------------------------------
139 
142  const Fw::InternalInterfaceString& text
143  ) = 0;
144 
145  protected:
146 
147  // ----------------------------------------------------------------------
148  // Internal interface base-class functions
149  // ----------------------------------------------------------------------
150 
153  const Fw::InternalInterfaceString& text
154  );
155 
156  private:
157 
158  // ----------------------------------------------------------------------
159  // Message dispatch functions
160  // ----------------------------------------------------------------------
161 
163  virtual MsgDispatchStatus doDispatch();
164 
165  private:
166 
167  // ----------------------------------------------------------------------
168  // Calls for messages received on typed input ports
169  // ----------------------------------------------------------------------
170 
172  static void m_p_TextLogger_in(
173  Fw::PassiveComponentBase* callComp,
174  FwIndexType portNum,
175  FwEventIdType id,
176  Fw::Time& timeTag,
177  const Fw::LogSeverity& severity,
178  Fw::TextLogString& text
179  );
180 
181  private:
182 
183  // ----------------------------------------------------------------------
184  // Typed input ports
185  // ----------------------------------------------------------------------
186 
188  Fw::InputLogTextPort m_TextLogger_InputPort[NUM_TEXTLOGGER_INPUT_PORTS];
189 
190  };
191 
192 }
193 
194 #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.