INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
rmpio.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp 00005 * 00006 * This copy of Orca is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 00011 #ifndef SEGWAYRMP_RMPIO_H 00012 #define SEGWAYRMP_RMPIO_H 00013 00014 namespace segwayrmpacfr 00015 { 00016 00017 class CanPacket; 00018 00019 // 00020 // @brief An abstract class for communicating with the RMP. 00021 // Note: This thing _has_ to be able to handle simultaneous read/write 00022 // from two different threads. 00023 // 00024 // @author Alex Brooks 00025 // 00026 class RmpIo 00027 { 00028 00029 public: 00030 00031 enum RmpIoStatus 00032 { 00033 OK = 0, 00034 NO_DATA = 1, 00035 }; 00036 00037 virtual ~RmpIo() {} 00038 00039 // Initiate comms with the RMP. 00040 virtual void enable( int debugLevel )=0; 00041 00042 // Release all resources. 00043 virtual void disable()=0; 00044 00045 // Returns OK if copied a packet, NO_DATA if not 00046 virtual RmpIoStatus readPacket( CanPacket &pkt )=0; 00047 virtual void writePacket( const CanPacket &pkt )=0; 00048 00049 private: 00050 00051 00052 }; 00053 00054 } 00055 00056 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)