leutron.h

00001
00002 /***************************************************************************
00003  *  leutron.h - This header defines a Leutron cam
00004  *
00005  *  Generated: Thu Mar 24 22:33:33 2005
00006  *  Copyright  2005  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023
00024 #ifndef __FIREVISION_CAMS_LEUTRON_H_
00025 #define __FIREVISION_CAMS_LEUTRON_H_
00026 
00027 #include <cams/camera.h>
00028
00029 class LvCameraNode;
00030 class LvGrabberNode;
00031
00032 class LeutronCamera : public Camera
00033 {
00034
00035  public:
00036
00037   LeutronCamera();
00038   virtual ~LeutronCamera();
00039
00040   virtual void open();
00041   virtual void start();
00042   virtual void stop();
00043   virtual void close();
00044   virtual void flush();
00045   virtual void capture();
00046
00047   virtual void print_info();
00048
00049   virtual bool ready();
00050
00051   virtual unsigned char* buffer();
00052   virtual unsigned int   buffer_size();
00053   virtual void           dispose_buffer();
00054
00055   virtual unsigned int   pixel_width();
00056   virtual unsigned int   pixel_height();
00057   virtual colorspace_t   colorspace();
00058
00059   virtual void           set_image_number(unsigned int n);
00060
00061  private:
00062   bool opened;
00063   bool started;
00064   bool autodetect;
00065
00066   const char *camera_name;
00067
00068   // should be HGRABBER, set to unsigned short to get rid of all the warnings
00069   // by the broken-like-shit dsylib.
00070   unsigned short int camera_handle;
00071   LvCameraNode   *camera;
00072   LvGrabberNode  *grabber;
00073
00074   unsigned int    width;
00075   unsigned int    height;
00076   unsigned int    scaled_width;
00077   unsigned int    scaled_height;
00078
00079   colorspace_t cspace;
00080
00081   unsigned char  *scaled_buffer;
00082
00083 };
00084
00085 #endif