-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqbattpsu.h
54 lines (46 loc) · 1.16 KB
/
qbattpsu.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
#ifndef QBATTPSU
#define QBATTPSU
#include <QString>
typedef struct _acad_info {
QString path;
QString psu_name;
int online;
} acad_t;
typedef struct _batt_info {
QString path;
QString psu_status;
int psu_present;
QString psu_technology;
QString psu_type;
int psu_cycle_count;
int psu_voltage_min_design;
int psu_voltage_now;
int psu_current_now;
int psu_charge_full_design;
int psu_charge_full;
int psu_charge_now;
int psu_capacity;
int psu_energy_full;
int psu_energy_full_design;
int psu_energy_now;
int psu_power_now;
QString psu_capacity_level;
QString psu_model_name;
QString psu_manufacturer;
QString psu_serial_number;
} battinfo_t;
typedef struct _psu_info {
acad_t ac_adapter;
battinfo_t battery;
} psuinfo_t;
typedef enum {
BATT_CHARGING = 1,
BATT_DISCHARGING = 2,
BATT_FULL = 4,
BATT_UNKNOWN
} tBatteryChargeState;
static const QString BATT_STATUS_UNKNOWN = "Unknown";
static const QString BATT_STATUS_DISCHARGING = "Discharging";
static const QString BATT_STATUS_CHARGING = "Charging";
static const QString BATT_STATUS_FULL = "Full";
#endif // QBATTPSU