TUM-Logo

libRASCH

 

Home
 

General

About libRASCH/News
Design
Screen shots
Sample programs (with source code)
License
 

Download

libRASCH
Tools
 

Documentation

User
Developer
 

Resources

Mailing list
Supported Formats
Plugins
Status
Links
 
Contact
About this site
 
Last updated
Tue Mar 27 23:03:52 2007
libRASCH: load_xml_v0.c File Reference

load_xml_v0.c File Reference

Include dependency graph for load_xml_v0.c:

Go to the source code of this file.

Defines

#define _LIBRASCH_BUILD
#define _DEFINE_INFO_STRUCTS_PROP

Functions

int eval_loadxml_v0 (meas_handle mh, const char *file)
 load evalution in XML format
int get_eval_file_xml (meas_handle mh, char *f)
 returns evaluation filename
int read_evals_xml (meas_handle mh, xmlNodePtr parent)
 reads the evaluations
xmlNodePtr get_node (xmlNodePtr parent, char *name)
 returns the XML node named with 'name'
int read_sets_xml (struct eval *e, xmlNodePtr parent)
 read event-sets
int read_events_start_end_xml (xmlNodePtr parent, struct event_info *evi, long num_events)
 read start- and end-time for event-sets
int read_props_xml (struct event_set *set, xmlNodePtr parent, int use_ascii, struct event_info *evi, long num_events)
 read event-properties
int read_events_xml (struct event_property *prop, xmlNodePtr parent, int use_ascii)
 read event values
int handle_value_events_ascii (struct event_property *prop, xmlNodePtr parent)
 read event values stored as ASCII-text
int read_short (xmlNodePtr node, struct event_property *prop, long idx)
 read short event value
int read_long (xmlNodePtr node, struct event_property *prop, long idx)
 read long event value
int read_double (xmlNodePtr node, struct event_property *prop, long idx)
 read double event value
int read_char (xmlNodePtr node, struct event_property *prop, long idx)
 read string event value
int read_short_array (xmlNodePtr node, struct event_property *prop, long idx)
 read short array event value
int read_long_array (xmlNodePtr node, struct event_property *prop, long idx)
 read long array event value
int read_double_array (xmlNodePtr node, struct event_property *prop, long idx)
 read double array event value
int handle_char_events (struct event_property *prop, xmlChar *c)
 read string event values stored in one XML tag
char * find_next_string (char *s)
 find next occurence of string seperator
int handle_value_events (struct event_property *prop, xmlChar *c)
 read event values MIME64 encoded
int read_templates_xml (struct event_set *set, xmlNodePtr parent)
 read templates
prop_handle find_prop (struct eval *e, const char *name)
 return a specific event-property
int read_single_template_xml (struct template_struct *templ, xmlNodePtr parent)
 read a single template


Detailed Description

This file implements the functionality to read libRASCH evaluation files Version 0.

Author:
Raphael Schneider (rasch@med1.med.tum.de)

Definition in file load_xml_v0.c.


Define Documentation

#define _DEFINE_INFO_STRUCTS_PROP
 

Definition at line 35 of file load_xml_v0.c.

#define _LIBRASCH_BUILD
 

Definition at line 34 of file load_xml_v0.c.


Function Documentation

int eval_loadxml_v0 meas_handle  mh,
const char *  file
 

Parameters:
<mh> measurement handle
<file> name of the evaluation file (optional)
This function loads the evaluation(s) that belongs to the measurement mh. If no filename file is given, the default-filename will be used.

Definition at line 60 of file load_xml_v0.c.

References _ra_set_error, get_eval_file_xml(), MAX_PATH_RA, RA_ERR_EVAL_FILE_CORRUPT, RA_ERR_READ_EVAL, and read_evals_xml().

char* find_next_string char *  s  ) 
 

Parameters:
<s> string which will be searched
The function returns the position of the next string seperator (0x10 + '.' + 0x10).

Definition at line 1077 of file load_xml_v0.c.

prop_handle find_prop struct eval e,
const char *  name
 

Parameters:
<e> pointer to an evaluation structure
<name> name of the event-property looked for
The function returns the event-property named 'name'.

Definition at line 1309 of file load_xml_v0.c.

int get_eval_file_xml meas_handle  mh,
char *  f
 

Parameters:
<mh> measurement handle
<f> will receive the filename of the evaluation
If no evaluation file was given in ra_eval_loadxml, this function returns the default filename used for evaluations (based on the measurement name).

