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
15 #if !FW_DIRECT_PORT_CALLS
17 #endif
18 #if !FW_DIRECT_PORT_CALLS
20 #endif
23 
24 namespace Svc {
25 
32  {
33 
34  // ----------------------------------------------------------------------
35  // Friend classes
36  // ----------------------------------------------------------------------
37 
41  friend class ActiveTextLoggerTester;
42 
43  protected:
44 
45  // ----------------------------------------------------------------------
46  // Constants
47  // ----------------------------------------------------------------------
48 
50  enum {
52  };
53 
54  public:
55 
56  // ----------------------------------------------------------------------
57  // Component initialization
58  // ----------------------------------------------------------------------
59 
61  void init(
62  FwSizeType queueDepth,
63  FwEnumStoreType instance = 0
64  );
65 
66 #if !FW_DIRECT_PORT_CALLS
67 
68  public:
69 
70  // ----------------------------------------------------------------------
71  // Getters for typed input ports
72  // ----------------------------------------------------------------------
73 
78  FwIndexType portNum
79  );
80 
81 #endif
82 
83  protected:
84 
85  // ----------------------------------------------------------------------
86  // Component construction and destruction
87  // ----------------------------------------------------------------------
88 
91  const char* compName = ""
92  );
93 
96 
97  protected:
98 
99  // ----------------------------------------------------------------------
100  // Getters for numbers of typed input ports
101  // ----------------------------------------------------------------------
102 
108  }
109 
110  protected:
111 
112  // ----------------------------------------------------------------------
113  // Handlers to implement for typed input ports
114  // ----------------------------------------------------------------------
115 
117  virtual void TextLogger_handler(
118  FwIndexType portNum,
119  FwEventIdType id,
120  Fw::Time& timeTag,
121  const Fw::LogSeverity& severity,
122  Fw::TextLogString& text
123  ) = 0;
124 
125 #if FW_DIRECT_PORT_CALLS
126  public:
127 #else
128  protected:
129 #endif
130 
131  // ----------------------------------------------------------------------
132  // Port handler base-class functions for typed input ports
133  //
134  // Call these functions directly to bypass the corresponding ports
135  // ----------------------------------------------------------------------
136 
139  FwIndexType portNum,
140  FwEventIdType id,
141  Fw::Time& timeTag,
142  const Fw::LogSeverity& severity,
143  Fw::TextLogString& text
144  );
145 
146  protected:
147 
148  // ----------------------------------------------------------------------
149  // Internal interface handlers
150  // ----------------------------------------------------------------------
151 
154  const Fw::InternalInterfaceString& text
155  ) = 0;
156 
157  protected:
158 
159  // ----------------------------------------------------------------------
160  // Internal interface base-class functions
161  // ----------------------------------------------------------------------
162 
165  const Fw::InternalInterfaceString& text
166  );
167 
168  private:
169 
170  // ----------------------------------------------------------------------
171  // Message dispatch functions
172  // ----------------------------------------------------------------------
173 
175  virtual MsgDispatchStatus doDispatch();
176 
177  private:
178 
179  // ----------------------------------------------------------------------
180  // Calls for messages received on typed input ports
181  // ----------------------------------------------------------------------
182 
184  static void m_p_TextLogger_in(
185  Fw::PassiveComponentBase* callComp,
186  FwIndexType portNum,
187  FwEventIdType id,
188  Fw::Time& timeTag,
189  const Fw::LogSeverity& severity,
190  Fw::TextLogString& text
191  );
192 
193 #if !FW_DIRECT_PORT_CALLS
194 
195  private:
196 
197  // ----------------------------------------------------------------------
198  // Typed input ports
199  // ----------------------------------------------------------------------
200 
202  Fw::InputLogTextPort m_TextLogger_InputPort[NUM_TEXTLOGGER_INPUT_PORTS];
203 
204 #endif
205 
206  };
207 
208 }
209 
210 #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.