Changeset 5652

Show
Ignore:
Timestamp:
02/15/09 21:45:36 (5 years ago)
Author:
khali
Message:

Reorder description section to match synopsis order. Move structure
definitions to their own subsection.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/lib/libsensors.3

    r5651 r5652  
    8484cleans everything up: you can't access anything after this, until the next sensors_init() call! 
    8585 
     86.B libsensors_version 
     87is a string representing the version of libsensors. 
     88 
    8689.B sensors_parse_chip_name() 
    8790parses a chip name to the internal representation. Return 0 on success, 
     
    9194returns the adapter name of a bus number, as used within the 
    9295sensors_chip_name structure. If it could not be found, it returns NULL. 
    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. 
    11396 
    11497.B sensors_get_detected_chips() 
     
    119102they point to internal structures! 
    120103 
    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  
    158104.B sensors_get_features() 
    159105returns all main features of a specific chip. nr is an internally 
     
    176122data structures. 
    177123 
    178 .B libsensors_version 
    179 is a string representing the version of libsensors. 
     124.B sensors_get_label() 
     125looks up the label which belongs to this chip. Note that chip should not 
     126contain wildcard values! The returned string is newly allocated (free it 
     127yourself). On failure, NULL is returned. 
     128If no label exists for this feature, its name is returned itself. 
     129 
     130.B sensors_get_value() 
     131Reads the value of a subfeature of a certain chip. Note that chip should not 
     132contain wildcard values! This function will return 0 on success, and <0 on 
     133failure. 
     134 
     135.B sensors_set_value() 
     136sets the value of a subfeature of a certain chip. Note that chip should not 
     137contain wildcard values! This function will return 0 on success, and <0 on 
     138failure. 
     139 
     140.B sensors_do_chip_sets() 
     141executes all set statements for this particular chip. The chip may contain 
     142wildcards!  This function will return 0 on success, and <0 on failure. 
     143 
     144.SH DATA STRUCTURES 
     145 
     146Structure \fBsensors_feature\fR contains information related to a given 
     147feature 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 
     159There are other members not documented here, which are only meant for 
     160libsensors internal use. 
     161 
     162Structure \fBsensors_subfeature\fR contains information related to a given 
     163subfeature 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 
     179The 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 
     182main feature). 
    180183 
    181184.SH FILES