Go to the documentation of this file.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 #ifndef _firewire_camera_driver_h_
00026 #define _firewire_camera_driver_h_
00027
00028 #include <iri_base_driver/iri_base_driver.h>
00029 #include <iri_firewire_camera/FirewireCameraConfig.h>
00030
00031
00032 #include "firewirecamera.h"
00033 #include "firewireserver.h"
00034 #include "camera_common.h"
00035
00055 class FirewireCameraDriver : public iri_base_driver::IriBaseDriver
00056 {
00057 private:
00058
00059 CFirewireCamera *camera;
00060 CFirewireServer *server;
00061 long int camera_id;
00062 int ISO_speed;
00063
00064 TCameraConfig desired_conf;
00065
00066 TCameraConfig current_conf;
00067
00068 TCameraConfig default_conf;
00069
00070 std::string calibration_file;
00071
00072 std::string frame_id;
00073 protected:
00078 void change_config(TCameraConfig *new_conf);
00083 void dyn_rec_to_camera(iri_firewire_camera::FirewireCameraConfig &dyn_rec_config,TCameraConfig &camera_config);
00088 void camera_to_dyn_rec(TCameraConfig &camera_config,iri_firewire_camera::FirewireCameraConfig &dyn_rec_config);
00093 void set_white_balance(bool *enable, int *mode, int *u_b_value, int *v_r_value);
00098 void set_shutter(bool *enable, int *mode, int *value);
00103 void set_gain(bool *enable, int *mode, int *value);
00104 public:
00111 typedef iri_firewire_camera::FirewireCameraConfig Config;
00112
00119 Config config_;
00120
00129 FirewireCameraDriver();
00130
00141 bool openDriver(void);
00142
00153 bool closeDriver(void);
00154
00165 bool startDriver(void);
00166
00177 bool stopDriver(void);
00178
00190 void config_update(Config& new_cfg, uint32_t level=0);
00191
00192
00193
00198 void set_ISO_speed(int iso_speed);
00203 void get_image(char **image_data);
00208 void set_config(TCameraConfig *new_conf);
00213 void get_current_config(TCameraConfig *current_conf);
00218 void get_desired_config(TCameraConfig *desired_conf);
00223 void get_default_config(TCameraConfig *default_conf);
00228 std::string get_new_frame_event(void);
00233 std::string get_calibration_file(void);
00238 std::string get_frame_id(void);
00245 ~FirewireCameraDriver();
00246 };
00247
00248 #endif