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

Reformat description section.

Files:
1 modified

Legend:

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

    r5650 r5651  
    7272 
    7373.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() 
     75loads the configuration file and the detected chips list. If this returns a 
    7776value unequal to zero, you are in trouble; you can not assume anything will 
    7877be initialized properly. If you want to reload the configuration file, call 
     
    8281section below). Most applications will want to do that. 
    8382 
    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() 
     84cleans everything up: you can't access anything after this, until the next sensors_init() call! 
     85 
     86.B sensors_parse_chip_name() 
     87parses a chip name to the internal representation. Return 0 on success, 
     88<0 on error. 
     89 
     90.B sensors_get_adapter_name() 
     91returns the adapter name of a bus number, as used within the 
    9792sensors_chip_name structure. If it could not be found, it returns NULL. 
    9893 
    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() 
     95looks up the label which belongs to this chip. Note that chip should not 
    10296contain wildcard values! The returned string is newly allocated (free it 
    10397yourself). On failure, NULL is returned. 
    10498If no label exists for this feature, its name is returned itself. 
    10599 
    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() 
     101Reads the value of a subfeature of a certain chip. Note that chip should not 
    109102contain wildcard values! This function will return 0 on success, and <0 on 
    110103failure. 
    111104 
    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() 
     106sets the value of a subfeature of a certain chip. Note that chip should not 
    115107contain wildcard values! This function will return 0 on success, and <0 on 
    116108failure. 
    117109 
    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() 
     111executes all set statements for this particular chip. The chip may contain 
     112wildcards!  This function will return 0 on success, and <0 on failure. 
     113 
     114.B sensors_get_detected_chips() 
     115returns all detected chips that match a given chip name, 
    126116one by one. If no chip name is provided, all detected chips are returned. 
    127117To start at the beginning of the list, use 0 for nr; NULL is returned if 
     
    134124\fBtypedef struct sensors_feature { 
    135125.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; 
    141131.br 
    142132} sensors_feature;\fP 
     
    150140\fBtypedef struct sensors_subfeature { 
    151141.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; 
    161151.br 
    162152} sensors_subfeature;\fP 
     
    166156(affected by the computation rules of the main feature). 
    167157 
    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() 
     159returns all main features of a specific chip. nr is an internally 
    171160used variable. Set it to zero to start at the begin of the list. If no 
    172161more features are found NULL is returned. 
     
    174163data structures. 
    175164 
    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() 
     166returns all subfeatures of a given main feature. nr is an internally 
    179167used variable. Set it to zero to start at the begin of the list. If no 
    180168more subfeatures are found NULL is returned. 
     
    182170data structures. 
    183171 
    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() 
     173returns the subfeature of the given type for a given main feature, 
    187174if it exists, NULL otherwise. 
    188175Do not try to change the returned structure; you will corrupt internal 
    189176data structures. 
    190177 
    191 \fBconst char *libsensors_version;\fP 
    192 .br 
    193 A string representing the version of libsensors. 
     178.B libsensors_version 
     179is a string representing the version of libsensors. 
    194180 
    195181.SH FILES