Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
realtime.h
Go to the documentation of this file.00001 #ifndef _REALTIME_H_
00002 #define _REALTIME_H_
00003
00004
00005
00006 #define AFNI_CONTROL_PORT 7954
00007 #define AFNI_TCP_PORT 7953
00008
00009 #define AFNI_OPEN_CONTROL_MODE 1
00010 #define AFNI_WAIT_CONTROL_MODE 2
00011 #define AFNI_OPEN_DATA_MODE 3
00012 #define AFNI_CATCHUP_MODE 4
00013 #define AFNI_CONTINUE_MODE 5
00014
00015 #define ART_STATE_NO_USE 0
00016 #define ART_STATE_TO_OPEN 1
00017 #define ART_STATE_TO_SEND_CTRL 2
00018 #define ART_STATE_IN_USE 3
00019 #define ART_STATE_TO_CLOSE 4
00020
00021 #define ART_COMMAND_MARKER "Et Earello Endorenna utulien!!"
00022 #define ART_COMMAND_MARKER_LEN 30
00023
00024 #define ART_NAME_LEN 128
00025 #define ART_TBUF_LEN 1024
00026
00027 #define ART_ADD_TO_BUF(dest,src) ( strcat(dest,src), strcat(dest,"\n") )
00028 #define CHECK_NULL_STR(str) ( str ? str : "(NULL)" )
00029
00030
00031
00032 typedef struct
00033 {
00034 int state;
00035 int mode;
00036 int use_tcp;
00037 int swap;
00038 int byte_order;
00039 char * zorder;
00040 char host[ART_NAME_LEN];
00041 char ioc_name[ART_NAME_LEN];
00042 char buf[1024];
00043 IOCHAN * ioc;
00044 param_t * param;
00045 } ART_comm;
00046
00047
00048
00049 void ART_exit ( void );
00050 int ART_idisp_ART_comm ( char * info, ART_comm * ac );
00051 int ART_init_AC_struct ( ART_comm * ac );
00052 int ART_open_afni_link ( ART_comm * ac, int num_tries, int again,int debug);
00053 int ART_send_control_info ( ART_comm * ac, vol_t * v, int debug );
00054 int ART_send_end_of_run ( ART_comm * ac, int run, int seq, int debug );
00055 int ART_send_volume ( ART_comm * ac, vol_t * v, int debug );
00056 int ART_start_io ( ART_comm * ac, int debug );
00057
00058 int swap_2 ( void * ptr, int npairs );
00059
00060
00061 #endif