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 #include <config/ActiveTextLoggerCfg.hpp>
12 
13 namespace Svc {
14 
22 
24  friend class ActiveTextLoggerTester;
25 
26  public:
35  explicit ActiveTextLogger(const char* compName);
36 
39  virtual ~ActiveTextLogger();
40 
51  bool set_log_file(const char* fileName, const U32 maxSize, const U32 maxBackups = 10);
52 
54  void configure(const FwEventIdType* filteredIds, FwSizeType count);
55 
56  private:
57  // ----------------------------------------------------------------------
58  // Prohibit Copying
59  // ----------------------------------------------------------------------
60 
65 
69  ActiveTextLogger& operator=(const ActiveTextLogger&);
70 
71  // ----------------------------------------------------------------------
72  // Constants/Types
73  // ----------------------------------------------------------------------
74 
75  // ----------------------------------------------------------------------
76  // Member Functions
77  // ----------------------------------------------------------------------
78 
79  // ----------------------------------------------------------------------
80  // Handlers to implement for typed input ports
81  // ----------------------------------------------------------------------
82 
84  //
85  virtual void TextLogger_handler(FwIndexType portNum,
86  FwEventIdType id,
87  Fw::Time& timeTag,
88  const Fw::LogSeverity& severity,
89  Fw::TextLogString& text
90  );
91 
92  // ----------------------------------------------------------------------
93  // Internal interface handlers
94  // ----------------------------------------------------------------------
95 
98  virtual void TextQueue_internalInterfaceHandler(const Fw::InternalInterfaceString& text
99  );
100 
101  // ----------------------------------------------------------------------
102  // Member Variables
103  // ----------------------------------------------------------------------
104 
105  // The optional file to text logs to:
106  LogFile m_log_file;
107 
108  // Event ID filters
109  FwSizeType m_numFilteredIDs;
111 };
112 
113 } // namespace Svc
114 #endif /* ACTIVETEXTLOGGERIMPL_HPP_ */
void configure(const FwEventIdType *filteredIds, FwSizeType count)
Configure component with event ID filters.
PlatformSizeType FwSizeType
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.