query.h 759 Bytes
Newer Older
Axel Auweter's avatar
Axel Auweter committed
1
2
3
4
5
6
7
8
9
10
/*
 * query.cpp
 *
 *  Created on: Feb 20, 2015
 *      Author: Axel Auweter
 */

#include <list>
#include <string>

Axel Auweter's avatar
Axel Auweter committed
11
#include "dcdb/connection.h"
Axel Auweter's avatar
Axel Auweter committed
12
#include "dcdb/timestamp.h"
Axel Auweter's avatar
Axel Auweter committed
13
#include "dcdb/sensorid.h"
Axel Auweter's avatar
Axel Auweter committed
14
#include "dcdb/sensordatastore.h"
Axel Auweter's avatar
Axel Auweter committed
15
#include "dcdb/sensorconfig.h"
Axel Auweter's avatar
Axel Auweter committed
16
#include "dcdb/unitconv.h"
Axel Auweter's avatar
Axel Auweter committed
17
18
19
20
21
22

#ifndef QUERY_H
#define QUERY_H

class DCDBQuery
{
Axel Auweter's avatar
Axel Auweter committed
23
24
25
26
27
protected:
  DCDBConnection* connection;
  bool useLocalTime;
  bool useRawOutput;

Axel Auweter's avatar
Axel Auweter committed
28
public:
Axel Auweter's avatar
Axel Auweter committed
29
30
31
32
33
34
  void setLocalTimeEnabled(bool enable);
  bool getLocalTimeEnabled();
  void setRawOutputEnabled(bool enable);
  bool getRawOutputEnabled();
  void doQuery(const char* hostname, std::list<std::string> sensors, DCDBTimeStamp start, DCDBTimeStamp end);

Axel Auweter's avatar
Axel Auweter committed
35
  DCDBQuery();
Axel Auweter's avatar
Axel Auweter committed
36
  virtual ~DCDBQuery() {};
Axel Auweter's avatar
Axel Auweter committed
37
38
39
40
41

};


#endif /* QUERY_H */