Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

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 /* AFNI realtime defines */
00006 #define AFNI_CONTROL_PORT     7954  /* always send control data to AFNI    */
00007 #define AFNI_TCP_PORT         7953  /* maybe send image data to AFNI       */
00008 
00009 #define AFNI_OPEN_CONTROL_MODE   1  /* 1st time thru: open control channel */
00010 #define AFNI_WAIT_CONTROL_MODE   2  /* waiting for AFNI to open control    */
00011 #define AFNI_OPEN_DATA_MODE      3  /* now can open data channel to AFNI   */
00012 #define AFNI_CATCHUP_MODE        4  /* waiting for AFNI to open data       */
00013 #define AFNI_CONTINUE_MODE       5  /* at last! data channel is ready!     */
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;                    /* state of AFNI realtime             */
00035     int       mode;                     /* if > 0, then means AFNI is active */
00036     int       use_tcp;                  /* if > 0, use TCP/IP to send data  */
00037     int       swap;                     /* byte swap data before sending   */
00038     int       byte_order;               /* note the byte order of images  */
00039     char    * zorder;                   /* slice order over time         */
00040     char      host[ART_NAME_LEN];       /* hostname of CPU afni is on   */
00041     char      ioc_name[ART_NAME_LEN];   /* I/O channel name to afni    */
00042     char      buf[1024];                /* main buffer for afni comm  */
00043     IOCHAN  * ioc;                      /* ptr to I/O channel struct */
00044     param_t * param;                    /* local pointer to images  */
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  /* _REALTIME_H_ */
 

Powered by Plone

This site conforms to the following standards: