-
Notifications
You must be signed in to change notification settings - Fork 1
/
fpd.h
79 lines (62 loc) · 1.62 KB
/
fpd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* Copyright (c) 2012 Alexandros Nikolopoulos <[email protected]>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
#ifndef FPD_H_
#define FPD_H_
#include <stdio.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdint.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <mysql/mysql.h>
#include <mysql/errmsg.h>
#include <syslog.h>
#include <signal.h>
#include <pthread.h>
#include <unistd.h>
#include <signal.h>
#include <list>
#include <map>
#include <string>
#include <sstream>
using namespace std;
#define MAJOR_VERSION 2
#define MINOR_VERSION 5
#include "CInterface.h"
#include "settings.h"
extern bool debugFlag;
typedef map<string, string> DataContainer;
typedef list<DataContainer> DataContainerList;
class CProbe
{
public:
virtual ~CProbe(void){};
virtual int Start(void) = 0;
virtual int Stop(void) = 0;
virtual int GetAverage(DataContainer &AverageData) = 0;
virtual list<int> GetConnectedInverters(void) = 0;
virtual int ResetStack(void) = 0;
};
string int2string(uint8_t num);
string int2string(uint16_t num);
string int2string(uint32_t num);
string int2string(uint64_t num);
string int2string(int8_t num);
string int2string(int16_t num);
string int2string(int32_t num);
string int2string(int64_t num);
string int2string(time_t num);
string float2string(float num);
#endif /* FPD_H_ */