Definition at line 111 of file load_xml_v0.c.

References ra_info_get(), RA_INFO_REC_GEN_DIR_L, RA_INFO_REC_GEN_PATH_C, ra_rec_get_first(), ra_value_free(), ra_value_get_long(), ra_value_get_string(), and ra_value_malloc().

xmlNodePtr get_node xmlNodePtr  parent,
char *  name
 

Parameters:
<parent> the childs of this XML node will be searched
<name> name of the wanted XML node
The function returns the XML node named 'name' below the XML node 'parent' (only the level directly below 'parent' is searched).

Definition at line 265 of file load_xml_v0.c.

int handle_char_events struct event_property *  prop,
xmlChar *  c
 

Parameters:
<prop> pointer to an event-property structure
<c> string containing the value
The function "reads" the string event values for the event-property 'prop' stored in 'c'. The single strings are seperated with 0x10 + '.' + 0x10 .

Definition at line 1027 of file load_xml_v0.c.

References find_next_string().

int handle_value_events struct event_property *  prop,
xmlChar *  c
 

Parameters:
<prop> pointer to an event-property structure
<c> string containing the values
The function "reads" the event values for the event-property 'prop' from the string 'c'. The string 'c' contains the values MIME64 encoded.

Definition at line 1117 of file load_xml_v0.c.

References _ra_set_error, decode_base64(), EVPROP_TYPE_DOUBLE, EVPROP_TYPE_LONG, EVPROP_TYPE_SHORT, and RA_ERR_EVAL_FILE_CORRUPT.

int handle_value_events_ascii struct event_property *  prop,
xmlNodePtr  parent
 

Parameters:
<prop> pointer to an event-property structure
<parent> pointer of the parent XML node
The function reads the event values for the event-property 'prop' below the XML node 'parent'. The function expects that the values are stored as ASCII text in there own XML tag.

Definition at line 610 of file load_xml_v0.c.

References EVPROP_TYPE_CHAR, EVPROP_TYPE_DOUBLE, EVPROP_TYPE_DOUBLE_ARRAY, EVPROP_TYPE_LONG, EVPROP_TYPE_LONG_ARRAY, EVPROP_TYPE_SHORT, EVPROP_TYPE_SHORT_ARRAY, read_char(), read_double(), read_double_array(), read_long(), read_long_array(), read_short(), and read_short_array().

int read_char xmlNodePtr  node,
struct event_property *  prop,
long  idx
 

Parameters:
<node> node containing the value as ASCII text
<prop> event-property
<idx> event number for which the value will be set
The function reads a string event value and set the value in the array for the property 'prop' at position 'idx'.

Definition at line 830 of file load_xml_v0.c.

int read_double xmlNodePtr  node,
struct event_property *  prop,
long  idx
 

Parameters:
<node> node containing the value as ASCII text
<prop> event-property
<idx> event number for which the value will be set
The function reads a double event value and set the value in the array for the property 'prop' at position 'idx'.

Definition at line 802 of file load_xml_v0.c.

int read_double_array xmlNodePtr  node,
struct event_property *  prop,
long  idx
 

Parameters:
<node> node containing the value as ASCII text
<prop> event-property
<idx> event number for which the value will be set
The function reads a double array event value and set the value in the array for the property 'prop' at position 'idx'.

Definition at line 972 of file load_xml_v0.c.

int read_evals_xml meas_handle  mh,
xmlNodePtr  parent
 

Parameters:
<mh> measurement handle
<parent> pointer of the parent XML node
The function reads all evaluations below the XML node 'parent'.

Definition at line 151 of file load_xml_v0.c.

References eval::def, ra_meas::eval, eval_info::evaluations, get_node(), eval::handle_id, eval::meas, eval::original, RA_HANDLE_EVAL, ra_list_add(), ra_value_free(), ra_value_malloc(), ra_value_set_string(), and read_sets_xml().

int read_events_start_end_xml xmlNodePtr  parent,
struct event_info evi,
long  num_events
 

Parameters:
<set> pointer to an event-set structure
<parent> pointer of the parent XML node
The function reads all start- and end-times for the event-set 'set' below the XML node 'parent'.

Definition at line 403 of file load_xml_v0.c.

References _ra_set_error, decode_base64(), event_info::end, get_node(), RA_ERR_EVAL_FILE_CORRUPT, and event_info::start.

int read_events_xml struct event_property *  prop,
xmlNodePtr  parent,
int  use_ascii
 

