| 1 |
/* |
| 2 |
chips.h - Part of sensors, a user-space program for hardware monitoring |
| 3 |
Copyright (c) 1998, 1999 Frodo Looijaard <[email protected]> |
| 4 |
Copyright (C) 2007 Jean Delvare <[email protected]> |
| 5 |
|
| 6 |
This program is free software; you can redistribute it and/or modify |
| 7 |
it under the terms of the GNU General Public License as published by |
| 8 |
the Free Software Foundation; either version 2 of the License, or |
| 9 |
(at your option) any later version. |
| 10 |
|
| 11 |
This program is distributed in the hope that it will be useful, |
| 12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
GNU General Public License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License |
| 17 |
along with this program; if not, write to the Free Software |
| 18 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
| 19 |
MA 02110-1301 USA. |
| 20 |
*/ |
| 21 |
|
| 22 |
#ifndef PROG_SENSORS_CHIPS_H |
| 23 |
#define PROG_SENSORS_CHIPS_H |
| 24 |
|
| 25 |
#include "lib/sensors.h" |
| 26 |
|
| 27 |
/* |
| 28 |
* Retrieved subfeatures |
| 29 |
*/ |
| 30 |
struct sensor_subfeature_data { |
| 31 |
double value; /* Subfeature value. Not used for alarms. */ |
| 32 |
const char *name; /* Subfeature name */ |
| 33 |
const char *unit; /* Unit to be displayed for this subfeature. |
| 34 |
This field is optional. */ |
| 35 |
}; |
| 36 |
|
| 37 |
/* |
| 38 |
* Subfeature data structure. Used to create a table of implemented subfeatures |
| 39 |
* for a given feature. |
| 40 |
*/ |
| 41 |
struct sensor_subfeature_list { |
| 42 |
int subfeature; |
| 43 |
const struct sensor_subfeature_list *exists; |
| 44 |
/* Complementary subfeatures to be displayed |
| 45 |
if subfeature exists */ |
| 46 |
int alarm; /* true if this is an alarm */ |
| 47 |
const char *name; /* subfeature name to be printed */ |
| 48 |
}; |
| 49 |
|
| 50 |
void print_chip_raw(const sensors_chip_name *name); |
| 51 |
void print_chip_json(const sensors_chip_name *name); |
| 52 |
void print_chip(const sensors_chip_name *name); |
| 53 |
|
| 54 |
#endif /* def PROG_SENSORS_CHIPS_H */ |