/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/xml.h

  • Committer: Suren A. Chilingaryan
  • Date: 2015-10-22 13:57:59 UTC
  • Revision ID: csa@suren.me-20151022135759-nqs5wowy38tvbw09
Documentation update

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
extern "C" {
41
41
#endif
42
42
 
43
 
/** pcilib_init_xml
44
 
 * Initializes XML stack and loads a default set of XML files. The default location for model XML files is
45
 
 * /usr/local/share/pcilib/models/<current_model>. This can be altered using CMake PCILIB_MODEL_DIR variable
46
 
 * while building or using PCILIB_MODEL_DIR environmental variable dynamicly.  More XML files can be added
47
 
 * later using pcilib_process_xml call.
48
 
 * @param[in,out] ctx - pcilib context
49
 
 * @param[in] model - the name of the model
50
 
 * @return - error or 0 on success
 
43
/** Initializes XML stack and loads a default set of XML files. 
 
44
 * The default location for XML files is /usr/local/share/pcilib/models/@b{model}.
 
45
 * This can be altered using CMake PCILIB_MODEL_DIR variable while building or using 
 
46
 * PCILIB_MODEL_DIR environmental variable dynamicly.  More XML files can be added
 
47
 * later using pcilib_process_xml() call.
 
48
 *
 
49
 * @param[in,out] ctx   - pcilib context
 
50
 * @param[in] model     - the name of the model
 
51
 * @return              - error or 0 on success
51
52
 */
52
53
int pcilib_init_xml(pcilib_t *ctx, const char *model);
53
54
 
54
 
/** pcilib_free_xml
55
 
 * this function free the xml parts of the pcilib_t running, and some libxml ashes
56
 
 * @param[in] ctx the pcilib_t running
 
55
/** Cleans up memory used by various XML structures
 
56
 * @param[in] ctx       - the pcilib_t context
57
57
 */
58
58
void pcilib_free_xml(pcilib_t *ctx);
59
59
 
60
 
/** pcilib_process_xml
61
 
 * Processes a bunch of XML files in the specified directory. During the initialization, all XML files
 
60
/** Processes a bunch of XML files in the specified directory. During the initialization, all XML files
62
61
 * in the corresponding model directory will be loaded. This function allows to additionally load XML 
63
62
 * files from the specified subdirectories of the model directory. I.e. the XML files from the 
64
 
 * /usr/local/share/pcilib/models/<current_model>/<location> will be loaded. As with pcilib_init_xml,
 
63
 * /usr/local/share/pcilib/models/@b{current_model}/@b{location} will be loaded. As with pcilib_init_xml,
65
64
 * the directory can be adjusted using CMake build configuration or PCILIB_MODEL_DIR environmental
66
65
 * variable.
67
 
 * @param[in] ctx - pcilib context
68
 
 * @param[in] location - Specifies sub-directory with XML files relative to the model directory.
69
 
 * @return - error or 0 on success
 
66
 * @param[in] ctx       - pcilib context
 
67
 * @param[in] location  - Specifies sub-directory with XML files relative to the model directory.
 
68
 * @return              - error or 0 on success
70
69
 */
71
70
int pcilib_process_xml(pcilib_t *ctx, const char *location);
72
71
 
73
 
/** pcilib_get_xml_attr
74
 
 * This is an internal function which returns a specified node attribute in the pcilib_value_t structure.
 
72
/** This is an internal function which returns a specified node attribute in the pcilib_value_t structure.
75
73
 * This function should not be used directly. Instead subsystem specific calls like pcilib_get_register_attr,
76
74
 * pcilib_get_property_attr, ...have to be used.
77
 
 * @param[in] ctx - pcilib context
78
 
 * @param[in] node - LibXML2 node
79
 
 * @param[in] attr - attribute name
80
 
 * @param[out] val - the result will be returned in this variable. Prior to first usage pcilib_value_t variable should be initalized to 0.
81
 
 * @return - error or 0 on success
 
75
 * @param[in] ctx       - pcilib context
 
76
 * @param[in] node      - LibXML2 node
 
77
 * @param[in] attr      - attribute name
 
78
 * @param[out] val      - the result will be returned in this variable. Prior to first usage pcilib_value_t variable should be initalized to 0.
 
79
 * @return              - error or 0 on success
82
80
 */
83
81
int pcilib_get_xml_attr(pcilib_t *ctx, pcilib_xml_node_t *node, const char *attr, pcilib_value_t *val);
84
82