segwayrmp400.h
1 /*
2  * Player - One Hell of a Robot Server
3  * Copyright (C) 2009 Goutham Mallapragda, Anthony Cascone, Rich Mattes & Brian Gerkey
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  */
20 /*
21  Desc: Segway RMP 400 Driver
22  Authors: Goutham Mallapragada, Anthony Cascone, Rich Mattes
23  Updated: July 21, 2009
24 */
25 
26 #ifndef __SEGWAYRMP400_H_
27 #define __SEGWAYRMP400_H_
28 
29 #include <stdio.h>
30 #include <pthread.h>
31 #include <string.h>
32 #include <stdlib.h>
33 #include <math.h>
34 #if !defined (WIN32)
35  #include <unistd.h>
36  #include <netinet/in.h>
37 #endif
38 
39 #include <libplayercore/playercore.h>
40 
41 
44 {
45 
46 public:
47 
49  SegwayRMP400(ConfigFile* cf, int section);
50 
52  virtual int MainSetup();
53 
55  virtual void MainQuit();
56 
57 private:
58 
59  // Devices
62 
63  // Device Addresses
66 
69 
70  // Device Data Structures
73 
76 
79 
80  // Flags
81  bool provide_2d;
82  bool provide_3d;
83 
84  int counter;
86  void Main();
87 
89  int ProcessMessage(QueuePointer &resp_queue, player_msghdr_t* hdr, void* data);
90 
92  void ProcessData();
93 
96 
99 
101  bool newfront3d, newback3d, newfront2d, newback2d;
102 
104  bool fullspeed;
105 };
106 
107 #endif

Last updated 12 September 2005 21:38:45