/common/home/bel/bella/lnx/exports/build/current/all/sys-tools/uv-lib/uv.h

00001 #ifndef UV_H
00002 #define UV_H
00003 
00004 
00005 
00006 #ifdef  __cplusplus
00007 extern "C" {
00008 #endif
00009 
00010 
00058   // TODO
00070 
00071 /*
00072  * INTERN
00073  *
00074  * The configuration and creation of the  underlying connection (input fd, reader thread etc.) 
00075  * is set up independently via xfreader-API. The missing link is a message hook function 
00076  * supplied to the reflection of the expected message object reflection. The hook function
00077  * is called in the xfreader thread but defined here.
00078  *
00079  * TODO: refactoring of tolerance computation neccessary
00080  */
00081 
00086 
00087 #define UV_LOGICAL  0
00089 #define UV_BYTE 1
00091 #define UV_INTEGER 2
00093 #define UV_LONG 3
00095 #define UV_DOUBLE 4
00097 #define UV_STRING 5
00098 
00100 #define UV_LOGICAL_VECTOR 6
00102 #define UV_BYTE_VECTOR 7
00104 #define UV_INTEGER_VECTOR 8
00106 #define UV_LONG_VECTOR 9
00108 #define UV_DOUBLE_VECTOR 10
00110 #define UV_STRING_VECTOR 11
00112 #define UV_OBJECT 12
00113 
00117 
00118 #define UV_READONLY  0x01
00120 #define UV_READWRITE 0x02
00122 #define UV_MUTABLE   0x04
00123 
00125 #define UV_ROOT 0
00126 
00127 
00129 typedef enum
00130 {
00131   UV_LOG =    0x01,
00132   UV_ERROR =  0x02,
00133   UV_INFO =   0x04,
00134   UV_DEBUG =  0x08,
00135   UV_TIMER =  0x10,
00136   UV_TREE  =  0x20
00137 } uv_loglevel_e;
00138 
00139 
00140 typedef unsigned int uv_folder_t;
00141 typedef unsigned int uv_queue_t;
00142 typedef unsigned int uv_mount_t;
00143 typedef unsigned int uv_file_t;
00144 typedef unsigned int uv_value_t;
00145 
00146 typedef void * UV_VALUE;
00147 
00156 typedef int  (*UV_CHANGE_CB) ( char *adr, int type, UV_VALUE val, int cnt,
00157     void *userarg );
00158 
00164 typedef int  (*UV_ADD_CB) ( char *path, char *filename );
00165 
00171 typedef int  (*UV_RM_CB) ( char *fileadr );
00172 
00179 typedef int  (*UV_FILE_CB) ( char *filepath, uv_file_t file, void *userarg );
00180 
00181 
00192 int  uv_init( char *mive, UV_CHANGE_CB cb );
00193 
00203 int uv_set_structure_cbs(UV_ADD_CB add_cb, UV_RM_CB rm_cb );
00204 
00205 
00214 int uv_burst_delay( int ms );
00215 
00223 int uv_online( void );
00224 
00232 int uv_offline( void );
00233 
00243 int uv_tree( char *path,  char *fn, uv_folder_t folder_id );
00244 
00255 uv_folder_t uv_folder_new( char *mive, int major, int minor );
00256 
00266 int uv_folder_free( uv_folder_t  folder_id );
00267 
00278 uv_queue_t uv_queue_new( char *mive, int major, int minor );
00279 
00290 uv_mount_t uv_mount_ip_new( char *host, int port, char *filepath );
00291 
00301 uv_mount_t uv_mount_name_new( char *service_name, char *filepath );
00302 
00321 int uv_file_new( uv_folder_t folder_id, char *name, int mode, 
00322     char *description, int type,  
00323     void *val, int cnt, void *userarg );
00324 
00340 int uv_file_add( char *foldername, char *filename, int mode,  
00341     char *description, int type, 
00342     UV_VALUE pval, int cnt, void *userarg );
00343 
00344 
00354 int uv_file_rm( char *filepath ); 
00355 
00368 int uv_queue_push( char *queuepath, char *name, char *description, int type,  
00369     void *val, int cnt );
00370 
00379 int uv_file_set_arg( char *filepath, void *arg );
00380 
00392 int uv_file_set( char *filepath, int idx, int type, UV_VALUE val );
00393 
00405 int uv_file_val( char *filepath, int type, UV_VALUE val, int count );
00406 
00408 int uv_file_set_logical( char *adr, unsigned char *pval );
00409 
00411 int uv_file_set_byte( char *adr, char *pval );
00412 
00414 int uv_file_set_int( char *adr, int *pval );
00415 
00417 int uv_file_set_long( char *adr, long long int *pval );
00418 
00420 int uv_file_set_double( char *adr, double *pval );
00421 
00423 int uv_file_set_string( char *adr, char *pval );
00424 
00426 int uv_file_set_logical_vector( char *adr, int idx, unsigned char *pval );
00427 
00429 int uv_file_set_byte_vector( char *adr, int idx, char *pval );
00430 
00432 int uv_file_set_int_vector( char *adr, int idx, int *pval );
00433 
00435 int uv_file_set_long_vector( char *adr, int idx, long long int *pval );
00436 
00438 int uv_file_set_double_vector( char *adr, int idx, double *pval );
00439 
00441 int uv_file_set_string_vector( char *adr, int idx, char *pval );
00442 
00481 int uv_traverse( uv_file_t root_folder, char *anchor, UV_FILE_CB cb, void *userarg );
00482 
00483 
00491 int uv_read_fs( char *fsrootpath );
00492 
00498 uv_folder_t uv_value_root(void);
00499 
00505 uv_file_t uv_value_root_file(void);
00506 
00507 
00510 #ifdef  __cplusplus
00511 }
00512 #endif
00513 
00514 #endif

Generated on 4 Mar 2014 for uv by  doxygen 1.4.7