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: ra_priv.h File Reference

ra_priv.h File Reference

Include dependency graph for ra_priv.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define _(String)   gettext (String)
#define gettext_noop(String)   String
#define N_(String)   gettext_noop (String)
#define MAX_I18N_LEN   250
#define LOAD_PLUGIN_FUNC   "load_ra_plugin"
#define INIT_PLUGIN_FUNC   "init_ra_plugin"
#define FINI_PLUGIN_FUNC   "fini_ra_plugin"
#define LICENSE_GPL   0
#define LICENSE_LGPL   1
#define LICENSE_PROPRIETARY   2
#define LICENSE_NOT_CHOOSEN   3
#define _ra_set_error(h, nr, str)   _ra_set_error_int(h, nr, str, __FILE__, __LINE__)

Functions

LIBRAAPI void _ra_set_error_int (any_handle h, long error, const char *error_from, const char *src_file, int src_line)
 set error number
LIBRAAPI int ra_eval_save_result (eval_handle eh, class_handle clh, prop_handle ph, proc_handle proc, long res_set)
void get_error_text (long err, char *text, int len)
void get_error_text_ra (long err, char *text, int len)
 returns error-string for OS specific errors returns error-string for libRASCH errors
void set_endian_type ()
 set endian of current system
LIBRAAPI int get_endian_type ()
 returns endian type
void init_i18n (struct librasch *ra)
 call functions and set variables needed for i18n
LIBRAAPI int local_to_utf8 (const char *src, char *dest, size_t dest_size)
LIBRAAPI int local_to_utf8_inplace (char *string, size_t buf_size)
LIBRAAPI int utf8_to_local (const char *src, char *dest, size_t dest_size)
LIBRAAPI int utf8_to_local_inplace (char *string, size_t buf_size)
int read_config (struct librasch *ra)
 read libRASCH configuration
void init_config (struct config_info *conf)
 set configuration to values which work when no config-file is found
int find_config_file (char *fn)
 read libRASCH configuration from Registry (only on Win32) look for libRASCH configuration file
int read_modules (struct librasch *ra)
int dload_module (struct librasch *ra, char *file)
void close_modules (struct librasch *ra)
plugin_structget_plugin (struct librasch *ra, int index)
 returns plugin-handle
plugin_structget_plugin_by_name (struct librasch *r, const char *name)
 returns plugin-handle
int calc_x_scales (struct ra_meas *meas)
 do scaling calculations
int check_handle_type (any_handle h, int id)
 check handle type
int get_lib_info (ra_handle ra, int id, value_handle vh)
 returns informations about the core
int get_plugin_info (plugin_handle pl, int id, value_handle vh)
 returns informations about plugins
int get_meas_general_info (meas_handle meas, int id, value_handle vh)
 returns informations about a measurement
int get_session_info (any_handle h, int id, value_handle vh)
 returns informations about a session
int get_proc_info (any_handle h, int id, value_handle vh)
 returns informations about processing results
plugin_structget_plugin_from_handle (any_handle h)
 returns plugin-handle
void free_mem (struct ra_value *v)
 frees value-handle memory
int find_option (const char *name, struct ra_option_infos *infos, int num_opt)
 returns index of an option
int get_option (void *options, struct ra_option_infos *opt_info, value_handle vh, long num_offset)
 returns option value
int set_option (void *options, struct ra_option_infos *opt_info, value_handle vh, long num_offset)
 set option value
int valid_value_handle (value_handle vh, int line_num)
 checks the validity of a value-handle
LIBRAAPI int set_meta_info (value_handle vh, const char *name, const char *desc, int id)
 set name and description in a value-handle
int copy_move_meas (meas_handle mh, const char *dest_dir, int copy)
 do a copy or move of a measurement
int create_auto_class (eval_handle eh, struct ra_auto_create_class *acc, value_handle *res, long res_offset)
int create_auto_prop (eval_handle eh, class_handle clh, struct proc_info *pi, struct ra_auto_create_class *acc, struct ra_auto_create_prop *acp, value_handle *res, long res_offset)

Variables

int ra_print_debug_infos
char ra_i18n_codeset [MAX_I18N_LEN]


