]> git.itanic.dy.fi Git - log-plotter/blob - data.h
data.c: Implement initial support for handling multiple data channels
[log-plotter] / data.h
1 #ifndef _DATA_H_
2 #define _DATA_H_
3
4 #include "config.h"
5
6 #define MAX_CELLS 10
7
8 struct charger_data {
9         unsigned int channel;
10         int state;
11         double timestamp;       /* seconds since beginning of the charging */
12         double input_voltage;
13         double charging_voltage;
14         double charging_current;
15         double cell_voltage[MAX_CELLS];
16
17         double total_charge;    /* mAh */
18         double int_temp;        /* celsius */
19         double ext_temp;
20 };
21
22 int init_data_parser(int infd, struct plotter_config *cfg);
23
24 #endif