Main Page | Files | Data Structures | Functions | Global Variables |
gpiv-trig.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 EXTERNAL FUNCTIONS:
31  gpiv_trig_openrtfs
32  gpiv_trig_default_parameters
33  gpiv_trig_read_parameters
34  gpiv_trig_check_parameters_read
35  gpiv_trig_parameters_set
36  gpiv_trig_test_parameter
37  gpiv_trig_fprint_parameters
38 
39 LAST MODIFICATION DATE: $Id: gpiv-trig.h,v 1.2 2008-04-09 06:10:28 gerber Exp $
40 ---------------------------------------------------------------------------- */
41 
50 #ifndef __LIBGPIV_TRIG_H__
51 #define __LIBGPIV_TRIG_H__
52 
53 
54 
55 /* #include <rtai.h> */
56 /* #include <fcntl.h> */
57 
58 /*
59  * Default values and keys of GpivTrigPar
60  */
61 #define GPIV_TRIGPAR_DEFAULT__CAP 250
62 #define GPIV_TRIGPAR_DEFAULT__LPW 0.02
63 #define GPIV_TRIGPAR_DEFAULT__T2L 0.19
64 #define GPIV_TRIGPAR_DEFAULT__DT 10
65 #define GPIV_TRIGPAR_DEFAULT__MODE 2
66 #define GPIV_TRIGPAR_DEFAULT__CYCLES 1
67 #define GPIV_TRIGPAR_DEFAULT__INCR_DT 1
69 #define GPIV_TRIGPAR_KEY "TRIG"
70 #define GPIV_TRIGPAR_KEY__CAP "Ttime_cap"
71 #define GPIV_TRIGPAR_KEY__LPW "Ttime_lpw"
72 #define GPIV_TRIGPAR_KEY__T2L "Ttime_t2l"
73 #define GPIV_TRIGPAR_KEY__DT "Ttime_dt"
74 #define GPIV_TRIGPAR_KEY__MODE "Ttime_mode"
75 #define GPIV_TRIGPAR_KEY__CYCLES "Ttime_cycles"
76 #define GPIV_TRIGPAR_KEY__INCR_DT "Ttime_incr_dt"
78 #define GPIV_TRIGPAR_CAP_MIN 100
79 #define GPIV_TRIGPAR_LPW_MIN 0.02
80 #define GPIV_TRIGPAR_T2L_MIN 0.19
81 #define GPIV_TRIGPAR_DT_MIN 0.10
82 #define GPIV_TRIGPAR_MODE_MIN 1
83 #define GPIV_TRIGPAR_CYCLES_MIN 1
84 #define GPIV_TRIGPAR_INCR_DT_MIN 0.01
86 #define GPIV_TRIGPAR_CAP_MAX 1000
87 #define GPIV_TRIGPAR_LPW_MAX 0.02
88 #define GPIV_TRIGPAR_T2L_MAX 0.19
89 #define GPIV_TRIGPAR_DT_MAX 100
90 #define GPIV_TRIGPAR_MODE_MAX 6
91 #define GPIV_TRIGPAR_CYCLES_MAX 1
92 #define GPIV_TRIGPAR_INCR_DT_MAX 20
94 #define GPIV_NANO2MILI 0.001 * 0.001
95 #define GPIV_MILI2NANO 1000 * 1000
102 enum GpivFifo {
108 };
109 
120 };
121 /* GPIV_TIMER_MODE__SNAPSHOT, */
122 /* GPIV_TIMER_MODE__EXIT, */
123 
124 
125 
127 
139  RTIME time2laser;
140  RTIME dt;
142  gint cycles;
143  RTIME increment;
144 };
145 
146 
147 
148 typedef struct __GpivTrigPar GpivTrigPar;
149 
159 
163  gboolean ttime__dt__set;
164  gboolean ttime__mode__set;
167 };
168 
169 
170 
180 gint
181 gpiv_trig_openrtfs (gint *init,
182  gint *trig,
183  gint *stop,
184  gint *error
185  );
186 
187 
188 
196 void
197 gpiv_trig_default_parameters (GpivTrigPar *trig_par_default,
198  const gboolean force
199  );
200 
201 
202 
211 void
212 gpiv_trig_read_parameters (FILE *fp_par,
213  GpivTrigPar *trig_par,
214  const gboolean verbose
215  );
216 
217 
218 
227 gchar *
229  const GpivTrigPar *trig_par_default
230  );
231 
232 
233 
241 void
243  const gboolean flag
244  );
245 
246 
247 
255 gchar *
256 gpiv_trig_test_parameter (const GpivTrigPar *trig_par
257  );
258 
259 
260 
268 void
269 gpiv_trig_print_parameters (FILE *fp_par_out,
270  const GpivTrigPar *trig_par
271  );
272 
273 #endif /*__LIBGPIV_TRIG_H__ */

Generated on Thu Mar 20 2014 09:01:34 for libgpiv-0.6.1 by doxygen 1.8.1.2