F´ Flight Software - C/C++ Documentation
devel
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
10
#include <
Svc/ActiveTextLogger/ActiveTextLoggerComponentAc.hpp
>
11
#include <
Svc/ActiveTextLogger/LogFile.hpp
>
12
13
14
namespace
Svc
{
15
23
24
class
ActiveTextLogger
:
public
ActiveTextLoggerComponentBase
{
25
26
public
:
27
36
explicit
ActiveTextLogger
(
const
char
* compName);
37
40
virtual
~ActiveTextLogger
();
41
52
bool
set_log_file
(
const
char
* fileName,
const
U32 maxSize,
const
U32 maxBackups = 10);
53
54
55
PRIVATE:
56
57
// ----------------------------------------------------------------------
58
// Prohibit Copying
59
// ----------------------------------------------------------------------
60
64
ActiveTextLogger
(
const
ActiveTextLogger
&);
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(
86
NATIVE_INT_TYPE
portNum,
87
FwEventIdType
id
,
88
Fw::Time
&timeTag,
89
const
Fw::LogSeverity
& severity,
90
Fw::TextLogString
&text
91
);
92
93
// ----------------------------------------------------------------------
94
// Internal interface handlers
95
// ----------------------------------------------------------------------
96
99
virtual
void
TextQueue_internalInterfaceHandler(
100
const
Fw::InternalInterfaceString
& text
101
);
102
103
// ----------------------------------------------------------------------
104
// Member Variables
105
// ----------------------------------------------------------------------
106
107
// The optional file to text logs to:
108
LogFile
m_log_file;
109
110
};
111
112
}
113
#endif
/* ACTIVETEXTLOGGERIMPL_HPP_ */
ActiveTextLoggerComponentAc.hpp
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition:
BasicTypes.h:55
FwEventIdType
U32 FwEventIdType
Definition:
FpConfig.h:103
LogFile.hpp
Fw::InternalInterfaceString
Definition:
InternalInterfaceString.hpp:18
Fw::LogSeverity
Enum representing event severity.
Definition:
LogSeverityEnumAc.hpp:19
Fw::TextLogString
Definition:
TextLogString.hpp:17
Fw::Time
Definition:
Time.hpp:9
Svc::ActiveTextLoggerComponentBase
Auto-generated base for ActiveTextLogger component.
Definition:
ActiveTextLoggerComponentAc.hpp:27
Svc::ActiveTextLogger
Definition:
ActiveTextLogger.hpp:24
Svc::ActiveTextLogger::ActiveTextLogger
ActiveTextLogger(const char *compName)
Component constructor.
Definition:
ActiveTextLogger.cpp:17
Svc::ActiveTextLogger::~ActiveTextLogger
virtual ~ActiveTextLogger()
Component destructor.
Definition:
ActiveTextLogger.cpp:24
Svc::ActiveTextLogger::set_log_file
bool set_log_file(const char *fileName, const U32 maxSize, const U32 maxBackups=10)
Set log file and max size.
Definition:
ActiveTextLogger.cpp:130
Svc
Definition:
ActiveRateGroupCfg.hpp:18
Svc::LogFile
LogFile struct.
Definition:
LogFile.hpp:22
Svc
ActiveTextLogger
ActiveTextLogger.hpp
Generated by
1.9.1