F´ Flight Software - C/C++ Documentation  devel
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 
10 #include "FpConfig.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 
35 
36  PROTECTED:
37 
38  // ----------------------------------------------------------------------
39  // Constants
40  // ----------------------------------------------------------------------
41 
43  enum {
45  };
46 
47  public:
48 
49  // ----------------------------------------------------------------------
50  // Component initialization
51  // ----------------------------------------------------------------------
52 
54  void init(
55  FwQueueSizeType queueDepth,
56  FwEnumStoreType instance = 0
57  );
58 
59  public:
60 
61  // ----------------------------------------------------------------------
62  // Getters for typed input ports
63  // ----------------------------------------------------------------------
64 
69  FwIndexType portNum
70  );
71 
72  PROTECTED:
73 
74  // ----------------------------------------------------------------------
75  // Component construction and destruction
76  // ----------------------------------------------------------------------
77 
80  const char* compName = ""
81  );
82 
85 
86  PROTECTED:
87 
88  // ----------------------------------------------------------------------
89  // Getters for numbers of typed input ports
90  // ----------------------------------------------------------------------
91 
96 
97  PROTECTED:
98 
99  // ----------------------------------------------------------------------
100  // Handlers to implement for typed input ports
101  // ----------------------------------------------------------------------
102 
104  virtual void TextLogger_handler(
105  FwIndexType portNum,
106  FwEventIdType id,
107  Fw::Time& timeTag,
108  const Fw::LogSeverity& severity,
109  Fw::TextLogString& text
110  ) = 0;
111 
112  PROTECTED:
113 
114  // ----------------------------------------------------------------------
115  // Port handler base-class functions for typed input ports
116  //
117  // Call these functions directly to bypass the corresponding ports
118  // ----------------------------------------------------------------------
119 
122  FwIndexType portNum,
123  FwEventIdType id,
124  Fw::Time& timeTag,
125  const Fw::LogSeverity& severity,
126  Fw::TextLogString& text
127  );
128 
129  PROTECTED:
130 
131  // ----------------------------------------------------------------------
132  // Internal interface handlers
133  // ----------------------------------------------------------------------
134 
137  const Fw::InternalInterfaceString& text
138  ) = 0;
139 
140  PROTECTED:
141 
142  // ----------------------------------------------------------------------
143  // Internal interface base-class functions
144  // ----------------------------------------------------------------------
145 
148  const Fw::InternalInterfaceString& text
149  );
150 
151  PRIVATE:
152 
153  // ----------------------------------------------------------------------
154  // Message dispatch functions
155  // ----------------------------------------------------------------------
156 
158  virtual MsgDispatchStatus doDispatch();
159 
160  PRIVATE:
161 
162  // ----------------------------------------------------------------------
163  // Calls for messages received on typed input ports
164  // ----------------------------------------------------------------------
165 
167  static void m_p_TextLogger_in(
168  Fw::PassiveComponentBase* callComp,
169  FwIndexType portNum,
170  FwEventIdType id,
171  Fw::Time& timeTag,
172  const Fw::LogSeverity& severity,
173  Fw::TextLogString& text
174  );
175 
176  PRIVATE:
177 
178  // ----------------------------------------------------------------------
179  // Typed input ports
180  // ----------------------------------------------------------------------
181 
183  Fw::InputLogTextPort m_TextLogger_InputPort[NUM_TEXTLOGGER_INPUT_PORTS];
184 
185  };
186 
187 }
188 
189 #endif
I32 FwEnumStoreType
Definition: FpConfig.h:51
U32 FwEventIdType
Definition: FpConfig.h:86
FwIndexType FwQueueSizeType
Definition: FpConfig.h:117
PlatformIndexType FwIndexType
Definition: FpConfig.h:20
C++-compatible configuration header for fprime configuration.
Enum representing event severity.
void init()
Object initializer.
Definition: ObjBase.cpp:27
Definition: Time.hpp:9
Auto-generated base for ActiveTextLogger component.
ActiveTextLoggerComponentBase(const char *compName="")
Construct ActiveTextLoggerComponentBase object.
Fw::InputLogTextPort * get_TextLogger_InputPort(FwIndexType portNum)
void TextQueue_internalInterfaceInvoke(const Fw::InternalInterfaceString &text)
Internal interface base-class function for TextQueue.
virtual void TextLogger_handler(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::TextLogString &text)=0
Handler for input port TextLogger.
virtual ~ActiveTextLoggerComponentBase()
Destroy ActiveTextLoggerComponentBase object.
friend class ActiveTextLoggerComponentBaseFriend
Friend class for 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.
virtual void TextQueue_internalInterfaceHandler(const Fw::InternalInterfaceString &text)=0
Internal interface handler for TextQueue.