glove::devices::local::LocalCyberGlove Class Reference

#include <LocalCyberGlove.hpp>

Inheritance diagram for glove::devices::local::LocalCyberGlove:

glove::devices::CyberGlove glove::devices::local::LocalDevice glove::devices::Device glove::devices::Device

List of all members.

Public Member Functions

 LocalCyberGlove (const std::string &port)
virtual ~LocalCyberGlove ()
virtual bool connect ()
virtual bool disconnect ()
virtual bool isConnected ()
virtual unsigned int numSensors ()
virtual bool isRightHanded ()
virtual bool isLeftHanded ()
virtual void enableSwitch (const bool b=true)
virtual bool isSwitchEnabled ()
virtual void requestGloveStatus (const bool b=true)
virtual bool gloveStatusRequested ()
virtual const std::bitset< 24 > getEnabledSensors ()
virtual void setSensorMask (std::bitset< 24 > mask)
virtual void streamSensorValues (bool b)
virtual bool isStreaming ()
virtual double getValue (const Sensor s)
virtual const std::vector< double > getValues ()
virtual void cancel ()
virtual void restart ()
virtual void reinitialize ()
virtual std::string info ()
virtual std::pair< int, int > version ()
virtual bool runTest (const bool fullTest=false, std::ostream *s=NULL)
virtual const std::string & getTypeIdentifier () const
virtual std::string toString ()

Friends

class LocalDeviceManager


Detailed Description

Implements a CyberGlove abstraction to the glove's control unit.

Author:
Christian Wressnegger
Date:
2009-2010

Constructor & Destructor Documentation

glove::devices::local::LocalCyberGlove::LocalCyberGlove ( const std::string &  port  ) 

The constructor.

Exceptions:
std::illegal_argument If the given port is obviously not valid (empty).
Parameters:
port The serial port to connect to.

virtual glove::devices::local::LocalCyberGlove::~LocalCyberGlove (  )  [virtual]

The destructor.


Member Function Documentation

virtual void glove::devices::local::LocalCyberGlove::cancel (  )  [virtual]

Cancel the current operation performed by the glove's control unit.

Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

virtual bool glove::devices::local::LocalCyberGlove::connect (  )  [virtual]

See also:
Device::connect() Never throws an exception.

Implements glove::devices::Device.

virtual bool glove::devices::local::LocalCyberGlove::disconnect (  )  [virtual]

See also:
Device::disconnect() Never throws an exception.

Implements glove::devices::Device.

virtual void glove::devices::local::LocalCyberGlove::enableSwitch ( const bool  b = true  )  [virtual]

Enables the switch on the wrist of the glove. The state of the switch is indicated by a LED on the switch.

Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.
Parameters:
b A boolean value for dis-/enabling the switch.

virtual const std::bitset<24> glove::devices::local::LocalCyberGlove::getEnabledSensors (  )  [virtual]

See also:
CyberGlove::getEnabledSensors()
Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

Implements glove::devices::CyberGlove.

virtual const std::string& glove::devices::local::LocalCyberGlove::getTypeIdentifier (  )  const [virtual]

virtual double glove::devices::local::LocalCyberGlove::getValue ( const Sensor  s  )  [virtual]

See also:
CyberGlove::getValue(Sensor s)
Exceptions:
std::invalid_argument If the CyberGlove::Sensor id is out of range.
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

Implements glove::devices::CyberGlove.

virtual const std::vector<double> glove::devices::local::LocalCyberGlove::getValues (  )  [virtual]

See also:
CyberGlove::getValues()
Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

Implements glove::devices::CyberGlove.

virtual bool glove::devices::local::LocalCyberGlove::gloveStatusRequested (  )  [virtual]

Returns the current setting for including the glove status byte in the sensor record.

Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.
Returns:
The current setting for including the glove status byte in the sensor record.

virtual std::string glove::devices::local::LocalCyberGlove::info (  )  [virtual]

See also:
CyberGlove::info()
Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

Implements glove::devices::CyberGlove.

