-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhandInterface.h
48 lines (38 loc) · 1.02 KB
/
handInterface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef HANDINTERFACE_H
#define HANDINTERFACE_H
#include <QObject>
#include <QList>
/**
* @file handInterface.h
*
* Implementation of GloveInterface class.
* All interaction with the hand comes through this class.
*/
class Hand;
class HandInterface : public QObject
{
Q_OBJECT
public:
HandInterface();
~HandInterface();
/// Trying to connect mHand with a real glove.
void setHardwareHand(const QString& portName);
/// Returns true if mHand serial port set.
bool isHardwareHandSet();
/// Calls the appropriate method of the Hand class.
void startSendingDatas();
/// Calls the appropriate method of the Hand class.
void stopSendingDatas();
/// Request hardware hand to set servo number num to value.
void moveMotor(int const& num, int const& value);
/// Request hardware hand to move all motors.
void moveMotors(QList<int> const& data);
/// Returns last datas from the servos.
QList<int> motorsDatas();
signals:
/// Re emits the signal of the glove.
void dataIsRead();
private:
Hand *mHand;
};
#endif // HANDINTERFACE_H