00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _RA_H
00019 #define _RA_H
00020
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024
00025 #include <stddef.h>
00026
00027 #include <ra_defines.h>
00028 #include <ra_error.h>
00029
00030
00031
00032 LIBRAAPI ra_handle ra_lib_init(void);
00033 LIBRAAPI void ra_lib_close(ra_handle h);
00034
00035 LIBRAAPI long ra_lib_get_error(ra_handle h, char *text, int len);
00036
00037 LIBRAAPI ra_handle ra_lib_handle_from_any_handle(meas_handle mh);
00038 LIBRAAPI meas_handle ra_meas_handle_from_any_handle(any_handle rh);
00039
00040 LIBRAAPI int ra_lib_use_plugin(ra_handle h, int plugin_index, int use_it);
00041
00042 LIBRAAPI plugin_handle ra_plugin_get_by_num(ra_handle h, int plugin_index, int search_all);
00043 LIBRAAPI plugin_handle ra_plugin_get_by_name(ra_handle h, const char *name, int search_all);
00044
00045 LIBRAAPI ra_find_handle ra_meas_find_first(ra_handle h, const char *dir, struct ra_find_struct *rfs);
00046 LIBRAAPI int ra_meas_find_next(ra_find_handle h, struct ra_find_struct *mfs);
00047 LIBRAAPI void ra_meas_close_find(ra_find_handle h);
00048
00049 LIBRAAPI meas_handle ra_meas_open(ra_handle h, const char *file, const char *eval_file, int fast);
00050
00051 LIBRAAPI meas_handle ra_meas_new(ra_handle h, const char *dir, const char *name);
00052 LIBRAAPI int ra_meas_save(meas_handle mh);
00053 LIBRAAPI void ra_meas_close(meas_handle mh);
00054
00055 LIBRAAPI int ra_info_get(any_handle h, int id, value_handle vh);
00056 LIBRAAPI int ra_info_get_by_name(any_handle h, const char *name, value_handle vh);
00057 LIBRAAPI int ra_info_get_by_idx(any_handle h, int info_type, int idx, value_handle vh);
00058 LIBRAAPI int ra_info_set(any_handle h, value_handle vh);
00059
00060 LIBRAAPI rec_handle ra_rec_get_first(meas_handle mh, long session);
00061 LIBRAAPI rec_handle ra_rec_get_next(rec_handle rh);
00062 LIBRAAPI rec_handle ra_rec_get_first_child(rec_handle rh);
00063
00064
00065
00066
00067
00068
00069
00070
00071 LIBRAAPI size_t ra_raw_get(rec_handle rh, unsigned int ch, size_t start, size_t num_data, DWORD *data, DWORD *data_high);
00072 LIBRAAPI size_t ra_raw_get_unit(rec_handle rh, unsigned int ch, size_t start, size_t num_data, double *data);
00073
00074 LIBRAAPI int ra_gui_call(any_handle h, plugin_handle pl);
00075
00076 LIBRAAPI proc_handle ra_proc_get(meas_handle mh, plugin_handle pl, void (*callback) (const char *, int ));
00077 LIBRAAPI void ra_proc_free(proc_handle proc);
00078 LIBRAAPI int ra_proc_do(proc_handle proc);
00079 LIBRAAPI int ra_proc_get_result(proc_handle proc, long res_num, long res_set, value_handle vh);
00080
00081 LIBRAAPI int ra_view_get(view_handle vh);
00082
00083
00084 LIBRAAPI value_handle ra_value_malloc();
00085 LIBRAAPI void ra_value_free(value_handle vh);
00086
00087 LIBRAAPI void ra_value_reset(value_handle vh);
00088
00089 LIBRAAPI long ra_value_get_type(value_handle vh);
00090 LIBRAAPI int ra_value_is_ok(value_handle vh);
00091 LIBRAAPI long ra_value_get_num_elem(value_handle vh);
00092 LIBRAAPI long ra_value_get_info(value_handle vh);
00093 LIBRAAPI const char *ra_value_get_name(value_handle vh);
00094 LIBRAAPI const char *ra_value_get_desc(value_handle vh);
00095
00096 LIBRAAPI int ra_value_set_number(value_handle vh, long number);
00097 LIBRAAPI long ra_value_get_number(value_handle vh);
00098
00099 LIBRAAPI void ra_value_set_short(value_handle vh, const short value);
00100 LIBRAAPI void ra_value_set_long(value_handle vh, const long value);
00101 LIBRAAPI void ra_value_set_double(value_handle vh, const double value);
00102 LIBRAAPI void ra_value_set_string(value_handle vh, const char *value);
00103 LIBRAAPI void ra_value_set_string_utf8(value_handle vh, const char *value);
00104 LIBRAAPI void ra_value_set_voidp(value_handle vh, const void *value);
00105 LIBRAAPI void ra_value_set_short_array(value_handle vh, const short *array, long num);
00106 LIBRAAPI void ra_value_set_long_array(value_handle vh, const long *array, long num);
00107 LIBRAAPI void ra_value_set_double_array(value_handle vh, const double *array, long num);
00108 LIBRAAPI void ra_value_set_string_array(value_handle vh, const char **array, long num);
00109 LIBRAAPI void ra_value_set_string_array_utf8(value_handle vh, const char **array, long num);
00110 LIBRAAPI void ra_value_set_voidp_array(value_handle vh, const void **array, long num);
00111 LIBRAAPI void ra_value_set_vh_array(value_handle vh, const value_handle *array, long num);
00112
00113 LIBRAAPI short ra_value_get_short(value_handle vh);
00114 LIBRAAPI long ra_value_get_long(value_handle vh);
00115 LIBRAAPI double ra_value_get_double(value_handle vh);
00116 LIBRAAPI const char *ra_value_get_string(value_handle vh);
00117 LIBRAAPI const char *ra_value_get_string_utf8(value_handle vh);
00118 LIBRAAPI const void *ra_value_get_voidp(value_handle vh);
00119 LIBRAAPI const short *ra_value_get_short_array(value_handle vh);
00120 LIBRAAPI const long *ra_value_get_long_array(value_handle vh);
00121 LIBRAAPI const double *ra_value_get_double_array(value_handle vh);
00122 LIBRAAPI const char **ra_value_get_string_array(value_handle vh);
00123 LIBRAAPI const char **ra_value_get_string_array_utf8(value_handle vh);
00124 LIBRAAPI const void **ra_value_get_voidp_array(value_handle vh);
00125 LIBRAAPI const value_handle *ra_value_get_vh_array(value_handle vh);
00126
00127 LIBRAAPI int ra_value_copy(value_handle dest, value_handle src);
00128 LIBRAAPI int ra_value_get_single_elem(value_handle dest, value_handle src, long elem_num);
00129
00130
00131
00132
00133 LIBRAAPI int ra_lib_get_option(any_handle h, const char *opt_name, value_handle vh);
00134 LIBRAAPI int ra_lib_set_option(any_handle h, const char *opt_name, value_handle vh);
00135
00136
00137
00138 LIBRAAPI int ra_meas_copy(meas_handle mh, const char *dest_dir);
00139 LIBRAAPI meas_handle ra_meas_move(meas_handle mh, const char *dest_dir);
00140 LIBRAAPI int ra_meas_delete(meas_handle mh);
00141
00142
00143
00144 LIBRAAPI int ra_eval_edit_start(any_handle h);
00145 LIBRAAPI int ra_eval_edit_complete(any_handle h);
00146 LIBRAAPI int ra_eval_edit_cancel(any_handle h);
00147
00148 LIBRAAPI int ra_eval_attribute_list(any_handle h, value_handle vh);
00149 LIBRAAPI int ra_eval_attribute_get(any_handle h, const char *name, value_handle vh);
00150 LIBRAAPI int ra_eval_attribute_set(any_handle h, const char *name, value_handle vh);
00151 LIBRAAPI int ra_eval_attribute_unset(any_handle h, const char *id);
00152
00153 LIBRAAPI eval_handle ra_eval_add(meas_handle mh, const char *name, const char *desc, int original);
00154 LIBRAAPI int ra_eval_delete(eval_handle eh);
00155 LIBRAAPI int ra_eval_get_all(meas_handle mh, value_handle vh);
00156 LIBRAAPI eval_handle ra_eval_get_original(meas_handle mh);
00157 LIBRAAPI eval_handle ra_eval_get_default(meas_handle mh);
00158 LIBRAAPI int ra_eval_set_default(eval_handle eh);
00159 LIBRAAPI eval_handle ra_eval_get_handle(class_handle clh);
00160
00161 LIBRAAPI class_handle ra_class_add(eval_handle eh, const char *id, const char *name, const char *desc);
00162 LIBRAAPI class_handle ra_class_add_predef(eval_handle eh, const char *id);
00163 LIBRAAPI int ra_class_delete(class_handle clh);
00164 LIBRAAPI int ra_class_get(eval_handle eh, const char *id, value_handle vh);
00165 LIBRAAPI long ra_class_add_event(class_handle clh, long start, long end);
00166 LIBRAAPI int ra_class_del_event(class_handle clh, long event_id);
00167 LIBRAAPI int ra_class_get_event_pos(class_handle clh, long event_id, long *start, long *end);
00168 LIBRAAPI int ra_class_set_event_pos(class_handle clh, long event_id, long start, long end);
00169 LIBRAAPI int ra_class_get_events(class_handle clh, long start, long end, int complete, int sort, value_handle vh);
00170 LIBRAAPI class_handle ra_class_get_handle(prop_handle ph);
00171
00172 LIBRAAPI prop_handle ra_prop_add(class_handle clh, const char *id, long value_type, long num_values, const char *name,
00173 const char *desc, const char *unit, int use_minmax, double min, double max);
00174 LIBRAAPI prop_handle ra_prop_add_predef(class_handle clh, const char *id);
00175 LIBRAAPI int ra_prop_delete(prop_handle ph);
00176 LIBRAAPI prop_handle ra_prop_get(class_handle clh, const char *id);
00177 LIBRAAPI int ra_prop_get_all(class_handle clh, value_handle vh);
00178 LIBRAAPI int ra_prop_set_value(prop_handle ph, long event_id, long ch, value_handle vh);
00179 LIBRAAPI int ra_prop_get_ch(prop_handle ph, long event_id, value_handle vh);
00180 LIBRAAPI int ra_prop_get_value(prop_handle ph, long event_id, long ch, value_handle vh);
00181 LIBRAAPI int ra_prop_get_events(prop_handle ph, value_handle min, value_handle max, long ch, value_handle vh);
00182
00183 LIBRAAPI sum_handle ra_sum_add(class_handle clh, const char *id, const char *name, const char *desc);
00184 LIBRAAPI int ra_sum_add_ch(sum_handle sh, long ch, long fiducial_offset, long num_dim, const char **dim_unit,
00185 const char **dim_name);
00186 LIBRAAPI int ra_sum_delete(sum_handle sh);
00187 LIBRAAPI int ra_sum_get(class_handle clh, const char *id, value_handle vh);
00188 LIBRAAPI long ra_sum_add_part(sum_handle sh, long num_events, const long *events_based_on);
00189 LIBRAAPI int ra_sum_del_part(sum_handle sh, long part_id);
00190 LIBRAAPI int ra_sum_get_part_all(sum_handle sh, value_handle vh);
00191 LIBRAAPI int ra_sum_set_part_data(sum_handle sh, long part_id, long channel, long dim, value_handle vh);
00192 LIBRAAPI int ra_sum_get_part_data(sum_handle sh, long part_id, long channel, long dim, value_handle vh);
00193 LIBRAAPI int ra_sum_get_part_events(sum_handle sh, long part_id, value_handle vh);
00194
00195
00196 #ifdef __cplusplus
00197 }
00198 #endif
00199
00200 #endif