INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydrodrivers/hydroimagedc1394camera/driver.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Alen Alempijevic, Tom Burdick, Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This distribution is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef HYDRO_IMAGE_DC1394_H
00012 #define HYDRO_IMAGE_DC1394_H
00013 
00014 #include <hydrointerfaces/image.h>
00015 #include <dc1394/dc1394.h>
00016 
00017 namespace imagedc1394 {
00018 
00019 //
00020 // libdc1394-2 image driver
00021 //
00022 class Driver : public hydrointerfaces::Image
00023 {
00024 
00025 public:
00026 
00027     Driver( const Config &cfg, const hydroutil::Context &context );
00028     virtual ~Driver();
00029 
00030     // Blocks til new data is available
00031     virtual void read( hydrointerfaces::Image::Data &data );
00032 
00033 private:
00034 
00035     void cleanup( dc1394camera_t* camera );
00036 
00037     Image::Config config_;
00038     hydroutil::Context context_;
00039 
00040     dc1394camera_t*     camera;
00041     dc1394video_frame_t* frame_;
00042     dc1394error_t       err_;
00043 
00044     dc1394video_mode_t  videoMode_;
00045     unsigned int        height_;
00046     unsigned int        width_;
00047     bool                format7_;
00048     dc1394operation_mode_t isoMode_;
00049     dc1394speed_t       isoSpeed_;
00050 };
00051 
00052 // Used for dynamically loading driver
00053 class Factory : public hydrointerfaces::ImageFactory
00054 {
00055 public:
00056     hydrointerfaces::Image *createDriver( 
00057                 hydrointerfaces::Image::Config &config,
00058                 const hydroutil::Context &context ) const
00059     {
00060         return new Driver( config, context );
00061     }
00062 };
00063 
00064 } // namespace
00065 
00066 // Used for dynamically loading driver
00067 extern "C" {
00068     hydrointerfaces::ImageFactory *createImageDriverFactory();
00069 }
00070 
00071 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5