virtual bool glove::devices::local::LocalCyberGlove::isConnected (  )  [virtual]

virtual bool glove::devices::local::LocalCyberGlove::isLeftHanded (  )  [virtual]

See also:
CyberGlove::isLeftHanded()
Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

Implements glove::devices::CyberGlove.

virtual bool glove::devices::local::LocalCyberGlove::isRightHanded (  )  [virtual]

See also:
CyberGlove::isRightHanded()
Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

Implements glove::devices::CyberGlove.

virtual bool glove::devices::local::LocalCyberGlove::isStreaming (  )  [virtual]

Indicates if the glove is currently streaming or not.

Returns:
A boolean value that indicates if the glove is currently streaming or not.

Implements glove::devices::CyberGlove.

virtual bool glove::devices::local::LocalCyberGlove::isSwitchEnabled (  )  [virtual]

Indicates if the switch on the wrist of the glove is enabled.

Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.
Returns:
A boolean value that indicates if the switch is enabled or not.

virtual unsigned int glove::devices::local::LocalCyberGlove::numSensors (  )  [virtual]

See also:
CyberGlove::numSensors()
Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

Implements glove::devices::CyberGlove.

virtual void glove::devices::local::LocalCyberGlove::reinitialize (  )  [virtual]

Reinitialize the glove's control unit.

Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

virtual void glove::devices::local::LocalCyberGlove::requestGloveStatus ( const bool  b = true  )  [virtual]

Requests the glove's status byte to be included in the sensor record.

Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.
Parameters:
b A boolean value for dis-/enabling this behavior.

virtual void glove::devices::local::LocalCyberGlove::restart (  )  [virtual]

Restart the glove's control unit.

Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

virtual bool glove::devices::local::LocalCyberGlove::runTest ( const bool  fullTest = false,
std::ostream *  s = NULL 
) [virtual]

See also:
LocalDevice::runTest(const bool, std::ostream*)
Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

Reimplemented from glove::devices::local::LocalDevice.

virtual void glove::devices::local::LocalCyberGlove::setSensorMask ( std::bitset< 24 >  mask  )  [virtual]

Set the sensor mask according to the following table:

  0: Thumb, oppose
  1: Thumb, proximal joint
  2: Thumb, distal joint
  3: Thumb, abduction
  4: Index finger, metacarpal joint
  5: Index finger, proximal joint
  6: Index finger, distal joint (only for 22-sensor gloves)
  7: reserved (Index finger, abduction)
  8: Middle finger, metacarpal joint
  9: Middle finger, proximal joint
 10: Middle finger, distal joint (only for 22-sensor gloves)
 11: Middle finger, abduction
 12: Ring finger, metacarpal joint
 13: Ring finger, proximal joint
 14: Ring finger, distal joint (only for 22-sensor gloves)
 15: Ring finger, abduction
 16: Pinky, metacarpal joint
 17: Pinky, proximal joint
 18: Pinky, distal joint (only for 22-sensor gloves)
 19: Pinky, abduction
 20: Palm arch
 21: Wrist pitch
 22: Wrist yaw
 23: reserved

Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.
Parameters:
mask The sensor mask

virtual void glove::devices::local::LocalCyberGlove::streamSensorValues ( bool  b  )  [virtual]

Dis-/Enables streaming sensor values at fixed rate.

Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.
Parameters:
b A boolean value for dis-/enabling streaming.

virtual std::string glove::devices::local::LocalCyberGlove::toString (  )  [virtual]

See also:
CyberGlove::toString()
Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

Implements glove::devices::Device.

virtual std::pair<int, int> glove::devices::local::LocalCyberGlove::version (  )  [virtual]

See also:
CyberGlove::version()
Exceptions:
std::runtime_error If the device isn't connected or currently streaming. If the device is streaming sensor values it doesn't accept new command until the streaming was stopped.
boost::system::system_error If the low-level communication to device failed.

Implements glove::devices::CyberGlove.


The documentation for this class was generated from the following file:

Generated on Thu Feb 4 12:36:54 2010 for libglove by  doxygen 1.5.8