Detailed Description

The header file contains definitions for private use in the library core and in the plugins.

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

Definition in file ra_priv.h.


Define Documentation

#define _ String   )     gettext (String)
 

Definition at line 28 of file ra_priv.h.

#define _ra_set_error h,
nr,
str   )     _ra_set_error_int(h, nr, str, __FILE__, __LINE__)
 

Definition at line 70 of file ra_priv.h.

Referenced by check_handle_type(), create_auto_class(), eval_get_info(), eval_loadxml_v0(), get_lib_info(), get_plugin_from_handle(), get_plugin_info(), handle_value_events(), ra_ch_add(), ra_class_add(), ra_class_add_event(), ra_class_del_event(), ra_class_delete(), ra_class_get(), ra_class_get_event_pos(), ra_class_get_events(), ra_class_get_handle(), ra_class_set_event_pos(), ra_dev_add(), ra_eval_add(), ra_eval_attribute_get(), ra_eval_attribute_list(), ra_eval_attribute_set(), ra_eval_attribute_unset(), ra_eval_delete(), ra_eval_get_all(), ra_eval_get_default(), ra_eval_get_handle(), ra_eval_get_original(), ra_eval_loadxml(), ra_eval_save_result(), ra_eval_savexml(), ra_eval_set_default(), ra_gui_call(), ra_info_get(), ra_info_get_by_idx(), ra_info_set(), ra_lib_get_option(), ra_lib_init(), ra_lib_set_option(), ra_lib_use_plugin(), ra_meas_handle_from_any_handle(), ra_meas_new(), ra_meas_open(), ra_meas_save(), ra_plugin_get_by_name(), ra_plugin_get_by_num(), ra_proc_do(), ra_proc_free(), ra_proc_get(), ra_proc_get_result(), ra_prop_add(), ra_prop_delete(), ra_prop_get(), ra_prop_get_all(), ra_prop_get_ch(), ra_prop_get_events(), ra_prop_get_value(), ra_prop_set_value(), ra_raw_add(), ra_raw_get(), ra_raw_get_unit(), ra_rec_add(), ra_rec_get_first(), ra_session_new(), ra_sum_add(), ra_sum_add_ch(), ra_sum_add_part(), ra_sum_del_part(), ra_sum_delete(), ra_sum_get(), ra_sum_get_part_data(), ra_sum_get_part_events(), ra_sum_set_part_data(), ra_view_get(), read_evaluation(), read_events_start_end_xml(), read_events_xml(), read_props_xml(), read_sets_xml(), and read_templates_xml().

#define FINI_PLUGIN_FUNC   "fini_ra_plugin"
 

Definition at line 62 of file ra_priv.h.

Referenced by close_plugins().

#define gettext_noop String   )     String
 

Definition at line 29 of file ra_priv.h.

#define INIT_PLUGIN_FUNC   "init_ra_plugin"
 

Definition at line 61 of file ra_priv.h.

Referenced by read_plugins().

#define LICENSE_GPL   0
 

Definition at line 65 of file ra_priv.h.

#define LICENSE_LGPL   1
 

Definition at line 66 of file ra_priv.h.

#define LICENSE_NOT_CHOOSEN   3
 

Definition at line 68 of file ra_priv.h.

#define LICENSE_PROPRIETARY   2
 

Definition at line 67 of file ra_priv.h.

#define LOAD_PLUGIN_FUNC   "load_ra_plugin"
 

Definition at line 60 of file ra_priv.h.

Referenced by dload_plugin().

#define MAX_I18N_LEN   250
 

Definition at line 54 of file ra_priv.h.

Referenced by init_i18n().

#define N_ String   )     gettext_noop (String)
 

Definition at line 30 of file ra_priv.h.


Function Documentation

LIBRAAPI void _ra_set_error_int any_handle  h,
long  error,
const char *  error_from,
const char *  file,
int  line
 

Parameters:
<h> any libRASCH handle (except value_handle)
<error> error number
<error_from> source of error (short name)
<file> name of the source-file the function is called
<line> line in the source-file the function is called
Function is called when an error occured and set the error number. Additionally, the source of the error can be given. This function is called from the libRASCH core and from the plugins. This function should _not_ be called from the user-space.

