Subversion Repositories Projects

Rev

Rev 391 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
239 Brean 1
/***************************************************************************
2
 *   Copyright (C) 2009 by Manuel Schrape                                  *
3
 *   manuel.schrape@gmx.de                                                 *
4
 *   and Andreas Bresser bresser@informatik.uni-bremen.de                  *
5
 *                                                                         *
6
 *   This program is free software; you can redistribute it and/or modify  *
7
 *   it under the terms of the GNU General Public License as published by  *
8
 *   the Free Software Foundation; either version 2 of the License.        *
9
 *                                                                         *
10
 *   This program is distributed in the hope that it will be useful,       *
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
 *   GNU General Public License for more details.                          *
14
 *                                                                         *
15
 *   You should have received a copy of the GNU General Public License     *
16
 *   along with this program; if not, write to the                         *
17
 *   Free Software Foundation, Inc.,                                       *
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19
 ***************************************************************************/
20
 
21
#ifndef LOGGER_H
22
#define LOGGER_H
23
 
24
#include <QLinkedList>
25
#include <QString>
26
#include "DefaultLogger.h"
240 Brean 27
#include "../global.h"
239 Brean 28
#include "../Classes/cSettings.h"
440 Brean 29
#include "../libMK/Handler.h"
239 Brean 30
 
31
//Die verschiedenen header der einzelnen Logger
32
//TODO: MySQLLogger, SQLiteLogger und/oder PostGreSQLLogger
33
#include "CSVLogger.h"
34
 
35
class Logger
36
{
37
private:
38
    CSVLogger * csv;
39
    //Liste aller bekannten Logger
40
    QLinkedList<DefaultLogger *> logger;
41
 
42
    bool active;
43
 
44
public:
440 Brean 45
    Logger(cSettings * settings, KopterData * data);
239 Brean 46
    ~Logger();
47
 
48
    void start_Log();
49
 
50
    //soll geloggt werden?
51
    bool is_active();
52
 
53
    //schreibe log
54
    void write(int * analogData);
55
 
56
    //alles schließen
57
    void close();
58
};
247 Brean 59
#endif