Main Page | Files | Data Structures | Functions | Global Variables |

gpiv-cam.h

Go to the documentation of this file.
00001 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
00002 
00003 /*-----------------------------------------------------------------------------
00004    libgpiv - library for Particle Image Velocimetry
00005 
00006    Copyright (C) 2002, 2003, 2004, 2005
00007    Gerber van der Graaf <gerber_graaf@users.sourceforge.net>
00008 
00009    This file is part of libgpiv.
00010 
00011    Libgpiv is free software; you can redistribute it and/or modify
00012    it under the terms of the GNU General Public License as published by
00013    the Free Software Foundation; either version 2, or (at your option)
00014    any later version.
00015 
00016    This program is distributed in the hope that it will be useful,
00017    but WITHOUT ANY WARRANTY; without even the implied warranty of
00018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019    GNU General Public License for more details.
00020 
00021    You should have received a copy of the GNU General Public License
00022    along with this program; if not, write to the Free Software Foundation,
00023    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
00024 
00025 
00026 
00027 
00028 -------------------------------------------------------------------------------
00029 LIBRARY:                libgpiv
00030 FILENAME:               cam.h
00031 SOURCE:                 cam.c
00032 EXTERNAL FUNCTIONS:
00033                         gpiv_cam_get_camvar
00034                         gpiv_cam_free_camvar
00035                         gpiv_cam_default_parameters
00036                         gpiv_cam_read_parameters
00037                         gpiv_cam_check_parameters_read
00038                         gpiv_cam_parameters_set
00039                         gpiv_cam_test_parameter
00040                         gpiv_cam_fprint_parameters
00041 
00042 ---------------------------------------------------------------------------- */
00043 
00052 #ifndef __LIBGPIV_CAM_H__
00053 #define __LIBGPIV_CAM_H__
00054 
00055 
00056 
00057 /*
00058  * Default values of CamPar
00059  */
00060 #define GPIV_CAMPAR_DEFAULT__MODE 1             
00061 #define GPIV_CAMPAR_DEFAULT__CYCLES 1           
00062 #define GPIV_CAMPAR_DEFAULT__FNAME "gpiv_img"   
00064 #define GPIV_CAMPAR_CYCLES_MIN 1 
00065 #define GPIV_CAMPAR_CYCLES_MAX 1 
00067 /*
00068  * Keys of CamPar to read values from configuration files
00069  */
00070 #define GPIV_CAMPAR_KEY "CAM"            
00071 #define GPIV_CAMPAR_KEY__MODE "Mode"     
00072 #define GPIV_CAMPAR_KEY__CYCLES "Cycles" 
00073 #define GPIV_CAMPAR_KEY__FNAME "Fname"   
00075 #define GPIV_CAMPAR_CYCLES_MIN 1
00076 #define GPIV_CAMPAR_CYCLES_MAX 1
00077 
00081 enum GpivCamMode {
00082     GPIV_CAM_MODE__PERIODIC = 1,
00083     GPIV_CAM_MODE__DURATION,    
00084     GPIV_CAM_MODE__ONE_SHOT_IRQ,
00085     GPIV_CAM_MODE__TRIGGER_IRQ, 
00086     GPIV_CAM_MODE__INCREMENT,   
00087     GPIV_CAM_MODE__DOUBLE,      
00088 };
00089 
00090 typedef struct __GpivCamPar GpivCamPar;
00097 struct __GpivCamPar {
00098     enum GpivCamMode mode;      
00099     guint cycles;               
00100     gchar fname[GPIV_MAX_CHARS];
00101     gboolean mode__set;         
00102     gboolean cycles__set;       
00103     gboolean fname__set;        
00104 };
00105 
00106 
00107 
00108 typedef struct __GpivCamVar GpivCamVar;
00114 struct __GpivCamVar {
00115     guint numNodes;             
00116     guint numCameras;           
00117     guint maxspeed;             
00118     guint port;                 
00119     raw1394handle_t handle;     
00120     nodeid_t *camera_nodes;     
00122     dc1394_cameracapture *capture;
00123     dc1394_camerainfo *camera;
00124     dc1394_feature_info *feature_info;
00125     dc1394_feature_set *feature_set;
00126     dc1394_miscinfo *misc_info;
00127 };
00128 
00129 
00130 
00131 
00138 GpivCamVar *
00139 gpiv_cam_get_camvar                     (const gboolean         verbose
00140                                         );
00141 
00142 
00143 
00150 gchar *
00151 gpiv_cam_free_camvar                    (GpivCamVar             *cam_var
00152                                         );
00153 
00154 
00155 
00163 void
00164 gpiv_cam_default_parameters             (GpivCamPar             *cam_par_default,
00165                                         const gboolean          force
00166                                         );
00167 
00168 
00169 
00178 void 
00179 gpiv_cam_read_parameters                (FILE                   *fp_par, 
00180                                         GpivCamPar              *cam_par, 
00181                                         const gboolean          verbose
00182                                         );
00183 
00184 
00185 
00193 gchar *
00194 gpiv_cam_check_parameters_read          (GpivCamPar             *cam_par,
00195                                         const GpivCamPar        *cam_par_default
00196                                         );
00197 
00198 
00199 
00207 void
00208 gpiv_cam_parameters__set                (GpivCamPar             *cam_par,
00209                                         const gboolean          flag
00210                                         );
00211 
00212 
00213 
00221 gchar *
00222 gpiv_cam_test_parameter                 (const GpivCamPar       *cam_par
00223                                         );
00224 
00225 
00226 
00234 void 
00235 gpiv_cam_print_parameters               (FILE                   *fp_par_out, 
00236                                         const GpivCamPar        *cam_par
00237                                         );
00238 
00239 
00240 
00241 #endif /*__LIBGPIV_CAM_H__ */

Generated on Tue Nov 20 19:46:20 2007 for Libgpiv by doxygen 1.5.1