F´ Flight Software - C/C++ Documentation devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
14namespace Svc {
15
23
25
26 public:
27
36 explicit ActiveTextLogger(const char* compName);
37
40 virtual ~ActiveTextLogger();
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
78 ActiveTextLogger& operator=(const ActiveTextLogger&);
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,
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_ */
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
U32 FwEventIdType
Definition FpConfig.h:62
Enum representing event severity.
void init()
Object initializer.
Definition ObjBase.cpp:27
Auto-generated base for ActiveTextLogger component.
ActiveTextLogger(const char *compName)
Component constructor.
virtual ~ActiveTextLogger()
Component destructor.
bool set_log_file(const char *fileName, const U32 maxSize, const U32 maxBackups=10)
Set log file and max size.
LogFile struct.
Definition LogFile.hpp:22