00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __GLOVE_DEVICES_REMOTE_REMOTECYBERGLOVE_HPP_
00028 #define __GLOVE_DEVICES_REMOTE_REMOTECYBERGLOVE_HPP_
00029
00030 #include "../../config.hpp"
00031
00032 #include <string>
00033
00034 #include <boost/asio.hpp>
00035
00036 #include "../../comm.hpp"
00037 #include "../CyberGlove.hpp"
00038 #include "RemoteDevice.hpp"
00039
00040 namespace glove {
00041 namespace devices {
00042 namespace remote {
00043
00044 class RemoteDeviceManager;
00045
00052 class API RemoteCyberGlove: public CyberGlove, public RemoteDevice {
00053
00054 boost::scoped_ptr<bool> isRightHanded_;
00055 int numSensors_;
00056 std::string info_;
00057 std::pair<int, int> version_;
00058 boost::scoped_ptr<std::bitset<24> > sensorMask_;
00059
00065 RemoteCyberGlove(glove::comm::Connection& c, const glove::devices::device_info& info);
00066 friend class RemoteDeviceManager;
00067
00068 public:
00069
00073 virtual ~RemoteCyberGlove();
00074
00083 virtual bool connect();
00092 virtual bool disconnect();
00101 virtual bool isConnected();
00102
00111 unsigned int numSensors();
00115 const std::bitset<24> getEnabledSensors();
00116
00125 bool isRightHanded();
00134 bool isLeftHanded();
00135
00146 virtual void streamSensorValues(bool b);
00155 virtual bool isStreaming();
00156
00165 virtual double getValue(const Sensor s);
00174 virtual const std::vector<double> getValues();
00175
00184 virtual std::string info();
00194 virtual std::pair<int, int> version();
00195
00199 virtual const std::string& getTypeIdentifier() const;
00203 virtual std::string toString();
00204 };
00205
00206 }
00207 }
00208 }
00209
00210 #endif