Low-Level C++ SDK  v1.2.0
Loading...
Searching...
No Matches
WeArtCommon.h File Reference
#include <vector>
#include <windows.h>
#include <string>
#include "nlohmann/json.hpp"
Include dependency graph for WeArtCommon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AccelerometerData
 
struct  GyroscopeData
 
struct  TofData
 
struct  SensorData
 
struct  AnalogSensorRawData
 
struct  MiddlewareConnectedDevice
 
struct  MiddlewareStatusData
 
struct  ThimbleStatus
 Status of a single thimble connected to a device. More...
 
struct  ConnectedDeviceStatus
 Status of a connected TouchDIVER device. More...
 

Namespaces

namespace  WeArtConstants
 

Macros

#define WIN32_LEAN_AND_MEAN
 Collection of constants used throughout the SDK.
 

Enumerations

enum class  TrackingType { DEFAULT , WEART_HAND }
 
enum class  HandSide { Left = 1 << 0 , Right = 1 << 1 }
 
enum  GraspingState { Grabbed = 0 , Released = 1 }
 
enum  CalibrationStatus { IDLE = 0 , Calibrating = 1 , Running = 2 }
 
enum class  MiddlewareStatus {
  DISCONNECTED , IDLE , STARTING , RUNNING ,
  STOPPING , UPLOADING_TEXTURES , CONNECTING_DEVICE , CALIBRATION
}
 

Functions

 NLOHMANN_JSON_SERIALIZE_ENUM (HandSide, { {HandSide::Left, "LEFT"}, {HandSide::Right, "RIGHT"}, }) enum class ActuationPoint
 
 NLOHMANN_JSON_SERIALIZE_ENUM (ActuationPoint, { {ActuationPoint::Thumb, "THUMB"}, {ActuationPoint::Index, "INDEX"}, {ActuationPoint::Middle, "MIDDLE"}, {ActuationPoint::Palm, "PALM"}, }) enum HandClosingState
 
 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (MiddlewareStatusData, status, version, statusCode, errorDesc, actuationsEnabled, connectedDevices)
 
 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (ThimbleStatus, id, connected, statusCode, errorDesc)
 
 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (ConnectedDeviceStatus, macAddress, handSide, batteryLevel, charging, thimbles)
 

Variables

const PCSTR WeArtConstants::DEFAULT_IP_ADDRESS = "127.0.0.1"
 
const PCSTR WeArtConstants::DEFAULT_TCP_PORT = "13031"
 
const std::string WeArtConstants::WEART_SDK_VERSION = "1.0.0"
 
const std::string WeArtConstants::WEART_SDK_TYPE = "SdkLLCPP"
 
const float WeArtConstants::defaultTemperature = 0.5f
 
const float WeArtConstants::minTemperature = 0.0f
 
const float WeArtConstants::maxTemperature = 1.0f
 
const float WeArtConstants::defaultForce = 0.0f
 
const float WeArtConstants::minForce = 0.0f
 
const float WeArtConstants::maxForce = 1.0f
 
const float WeArtConstants::defaultClosure = 0.0f
 
const float WeArtConstants::minClosure = 0.0f
 
const float WeArtConstants::maxClosure = 1.0f
 
const float WeArtConstants::defaultAbduction = 0.442f
 
const int WeArtConstants::defaultTextureIndex = 0
 
const int WeArtConstants::minTextureIndex = 0
 
const int WeArtConstants::maxTextureIndex = 21
 
const int WeArtConstants::nullTextureIndex = 255
 
const float WeArtConstants::defaultCollisionMultiplier = 20.0f
 
const float WeArtConstants::minCollisionMultiplier = 0.0f
 
const float WeArtConstants::maxCollisionMultiplier = 100.0f
 
const float WeArtConstants::defaultVolumeTexture = 100.0f
 
const float WeArtConstants::minVolumeTexture = 0.0f
 
const float WeArtConstants::maxVolumeTexture = 100.0f
 
const float WeArtConstants::thresholdThumbClosure = 0.5f
 
const float WeArtConstants::thresholdIndexClosure = 0.5f
 
const float WeArtConstants::thresholdMiddleClosure = 0.5f
 
const float WeArtConstants::defaultGraspForce = 0.3f
 
const float WeArtConstants::dynamicForceSensibility = 10.0f
 

Macro Definition Documentation

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Collection of constants used throughout the SDK.

Enumeration Type Documentation

◆ CalibrationStatus

Enumerator
IDLE 
Calibrating 
Running 

◆ GraspingState

Enumerator
Grabbed 
Released 

◆ HandSide

enum class HandSide
strong
Enumerator
Left 
Right 

◆ MiddlewareStatus

enum class MiddlewareStatus
strong
Enumerator
DISCONNECTED 
IDLE 
STARTING 
RUNNING 
STOPPING 
UPLOADING_TEXTURES 
CONNECTING_DEVICE 
CALIBRATION 

◆ TrackingType

enum class TrackingType
strong
Enumerator
DEFAULT 

Deprecated, contains only closure values.

WEART_HAND 

Tracking with closures, and abduction value for thumb.

Function Documentation

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT() [1/3]

NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT ( ConnectedDeviceStatus  ,
macAddress  ,
handSide  ,
batteryLevel  ,
charging  ,
thimbles   
)

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT() [2/3]

NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT ( MiddlewareStatusData  ,
status  ,
version  ,
statusCode  ,
errorDesc  ,
actuationsEnabled  ,
connectedDevices   
)

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT() [3/3]

NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT ( ThimbleStatus  ,
id  ,
connected  ,
statusCode  ,
errorDesc   
)

◆ NLOHMANN_JSON_SERIALIZE_ENUM() [1/2]

NLOHMANN_JSON_SERIALIZE_ENUM ( ActuationPoint  ,
{ {ActuationPoint::Thumb, "THUMB"}, {ActuationPoint::Index, "INDEX"}, {ActuationPoint::Middle, "MIDDLE"}, {ActuationPoint::Palm, "PALM"}, }   
)

◆ NLOHMANN_JSON_SERIALIZE_ENUM() [2/2]

NLOHMANN_JSON_SERIALIZE_ENUM ( HandSide  ,
{ {HandSide::Left, "LEFT"}, {HandSide::Right, "RIGHT"}, }   
)