| 93 | | |
| 94 | | .B sensors_get_label() |
| 95 | | looks up the label which belongs to this chip. Note that chip should not |
| 96 | | contain wildcard values! The returned string is newly allocated (free it |
| 97 | | yourself). On failure, NULL is returned. |
| 98 | | If no label exists for this feature, its name is returned itself. |
| 99 | | |
| 100 | | .B sensors_get_value() |
| 101 | | Reads the value of a subfeature of a certain chip. Note that chip should not |
| 102 | | contain wildcard values! This function will return 0 on success, and <0 on |
| 103 | | failure. |
| 104 | | |
| 105 | | .B sensors_set_value() |
| 106 | | sets the value of a subfeature of a certain chip. Note that chip should not |
| 107 | | contain wildcard values! This function will return 0 on success, and <0 on |
| 108 | | failure. |
| 109 | | |
| 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. |
| 121 | | This structure contains information related to a given feature of a |
| 122 | | specific chip. |
| 123 | | .br |
| 124 | | \fBtypedef struct sensors_feature { |
| 125 | | .br |
| 126 | | const char *name; |
| 127 | | .br |
| 128 | | int number; |
| 129 | | .br |
| 130 | | sensors_feature_type type; |
| 131 | | .br |
| 132 | | } sensors_feature;\fP |
| 133 | | .br |
| 134 | | There are other member not documented here, which are only meant for libsensors |
| 135 | | internal use. |
| 136 | | |
| 137 | | This structure contains information related to a given subfeature of a |
| 138 | | specific chip feature. |
| 139 | | .br |
| 140 | | \fBtypedef struct sensors_subfeature { |
| 141 | | .br |
| 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; |
| 151 | | .br |
| 152 | | } sensors_subfeature;\fP |
| 153 | | .br |
| 154 | | The flags field is a bitfield, its value is a combination of |
| 155 | | SENSORS_MODE_R (readable), SENSORS_MODE_W (writable) and SENSORS_COMPUTE_MAPPING |
| 156 | | (affected by the computation rules of the main feature). |
| 157 | | |
| 178 | | .B libsensors_version |
| 179 | | is a string representing the version of libsensors. |
| | 124 | .B sensors_get_label() |
| | 125 | looks up the label which belongs to this chip. Note that chip should not |
| | 126 | contain wildcard values! The returned string is newly allocated (free it |
| | 127 | yourself). On failure, NULL is returned. |
| | 128 | If no label exists for this feature, its name is returned itself. |
| | 129 | |
| | 130 | .B sensors_get_value() |
| | 131 | Reads the value of a subfeature of a certain chip. Note that chip should not |
| | 132 | contain wildcard values! This function will return 0 on success, and <0 on |
| | 133 | failure. |
| | 134 | |
| | 135 | .B sensors_set_value() |
| | 136 | sets the value of a subfeature of a certain chip. Note that chip should not |
| | 137 | contain wildcard values! This function will return 0 on success, and <0 on |
| | 138 | failure. |
| | 139 | |
| | 140 | .B sensors_do_chip_sets() |
| | 141 | executes all set statements for this particular chip. The chip may contain |
| | 142 | wildcards! This function will return 0 on success, and <0 on failure. |
| | 143 | |
| | 144 | .SH DATA STRUCTURES |
| | 145 | |
| | 146 | Structure \fBsensors_feature\fR contains information related to a given |
| | 147 | feature of a specific chip: |
| | 148 | |
| | 149 | \fBtypedef struct sensors_feature { |
| | 150 | .br |
| | 151 | const char *name; |
| | 152 | .br |
| | 153 | int number; |
| | 154 | .br |
| | 155 | sensors_feature_type type; |
| | 156 | .br |
| | 157 | } sensors_feature;\fP |
| | 158 | |
| | 159 | There are other members not documented here, which are only meant for |
| | 160 | libsensors internal use. |
| | 161 | |
| | 162 | Structure \fBsensors_subfeature\fR contains information related to a given |
| | 163 | subfeature of a specific chip feature: |
| | 164 | |
| | 165 | \fBtypedef struct sensors_subfeature { |
| | 166 | .br |
| | 167 | const char *name; |
| | 168 | .br |
| | 169 | int number; |
| | 170 | .br |
| | 171 | sensors_subfeature_type type; |
| | 172 | .br |
| | 173 | int mapping; |
| | 174 | .br |
| | 175 | unsigned int flags; |
| | 176 | .br |
| | 177 | } sensors_subfeature;\fP |
| | 178 | |
| | 179 | The flags field is a bitfield, its value is a combination of |
| | 180 | \fBSENSORS_MODE_R\fR (readable), \fBSENSORS_MODE_W\fR (writable) and |
| | 181 | \fBSENSORS_COMPUTE_MAPPING\fR (affected by the computation rules of the |
| | 182 | main feature). |