KITProsthesisIceDriver.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package RobotAPI::::drivers::KITProsthesisIceDriver
17  * @author Julia Starke ( julia dot starke at kit dot edu )
18  * @date 2019
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 #include <RobotAPI/interface/units/KITProstheticHandInterface.h>
27 #include <Ice/Ice.h>
28 #include <Ice/Object.h>
29 #include <QCoreApplication>
30 #include <iostream>
31 #include <thread>
32 
33 [[maybe_unused]] static constexpr auto prosthesis = "CB:43:34:8F:3C:0A";
34 [[maybe_unused]] static constexpr auto prosthesis_old = "DF:70:E8:81:DB:D6";
35 
38 {
39 public:
40  KITProsthesisIceDriver(const std::string& mac = prosthesis_old) : iface{mac}
41  {}
42 
43  // sender interface
44  void sendGrasp(Ice::Int, const Ice::Current& = Ice::emptyCurrent) override;
45  void sendThumbPWM(const KITProsthesis::ProsthesisMotorValues&, const ::Ice::Current& = ::Ice::emptyCurrent) override;
46  void sendFingerPWM(const KITProsthesis::ProsthesisMotorValues&, const ::Ice::Current& = ::Ice::emptyCurrent) override;
47 
48  KITProsthesis::ProsthesisSensorValues getSensorValues(const Ice::Current&) override;
49 private:
51 
52 };
KITProsthesis::KITProstheticHandInterface::getSensorValues
ProsthesisSensorValues getSensorValues()
KITProsthesisIceDriver::KITProsthesisIceDriver
KITProsthesisIceDriver(const std::string &mac=prosthesis_old)
Definition: KITProsthesisIceDriver.h:40
KITProsthesis::ProsthesisSensorValues
Definition: KITProstheticHandInterface.ice:55
KITProsthesisIceDriver::sendThumbPWM
void sendThumbPWM(const KITProsthesis::ProsthesisMotorValues &, const ::Ice::Current &=::Ice::emptyCurrent) override
Definition: KITProsthesisIceDriver.cpp:11
KITProsthesisIceDriver::sendGrasp
void sendGrasp(Ice::Int, const Ice::Current &=Ice::emptyCurrent) override
Definition: KITProsthesisIceDriver.cpp:7
KITProsthesis::ProsthesisMotorValues
Definition: KITProstheticHandInterface.ice:48
KITProsthesisIceDriver
Definition: KITProsthesisIceDriver.h:36
armarx::VariantType::Int
const VariantTypeId Int
Definition: Variant.h:916
BLEProthesisInterface
Definition: BLEProthesisInterface.h:10
BLEProthesisInterface.h
KITProsthesisIceDriver::sendFingerPWM
void sendFingerPWM(const KITProsthesis::ProsthesisMotorValues &, const ::Ice::Current &=::Ice::emptyCurrent) override
Definition: KITProsthesisIceDriver.cpp:16
KITProsthesis::KITProstheticHandInterface
Definition: KITProstheticHandInterface.ice:68