FlightGear
next
logger.hxx
Go to the documentation of this file.
1
// logger.hxx - log properties.
2
// Written by David Megginson, started 2002.
3
//
4
// This file is in the Public Domain, and comes with no warranty.
5
6
#ifndef __LOGGER_HXX
7
#define __LOGGER_HXX 1
8
9
#include <memory>
10
#include <vector>
11
12
#include <simgear/compiler.h>
13
#include <simgear/io/iostreams/sgstream.hxx>
14
#include <simgear/structure/subsystem_mgr.hxx>
15
#include <simgear/props/props.hxx>
16
20
class
FGLogger
:
public
SGSubsystem
21
{
22
public
:
23
// Subsystem API.
24
void
bind
()
override
;
25
void
init
()
override
;
26
void
reinit
()
override
;
27
void
unbind
()
override
;
28
void
update
(
double
dt)
override
;
29
30
// Subsystem identification.
31
static
const
char
*
staticSubsystemClassId
() {
return
"logger"
; }
32
33
private
:
37
struct
Log {
38
Log ();
39
40
std::vector<SGPropertyNode_ptr> nodes;
41
std::unique_ptr<sg_ofstream> output;
42
long
interval_ms;
43
double
last_time_ms;
44
char
delimiter;
45
};
46
47
std::vector< std::unique_ptr<Log> > _logs;
48
};
49
50
#endif
// __LOGGER_HXX
FGLogger
Log any property values to any number of CSV files.
Definition
logger.hxx:21
FGLogger::init
void init() override
Definition
logger.cxx:32
FGLogger::reinit
void reinit() override
Definition
logger.cxx:120
FGLogger::staticSubsystemClassId
static const char * staticSubsystemClassId()
Definition
logger.hxx:31
FGLogger::bind
void bind() override
Definition
logger.cxx:127
FGLogger::update
void update(double dt) override
Definition
logger.cxx:137
FGLogger::unbind
void unbind() override
Definition
logger.cxx:132
src
Main
logger.hxx
Generated on Tue Jun 3 2025 12:58:40 for FlightGear by
1.13.2