Definition at line 556 of file ra.c.

References librasch::error_from, librasch::error_number, RA_ERR_NONE, ra_in_error, ra_lib_get_error(), ra_lib_handle_from_any_handle(), and ra_print_debug_infos.

int calc_x_scales struct ra_meas meas  ) 
 

Parameters:
<meas> pointer to a measurement struct
Function gets maximum samplerate used in a measurement and calculate for each recording channel the scaling factor to the max. samplerate.

Definition at line 1059 of file ra.c.

References ra_meas::max_samplerate, ra_meas::num_ch, ra_info_get(), RA_INFO_REC_CH_SAMPLERATE_D, RA_INFO_REC_GEN_NUM_CHANNEL_L, ra_rec_get_first(), ra_value_free(), ra_value_get_double(), ra_value_get_long(), ra_value_malloc(), ra_value_set_number(), and ra_meas::x_scale.

Referenced by ra_meas_new(), and ra_meas_open().

int check_handle_type any_handle  h,
int  id
 

Parameters:
<h> any libRASCH handle
<id> name of plugin
Function checks if the type handle 'h' is correct for the info-id 'id'.

Definition at line 1299 of file ra.c.

References _ra_set_error, RA_ERR_UNKNOWN_HANDLE, RA_ERR_UNSUPPORTED, RA_HANDLE_EVAL, RA_HANDLE_EVAL_CLASS, RA_HANDLE_EVAL_PROP, RA_HANDLE_EVAL_SUMMARY, RA_HANDLE_FIND, RA_HANDLE_LIB, RA_HANDLE_MEAS, RA_HANDLE_PLUGIN, RA_HANDLE_PROC, RA_HANDLE_REC, RA_HANDLE_VIEW, RA_INFO_CLASS_END, RA_INFO_CLASS_START, RA_INFO_EVAL_END, RA_INFO_EVAL_START, RA_INFO_LIB_END, RA_INFO_LIB_START, RA_INFO_MEASUREMENT_START, RA_INFO_OBJECT_END, RA_INFO_PLUGIN_END, RA_INFO_PLUGIN_START, RA_INFO_PROCESSING_END, RA_INFO_PROCESSING_START, RA_INFO_PROP_END, RA_INFO_PROP_START, RA_INFO_RECORDING_END, RA_INFO_RECORDING_START, RA_INFO_SUM_END, and RA_INFO_SUM_START.

Referenced by ra_info_get().

void close_modules struct librasch ra  ) 
 

int copy_move_meas meas_handle  mh,
const char *  dest_dir,
int  copy
 

Parameters:
<mh> measurement-handle
<dest_dir> destination directory
<copy> flag if a copy (!= 0) or a move (== 0) should be done
Function copy or move a measurement.

Definition at line 2719 of file ra.c.

References copy_move_file(), delete_file(), make_dir(), MAX_PATH_RA, RA_INFO_DIR_L, RA_INFO_FILES_CA, ra_info_get(), RA_INFO_PATH_C, ra_value_free(), ra_value_get_num_elem(), ra_value_get_string(), ra_value_get_string_array(), and ra_value_malloc().

Referenced by ra_meas_copy(), and ra_meas_move().

int create_auto_class eval_handle  eh,
struct ra_auto_create_class acc,
value_handle res,
long  res_offset
 

Definition at line 88 of file eval_auto.c.

References _ra_set_error, ra_auto_create_class::ascii_id, ra_auto_create_class::clh, ra_auto_create_class::end_pos_idx, ra_auto_create_class::event_ids, ra_auto_create_class::info_ext, ra_auto_create_class::info_long, ra_auto_create_class::info_short, ra_auto_create_class::num_events, ra_class_add_event(), ra_class_add_predef(), RA_ERR_ERROR_INTERNAL, ra_eval_attribute_set(), ra_eval_edit_cancel(), ra_eval_edit_complete(), ra_eval_edit_start(), ra_value_free(), ra_value_get_long_array(), ra_value_get_num_elem(), ra_value_malloc(), ra_value_set_string(), and ra_auto_create_class::start_pos_idx.

