Subversion Repositories Projects

Rev

Rev 239 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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