toranger.h
1 /*
2  * Player - One Hell of a Robot Server
3  * Copyright (C) 2000 Brian Gerkey & Kasper Stoy
4  * gerkey@usc.edu kaspers@robotics.usc.edu
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  */
21 
23 //
24 // Desc: Base class for ->ranger interface converter drivers.
25 // Author: Geoffrey Biggs
26 // Date: 06/05/2007
27 //
29 
30 #include <libplayercore/playercore.h>
31 
32 class ToRanger : public Driver
33 {
34  public:
35  ToRanger (ConfigFile* cf, int section);
36  ~ToRanger (void);
37 
38  // Message processor - must be called first by child classes if overridden
39  virtual int ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data);
40 
41  virtual int Setup (void);
42  virtual int Shutdown (void);
43 
44  protected:
45  // Ranger interface stuff - should be filled by ProcessMessage()
46  player_ranger_geom_t deviceGeom; // Geometry of the device
47 
48  // Input device
49  Device *inputDevice; // Input device interface
50  player_devaddr_t inputDeviceAddr; // Input device address
51 };
Class for loading configuration file information.
Definition: configfile.h:196
Generic message header.
Definition: player.h:161
A device address.
Definition: player.h:145
virtual int Shutdown(void)
Finalize the driver.
Definition: toranger.cc:70
Definition: toranger.h:32
Encapsulates a device (i.e., a driver bound to an interface)
Definition: device.h:74
virtual int Setup(void)
Initialize the driver.
Definition: toranger.cc:58
An autopointer for the message queue.
Definition: message.h:73
Data and Request/reply: Get geometry.
Definition: player_interfaces.h:5005
virtual int ProcessMessage(QueuePointer &resp_queue, player_msghdr *hdr, void *data)
Message handler.
Definition: toranger.cc:91
Base class for all drivers.
Definition: driver.h:108