00001 /* Copyright (C) 2002 Dominic Letourneau (dominic.letourneau@courrier.usherb.ca) 00002 00003 This library is free software; you can redistribute it and/or 00004 modify it under the terms of the GNU Lesser General Public 00005 License as published by the Free Software Foundation; either 00006 version 2.1 of the License, or (at your option) any later version. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Lesser General Public License for more details. 00012 00013 You should have received a copy of the GNU Lesser General Public 00014 License along with this library; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 */ 00017 #ifndef _PIONEER2CONNECT_H_ 00018 #define _PIONEER2CONNECT_H_ 00019 00020 #include "BufferedNode.h" 00021 00022 namespace RobotFlow { 00023 00024 class Pioneer2Connect : public FD::BufferedNode{ 00025 00026 public: 00027 00028 Pioneer2Connect(std::string nodeName, FD::ParameterSet params); 00029 00030 void calculate(int output_id, int count, FD::Buffer &out); 00031 00032 virtual ~Pioneer2Connect(); 00033 00034 private: 00035 00036 bool m_isInit; 00037 00038 int m_filedescriptor; 00039 00040 int m_outputConnectID; 00041 00042 std::string m_serial_port; 00043 00044 bool m_motorEnable; 00045 bool m_frontSonarsEnable; 00046 bool m_rearSonarsEnable; 00047 00048 }; 00049 00050 00051 }//namespace RobotFlow 00052 #endif