Referenced by ra_eval_save_result().

int create_auto_prop eval_handle  eh,
class_handle  clh,
struct proc_info pi,
struct ra_auto_create_class acc,
struct ra_auto_create_prop acp,
value_handle res,
long  res_offset
 

Definition at line 148 of file eval_auto.c.

References ra_auto_create_prop::ascii_id, ra_auto_create_prop::ch_id, ra_auto_create_prop::class_index, ra_auto_create_class::clh, ra_auto_create_prop::event_id_idx, ra_auto_create_class::event_ids, ra_auto_create_prop::ph, ra_prop_add_predef(), ra_prop_get(), ra_prop_set_value(), ra_value_free(), ra_value_get_long_array(), ra_value_get_num_elem(), ra_value_get_single_elem(), ra_value_malloc(), and ra_auto_create_prop::value_id.

Referenced by ra_eval_save_result().

int dload_module struct librasch ra,
char *  file
 

int find_config_file char *  fn  ) 
 

Parameters:
<fn> contains path of config file if function ended successful
This function looks for the libRASCH configuration file. For the config file is first looked in the current directory. If there is none than it looks in '/etc'(Linux) resp. in the system directory (Win32). If not found, on Linux the $HOME directory is searched also.

Definition at line 346 of file ra.c.

References MAX_PATH_RA.

Referenced by read_config().

int find_option const char *  name,
struct ra_option_infos infos,
int  num_opt
 

Parameters:
<name> name of the option looked for
<infos> array of available options
<num_opt> number of the available options
Functions looks in the array 'infos' for the option named 'name'.

Definition at line 2395 of file ra.c.

Referenced by ra_lib_get_option(), and ra_lib_set_option().

void free_mem struct ra_value v  ) 
 

Parameters:
<v> pointer to a value-handle struct
Function frees memory allocated for a value-handle.

Definition at line 1328 of file value.c.

References ra_value::l, ra_value::num_values, ra_free_mem, ra_value_free(), RA_VALUE_TYPE_CHAR, RA_VALUE_TYPE_CHAR_ARRAY, RA_VALUE_TYPE_DOUBLE_ARRAY, RA_VALUE_TYPE_LONG_ARRAY, RA_VALUE_TYPE_NONE, RA_VALUE_TYPE_SHORT_ARRAY, RA_VALUE_TYPE_VH_ARRAY, RA_VALUE_TYPE_VOIDP_ARRAY, ra_value::utype, ra_value::value, ra_value::value_is_valid, and ra_value::value_locale.

Referenced by ra_value_copy(), ra_value_free(), ra_value_get_single_elem(), ra_value_reset(), ra_value_set_double(), ra_value_set_double_array(), ra_value_set_long(), ra_value_set_long_array(), ra_value_set_short(), ra_value_set_short_array(), ra_value_set_string(), ra_value_set_string_array(), ra_value_set_string_array_utf8(), ra_value_set_string_utf8(), ra_value_set_vh_array(), ra_value_set_voidp(), and ra_value_set_voidp_array().

LIBRAAPI int get_endian_type  ) 
 

This function returns the endian type for the running system.

Definition at line 190 of file ra.c.

References ra_endian_type.

void get_error_text long  err,
char *  text,
int  len
 

Referenced by ra_lib_get_error().

void get_error_text_ra long  err,
char *  text,
int  len
 

Parameters:
<err> libRASCH error number
<text> array in which error-string will be set
<len> length of array 'text'
Function gets error-string for libRASCH error numbers.

Definition at line 521 of file ra.c.

References RA_WARNING.

int get_lib_info ra_handle  ra,
int  id,
value_handle  vh
 

Parameters:
<ra> handle to library instance
<id> info id
<vh> value-handle (will receive info)
Function returns informations about the library core.

Definition at line 1367 of file ra.c.

References _ra_set_error, meta_info::desc, get_meta_info(), meta_info::id, meta_info::name, RA_ERR_UNKNOWN_INFO, RA_INFO_LIB_END, RA_INFO_NUM_PLUGINS_L, RA_INFO_VERSION_C, ra_value_set_long(), ra_value_set_string_utf8(), and set_meta_info().

