src/libproc/acpi.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef LIBPROC_ACPI_H_FJIAO9GH430Q8FZUJN
00035 #define LIBPROC_ACPI_H_FJIAO9GH430Q8FZUJN
00036
00037 #define LIBPROC_BATTERY_OK 0
00038 #define LIBPROC_BATTERY_CRITICAL 1
00039 #define LIBPROC_BATTERY_CHARGED 0
00040 #define LIBPROC_BATTERY_CHARGING 1
00041 #define LIBPROC_BATTERY_DISCHARGING 2
00042 #define LIBPROC_BATTERY_CHARGING_DISCHARGING 2
00043
00044 struct libproc_acpi_battstate {
00045
00046 int present;
00047
00048 int capstate;
00049
00050 int chargestate;
00051
00052 unsigned long int rate;
00053
00054 unsigned long int capacity;
00055
00056 unsigned long int voltage;
00057 };
00058
00059 #define LIBPROC_BATTERY_TECHLEN 64
00060 #define LIBPROC_BATTERY_MODELLEN 64
00061 #define LIBPROC_BATTERY_SERIALLEN 64
00062 #define LIBPROC_BATTERY_TYPELEN 64
00063 #define LIBPROC_BATTERY_OEMLEN 64
00064
00065
00066 struct libproc_acpi_battery {
00067
00068 unsigned int battnum;
00069
00070
00071 unsigned long int alarm;
00072
00073
00074 int present;
00075
00076 unsigned long int descap;
00077
00078 unsigned long int lastfullcap;
00079
00080 char tech[LIBPROC_BATTERY_TECHLEN];
00081
00082 unsigned long int desvolt;
00083
00084 unsigned long int deswarn;
00085
00086 unsigned long int deslow;
00087
00088 unsigned long int capgran1;
00089 unsigned long int capgran2;
00090
00091 char model[LIBPROC_BATTERY_MODELLEN];
00092
00093 char serial[LIBPROC_BATTERY_SERIALLEN];
00094
00095 char type[LIBPROC_BATTERY_TYPELEN];
00096
00097 char oem[LIBPROC_BATTERY_OEMLEN];
00098
00099
00100 struct libproc_acpi_battstate *state;
00101
00102
00103 struct libproc_acpi_battery *next;
00104 };
00105
00106
00107 struct libproc_acpi_cpulimit {
00108
00109 unsigned int activep;
00110
00111 unsigned int activet;
00112
00113 unsigned int userp;
00114
00115 unsigned int usert;
00116
00117 unsigned int thermp;
00118
00119 unsigned int thermt;
00120 };
00121
00122
00123 struct libproc_acpi_cstate {
00124
00125 unsigned int state;
00126 unsigned int p;
00127 unsigned int d;
00128 unsigned int latency;
00129 unsigned long int usage;
00130 struct libproc_acpi_cstate *next;
00131 };
00132
00133 struct libproc_acpi_cpupower {
00134
00135 unsigned int activec;
00136
00137 unsigned int defaultc;
00138
00139 unsigned int busmaster;
00140
00141 struct libproc_acpi_cstate *cstates;
00142 };
00143
00144 struct libproc_acpi_tstate {
00145 unsigned int state;
00146 unsigned int throttling;
00147
00148 int active;
00149
00150 struct libproc_acpi_tstate* next;
00151 };
00152
00153 struct libproc_acpi_cputhrottling {
00154
00155 unsigned int numstates;
00156
00157 unsigned int active;
00158
00159 struct libproc_acpi_tstate *tstates;
00160 };
00161
00162 struct libproc_acpi_cpu {
00163
00164 unsigned int id;
00165
00166 unsigned int acpiId;
00167
00168 int busmastering;
00169
00170 int powerman;
00171
00172 int throttling;
00173
00174 int limitflag;
00175
00176 struct libproc_acpi_cpulimit* limit;
00177 struct libproc_acpi_cpupower* power;
00178 struct libproc_acpi_cputhrottling* throttle;
00179
00180 struct libproc_acpi_cpu* next;
00181 };
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193 struct libproc_acpi_battery* libproc_acpi_get_batteries(int *err);
00194
00195
00196
00197
00198
00199
00200
00201
00202 struct libproc_acpi_battstate* libproc_acpi_get_battery_state(unsigned int battery, int *err);
00203 struct libproc_acpi_battery* libproc_acpi_get_battery(unsigned int battery, int *err);
00204 unsigned long int libproc_acpi_get_battery_alarm(unsigned int battery, int *err);
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215 struct libproc_acpi_cpu* libproc_acpi_get_cpus(int *err);
00216 struct libproc_acpi_cpu* libproc_acpi_get_cpu(unsigned int cpu, int *err);
00217
00218
00219
00220
00221
00222
00223
00224
00225 struct libproc_acpi_cpulimit* libproc_acpi_get_cpulimit(unsigned int cpu, int *err);
00226
00227
00228
00229
00230
00231
00232 int libproc_acpi_set_cpulimit(unsigned int cpu, int p, int t);
00233
00234
00235
00236
00237
00238
00239
00240
00241 struct libproc_acpi_cpupower* libproc_acpi_get_cpupower(unsigned int cpu, int *err);
00242
00243
00244
00245
00246
00247
00248
00249
00250 struct libproc_acpi_cputhrottling* libproc_acpi_get_cputhrottling(unsigned int cpu, int *err);
00251
00252
00253 void libproc_acpi_freethrottling(struct libproc_acpi_cputhrottling* throttle);
00254 void libproc_acpi_freepower(struct libproc_acpi_cpupower* power);
00255 void libproc_acpi_freelimit(struct libproc_acpi_cpulimit* limit);
00256 void libproc_acpi_freecpu(struct libproc_acpi_cpu* cpu);
00257 void libproc_acpi_freebattery(struct libproc_acpi_battery* state);
00258 void libproc_acpi_freebattstate(struct libproc_acpi_battstate* state);
00259
00260 #endif //LIBPROC_ACPI_H_FJIAO9GH430Q8FZUJN
Generated on Thu Dec 30 21:48:53 2004 for The Versatile Governor by
1.3.8