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