imagebase.h

00001 /*
00002  *  Player - One Hell of a Robot Server
00003  *  Copyright (C) 2000  Brian Gerkey et al
00004  *                      gerkey@usc.edu    
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00022 //
00023 // Desc: base driver for image processing and transform drivers
00024 // Author: Toby Collett
00025 // Date: 15 Feb 2004
00026 // CVS: $Id: imagebase.h,v 1.1.2.2 2006/06/07 16:12:38 gerkey Exp $
00027 //
00029 
00030 
00058 #include <libplayercore/playercore.h>
00059 #include <libplayercore/error.h>
00060 
00061 // Driver for detecting laser retro-reflectors.
00062 class ImageBase : public Driver
00063 {
00064         public: 
00065                 // Constructor
00066                 ImageBase(ConfigFile *cf, int section, bool overwrite_cmds, size_t queue_maxlen, int interf);
00067                 ImageBase(ConfigFile *cf, int section, bool overwrite_cmds = true, size_t queue_maxlen = PLAYER_MSGQUEUE_DEFAULT_MAXLEN);
00068                 virtual ~ImageBase() {};
00069 
00070                 // Setup/shutdown routines.
00071                 virtual int Setup();
00072                 virtual int Shutdown();
00073 
00074                 // Process incoming messages from clients 
00075                 int ProcessMessage (MessageQueue * resp_queue, player_msghdr * hdr, void * data);
00076 
00077         protected: 
00078                 virtual int ProcessFrame() = 0;
00079                 // Main function for device thread.
00080                 virtual void Main();    
00081         
00082                 // Input camera stuff
00083                 Device *camera_driver;
00084                 player_devaddr_t camera_addr;
00085                 player_camera_data_t stored_data;
00086                 bool HaveData;
00087 };
00088 
00089 

Last updated 12 September 2005 21:38:45