Referenced by ra_info_get().

int get_meas_general_info meas_handle  mh,
int  id,
value_handle  vh
 

Parameters:
<mh> handle to a measurement
<id> info id
<vh> value-handle (will receive info)
Function returns informations about a measurement.

Definition at line 1545 of file ra.c.

Referenced by ra_info_get().

int get_option void *  options,
struct ra_option_infos opt_info,
value_handle  vh,
long  num_offset
 

Parameters:
<options> pointer to an option struct
<opt_info> option looked for
<vh> value-handle (will receive option value)
<num_offset> offset where number of array elements is stored (only for array values needed)
Function returns the value for the option in 'vh'.

Definition at line 2422 of file ra.c.

References ra_option_infos::desc, ra_option_infos::name, ra_option_infos::offset, RA_INFO_NONE, ra_value_set_double(), ra_value_set_double_array(), ra_value_set_long(), ra_value_set_long_array(), ra_value_set_short(), ra_value_set_short_array(), ra_value_set_string_utf8(), RA_VALUE_TYPE_CHAR, RA_VALUE_TYPE_CHAR_ARRAY, RA_VALUE_TYPE_DOUBLE, RA_VALUE_TYPE_DOUBLE_ARRAY, RA_VALUE_TYPE_LONG, RA_VALUE_TYPE_LONG_ARRAY, RA_VALUE_TYPE_SHORT, RA_VALUE_TYPE_SHORT_ARRAY, set_meta_info(), and ra_option_infos::type.

Referenced by ra_lib_get_option().

struct plugin_struct* get_plugin struct librasch ra,
int  number
 

Parameters:
<ra> pointer to general libRASCH struct
<number> number of the plugin
Function returns the plugin-handle for the plugin #number (zero based).

Definition at line 766 of file ra.c.

References plugin_struct::next, and librasch::pl_head.

Referenced by ra_lib_use_plugin(), and ra_plugin_get_by_num().

struct plugin_struct* get_plugin_by_name struct librasch ra,
const char *  name
 

Parameters:
<ra> pointer to general libRASCH struct
<name> name of plugin
Function returns the plugin-handle for the plugin with the name 'name'.

Definition at line 786 of file ra.c.

References plugin_struct::info, plugin_infos::name, plugin_struct::next, and librasch::pl_head.

Referenced by ra_lib_init(), and ra_plugin_get_by_name().

struct plugin_struct* get_plugin_from_handle any_handle  h  ) 
 

Parameters:
<h> handle which belongs to a plugin
Function returns plugin-handle which is associated with the handle 'h'.

Definition at line 1680 of file ra.c.

References _ra_set_error, RA_ERR_ERROR, RA_HANDLE_EVAL, RA_HANDLE_EVAL_CLASS, RA_HANDLE_EVAL_PROP, RA_HANDLE_EVAL_SUMMARY, RA_HANDLE_MEAS, and RA_HANDLE_REC.

Referenced by ra_info_get(), ra_info_get_by_idx(), and ra_info_set().

int get_plugin_info plugin_handle  pl,
int  id,
value_handle  vh
 

Parameters:
<pl> handle to plugin
<id> info id
<vh> value-handle (will receive info)
Function returns informations about library plugins.

Definition at line 1420 of file ra.c.

References _ra_set_error, plugin_infos::build_ts, plugin_infos::desc, meta_info::desc, plugin_infos::file, get_meta_info(), meta_info::id, plugin_struct::info, plugin_infos::license, meta_info::name, plugin_infos::name, plugin_infos::num_options, plugin_infos::num_results, ra_value::number, plugin_infos::opt, RA_ERR_UNKNOWN_INFO, RA_INFO_PL_OPT_NAME_C, RA_INFO_PL_OPT_TYPE_L, RA_INFO_PL_RES_DEFAULT_L, RA_INFO_PL_RES_NAME_C, RA_INFO_PLUGIN_END, ra_value_set_long(), ra_value_set_string_utf8(), plugin_infos::res, set_meta_info(), plugin_infos::type, plugin_infos::use_plugin, and plugin_infos::version.

