-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathomnikstats.h
40 lines (35 loc) · 919 Bytes
/
omnikstats.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
#define C_UDPPORT "48899" // the port users will be connecting to
#define UDPPORT 48899
#define OMNIKPORT 8899
#define MAXBUFLEN 100
struct statistics {
int verbose;
int logcsv;
char url[60];
char key[60];
char ID[10];
char IPnumber[20];
char filename[200];
int strings;
long serial_number;
float temperature;
float PVVoltageDC[3];
float IVCurrentDC[3];
float PVVoltageAC[3];
float IVCurrentAC[3];
float frequency;
float PVPower[3];
float PowerToday;
float TotalPower;
float TotalHours;
};
extern struct statistics stats;
extern float ctonr(char * src, int nrofbytes, int div);
extern void *get_in_addr(struct sockaddr *sa);
extern int omniksearch(void);
extern int omnikgetstats(char *server_reply);
extern void omnikcsv(void);
extern char *getdatetime(char *now, int datetime);
extern int omnikpvoutput(void);
extern void omnikfillstruct(char *server_reply);
extern int omnikreadconfig(void);