00001 /* 00002 Object Oriented Mobile Robot Model (OOMRM) C++ Library Copyright (C) 2002-2005 Derek Jones 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Lesser General Public License for more details. 00013 00014 You should have received a copy of the GNU Lesser General Public 00015 License along with this library; if not, write to the Free Software 00016 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 Class: oSharpgp2d12 00020 Purpose: Implements a Sharp GP2D12 IR module derived from an oA2D object. 00021 Author : Derek Jones 00022 Please send bug reports/enhancements to d.b.jones@verizon.net. 00023 00024 $Id: oir.h,v 1.2 2007/10/09 01:58:59 derek Exp $ 00025 */ 00026 00027 #ifndef _H_OIR_H 00028 #define _H_OIR_H 00029 #include <hardware/oa2d.h> 00031 enum IR_TYPE { GP2Y0A02YK, GP2D12, GP2D120 }; 00032 00034 00057 class oIR : public oA2D 00058 { 00059 public: 00060 friend class IR_base; 00061 oIR(IOLINE channel, IR_TYPE type); 00062 00063 00068 void callibrate(short c); 00069 short value(void); 00070 00071 void status(JAUS_STATE istat); 00072 protected: 00073 oIR(void); 00074 IR_TYPE _type; 00075 short _callibrate; 00076 private: 00077 protected: 00078 JAUS_STATE _status; // status is available whether we have jaus defined or not. 00079 }; 00080 00081 #endif
1.3