00001
00002
00003 #ifndef _REC_ROBOTINO_COM_LASERRANGEFINDER_H_
00004 #define _REC_ROBOTINO_COM_LASERRANGEFINDER_H_
00005
00006 #include "rec/robotino/com/Actor.h"
00007 #include "rec/robotino/com/LaserRangeFinderReadings.h"
00008
00009 #include <vector>
00010 #include <string>
00011
00012 namespace rec
00013 {
00014 namespace robotino
00015 {
00016 namespace com
00017 {
00018 class LaserRangeFinderImpl;
00019
00023 class
00024 #ifdef WIN32
00025 # ifdef rec_robotino_com_EXPORTS
00026 __declspec(dllexport)
00027 # endif
00028 # ifdef rec_robotino_com2_EXPORTS
00029 __declspec(dllexport)
00030 # endif
00031 # ifdef rec_robotino_com3_EXPORTS
00032 __declspec(dllexport)
00033 # endif
00034 #else
00035 # ifndef SWIG
00036 __attribute__ ((visibility ("default")))
00037 # endif
00038 #endif
00039 LaserRangeFinder : public Actor
00040 {
00041 public:
00042 LaserRangeFinder();
00043
00044 virtual ~LaserRangeFinder();
00045
00052 void setComId( const ComId& id );
00053
00059 void connectToServer();
00060
00066 void disconnectFromServer();
00067
00073 void setAddress( const std::string& address );
00074
00075 std::string address() const;
00076
00077 bool isConnected() const;
00078
00084 void setRawDataCallbackEnabled( bool enable );
00085
00089 virtual void readingsCallback( const LaserRangeFinderReadings& scan );
00090
00097 virtual void rawDataCallback( const char* data, int dataSize );
00098
00099 virtual void error( const std::string& message );
00100
00101 virtual void log( const std::string& message );
00102
00103 virtual void connected();
00104
00105 virtual void disconnected();
00106
00107 private:
00108 LaserRangeFinderImpl* _impl;
00109 };
00110 }
00111 }
00112 }
00113 #endif