glove::devices::local::LocalCyberGlove Class Reference
#include <LocalCyberGlove.hpp>
List of all members.
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] |
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] |
virtual bool glove::devices::local::LocalCyberGlove::disconnect |
( |
|
) |
[virtual] |
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] |
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:
-
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: