00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00052 #ifndef __LIBGPIV_CAM_H__
00053 #define __LIBGPIV_CAM_H__
00054
00055
00056
00057
00058
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
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