BLEProthesisInterface Class Reference

#include <RobotAPI/drivers/KITProstheticHandDriver/BLEProthesisInterface.h>

Public Types

enum  SensorValueProtocol { tpos_tpwm_fpos_fpwm, mx_pos_pwm }
 
enum  State {
  Created, DiscoveringDevices, DiscoveringDevicesDone, Disconnected,
  Connecting, ConnectingDone, DiscoveringServices, DiscoveringServicesDone,
  ConnectingService, Running, Killed
}
 

Public Member Functions

 BLEProthesisInterface (const std::string &mac, SensorValueProtocol protocol=SensorValueProtocol::mx_pos_pwm)
 
std::int64_t getFingerPos () const
 
std::int64_t getFingerPWM () const
 
State getState () const
 
std::int64_t getThumbPos () const
 
std::int64_t getThumbPWM () const
 
void sendFingerPWM (std::uint64_t v, std::uint64_t maxPWM, std::uint64_t pos)
 
void sendGrasp (std::uint64_t n)
 
void sendRaw (const std::string &cmd)
 
void sendThumbPWM (std::uint64_t v, std::uint64_t maxPWM, std::uint64_t pos)
 
void verboseReceive (bool b=true)
 
void verboseSend (bool b=true)
 
 ~BLEProthesisInterface ()
 

Static Public Member Functions

static constexpr std::uint64_t getMaxG ()
 
static constexpr std::uint64_t getMaxPosFingers ()
 
static constexpr std::uint64_t getMaxPosThumb ()
 
static constexpr std::uint64_t getMaxPWM ()
 
static constexpr std::uint64_t getMaxV ()
 
static constexpr std::uint64_t getMinV ()
 

Friends

class BLEProthesisInterfaceQtWorker
 

Detailed Description

Definition at line 10 of file BLEProthesisInterface.h.

Member Enumeration Documentation

◆ SensorValueProtocol

enum SensorValueProtocol
strong
Enumerator
tpos_tpwm_fpos_fpwm 
mx_pos_pwm 

Definition at line 27 of file BLEProthesisInterface.h.

◆ State

enum State
strong
Enumerator
Created 
DiscoveringDevices 
DiscoveringDevicesDone 
Disconnected 
Connecting 
ConnectingDone 
DiscoveringServices 
DiscoveringServicesDone 
ConnectingService 
Running 
Killed 

Definition at line 13 of file BLEProthesisInterface.h.

Constructor & Destructor Documentation

◆ BLEProthesisInterface()

BLEProthesisInterface ( const std::string &  mac,
SensorValueProtocol  protocol = SensorValueProtocol::mx_pos_pwm 
)

Definition at line 6 of file BLEProthesisInterface.cpp.

◆ ~BLEProthesisInterface()

Definition at line 13 of file BLEProthesisInterface.cpp.

Member Function Documentation

◆ getFingerPos()

std::int64_t getFingerPos ( ) const

Definition at line 38 of file BLEProthesisInterface.cpp.

◆ getFingerPWM()

std::int64_t getFingerPWM ( ) const

Definition at line 33 of file BLEProthesisInterface.cpp.

◆ getMaxG()

static constexpr std::uint64_t getMaxG ( )
inlinestaticconstexpr

Definition at line 66 of file BLEProthesisInterface.h.

+ Here is the caller graph for this function:

◆ getMaxPosFingers()

static constexpr std::uint64_t getMaxPosFingers ( )
inlinestaticconstexpr

Definition at line 86 of file BLEProthesisInterface.h.

+ Here is the caller graph for this function:

◆ getMaxPosThumb()

static constexpr std::uint64_t getMaxPosThumb ( )
inlinestaticconstexpr

Definition at line 82 of file BLEProthesisInterface.h.

+ Here is the caller graph for this function:

◆ getMaxPWM()

static constexpr std::uint64_t getMaxPWM ( )
inlinestaticconstexpr

Definition at line 78 of file BLEProthesisInterface.h.

+ Here is the caller graph for this function:

◆ getMaxV()

static constexpr std::uint64_t getMaxV ( )
inlinestaticconstexpr

Definition at line 74 of file BLEProthesisInterface.h.

+ Here is the caller graph for this function:

◆ getMinV()

static constexpr std::uint64_t getMinV ( )
inlinestaticconstexpr

Definition at line 70 of file BLEProthesisInterface.h.

+ Here is the caller graph for this function:

◆ getState()

BLEProthesisInterface::State getState ( ) const

Definition at line 43 of file BLEProthesisInterface.cpp.

◆ getThumbPos()

std::int64_t getThumbPos ( ) const

Definition at line 28 of file BLEProthesisInterface.cpp.

◆ getThumbPWM()

std::int64_t getThumbPWM ( ) const

Definition at line 23 of file BLEProthesisInterface.cpp.

◆ sendFingerPWM()

void sendFingerPWM ( std::uint64_t  v,
std::uint64_t  maxPWM,
std::uint64_t  pos 
)

Definition at line 114 of file BLEProthesisInterface.cpp.

+ Here is the call graph for this function:

◆ sendGrasp()

void sendGrasp ( std::uint64_t  n)

Definition at line 61 of file BLEProthesisInterface.cpp.

+ Here is the call graph for this function:

◆ sendRaw()

void sendRaw ( const std::string &  cmd)

Definition at line 48 of file BLEProthesisInterface.cpp.

+ Here is the caller graph for this function:

◆ sendThumbPWM()

void sendThumbPWM ( std::uint64_t  v,
std::uint64_t  maxPWM,
std::uint64_t  pos 
)

Definition at line 74 of file BLEProthesisInterface.cpp.

+ Here is the call graph for this function:

◆ verboseReceive()

void verboseReceive ( bool  b = true)

Definition at line 154 of file BLEProthesisInterface.cpp.

◆ verboseSend()

void verboseSend ( bool  b = true)

Definition at line 159 of file BLEProthesisInterface.cpp.

Friends And Related Function Documentation

◆ BLEProthesisInterfaceQtWorker

friend class BLEProthesisInterfaceQtWorker
friend

Definition at line 52 of file BLEProthesisInterface.h.


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