F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ActiveTextLogger.hpp
Go to the documentation of this file.
1 // \copyright
2 // Copyright 2009-2015, by the California Institute of Technology.
3 // ALL RIGHTS RESERVED. United States Government Sponsorship
4 // acknowledged.
5 
6 
7 #ifndef ACTIVETEXTLOGGERIMPL_HPP_
8 #define ACTIVETEXTLOGGERIMPL_HPP_
9 
12 
13 
14 namespace Svc {
15 
23 
25 
26  friend class ActiveTextLoggerTester;
27 
28  public:
29 
38  explicit ActiveTextLogger(const char* compName);
39 
42  virtual ~ActiveTextLogger();
43 
54  bool set_log_file(const char* fileName, const U32 maxSize, const U32 maxBackups = 10);
55 
56 
57  private:
58 
59  // ----------------------------------------------------------------------
60  // Prohibit Copying
61  // ----------------------------------------------------------------------
62 
67 
71  ActiveTextLogger& operator=(const ActiveTextLogger&);
72 
73  // ----------------------------------------------------------------------
74  // Constants/Types
75  // ----------------------------------------------------------------------
76 
77  // ----------------------------------------------------------------------
78  // Member Functions
79  // ----------------------------------------------------------------------
80 
81  // ----------------------------------------------------------------------
82  // Handlers to implement for typed input ports
83  // ----------------------------------------------------------------------
84 
86  //
87  virtual void TextLogger_handler(
88  FwIndexType portNum,
89  FwEventIdType id,
90  Fw::Time &timeTag,
91  const Fw::LogSeverity& severity,
92  Fw::TextLogString &text
93  );
94 
95  // ----------------------------------------------------------------------
96  // Internal interface handlers
97  // ----------------------------------------------------------------------
98 
101  virtual void TextQueue_internalInterfaceHandler(
102  const Fw::InternalInterfaceString& text
103  );
104 
105  // ----------------------------------------------------------------------
106  // Member Variables
107  // ----------------------------------------------------------------------
108 
109  // The optional file to text logs to:
110  LogFile m_log_file;
111 
112  };
113 
114 }
115 #endif /* ACTIVETEXTLOGGERIMPL_HPP_ */
Definition: Time.hpp:9
friend class ActiveTextLoggerTester
LogFile struct.
Definition: LogFile.hpp:22
ActiveTextLogger(const char *compName)
Component constructor.
FwIdType FwEventIdType
The type of an event identifier.
virtual ~ActiveTextLogger()
Component destructor.
Enum representing event severity.
Auto-generated base for ActiveTextLogger component.
PlatformIndexType FwIndexType
bool set_log_file(const char *fileName, const U32 maxSize, const U32 maxBackups=10)
Set log file and max size.
RateGroupDivider component implementation.