32 virtual std::string getID() = 0;
33 virtual std::vector<std::string> getValues() = 0;
34 virtual void setValues(std::vector<std::string>& values) = 0;
38 virtual void setHandSide(
HandSide hs) = 0;
48class WeArtMessageNoParams :
public WeArtMessage {
50 virtual void setHandSide(
HandSide hs)
override {};
54 virtual std::vector<std::string> getValues()
override {
55 return std::vector<std::string>();
57 virtual void setValues(std::vector<std::string>& values)
override {};
62class WeArtMessageHandSpecific :
public WeArtMessage {
70 virtual void setHandSide(
HandSide hs)
override {
78class WeArtMessageObjectSpecific :
public WeArtMessage {
84 virtual void setHandSide(
HandSide hs)
override {
89 return actuationPoint;
104class StartFromClientMessage :
public WeArtMessageNoParams {
106 static constexpr const char* ID =
"StartFromClient";
108 StartFromClientMessage(
TrackingType trackType = TrackingType::WEART_HAND) : _trackType(trackType) {}
110 virtual std::string getID()
override {
114 virtual std::vector<std::string> getValues()
override;
115 virtual void setValues(std::vector<std::string>& values)
override;
121class StopFromClientMessage :
public WeArtMessageNoParams {
123 static constexpr const char* ID =
"StopFromClient";
125 virtual std::string getID()
override {
131class StartCalibrationMessage :
public WeArtMessageNoParams {
133 static constexpr const char* ID =
"StartCalibration";
135 virtual std::string getID()
override {
141class StopCalibrationMessage :
public WeArtMessageNoParams {
143 static constexpr const char* ID =
"StopCalibration";
145 virtual std::string getID()
override {
151class CalibrationStatusMessage :
public WeArtMessageHandSpecific {
153 static constexpr const char* ID =
"CalibrationStatus";
155 virtual std::string getID()
override {
163 virtual std::vector<std::string> getValues()
override;
165 virtual void setValues(std::vector<std::string>& values)
override;
172class CalibrationResultMessage :
public WeArtMessageHandSpecific {
174 static constexpr const char* ID =
"CalibrationResult";
176 virtual std::string getID()
override {
184 virtual std::vector<std::string> getValues()
override;
186 virtual void setValues(std::vector<std::string>& values)
override;
193class ExitMessage :
public WeArtMessageNoParams {
195 static constexpr const char* ID =
"exit";
197 virtual std::string getID()
override {
198 return std::string(
"exit");
203class DisconnectMessage :
public WeArtMessageNoParams {
205 static constexpr const char* ID =
"disconnect";
207 virtual std::string getID()
override {
213class SetTemperatureMessage :
public WeArtMessageObjectSpecific {
215 static constexpr const char* ID =
"temperature";
217 SetTemperatureMessage(
const float t) : temperature(t) {};
218 SetTemperatureMessage() {};
219 virtual std::string getID()
override {
223 virtual std::vector<std::string> getValues()
override;
225 virtual void setValues(std::vector<std::string>& values)
override;
232class StopTemperatureMessage :
public WeArtMessageObjectSpecific {
234 static constexpr const char* ID =
"stopTemperature";
236 virtual std::string getID()
override {
240 virtual std::vector<std::string> getValues()
override;
242 virtual void setValues(std::vector<std::string>& values)
override;
246class SetForceMessage :
public WeArtMessageObjectSpecific {
248 static constexpr const char* ID =
"force";
250 SetForceMessage(
const float f[3]) : force{ f[0], f[1], f[2] } {};
251 SetForceMessage() {};
252 virtual std::string getID()
override {
256 virtual std::vector<std::string> getValues()
override;
258 virtual void setValues(std::vector<std::string>& values)
override;
265class StopForceMessage :
public WeArtMessageObjectSpecific {
267 static constexpr const char* ID =
"stopForce";
269 virtual std::string getID()
override {
273 virtual std::vector<std::string> getValues()
override;
275 virtual void setValues(std::vector<std::string>& values)
override;
279class SetTextureMessage :
public WeArtMessageObjectSpecific {
281 static constexpr const char* ID =
"texture";
283 SetTextureMessage(
const int idx,
const float vel,
const float vol) : index(idx), velocity{ 0.5f, 0.0f, vel }, volume(vol) {};
284 SetTextureMessage() {};
285 virtual std::string getID()
override {
289 virtual std::vector<std::string> getValues()
override;
291 virtual void setValues(std::vector<std::string>& values)
override;
295 float velocity[3] = { 0.5f, 0.0f, 0.0f };
300class StopTextureMessage :
public WeArtMessageObjectSpecific {
302 static constexpr const char* ID =
"stopTexture";
304 virtual std::string getID()
override {
308 virtual std::vector<std::string> getValues()
override;
310 virtual void setValues(std::vector<std::string>& values)
override;
324class TrackingMessage :
public WeArtMessageNoParams {
326 static constexpr const char* ID =
"Tracking";
328 virtual std::string getID()
override {
329 return std::string(ID);
338 virtual std::vector<std::string> getValues()
override;
340 virtual void setValues(std::vector<std::string>& values)
override;
343 return _trackingType;
361 uint8 RightThumbClosure;
362 uint8 RightIndexClosure;
363 uint8 RightMiddleClosure;
364 uint8 RightPalmClosure;
365 uint8 LeftThumbClosure;
366 uint8 LeftIndexClosure;
367 uint8 LeftMiddleClosure;
368 uint8 LeftPalmClosure;
371 uint8 RightThumbAbduction;
372 uint8 LeftThumbAbduction;
CalibrationStatus
Definition: WeArtCommon.h:39
HandSide
Definition: WeArtCommon.h:11
TrackingType
Collection of constants used throughout the SDK.
Definition: WeArtCommon.h:6
ActuationPoint
Definition: WeArtCommon.h:18
HandSide StringToHandside(std::string &str)
Definition: WeArtMessages.cpp:5
std::string TrackingTypeToString(TrackingType trackType)
Definition: WeArtMessages.cpp:77
std::string HandsideToString(HandSide hs)
Definition: WeArtMessages.cpp:16
HandSide StringToCalibrationHandSide(std::string &str)
Definition: WeArtMessages.cpp:31
TrackingType StringToTrackingType(const std::string &str)
Definition: WeArtMessages.cpp:71
std::string CalibrationHandSideToString(HandSide hs)
Definition: WeArtMessages.cpp:27
std::string ActuationPointToString(ActuationPoint ap)
Definition: WeArtMessages.cpp:56
ActuationPoint StringToActuationPoint(std::string &str)
Definition: WeArtMessages.cpp:41
Definition: WeArtMessages.h:332
float Y
Definition: WeArtMessages.h:334
float Z
Definition: WeArtMessages.h:335
float X
Definition: WeArtMessages.h:333