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-------------------------------------------------------------------------------
29LIBRARY: libgpiv
30EXTERNAL 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
39LAST 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
109
121/* GPIV_TIMER_MODE__SNAPSHOT, */
122/* GPIV_TIMER_MODE__EXIT, */
123
124
125
127
145
146
147
149
168
169
170
180gint
182 gint *trig,
183 gint *stop,
184 gint *error
185 );
186
187
188
196void
198 const gboolean force
199 );
200
201
202
211void
213 GpivTrigPar *trig_par,
214 const gboolean verbose
215 );
216
217
218
227gchar *
229 const GpivTrigPar *trig_par_default
230 );
231
232
233
241void
243 const gboolean flag
244 );
245
246
247
255gchar *
257 );
258
259
260
268void
269gpiv_trig_print_parameters (FILE *fp_par_out,
270 const GpivTrigPar *trig_par
271 );
272
273#endif /*__LIBGPIV_TRIG_H__ */
void gpiv_trig_parameters_set(GpivTrigPar *trig_par, const gboolean flag)
Sets flags for __set variables of GpivTrigPar.
gint gpiv_trig_openrtfs(gint *init, gint *trig, gint *stop, gint *error)
Opens communication channels to camlasco-rtl kernel module.
gchar * gpiv_trig_test_parameter(const GpivTrigPar *trig_par)
Testing GpivTrigPar parameters on valid values.
gchar * gpiv_trig_check_parameters_read(GpivTrigPar *trig_par, const GpivTrigPar *trig_par_default)
Check out if all GpivTrigPar parameters have been read.
void gpiv_trig_default_parameters(GpivTrigPar *trig_par_default, const gboolean force)
Sets default GpivTrigPar parameter values.
void gpiv_trig_read_parameters(FILE *fp_par, GpivTrigPar *trig_par, const gboolean verbose)
Read all GpivTrigPar parameters.
GpivFifo
Fifo values.
Definition gpiv-trig.h:102
@ GPIV_FIFO_START_COMMAND
Definition gpiv-trig.h:104
@ GPIV_FIFO_TIMING_PARAMETER
Definition gpiv-trig.h:103
@ GPIV_FIFO_ERROR
Definition gpiv-trig.h:106
@ GPIV_FIFO_STOP_COMMAND
Definition gpiv-trig.h:105
@ GPIV_FIFO_JITTER
Definition gpiv-trig.h:107
GpivTimingMode
Operating mode.
Definition gpiv-trig.h:113
@ GPIV_TIMER_MODE__ONE_SHOT_IRQ
Check.
Definition gpiv-trig.h:116
@ GPIV_TIMER_MODE__PERIODIC
Indefinite until interrupted.
Definition gpiv-trig.h:114
@ GPIV_TIMER_MODE__INCREMENT
Incremented __GpivTrigTime::dt.
Definition gpiv-trig.h:118
@ GPIV_TIMER_MODE__DOUBLE
Check.
Definition gpiv-trig.h:119
@ GPIV_TIMER_MODE__TRIGGER_IRQ
Check.
Definition gpiv-trig.h:117
@ GPIV_TIMER_MODE__DURATION
During specific amount of cycles.
Definition gpiv-trig.h:115
void gpiv_trig_print_parameters(FILE *fp_par_out, const GpivTrigPar *trig_par)
Prints GpivTrigPar parameters to fp_par_out.
Whether elements of __GpivTrigTime have been set.
Definition gpiv-trig.h:157
gboolean ttime__dt__set
flag if dt has been defined
Definition gpiv-trig.h:163
gboolean ttime__cam_acq_period__set
flag if cam_acq_period has been defined
Definition gpiv-trig.h:160
GpivTrigTime ttime
Definition gpiv-trig.h:158
gboolean ttime__laser_trig_pw__set
flag if laser_trig_pw has been defined
Definition gpiv-trig.h:161
gboolean ttime__increment__set
flag if increment has been defined
Definition gpiv-trig.h:166
gboolean ttime__time2laser__set
flag if time2laser has been defined
Definition gpiv-trig.h:162
gboolean ttime__mode__set
flag if mode has been defined
Definition gpiv-trig.h:164
gboolean ttime__cycles__set
flag if cycles has been defined
Definition gpiv-trig.h:165
Trigger parameters.
Definition gpiv-trig.h:136
RTIME cam_acq_period
camera acquisition period time in ns (period)
Definition gpiv-trig.h:137
RTIME increment
increment in dt (ms)
Definition gpiv-trig.h:143
RTIME time2laser
time from laser trigger->Hi (tl) until laser pulse: 0.19 ms in ns
Definition gpiv-trig.h:139
RTIME dt
time between 2 laser exposures in ns
Definition gpiv-trig.h:140
RTIME laser_trig_pw
laser trigger pulse width in ns (tp)
Definition gpiv-trig.h:138
gint cycles
number of cycles, equal to the number of image pairs to be recorded
Definition gpiv-trig.h:142
enum GpivTimingMode mode
operating mode (indefinite/interrupt/definite)
Definition gpiv-trig.h:141

Generated for libgpiv-0.6.1 by doxygen 1.9.8