Parameters:
<prop> pointer to an event-property structure
<parent> pointer of the parent XML node
<use_ascii> flag if event-values are stored as ASCII-text (=1) or as binary MIME64 encoded data (=0)
The function reads all event-values below the XML node 'parent'.

Definition at line 569 of file load_xml_v0.c.

References _ra_set_error, EVPROP_TYPE_CHAR, get_node(), handle_char_events(), handle_value_events(), handle_value_events_ascii(), and RA_ERR_EVAL_FILE_CORRUPT.

int read_long xmlNodePtr  node,
struct event_property *  prop,
long  idx
 

Parameters:
<node> node containing the value as ASCII text
<prop> event-property
<idx> event number for which the value will be set
The function reads a long event value and set the value in the array for the property 'prop' at position 'idx'.

Definition at line 774 of file load_xml_v0.c.

int read_long_array xmlNodePtr  node,
struct event_property *  prop,
long  idx
 

Parameters:
<node> node containing the value as ASCII text
<prop> event-property
<idx> event number for which the value will be set
The function reads a long array event value and set the value in the array for the property 'prop' at position 'idx'.

Definition at line 916 of file load_xml_v0.c.

int read_props_xml struct event_set *  set,
xmlNodePtr  parent,
int  use_ascii,
struct event_info evi,
long  num_events
 

Parameters:
<set> pointer to an event-set structure
<parent> pointer of the parent XML node
<use_ascii> flag if event-values are stored as ASCII-text (=1) or as binary MIME64 encoded data (=0)
The function reads all event-properties below the XML node 'parent'.

Definition at line 459 of file load_xml_v0.c.

References _ra_set_error, EVAL_MAX_DESC, EVAL_MAX_NAME, EVAL_MAX_UNIT, EVPROP_TYPE_CHAR, EVPROP_TYPE_DOUBLE, EVPROP_TYPE_DOUBLE_ARRAY, EVPROP_TYPE_LONG, EVPROP_TYPE_LONG_ARRAY, EVPROP_TYPE_SHORT, EVPROP_TYPE_SHORT_ARRAY, get_node(), RA_ERR_EVAL_FILE_CORRUPT, ra_list_add(), and read_events_xml().

int read_sets_xml struct eval e,
xmlNodePtr  parent
 

Parameters:
<e> pointer to an evaluation structure
<parent> pointer of the parent XML node
The function reads all event-sets below the XML node 'parent'.

Definition at line 288 of file load_xml_v0.c.

References eval_class::ascii_id, eval::cl, event_info::end, eval_class::eval, get_class_id(), get_node(), eval_class::handle_id, event_info::id, eval_class::id, MAX_ID_LEN, eval::meas, eval_class::meas, ra_class_add_event(), ra_eval_attribute_set(), RA_HANDLE_EVAL_CLASS, ra_list_add(), ra_value_set_string(), read_events_start_end_xml(), read_props_xml(), read_templates_xml(), and event_info::start.

int read_short xmlNodePtr  node,
struct event_property *  prop,
long  idx
 

Parameters:
<node> node containing the value as ASCII text
<prop> event-property
<idx> event number for which the value will be set
The function reads a short event value and set the value in the array for the property 'prop' at position 'idx'.

Definition at line 746 of file load_xml_v0.c.

int read_short_array xmlNodePtr  node,
struct event_property *  prop,
long  idx
 

Parameters:
<node> node containing the value as ASCII text
<prop> event-property
<idx> event number for which the value will be set
The function reads a short array event value and set the value in the array for the property 'prop' at position 'idx'.

Definition at line 859 of file load_xml_v0.c.

int read_single_template_xml struct template_struct *  templ,
xmlNodePtr  parent
 

Parameters:
<templ> pointer to an template structure
<parent> pointer of the parent XML node
The function reads a single template information below the XML node 'parent'.

Definition at line 1333 of file load_xml_v0.c.

References decode_base64().

int read_templates_xml struct event_set *  set,
xmlNodePtr  parent
 

Parameters:
<set> pointer to an event-set structure
<parent> pointer of the parent XML node
The function reads all template informations below the XML node 'parent'.

Definition at line 1230 of file load_xml_v0.c.

References _ra_set_error, find_prop(), RA_ERR_EVAL_FILE_CORRUPT, ra_list_add(), and read_single_template_xml().


Generated on Fri May 27 11:33:00 2005 for libRASCH by  doxygen 1.4.2