Referenced by ra_info_get().

int get_proc_info any_handle  h,
int  id,
value_handle  vh
 

Parameters:
<h> any handle belonging to a processing handle
<id> info id
<vh> value-handle (will receive info)
Function returns informations about processing results

Definition at line 1644 of file ra.c.

References proc_info::num_result_sets, proc_info::num_results, RA_INFO_PROC_NUM_RES_L, RA_INFO_PROC_NUM_RES_SETS_L, RA_INFO_PROCESSING_END, and ra_value_set_long().

Referenced by ra_info_get().

int get_session_info any_handle  h,
int  id,
value_handle  vh
 

Parameters:
<h> any handle belonging to a measurement
<id> info id
<vh> value-handle (will receive info)
Function returns informations about a measurement session.

Definition at line 1602 of file ra.c.

References ra_meas::num_sessions, ra_value::number, RA_INFO_SES_DESC_C, RA_INFO_SES_NAME_C, RA_INFO_SESSION_END, ra_meas_handle_from_any_handle(), ra_value_set_string_utf8(), and ra_meas::sessions.

Referenced by ra_info_get().

void init_config struct config_info conf  ) 
 

Parameters:
<conf> pointer to the configuration infos
The function set the configuration parameters to values which will work when no config-file is found.

Definition at line 286 of file ra.c.

References MAX_PATH_RA, config_info::plugin_dir, and config_info::po_dir.

Referenced by read_config().

void init_i18n struct librasch ra  ) 
 

Parameters:
<ra> pointer to general libRASCH struct
This function call functions for i18n handling and set global variables for i18n. The following variable(s) are set:

  • ra_i18n_codeset: the name of the current codeset ("" if locale is not working)

Definition at line 149 of file ra.c.

References librasch::config, MAX_I18N_LEN, config_info::po_dir, ra_i18n_codeset, and ra_print_debug_infos.

Referenced by ra_lib_init().

LIBRAAPI int local_to_utf8 const char *  src,
char *  dest,
size_t  dest_size
 

Definition at line 34 of file i18n.c.

References do_i18n_conversion(), and ra_i18n_codeset.

Referenced by ra_est_ch_type(), ra_info_get_by_name(), ra_lib_get_option(), ra_lib_set_option(), ra_meas_copy(), ra_meas_find_first(), ra_meas_move(), ra_meas_new(), ra_meas_open(), ra_plugin_get_by_name(), ra_value_set_string(), and ra_value_set_string_array().

LIBRAAPI int local_to_utf8_inplace char *  string,
size_t  buf_size
 

Definition at line 41 of file i18n.c.

References do_i18n_conversion_inplace(), and ra_i18n_codeset.

Referenced by dload_plugin().

LIBRAAPI int ra_eval_save_result eval_handle  eh,
class_handle  clh,
prop_handle  ph,
proc_handle  proc,
long  res_set
 

Definition at line 12 of file eval_auto.c.

References _ra_set_error, create_auto_class(), create_auto_prop(), plugin_infos::create_class, plugin_infos::create_prop, ra_auto_create_class::event_ids, plugin_struct::info, proc_info::mh, plugin_infos::num_create_class, plugin_infos::num_create_prop, proc_info::num_result_sets, proc_info::num_results, proc_info::plugin, RA_ERR_ERROR, RA_ERR_ERROR_INTERNAL, ra_eval_add(), ra_value_get_num_elem(), proc_info::results, and ra_auto_create_class::start_pos_idx.

int read_config struct librasch ra  ) 
 

Parameters:
<ra> pointer to general libRASCH struct
Read the configuration set for libRASCH. On Windows, first try to get configuration from Registry. Than try to get configuration from libRASCH config-file. (See find_config_file() in which locations is looked for.) When no config-file was found, '-1' will be returned. When an error inside the config-file was found, '-2' will be returned.

Definition at line 207 of file ra.c.

References librasch::config, EVAL_MAX_NAME, find_config_file(), init_config(), MAX_PATH_RA, config_info::plugin_dir, config_info::po_dir, and ra_print_debug_infos.

Referenced by ra_lib_init().

int read_modules struct librasch ra  ) 
 

