Changeset 5651 for lm-sensors/trunk/lib/libsensors.3
- Timestamp:
- 02/15/09 21:43:36 (4 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/lib/libsensors.3 (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/lib/libsensors.3
r5650 r5651 72 72 73 73 .SH DESCRIPTION 74 .B int sensors_init(FILE *input); 75 .br 76 Load the configuration file and the detected chips list. If this returns a 74 .B sensors_init() 75 loads the configuration file and the detected chips list. If this returns a 77 76 value unequal to zero, you are in trouble; you can not assume anything will 78 77 be initialized properly. If you want to reload the configuration file, call … … 82 81 section below). Most applications will want to do that. 83 82 84 .B void sensors_cleanup(void); 85 .br 86 Clean-up function: You can't access anything after this, until the next sensors_init() call! 87 .br 88 89 \fBint sensors_parse_chip_name(const char *orig_name, 90 sensors_chip_name *res);\fP 91 .br 92 Parse a chip name to the internal representation. Return 0 on succes, <0 on error. 93 94 .B const char *sensors_get_adapter_name(int bus_nr); 95 .br 96 This function returns the adapter name of a bus number, as used within the 83 .B sensors_cleanup() 84 cleans everything up: you can't access anything after this, until the next sensors_init() call! 85 86 .B sensors_parse_chip_name() 87 parses a chip name to the internal representation. Return 0 on success, 88 <0 on error. 89 90 .B sensors_get_adapter_name() 91 returns the adapter name of a bus number, as used within the 97 92 sensors_chip_name structure. If it could not be found, it returns NULL. 98 93 99 \fBchar *sensors_get_label(const sensors_chip_name *name, const sensors_feature *feature);\fP 100 .br 101 Look up the label which belongs to this chip. Note that chip should not 94 .B sensors_get_label() 95 looks up the label which belongs to this chip. Note that chip should not 102 96 contain wildcard values! The returned string is newly allocated (free it 103 97 yourself). On failure, NULL is returned. 104 98 If no label exists for this feature, its name is returned itself. 105 99 106 \fBint sensors_get_value(const sensors_chip_name *name, int subfeat_nr, double *value);\fP 107 .br 108 Read the value of a subfeature of a certain chip. Note that chip should not 100 .B sensors_get_value() 101 Reads the value of a subfeature of a certain chip. Note that chip should not 109 102 contain wildcard values! This function will return 0 on success, and <0 on 110 103 failure. 111 104 112 \fBint sensors_set_value(const sensors_chip_name *name, int subfeat_nr, double value);\fP 113 .br 114 Set the value of a subfeature of a certain chip. Note that chip should not 105 .B sensors_set_value() 106 sets the value of a subfeature of a certain chip. Note that chip should not 115 107 contain wildcard values! This function will return 0 on success, and <0 on 116 108 failure. 117 109 118 .B int sensors_do_chip_sets(const sensors_chip_name *name); 119 .br 120 Execute all set statements for this particular chip. The chip may contain wildcards! This function will return 0 on success, and <0 on failure. 121 122 \fBconst sensors_chip_name *sensors_get_detected_chips(const sensors_chip_name 123 *match, int *nr);\fP 124 .br 125 This function returns all detected chips that match a given chip name, 110 .B sensors_do_chip_sets() 111 executes all set statements for this particular chip. The chip may contain 112 wildcards! This function will return 0 on success, and <0 on failure. 113 114 .B sensors_get_detected_chips() 115 returns all detected chips that match a given chip name, 126 116 one by one. If no chip name is provided, all detected chips are returned. 127 117 To start at the beginning of the list, use 0 for nr; NULL is returned if … … 134 124 \fBtypedef struct sensors_feature { 135 125 .br 136 const char *name;137 .br 138 int number;139 .br 140 sensors_feature_type type;126 const char *name; 127 .br 128 int number; 129 .br 130 sensors_feature_type type; 141 131 .br 142 132 } sensors_feature;\fP … … 150 140 \fBtypedef struct sensors_subfeature { 151 141 .br 152 const char *name;153 .br 154 int number;155 .br 156 sensors_subfeature_type type;157 .br 158 int mapping;159 .br 160 unsigned int flags;142 const char *name; 143 .br 144 int number; 145 .br 146 sensors_subfeature_type type; 147 .br 148 int mapping; 149 .br 150 unsigned int flags; 161 151 .br 162 152 } sensors_subfeature;\fP … … 166 156 (affected by the computation rules of the main feature). 167 157 168 \fBconst sensors_feature *sensors_get_features(const sensors_chip_name *name, int *nr);\fP 169 .br 170 This returns all main features of a specific chip. nr is an internally 158 .B sensors_get_features() 159 returns all main features of a specific chip. nr is an internally 171 160 used variable. Set it to zero to start at the begin of the list. If no 172 161 more features are found NULL is returned. … … 174 163 data structures. 175 164 176 \fBconst sensors_subfeature *sensors_get_all_subfeatures(const sensors_chip_name *name, const sensors_feature *feature, int *nr);\fP 177 .br 178 This returns all subfeatures of a given main feature. nr is an internally 165 .B sensors_get_all_subfeatures() 166 returns all subfeatures of a given main feature. nr is an internally 179 167 used variable. Set it to zero to start at the begin of the list. If no 180 168 more subfeatures are found NULL is returned. … … 182 170 data structures. 183 171 184 \fBconst sensors_subfeature *sensors_get_subfeature(const sensors_chip_name *name, const sensors_feature *feature, sensors_subfeature_type type);\fP 185 .br 186 This returns the subfeature of the given type for a given main feature, 172 .B sensors_get_subfeature() 173 returns the subfeature of the given type for a given main feature, 187 174 if it exists, NULL otherwise. 188 175 Do not try to change the returned structure; you will corrupt internal 189 176 data structures. 190 177 191 \fBconst char *libsensors_version;\fP 192 .br 193 A string representing the version of libsensors. 178 .B libsensors_version 179 is a string representing the version of libsensors. 194 180 195 181 .SH FILES
