root/lm-sensors/branches/lm-sensors-3.0.0/prog/sensord/sensord.h @ 5163

Revision 5163, 2.5 KB (checked in by khali, 6 years ago)

Patch from Aurelien Jarno:

I have just noticed that the FSF address is the old one in all files
except COPYING. Please find a patch below to fix that.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/*
2 * sensord
3 *
4 * A daemon that periodically logs sensor information to syslog.
5 *
6 * Copyright (c) 1999-2002 Merlin Hughes <merlin@merlin.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21 * MA 02110-1301 USA.
22 */
23
24#include "lib/sensors.h"
25
26extern void sensorLog (int priority, const char *fmt, ...);
27
28/* from args.c */
29
30extern int isDaemon;
31extern const char *sensorsCfgFile;
32extern const char *pidFile;
33extern const char *rrdFile;
34extern const char *cgiDir;
35extern int scanTime;
36extern int logTime;
37extern int rrdTime;
38extern int rrdNoAverage;
39extern int syslogFacility;
40extern int doScan;
41extern int doSet;
42extern int doCGI;
43extern int doLoad;
44extern int debug;
45extern sensors_chip_name chipNames[];
46extern int numChipNames;
47
48extern int parseArgs (int argc, char **argv);
49extern int parseChips (int argc, char **argv);
50
51/* from lib.c */
52
53extern int loadLib (const char *cfgPath);
54extern int reloadLib (const char *cfgPath);
55extern int unloadLib (void);
56
57/* from sense.c */
58
59extern int readChips (void);
60extern int scanChips (void);
61extern int setChips (void);
62extern int rrdChips (void);
63
64/* from rrd.c */
65
66extern char rrdBuff[];
67extern int rrdInit (void);
68extern int rrdUpdate (void);
69extern int rrdCGI (void);
70
71/* from chips.c */
72
73#define MAX_DATA 5
74
75typedef const char * (*FormatterFN) (const double values[], int alarm, int beep);
76
77typedef const char * (*RRDFN) (const double values[]);
78
79typedef enum {
80  DataType_voltage = 0,
81  DataType_rpm,
82  DataType_temperature,
83  DataType_other = -1
84} DataType;
85
86typedef struct {
87  FormatterFN format;
88  RRDFN rrd;
89  DataType type;
90  int alarmNumber;
91  int beepNumber;
92  const sensors_feature *feature;
93  int dataNumbers[MAX_DATA + 1];
94} FeatureDescriptor;
95
96typedef struct {
97  const sensors_chip_name *name;
98  FeatureDescriptor *features;
99} ChipDescriptor;
100
101extern ChipDescriptor * knownChips;
102extern int initKnownChips (void);
103extern void freeKnownChips (void);
Note: See TracBrowser for help on using the browser.