void set_endian_type  ) 
 

This function get the endianness of the current system on runtime and set the global variable 'ra_endian_type' accordingly.

Definition at line 124 of file ra.c.

References RA_BIG_ENDIAN, ra_endian_type, and RA_LITTLE_ENDIAN.

Referenced by ra_lib_init().

LIBRAAPI int set_meta_info value_handle  vh,
const char *  name,
const char *  desc,
int  id
 

Parameters:
<vh> value-handle
<name> name of the value
<desc> a short description of the value
<id> id of the value (if it is an libRASCH info)
When value-handle represents some information set inside the core or in a plugin, most of the times a name and description is available.

Definition at line 280 of file value.c.

References ra_value::desc, ra_value::id, ra_value::name, RA_VALUE_DESC_MAX, RA_VALUE_NAME_MAX, and valid_value_handle().

Referenced by find_ra_info_by_name(), get_lib_info(), get_option(), get_plugin_info(), and ra_info_set().

int set_option void *  options,
struct ra_option_infos opt_info,
value_handle  vh,
long  num_offset
 

Parameters:
<options> pointer to an option struct
<opt_info> used option
<vh> value-handle (has value which should be set)
<num_offset> offset where number of array elements will be set (only for array values needed)
Function set the value for the option given in 'vh'.

Definition at line 2541 of file ra.c.

References ra_option_infos::offset, ra_alloc_mem, ra_free_mem, ra_value_get_double(), ra_value_get_double_array(), ra_value_get_long(), ra_value_get_long_array(), ra_value_get_num_elem(), ra_value_get_short(), ra_value_get_short_array(), ra_value_get_string_utf8(), ra_value_get_voidp(), ra_value_get_voidp_array(), RA_VALUE_TYPE_CHAR, RA_VALUE_TYPE_CHAR_ARRAY, RA_VALUE_TYPE_DOUBLE, RA_VALUE_TYPE_DOUBLE_ARRAY, RA_VALUE_TYPE_LONG, RA_VALUE_TYPE_LONG_ARRAY, RA_VALUE_TYPE_SHORT, RA_VALUE_TYPE_SHORT_ARRAY, RA_VALUE_TYPE_VOIDP, RA_VALUE_TYPE_VOIDP_ARRAY, and ra_option_infos::type.

Referenced by ra_lib_set_option().

LIBRAAPI int utf8_to_local const char *  src,
char *  dest,
size_t  dest_size
 

Definition at line 48 of file i18n.c.

References do_i18n_conversion(), and ra_i18n_codeset.

Referenced by _ra_fopen(), _trace_sigdest(), _trace_signame(), copy_move_file(), delete_file(), make_dir(), ra_value_get_desc(), ra_value_get_name(), ra_value_set_string_array_utf8(), ra_value_set_string_utf8(), and read_plugins().

LIBRAAPI int utf8_to_local_inplace char *  string,
size_t  buf_size
 

Definition at line 55 of file i18n.c.

References do_i18n_conversion_inplace(), and ra_i18n_codeset.

Referenced by ra_lib_get_error(), ra_meas_find_first(), and ra_meas_find_next().

int valid_value_handle value_handle  vh,
int  line_num
 

Parameters:
<vh> value-handle
Function checks if the handle given by 'vh' is really a value-handle. If it is another handle, assert(0) is called which stops the program.

Definition at line 81 of file value.c.

References ra_value::handle_id, and RA_HANDLE_VALUE.

Referenced by ra_value_copy(), ra_value_free(), ra_value_get_desc(), ra_value_get_double(), ra_value_get_double_array(), ra_value_get_info(), ra_value_get_long(), ra_value_get_long_array(), ra_value_get_name(), ra_value_get_num_elem(), ra_value_get_number(), ra_value_get_short(), ra_value_get_short_array(), ra_value_get_single_elem(), ra_value_get_string(), ra_value_get_string_array(), ra_value_get_string_array_utf8(), ra_value_get_string_utf8(), ra_value_get_type(), ra_value_get_vh_array(), ra_value_get_voidp(), ra_value_get_voidp_array(), ra_value_is_ok(), ra_value_reset(),