F´ Flight Software - C/C++ Documentation  NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
ActiveTextLoggerImpl.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 
10 #include <Svc/ActiveTextLogger/ActiveTextLoggerComponentAc.hpp>
12 
13 
14 namespace Svc {
15 
23 
24  class ActiveTextLoggerComponentImpl: public ActiveTextLoggerComponentBase {
25 
26  public:
27 
36  explicit ActiveTextLoggerComponentImpl(const char* compName);
37 
41 
49  void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance = 0);
50 
61  bool set_log_file(const char* fileName, const U32 maxSize, const U32 maxBackups = 10);
62 
63 
64  PRIVATE:
65 
66  // ----------------------------------------------------------------------
67  // Prohibit Copying
68  // ----------------------------------------------------------------------
69 
74 
79 
80  // ----------------------------------------------------------------------
81  // Constants/Types
82  // ----------------------------------------------------------------------
83 
84  // ----------------------------------------------------------------------
85  // Member Functions
86  // ----------------------------------------------------------------------
87 
88  // ----------------------------------------------------------------------
89  // Handlers to implement for typed input ports
90  // ----------------------------------------------------------------------
91 
93  //
94  virtual void TextLogger_handler(
95  NATIVE_INT_TYPE portNum,
96  FwEventIdType id,
97  Fw::Time &timeTag,
98  const Fw::LogSeverity& severity,
99  Fw::TextLogString &text
100  );
101 
102  // ----------------------------------------------------------------------
103  // Internal interface handlers
104  // ----------------------------------------------------------------------
105 
108  virtual void TextQueue_internalInterfaceHandler(
109  const Fw::InternalInterfaceString& text
110  );
111 
112  // ----------------------------------------------------------------------
113  // Member Variables
114  // ----------------------------------------------------------------------
115 
116  // The optional file to text logs to:
117  LogFile m_log_file;
118 
119  };
120 
121 }
122 #endif /* ACTIVETEXTLOGGERIMPL_HPP_ */
Fw::InternalInterfaceString
Definition: InternalInterfaceString.hpp:11
Fw::TextLogString
Definition: TextLogString.hpp:11
Fw::Time
Definition: Time.hpp:10
Svc::ActiveTextLoggerComponentImpl
Active text logger component class.
Definition: ActiveTextLoggerImpl.hpp:24
Svc::ActiveTextLoggerComponentImpl::ActiveTextLoggerComponentImpl
ActiveTextLoggerComponentImpl(const char *compName)
Component constructor.
Definition: ActiveTextLoggerImpl.cpp:17
LogFile.hpp
Svc::ActiveTextLoggerComponentImpl::~ActiveTextLoggerComponentImpl
virtual ~ActiveTextLoggerComponentImpl()
Component destructor.
Definition: ActiveTextLoggerImpl.cpp:24
Svc::LogFile
LogFile struct.
Definition: LogFile.hpp:22
Svc::ActiveTextLoggerComponentImpl::set_log_file
bool set_log_file(const char *fileName, const U32 maxSize, const U32 maxBackups=10)
Set log file and max size.
Definition: ActiveTextLoggerImpl.cpp:135
Svc
Definition: ActiveRateGroupImplCfg.hpp:18
FwEventIdType
#define FwEventIdType
Type representation for an event id.
Definition: FpConfig.hpp:66
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
Svc::ActiveTextLoggerComponentImpl::init
void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance=0)
Component initialization routine.
Definition: ActiveTextLoggerImpl.cpp:29