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 #ifndef ACTIVETEXTLOGGERIMPL_HPP_
7 #define ACTIVETEXTLOGGERIMPL_HPP_
8 
11 
12 namespace Svc {
13 
21 
23  friend class ActiveTextLoggerTester;
24 
25  public:
34  explicit ActiveTextLogger(const char* compName);
35 
38  virtual ~ActiveTextLogger();
39 
50  bool set_log_file(const char* fileName, const U32 maxSize, const U32 maxBackups = 10);
51 
52  private:
53  // ----------------------------------------------------------------------
54  // Prohibit Copying
55  // ----------------------------------------------------------------------
56 
61 
65  ActiveTextLogger& operator=(const ActiveTextLogger&);
66 
67  // ----------------------------------------------------------------------
68  // Constants/Types
69  // ----------------------------------------------------------------------
70 
71  // ----------------------------------------------------------------------
72  // Member Functions
73  // ----------------------------------------------------------------------
74 
75  // ----------------------------------------------------------------------
76  // Handlers to implement for typed input ports
77  // ----------------------------------------------------------------------
78 
80  //
81  virtual void TextLogger_handler(FwIndexType portNum,
82  FwEventIdType id,
83  Fw::Time& timeTag,
84  const Fw::LogSeverity& severity,
85  Fw::TextLogString& text
86  );
87 
88  // ----------------------------------------------------------------------
89  // Internal interface handlers
90  // ----------------------------------------------------------------------
91 
94  virtual void TextQueue_internalInterfaceHandler(const Fw::InternalInterfaceString& text
95  );
96 
97  // ----------------------------------------------------------------------
98  // Member Variables
99  // ----------------------------------------------------------------------
100 
101  // The optional file to text logs to:
102  LogFile m_log_file;
103 };
104 
105 } // namespace Svc
106 #endif /* ACTIVETEXTLOGGERIMPL_HPP_ */
friend class ActiveTextLoggerTester
LogFile struct.
Definition: LogFile.hpp:21
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.