toranger.h

00001 /*
00002  *  Player - One Hell of a Robot Server
00003  *  Copyright (C) 2000  Brian Gerkey   &  Kasper Stoy
00004  *                      gerkey@usc.edu    kaspers@robotics.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  */
00021 
00023 //
00024 // Desc: Base class for ->ranger interface converter drivers.
00025 // Author: Geoffrey Biggs
00026 // Date: 06/05/2007
00027 //
00029 
00030 #include <libplayercore/playercore.h>
00031 #include <libplayercore/error.h>
00032 
00033 // Driver for computing the free c-space from a laser scan.
00034 class ToRanger : public Driver
00035 {
00036         public:
00037                 ToRanger (ConfigFile* cf, int section);
00038                 ~ToRanger (void);
00039 
00040                 // Message processor - must be called first by child classes if overridden
00041                 virtual int ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data);
00042 
00043                 virtual int Setup (void);
00044                 virtual int Shutdown (void);
00045 
00046         protected:
00047                 // Ranger interface stuff - should be filled by ProcessMessage()
00048                 player_ranger_geom_t deviceGeom;                        // Geometry of the device
00049 
00050                 // Input device
00051                 Device *inputDevice;                                            // Input device interface
00052                 player_devaddr_t inputDeviceAddr;                       // Input device address
00053 };

Last updated 12 September 2005 21:38:45