Go to the documentation of this file.
52 throw std::invalid_argument
54 "BLEProthesisInterface::sendRaw( cmd = " + cmd +
55 " ): The UART service is not connected!"
58 _worker->sendCommand(cmd);
65 throw std::invalid_argument
78 throw std::invalid_argument
89 throw std::invalid_argument
94 " ): The interval for mxPWM is [0, , " +
100 throw std::invalid_argument
105 " ): The interval for pos is [0, " +
109 std::stringstream
str;
110 str <<
'M' << 2 <<
',' <<
v <<
',' << mxPWM <<
',' << pos <<
'\n';
118 throw std::invalid_argument
129 throw std::invalid_argument
134 " ): The interval for mxPWM is [0, , " +
140 throw std::invalid_argument
145 " ): The interval for pos is [0, " +
149 std::stringstream
str;
150 str <<
'M' << 3 <<
',' <<
v <<
',' << mxPWM <<
',' << pos <<
'\n';
171 return "DiscoveringDevices";
173 return "DiscoveringDevicesDone";
175 return "Disconnected";
179 return "ConnectingDone";
181 return "DiscoveringServices";
183 return "DiscoveringServicesDone";
185 return "ConnectingService";
191 return "UNKNOWN VALUE FOR BLEProthesisInterface::State: " +
std::to_string(
static_cast<int>(
s));
static constexpr std::uint64_t getMaxG()
void verboseReceive(bool b=true)
static constexpr std::uint64_t getMaxV()
static constexpr std::uint64_t getMaxPosThumb()
static constexpr std::uint64_t getMinV()
std::int64_t getFingerPWM() const
std::int64_t getThumbPos() const
@ DiscoveringServicesDone
BLEProthesisInterface(const std::string &mac, SensorValueProtocol protocol=SensorValueProtocol::mx_pos_pwm)
void verboseSend(bool b=true)
static constexpr std::uint64_t getMaxPosFingers()
void sendThumbPWM(std::uint64_t v, std::uint64_t maxPWM, std::uint64_t pos)
std::int64_t getFingerPos() const
double v(double t, double v0, double a0, double j)
std::string to_string(BLEProthesisInterface::State s)
std::int64_t getThumbPWM() const
void sendGrasp(std::uint64_t n)
double s(double t, double s0, double v0, double a0, double j)
void sendRaw(const std::string &cmd)
void sendFingerPWM(std::uint64_t v, std::uint64_t maxPWM, std::uint64_t pos)
static constexpr std::uint64_t getMaxPWM()