#include <gloveDevice.h>
Copyright (c) 2016, Heller Florian, Meißner Pascal, Nguyen Trung, Yi Xie All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition at line 40 of file gloveDevice.h.
Definition at line 28 of file gloveDevice.cc.
Definition at line 32 of file gloveDevice.cc.
bool gloveDevice::cmdGetActuateAll | ( | vector_t | values | ) |
Definition at line 250 of file gloveDevice.cc.
bool gloveDevice::cmdGetBaudRate | ( | uchar_t * | baudDivide | ) |
Definition at line 271 of file gloveDevice.cc.
bool gloveDevice::cmdGetBinarySync | ( | bool * | enable | ) |
Definition at line 755 of file gloveDevice.cc.
bool gloveDevice::cmdGetBool | ( | uchar_t | name, |
bool * | val | ||
) | [private] |
Definition at line 202 of file gloveDevice.cc.
bool gloveDevice::cmdGetCalibrateAll | ( | vector_t | offset, |
vector_t | gain | ||
) |
Definition at line 333 of file gloveDevice.cc.
bool gloveDevice::cmdGetChar | ( | uchar_t | name, |
uchar_t * | val | ||
) | [private] |
Definition at line 186 of file gloveDevice.cc.
bool gloveDevice::cmdGetConnectStatus | ( | statusConnect_t * | status | ) |
Definition at line 467 of file gloveDevice.cc.
bool gloveDevice::cmdGetControlLight | ( | bool * | enable | ) |
Definition at line 482 of file gloveDevice.cc.
bool gloveDevice::cmdGetDigitalFilter | ( | bool * | enable | ) |
Definition at line 385 of file gloveDevice.cc.
bool gloveDevice::cmdGetGloveStatus | ( | bool * | enable | ) |
Definition at line 701 of file gloveDevice.cc.
bool gloveDevice::cmdGetGloveVersion | ( | gloveVersion_t * | version | ) |
Definition at line 711 of file gloveDevice.cc.
bool gloveDevice::cmdGetHand | ( | bool * | rightHand | ) |
Definition at line 611 of file gloveDevice.cc.
bool gloveDevice::cmdGetHwSensorMask | ( | sensorMask_t * | mask | ) |
Definition at line 487 of file gloveDevice.cc.
bool gloveDevice::cmdGetNbSensorsEnabled | ( | uchar_t * | n | ) |
Definition at line 557 of file gloveDevice.cc.
bool gloveDevice::cmdGetNbSensorsTotal | ( | uchar_t * | n | ) |
Definition at line 652 of file gloveDevice.cc.
bool gloveDevice::cmdGetParameterFlags | ( | parameterFlags_t * | flags | ) |
Definition at line 585 of file gloveDevice.cc.
bool gloveDevice::cmdGetQuantized | ( | bool * | enable | ) |
Definition at line 606 of file gloveDevice.cc.
bool gloveDevice::cmdGetSamplePeriod | ( | samplePeriod_t * | period | ) |
Definition at line 675 of file gloveDevice.cc.
bool gloveDevice::cmdGetSensorDummyValues | ( | vector_t | values, |
uchar_t * | n, | ||
statusQuery_t * | query, | ||
gloveStatusByte_t * | gloveStatusByte | ||
) |
Definition at line 616 of file gloveDevice.cc.
bool gloveDevice::cmdGetSensorValues | ( | vector_t | values, |
uchar_t * | n, | ||
statusQuery_t * | query, | ||
gloveStatusByte_t * | gloveStatusByte | ||
) |
Definition at line 390 of file gloveDevice.cc.
bool gloveDevice::cmdGetSensorValuesSync | ( | vector_t | values, |
uchar_t * | n, | ||
bool * | errorSync, | ||
gloveStatusByte_t * | gloveStatusByte | ||
) |
Definition at line 760 of file gloveDevice.cc.
bool gloveDevice::cmdGetSwSensorMask | ( | sensorMask_t * | mask | ) |
Definition at line 531 of file gloveDevice.cc.
bool gloveDevice::cmdGetTimeStamp | ( | bool * | enable | ) |
Steffen
Definition at line 365 of file gloveDevice.cc.
bool gloveDevice::cmdGetWristLight | ( | bool * | enable | ) |
Definition at line 508 of file gloveDevice.cc.
bool gloveDevice::cmdGetWristToggle | ( | bool * | enable | ) |
Definition at line 745 of file gloveDevice.cc.
Definition at line 472 of file gloveDevice.cc.
bool gloveDevice::cmdRestartFirmware | ( | ) |
Definition at line 647 of file gloveDevice.cc.
bool gloveDevice::cmdSetActuate | ( | int | n, |
vector_t | index, | ||
vector_t | values | ||
) |
Definition at line 210 of file gloveDevice.cc.
bool gloveDevice::cmdSetActuateAll | ( | vector_t | values | ) |
Definition at line 232 of file gloveDevice.cc.
bool gloveDevice::cmdSetBaudRate | ( | uchar_t | baudDivide | ) |
Definition at line 266 of file gloveDevice.cc.
bool gloveDevice::cmdSetBinarySync | ( | bool | enable | ) |
Definition at line 750 of file gloveDevice.cc.
bool gloveDevice::cmdSetCalibrateAll | ( | vector_t | offset, |
vector_t | gain | ||
) |
Definition at line 276 of file gloveDevice.cc.
bool gloveDevice::cmdSetCalibrateGain | ( | uchar_t | index, |
uchar_t | gain | ||
) |
Definition at line 314 of file gloveDevice.cc.
bool gloveDevice::cmdSetCalibrateOffset | ( | uchar_t | index, |
uchar_t | offset | ||
) |
Definition at line 295 of file gloveDevice.cc.
bool gloveDevice::cmdSetChar | ( | uchar_t | name, |
uchar_t | val | ||
) | [private] |
Definition at line 169 of file gloveDevice.cc.
bool gloveDevice::cmdSetControlLight | ( | bool | enable | ) |
Definition at line 477 of file gloveDevice.cc.
bool gloveDevice::cmdSetDigitalFilter | ( | bool | enable | ) |
Definition at line 380 of file gloveDevice.cc.
bool gloveDevice::cmdSetGloveStatus | ( | bool | enable | ) |
Definition at line 691 of file gloveDevice.cc.
bool gloveDevice::cmdSetNbSensorsEnabled | ( | uchar_t | n | ) |
Definition at line 547 of file gloveDevice.cc.
bool gloveDevice::cmdSetParameterFlags | ( | parameterFlags_t | flags | ) |
Definition at line 567 of file gloveDevice.cc.
bool gloveDevice::cmdSetQuantized | ( | bool | enable | ) |
Definition at line 601 of file gloveDevice.cc.
bool gloveDevice::cmdSetSamplePeriod | ( | samplePeriod_t | period | ) |
Definition at line 657 of file gloveDevice.cc.
bool gloveDevice::cmdSetStreamValues | ( | bool | enable | ) |
Definition at line 451 of file gloveDevice.cc.
bool gloveDevice::cmdSetSwSensorMask | ( | sensorMask_t | mask | ) |
Definition at line 513 of file gloveDevice.cc.
bool gloveDevice::cmdSetTimeStamp | ( | bool | enable | ) |
Steffen
Definition at line 350 of file gloveDevice.cc.
bool gloveDevice::cmdSetWristLight | ( | bool | enable | ) |
Definition at line 503 of file gloveDevice.cc.
bool gloveDevice::cmdSetWristToggle | ( | bool | enable | ) |
Definition at line 740 of file gloveDevice.cc.
uchar_t gloveDevice::getChar | ( | ) | [private] |
Definition at line 122 of file gloveDevice.cc.
void gloveDevice::getString | ( | vector_t | s, |
int | n | ||
) | [private] |
Definition at line 129 of file gloveDevice.cc.
bool gloveDevice::init | ( | const char * | serialDev | ) |
Definition at line 37 of file gloveDevice.cc.
bool gloveDevice::internalCmd | ( | uchar_t | cmd | ) | [private] |
Definition at line 627 of file gloveDevice.cc.
void gloveDevice::lock_serial | ( | ) | [private] |
Definition at line 110 of file gloveDevice.cc.
bool gloveDevice::readNullChar | ( | ) | [private] |
Definition at line 154 of file gloveDevice.cc.
bool gloveDevice::readResponseGet | ( | uchar_t | c | ) | [private] |
Definition at line 159 of file gloveDevice.cc.
bool gloveDevice::readResponseSet | ( | uchar_t | c | ) | [private] |
Definition at line 144 of file gloveDevice.cc.
bool gloveDevice::readResponseSet | ( | uchar_t | c1, |
uchar_t | c2 | ||
) | [private] |
Definition at line 149 of file gloveDevice.cc.
void gloveDevice::sendChar | ( | uchar_t | c | ) | [private] |
Definition at line 134 of file gloveDevice.cc.
void gloveDevice::sendString | ( | vector_t | s, |
int | n | ||
) | [private] |
Definition at line 139 of file gloveDevice.cc.
void gloveDevice::showCurrentStatus | ( | ) |
Definition at line 788 of file gloveDevice.cc.
void gloveDevice::stop | ( | ) |
Definition at line 105 of file gloveDevice.cc.
void gloveDevice::unlock_serial | ( | ) | [private] |
Definition at line 116 of file gloveDevice.cc.
bool gloveDevice::error [private] |
Definition at line 149 of file gloveDevice.h.
SerialDevice gloveDevice::serial [private] |
Definition at line 148 of file gloveDevice.h.
pthread_mutex_t gloveDevice::serial_lock [private] |
Definition at line 150 of file gloveDevice.h.
int gloveDevice::serialId [private] |
Definition at line 148 of file gloveDevice.h.
gloveStatus gloveDevice::status [private] |
Definition at line 147 of file gloveDevice.h.