Main Page | Files | Data Structures | Functions | Global Variables |
gpiv-cam.h
Go to the documentation of this file.
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
2 
3 /*-----------------------------------------------------------------------------
4  libgpiv - library for Particle Image Velocimetry
5 
6  Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Gerber van der Graaf
7  <gerber_graaf@users.sourceforge.net>
8 
9  This file is part of libgpiv.
10 
11  Libgpiv is free software; you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2, or (at your option)
14  any later version.
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software Foundation,
23  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 
25 
26 
27 
28 -------------------------------------------------------------------------------
29 LIBRARY: libgpiv
30 FILENAME: cam.h
31 SOURCE: cam.c
32 EXTERNAL FUNCTIONS:
33  gpiv_cam_get_camvar
34  gpiv_cam_free_camvar
35  gpiv_cam_default_parameters
36  gpiv_cam_read_parameters
37  gpiv_cam_check_parameters_read
38  gpiv_cam_parameters_set
39  gpiv_cam_test_parameter
40  gpiv_cam_fprint_parameters
41 
42 ---------------------------------------------------------------------------- */
43 
52 #ifndef __LIBGPIV_CAM_H__
53 #define __LIBGPIV_CAM_H__
54 
55 
56 
57 /*
58  * Default values of CamPar
59  */
60 #define GPIV_CAMPAR_DEFAULT__MODE 1
61 #define GPIV_CAMPAR_DEFAULT__CYCLES 1
62 #define GPIV_CAMPAR_DEFAULT__FNAME "gpiv_img"
64 #define GPIV_CAMPAR_CYCLES_MIN 1
65 #define GPIV_CAMPAR_CYCLES_MAX 1
67 /*
68  * Keys of CamPar to read values from configuration files
69  */
70 #define GPIV_CAMPAR_KEY "CAM"
71 #define GPIV_CAMPAR_KEY__MODE "Mode"
72 #define GPIV_CAMPAR_KEY__CYCLES "Cycles"
73 #define GPIV_CAMPAR_KEY__FNAME "Fname"
75 #define GPIV_CAMPAR_CYCLES_MIN 1
76 #define GPIV_CAMPAR_CYCLES_MAX 1
77 
88 };
89 
90 typedef struct __GpivCamPar GpivCamPar;
97 struct __GpivCamPar {
99  guint cycles;
101  gboolean mode__set;
102  gboolean cycles__set;
103  gboolean fname__set;
104 };
105 
106 
107 
108 typedef struct __GpivCamVar GpivCamVar;
114 struct __GpivCamVar {
115  guint numNodes;
116  guint numCameras;
117  guint maxspeed;
118  guint port;
119  raw1394handle_t handle;
120  nodeid_t *camera_nodes;
122  dc1394_cameracapture *capture;
123  dc1394_camerainfo *camera;
124  dc1394_feature_info *feature_info;
125  dc1394_feature_set *feature_set;
126  dc1394_miscinfo *misc_info;
127 };
128 
129 
130 
131 
138 GpivCamVar *
139 gpiv_cam_get_camvar (const gboolean verbose
140  );
141 
142 
143 
150 gchar *
152  );
153 
154 
155 
163 void
164 gpiv_cam_default_parameters (GpivCamPar *cam_par_default,
165  const gboolean force
166  );
167 
168 
169 
178 void
179 gpiv_cam_read_parameters (FILE *fp_par,
180  GpivCamPar *cam_par,
181  const gboolean verbose
182  );
183 
184 
185 
196 gchar *
198  const GpivCamPar *cam_par_default
199  );
200 
201 
202 
210 void
212  const gboolean flag
213  );
214 
215 
216 
224 gchar *
225 gpiv_cam_test_parameter (const GpivCamPar *cam_par
226  );
227 
228 
229 
237 void
238 gpiv_cam_print_parameters (FILE *fp_par_out,
239  const GpivCamPar *cam_par
240  );
241 
242 
243 
244 #endif /*__LIBGPIV_CAM_H__ */
gchar fname[GPIV_MAX_CHARS]
image file name
Definition: gpiv-cam.h:100
nodeid_t * camera_nodes
camera node
Definition: gpiv-cam.h:120
guint numNodes
number of nodes available
Definition: gpiv-cam.h:115
dc1394_feature_set * feature_set
Definition: gpiv-cam.h:125
gchar * gpiv_cam_free_camvar(GpivCamVar *cam_var)
Free memory variables of connected cameras using firewire.
Parameters for camera settings.
Definition: gpiv-cam.h:97
Camera variables.
Definition: gpiv-cam.h:114
dc1394_miscinfo * misc_info
Definition: gpiv-cam.h:126
void gpiv_cam_read_parameters(FILE *fp_par, GpivCamPar *cam_par, const gboolean verbose)
Read all GpivCamPar parameters.
dc1394_camerainfo * camera
Definition: gpiv-cam.h:123
continuoulsy
Definition: gpiv-cam.h:83
void gpiv_cam_parameters__set(GpivCamPar *cam_par, const gboolean flag)
Sets flags for __set variables of GpivCamPar.
guint port
port number
Definition: gpiv-cam.h:118
gboolean cycles__set
flag if cycles has been defined
Definition: gpiv-cam.h:102
gchar * gpiv_cam_test_parameter(const GpivCamPar *cam_par)
Testing GpivCamPar parameters on valid values and initializing derived variables. ...
guint maxspeed
maximum frame rate speed
Definition: gpiv-cam.h:117
gboolean fname__set
flag if fname has been defined
Definition: gpiv-cam.h:103
single image pair
Definition: gpiv-cam.h:84
enum GpivCamMode mode
operating mode (indefinite/interrupt/definite)
Definition: gpiv-cam.h:98
gboolean mode__set
flag if mode has been defined
Definition: gpiv-cam.h:101
GpivCamMode
Camera modes.
Definition: gpiv-cam.h:81
#define GPIV_MAX_CHARS
Maximum number of characters on a line.
Definition: gpiv.h:234
dc1394_feature_info * feature_info
Definition: gpiv-cam.h:124
gchar * gpiv_cam_check_parameters_read(GpivCamPar *cam_par, const GpivCamPar *cam_par_default)
Checks if all GpivCamPar parameters have been read.
GpivCamVar * gpiv_cam_get_camvar(const gboolean verbose)
Get varaiables of connected cameras using firewire.
void gpiv_cam_print_parameters(FILE *fp_par_out, const GpivCamPar *cam_par)
Prints GpivCamPar parameters to fp_par_out.
guint cycles
If GpivTrigPar not used.
Definition: gpiv-cam.h:99
dc1394_cameracapture * capture
Definition: gpiv-cam.h:122
void gpiv_cam_default_parameters(GpivCamPar *cam_par_default, const gboolean force)
Sets default GpivCamPar parameter values.
guint numCameras
number of cameras available
Definition: gpiv-cam.h:116
on wxternal trigger signals
Definition: gpiv-cam.h:85
raw1394handle_t handle
handle
Definition: gpiv-cam.h:119

Generated for libgpiv-0.6.1 by doxygen 1.8.13