root/lm-sensors/trunk/prog/sensord/sensord.h @ 4810

Revision 4810, 2.7 KB (checked in by khali, 7 years ago)

Synchronize the sensord version with the lm-sensors version. We're
using the same version number for sensord since October 2002!

  • 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., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23#include "lib/sensors.h"
24
25extern void sensorLog (int priority, const char *fmt, ...);
26
27/* from args.c */
28
29extern int isDaemon;
30extern const char *sensorsCfgFile;
31extern const char *pidFile;
32extern const char *rrdFile;
33extern const char *cgiDir;
34extern int scanTime;
35extern int logTime;
36extern int rrdTime;
37extern int rrdNoAverage;
38extern int syslogFacility;
39extern int doScan;
40extern int doSet;
41extern int doCGI;
42extern int doLoad;
43extern int debug;
44extern sensors_chip_name chipNames[];
45extern int numChipNames;
46
47extern int parseArgs (int argc, char **argv);
48extern int parseChips (int argc, char **argv);
49
50/* from lib.c */
51
52extern int initLib (void);
53extern int loadLib (void);
54extern int reloadLib (void);
55extern int unloadLib (void);
56
57/* from sense.c */
58
59extern int getValid (sensors_chip_name name, int feature, int *valid);
60extern int getLabel (sensors_chip_name name, int feature, char **label);
61extern int getRawLabel (sensors_chip_name name, int feature, const char **label);
62
63extern int readChips (void);
64extern int scanChips (void);
65extern int setChips (void);
66extern int rrdChips (void);
67
68/* from rrd.c */
69
70extern char rrdBuff[];
71extern int rrdInit (void);
72extern int rrdUpdate (void);
73extern int rrdCGI (void);
74
75/* from chips.c */
76
77#define MAX_DATA 5
78
79typedef const char * (*FormatterFN) (const double values[], int alarm, int beep);
80
81typedef const char * (*RRDFN) (const double values[]);
82
83typedef enum {
84  DataType_voltage = 0,
85  DataType_rpm,
86  DataType_temperature,
87  DataType_mhz,
88  DataType_other = -1
89} DataType;
90
91typedef struct {
92  FormatterFN format;
93  RRDFN rrd;
94  DataType type;
95  int alarmMask;
96  int beepMask;
97  const int dataNumbers[MAX_DATA + 1]; /* First entry is used for the label */
98} FeatureDescriptor;
99
100typedef struct {
101  const char * const *names;
102  const FeatureDescriptor *features;
103  int alarmNumber;
104  int beepNumber;
105} ChipDescriptor;
106
107extern const ChipDescriptor * const knownChips[];
Note: See TracBrowser for help on using the browser.