C++ SDK for MANUS Core 2.0
Loading...
Searching...
No Matches
SDKClient

Classes

class  SDKClientPlatformSpecific
 
struct  ClientHapticSettings
 Haptic settings for a single glove. More...
 
class  ClientSkeleton
 Used to store the information about the final animated skeletons. More...
 
class  ClientSkeletonCollection
 Used to store all the final animated skeletons received from Core. More...
 
class  SDKClient
 

Enumerations

enum  MicrosoftVirtualKeyCodes {
  VK_TAB = 9 , VK_RETURN = 13 , VK_ESCAPE = 27 , VK_DOWN = 258 ,
  VK_UP = 259 , VK_LEFT = 260 , VK_RIGHT = 261 , VK_HOME = 262 ,
  VK_BACK = 263 , VK_F1 = 265 , VK_F2 = 266 , VK_F3 = 267 ,
  VK_F4 = 268 , VK_F5 = 269 , VK_F6 = 270 , VK_F7 = 271 ,
  VK_F8 = 272 , VK_F9 = 273 , VK_F10 = 274 , VK_F11 = 275 ,
  VK_F12 = 276 , VK_DELETE = 330 , VK_INSERT = 331 , VK_NEXT = 338 ,
  VK_PRIOR = 339 , VK_END = 360
}
 
enum class  ClientState : int {
  ClientState_PickingConnectionType = 0 , ClientState_LookingForHosts , ClientState_NoHostsFound , ClientState_PickingHost ,
  ClientState_ConnectingToCore , ClientState_DisplayingData , ClientState_Disconnected , ClientState_MAX_CLIENT_STATE_SIZE
}
 The current state of the client. More...
 
enum class  ClientReturnCode : int {
  ClientReturnCode_Success = 0 , ClientReturnCode_FailedPlatformSpecificInitialization , ClientReturnCode_FailedToResizeWindow , ClientReturnCode_FailedToInitialize ,
  ClientReturnCode_FailedToFindHosts , ClientReturnCode_FailedToConnect , ClientReturnCode_UnrecognizedStateEncountered , ClientReturnCode_FailedToShutDownSDK ,
  ClientReturnCode_FailedPlatformSpecificShutdown , ClientReturnCode_FailedToRestart , ClientReturnCode_FailedWrongTimeToGetData , ClientReturnCode_MAX_CLIENT_RETURN_CODE_SIZE ,
  ClientReturnCode_Success = 0 , ClientReturnCode_FailedPlatformSpecificInitialization , ClientReturnCode_FailedToResizeWindow , ClientReturnCode_FailedToInitialize ,
  ClientReturnCode_FailedToFindHosts , ClientReturnCode_FailedToConnect , ClientReturnCode_UnrecognizedStateEncountered , ClientReturnCode_FailedToShutDownSDK ,
  ClientReturnCode_FailedPlatformSpecificShutdown , ClientReturnCode_FailedToRestart , ClientReturnCode_FailedWrongTimeToGetData , ClientReturnCode_MAX_CLIENT_RETURN_CODE_SIZE
}
 Values that can be returned by this application. More...
 

Variables

constexpr unsigned int NUMBER_OF_HANDS_SUPPORTED = 2
 Constant expression: number of hands supported by demo. More...
 
constexpr unsigned long long int MINIMUM_MILLISECONDS_BETWEEN_HAPTICS_COMMANDS = 20
 Constant expression used to define the time between two possible haptics commands sent. More...
 
constexpr unsigned long long int MILLISECONDS_BETWEEN_TEMPORARY_SKELETONS_UPDATE = 1000
 Constant expression used to define the time between two updates of the temporary skeleton count printing. More...
 

Detailed Description


Class Documentation

◆ SDKClientPlatformSpecific

class SDKClientPlatformSpecific

Definition at line 18 of file ClientPlatformSpecific.hpp.

Inherited by SDKClient, and SDKMinimalClient.

Protected Member Functions

bool PlatformSpecificInitialization (void)
 Initialise things only needed for this platform. More...
 
bool PlatformSpecificShutdown (void)
 Shut down things only needed for this platform. More...
 
void UpdateInput (void)
 Update the current keyboard state. More...
 
bool ResizeWindow (const short int p_ConsoleWidth, const short int p_ConsoleHeight, const short int p_ConsoleScrollback)
 Resize the window, so the log messages will fit. Make sure not to enter illegal sizes in here or SetConsoleWindowInfo and SetConsoleScreenBufferSize can generate an error. This is not code directly needed for the SDK to function, but its handy for a quick and simple output for this client. More...
 
void ApplyConsolePosition (const int p_ConsoleCurrentOffset)
 Set the current console position. This handles the platform-specific part of advancing the console position. More...
 
bool GetKey (const int p_Key)
 Gets key's current state. True is pressed false is not pressed. More...
 
bool GetKeyDown (const int p_Key)
 Returns true first time it is called when key is pressed. More...
 
bool GetKeyUp (const int p_Key)
 Returns true first time it is called when key is released. More...
 
std::string GetDocumentsDirectoryPath_UTF8 (void)
 Get the path to the user's Documents folder. The string should be in UTF-8 format. More...
 
std::ifstream GetInputFileStream (std::string p_Path_UTF8)
 Get an input stream for the given file. The file's path should be in UTF-8 format. More...
 
std::ofstream GetOutputFileStream (std::string p_Path_UTF8)
 Get an output stream for the given file. The file's path should be in UTF-8 format. More...
 
bool DoesFolderOrFileExist (std::string p_Path_UTF8)
 Check if the given folder or file exists. The folder path given should be in UTF-8 format. More...
 
void CreateFolderIfItDoesNotExist (std::string p_Path_UTF8)
 Create the given folder if it does not exist. The folder path given should be in UTF-8 format. More...
 

Static Protected Member Functions

static bool CopyString (char *const p_Target, const size_t p_MaxLengthThatWillFitInTarget, const std::string &p_Source)
 Copy the given string into the given target. More...
 
static void ClearConsole (void)
 Clear the console window. More...
 

Static Protected Attributes

static const std::string s_SlashForFilesystemPath = "/"
 The slash character that is used in the filesystem. More...
 

Member Function Documentation

◆ ApplyConsolePosition()

void ApplyConsolePosition ( const int  p_ConsoleCurrentOffset)
protected

Set the current console position. This handles the platform-specific part of advancing the console position.

Definition at line 469 of file ClientPlatformSpecific.cpp.

◆ ClearConsole()

void ClearConsole ( void  )
staticprotected

Clear the console window.

Definition at line 475 of file ClientPlatformSpecific.cpp.

◆ CopyString()

bool CopyString ( char *const  p_Target,
const size_t  p_MaxLengthThatWillFitInTarget,
const std::string &  p_Source 
)
staticprotected

Copy the given string into the given target.

Definition at line 403 of file ClientPlatformSpecific.cpp.

◆ CreateFolderIfItDoesNotExist()

void CreateFolderIfItDoesNotExist ( std::string  p_Path_UTF8)
protected

Create the given folder if it does not exist. The folder path given should be in UTF-8 format.

Definition at line 548 of file ClientPlatformSpecific.cpp.

◆ DoesFolderOrFileExist()

bool DoesFolderOrFileExist ( std::string  p_Path_UTF8)
protected

Check if the given folder or file exists. The folder path given should be in UTF-8 format.

Definition at line 543 of file ClientPlatformSpecific.cpp.

◆ GetDocumentsDirectoryPath_UTF8()

std::string GetDocumentsDirectoryPath_UTF8 ( void  )
protected

Get the path to the user's Documents folder. The string should be in UTF-8 format.

Definition at line 512 of file ClientPlatformSpecific.cpp.

◆ GetInputFileStream()

std::ifstream GetInputFileStream ( std::string  p_Path_UTF8)
protected

Get an input stream for the given file. The file's path should be in UTF-8 format.

Definition at line 531 of file ClientPlatformSpecific.cpp.

◆ GetKey()

bool GetKey ( const int  p_Key)
protected

Gets key's current state. True is pressed false is not pressed.

Definition at line 497 of file ClientPlatformSpecific.cpp.

◆ GetKeyDown()

bool GetKeyDown ( const int  p_Key)
protected

Returns true first time it is called when key is pressed.

Definition at line 502 of file ClientPlatformSpecific.cpp.

◆ GetKeyUp()

bool GetKeyUp ( const int  p_Key)
protected

Returns true first time it is called when key is released.

Definition at line 507 of file ClientPlatformSpecific.cpp.

◆ GetOutputFileStream()

std::ofstream GetOutputFileStream ( std::string  p_Path_UTF8)
protected

Get an output stream for the given file. The file's path should be in UTF-8 format.

Definition at line 537 of file ClientPlatformSpecific.cpp.

◆ PlatformSpecificInitialization()

bool PlatformSpecificInitialization ( void  )
protected

Initialise things only needed for this platform.

Definition at line 381 of file ClientPlatformSpecific.cpp.

◆ PlatformSpecificShutdown()

bool PlatformSpecificShutdown ( void  )
protected

Shut down things only needed for this platform.

Definition at line 390 of file ClientPlatformSpecific.cpp.

◆ ResizeWindow()

bool ResizeWindow ( const short int  p_ConsoleWidth,
const short int  p_ConsoleHeight,
const short int  p_ConsoleScrollback 
)
protected

Resize the window, so the log messages will fit. Make sure not to enter illegal sizes in here or SetConsoleWindowInfo and SetConsoleScreenBufferSize can generate an error. This is not code directly needed for the SDK to function, but its handy for a quick and simple output for this client.

Definition at line 441 of file ClientPlatformSpecific.cpp.

◆ UpdateInput()

void UpdateInput ( void  )
protected

Update the current keyboard state.

Definition at line 398 of file ClientPlatformSpecific.cpp.

Member Data Documentation

◆ s_SlashForFilesystemPath

const std::string s_SlashForFilesystemPath = "/"
staticprotected

The slash character that is used in the filesystem.

Definition at line 86 of file ClientPlatformSpecific.hpp.

◆ ClientHapticSettings

struct ClientHapticSettings

Haptic settings for a single glove.

This is used to store if a specific motor on the glove should be enabled or not.

Definition at line 66 of file SDKClient.hpp.

Public Attributes

bool shouldHapticFinger [NUM_FINGERS_ON_HAND]
 

Member Data Documentation

◆ shouldHapticFinger

bool shouldHapticFinger[NUM_FINGERS_ON_HAND]

Definition at line 68 of file SDKClient.hpp.

◆ ClientSkeleton

class ClientSkeleton

Used to store the information about the final animated skeletons.

Definition at line 72 of file SDKClient.hpp.

Public Member Functions

 ~ClientSkeleton ()
 

Public Attributes

SkeletonInfo info
 
std::vector< SkeletonNodenodes
 
SkeletonNodenodes = nullptr
 

Constructor & Destructor Documentation

◆ ~ClientSkeleton()

~ClientSkeleton ( )
inline

Definition at line 41 of file SDKMinimalClient.hpp.

Member Data Documentation

◆ info

Definition at line 75 of file SDKClient.hpp.

◆ nodes [1/2]

std::vector<SkeletonNode> nodes

Definition at line 76 of file SDKClient.hpp.

◆ nodes [2/2]

SkeletonNode* nodes = nullptr

Definition at line 39 of file SDKMinimalClient.hpp.

◆ ClientSkeletonCollection

class ClientSkeletonCollection

Used to store all the final animated skeletons received from Core.

Definition at line 80 of file SDKClient.hpp.

Public Attributes

std::vector< ClientSkeletonskeletons
 

Member Data Documentation

◆ skeletons

std::vector< ClientSkeleton > skeletons

Definition at line 83 of file SDKClient.hpp.

◆ SDKClient

class SDKClient

Definition at line 86 of file SDKClient.hpp.

Inherits SDKClientPlatformSpecific.

Public Member Functions

 SDKClient ()
 
 ~SDKClient ()
 
ClientReturnCode Initialize ()
 Initialize the sample console and the SDK. This function attempts to resize the console window and then proceeds to initialize the SDK's interface. More...
 
ClientReturnCode Run ()
 The main SDKClient loop. This is a simple state machine which switches between different substates. More...
 
ClientReturnCode ShutDown ()
 When you are done with the SDK, don't forget to nicely shut it down this will close all connections to the host, close any threads and clean up after itself after this is called it is expected to exit the client program. If not it needs to call initialize again. More...
 
float RoundFloatValue (float p_Value, int p_NumDecimalsToKeep)
 Round the given float value so that it has no more than the given number of decimals. More...
 
void AdvanceConsolePosition (short int p_Y)
 Set the position that the next log message will appear at. Using this allows us to have somewhat of a static, yet flexible layout of logging. More...
 

Static Public Member Functions

static void OnConnectedCallback (const ManusHost *const p_Host)
 Gets called when the client is connects to manus core Using this callback is optional. In this sample we use this callback to change the client's state and switch to another screen. More...
 
static void OnDisconnectedCallback (const ManusHost *const p_Host)
 Gets called when the client disconnects from manus core. This callback is optional and in the sample changes the client's state. More...
 
static void OnSkeletonStreamCallback (const SkeletonStreamInfo *const p_Skeleton)
 This gets called when the client is connected to manus core. More...
 
static void OnLandscapeCallback (const Landscape *const p_Landscape)
 This gets called when receiving landscape information from core. More...
 
static void OnSystemCallback (const SystemMessage *const p_SystemMessage)
 This gets called when receiving a system message from Core. More...
 
static void OnErgonomicsCallback (const ErgonomicsStream *const p_Ergo)
 This gets called when receiving ergonomics data from Manus Core In our sample we only save the first left and first right glove's latests ergonomics data. Ergonomics data gets generated and sent when glove data changes, this means that the stream does not always contain ALL of the devices, because some may not have had new data since the last time the ergonomics data was sent. More...
 

Protected Member Functions

virtual ClientReturnCode InitializeSDK ()
 Initialize the sdk, register the callbacks and set the coordinate system. This needs to be done before any of the other SDK functions can be used. More...
 
virtual ClientReturnCode RestartSDK ()
 Used to restart and initialize the SDK to make sure a new connection can be set up. This function is used by the client to shutdown the SDK and any connections it has. After that it reinitializes the SDK so that it is ready to connect to a new Manus Core. More...
 
virtual ClientReturnCode RegisterAllCallbacks ()
 Used to register the callbacks between sdk and core. Callbacks that are registered functions that get called when a certain 'event' happens, such as data coming in from Manus Core. All of these are optional, but depending on what data you require you may or may not need all of them. More...
 
virtual ClientReturnCode PickingConnectionType ()
 Overridable switch states of how the client flow is done. This is the first option screen in the client to determine how the client is going to connect to manus core it sets the m_state based on user input. More...
 
virtual ClientReturnCode LookingForHosts ()
 Simple example of the SDK looking for manus core hosts on the network and display them on screen. More...
 
virtual ClientReturnCode NoHostsFound ()
 When no available hosts are found the user can either retry or exit. More...
 
virtual ClientReturnCode PickingHost ()
 Print the found hosts and give the user the option to select one. More...
 
virtual ClientReturnCode ConnectingToCore ()
 After a connection option was selected, the client will now try to connect to manus core via the SDK. More...
 
virtual ClientReturnCode UpdateBeforeDisplayingData ()
 Some things happen before every display update, no matter what state. They happen here, such as the updating of the landscape and the generated tracker. More...
 
virtual ClientReturnCode DisplayingData ()
 Once the connections are made we loop this function it calls all the input handlers for different aspects of the SDK and then prints any relevant data of it. More...
 
virtual ClientReturnCode DisplayingDataGlove ()
 display the ergonomics data of the gloves, and handles haptic commands. More...
 
virtual ClientReturnCode DisplayingDataSkeleton ()
 
virtual ClientReturnCode DisplayingDataTracker ()
 
virtual ClientReturnCode DisplayingDataTemporarySkeleton ()
 
virtual ClientReturnCode DisplayingLandscapeTimeData ()
 
virtual ClientReturnCode DisconnectedFromCore ()
 When the SDK loses the connection with Core the user can either close the sdk or try to reconnect to a local or to a remote host. More...
 
virtual ClientReturnCode ReconnectingToCore (int32_t p_ReconnectionTime=0, int32_t p_ReconnectionAttempts=0)
 It is called when the sdk is disconnected from Core and the user select one of the options to reconnect. More...
 
void PrintHandErgoData (ErgonomicsData &p_ErgoData, bool p_Left)
 Prints the ergonomics data of a hand. More...
 
void PrintErgonomicsData ()
 Print the ergonomics data received from Core. More...
 
void PrintDongleData ()
 Print the ergonomics data received from Core. More...
 
void PrintSystemMessage ()
 Prints the last received system messages received from Core. More...
 
void PrintSkeletonData ()
 Prints the finalized skeleton data received from Core. Since our console cannot render this data visually in 3d (its not in the scope of this client) we only display a little bit of data of the skeletons we receive. More...
 
void PrintTrackerData ()
 Prints the tracker data Since our console cannot render this data visually in 3d (its not in the scope of this client) we only display a little bit of data of the trackers we receive. More...
 
void PrintTrackerDataGlobal ()
 Prints the tracker data without taking users into account. This shows how one can get the tracker data that is being streamed without caring about users. More...
 
void PrintTrackerDataPerUser ()
 Prints the tracker data per user, this shows how to access this data for each user. More...
 
void PrintLandscapeTimeData ()
 
void PrintSkeletonInfo ()
 Prints the type of the first chain generated by the AllocateChain function, this is used for testing. More...
 
void PrintTemporarySkeletonInfo ()
 This support function gets the temporary skeletons for all sessions connected to Core and it prints the total number of temporary skeletons associated to the current session. Temporary skeletons are used for auto allocation and in the Dev Tools. More...
 
void GetTemporarySkeletonIfModified ()
 This support function checks if a temporary skeleton related to the current session has been modified and gets it. Whenever the Dev Tools saves the changes to the skeleton, it sets the boolean t_IsSkeletonModified to true for that skeleton. With callback OnSystemCallback this application can be notified when one of its temporary skeletons has been modified, so it can get it and, potentially, load it. More...
 
void HandleHapticCommands ()
 This showcases haptics support on gloves. Send haptics commands to connected gloves if specific keys were pressed. We have two ways of sending the vibration commands, based on the dongle id or based on the skeleton id. More...
 
void HandleSkeletonCommands ()
 Handles the console commands for the skeletons. More...
 
void HandleSkeletonHapticCommands ()
 This showcases haptics support on the skeletons. Send haptics commands to the gloves connected to a skeleton if specific keys were pressed. We have two ways of sending the vibration commands, based on the dongle id or based on the skeleton id. More...
 
void HandleTemporarySkeletonCommands ()
 Handles the console commands for the temporary skeletons. More...
 
void HandleTrackerCommands ()
 This support function is used to set a test tracker and add it to the landscape. More...
 
bool SetupHandNodes (uint32_t p_SklIndex)
 This support function sets up the nodes for the skeleton hand In order to have any 3d positional/rotational information from the gloves or body, one needs to setup the skeleton on which this data should be applied. In the case of this sample we create a Hand skeleton for which we want to get the calculated result. The ID's for the nodes set here are the same IDs which are used in the OnSkeletonStreamCallback, this allows us to create the link between Manus Core's data and the data we enter here. More...
 
bool SetupHandChains (uint32_t p_SklIndex)
 This function sets up some basic hand chains. Chains are required for a Skeleton to be able to be animated, it basically tells Manus Core which nodes belong to which body part and what data needs to be applied to which node. More...
 
void LoadTestSkeleton ()
 This function sets up a very minimalistic hand skeleton. In order to have any 3d positional/rotational information from the gloves or body, one needs to setup a skeleton on which this data can be applied. In the case of this sample we create a Hand skeleton in order to get skeleton information in the OnSkeletonStreamCallback function. This sample does not contain any 3D rendering, so we will not be applying the returned data on anything. More...
 
void UnloadTestSkeleton ()
 This support function is used to unload a skeleton from Core. More...
 
void AllocateChains ()
 This support function sets up an incomplete hand skeleton and then uses manus core to allocate chains for it. More...
 
void BuildTemporarySkeleton ()
 This support function is used for the manual allocation of the skeleton chains with means of a temporary skeleton. Temporary Skeletons can be helpful when the user wants to modify the skeletons chains or nodes more than once before retargeting, as they can be saved in core and retrieved later by the user to apply further modifications. This can be done easily with means of the Dev Tools. The current function contains an example that shows how to create a temporary skeleton, modify its chains, nodes and skeleton info, and save it into Core. This process should be used during development. After that, the final skeleton should be loaded into core for retargeting and for getting the actual data,as displayed in the LoadTestSkeleton function. More...
 
void ClearTemporarySkeleton ()
 This support function is used to clear a temporary skeleton from the temporary skeleton list, for example it can be used when the max number of temporary skeletons has been reached for a specific session. More...
 
void ClearAllTemporarySkeletons ()
 This support function is used to clear all temporary skeletons associated to the current SDK session, it can be used when the max number of temporary skeletons has been reached for the current session and we want to make room for more. More...
 
void SaveTemporarySkeletonToFile ()
 
void GetTemporarySkeletonFromFile ()
 
void TestTimestamp ()
 
void RemoveIndexFromTemporarySkeletonList (uint32_t p_Idx)
 
- Protected Member Functions inherited from SDKClientPlatformSpecific
bool PlatformSpecificInitialization (void)
 Initialise things only needed for this platform. More...
 
bool PlatformSpecificShutdown (void)
 Shut down things only needed for this platform. More...
 
void UpdateInput (void)
 Update the current keyboard state. More...
 
bool ResizeWindow (const short int p_ConsoleWidth, const short int p_ConsoleHeight, const short int p_ConsoleScrollback)
 Resize the window, so the log messages will fit. Make sure not to enter illegal sizes in here or SetConsoleWindowInfo and SetConsoleScreenBufferSize can generate an error. This is not code directly needed for the SDK to function, but its handy for a quick and simple output for this client. More...
 
void ApplyConsolePosition (const int p_ConsoleCurrentOffset)
 Set the current console position. This handles the platform-specific part of advancing the console position. More...
 
bool GetKey (const int p_Key)
 Gets key's current state. True is pressed false is not pressed. More...
 
bool GetKeyDown (const int p_Key)
 Returns true first time it is called when key is pressed. More...
 
bool GetKeyUp (const int p_Key)
 Returns true first time it is called when key is released. More...
 
std::string GetDocumentsDirectoryPath_UTF8 (void)
 Get the path to the user's Documents folder. The string should be in UTF-8 format. More...
 
std::ifstream GetInputFileStream (std::string p_Path_UTF8)
 Get an input stream for the given file. The file's path should be in UTF-8 format. More...
 
std::ofstream GetOutputFileStream (std::string p_Path_UTF8)
 Get an output stream for the given file. The file's path should be in UTF-8 format. More...
 
bool DoesFolderOrFileExist (std::string p_Path_UTF8)
 Check if the given folder or file exists. The folder path given should be in UTF-8 format. More...
 
void CreateFolderIfItDoesNotExist (std::string p_Path_UTF8)
 Create the given folder if it does not exist. The folder path given should be in UTF-8 format. More...
 

Static Protected Member Functions

static NodeSetup CreateNodeSetup (uint32_t p_Id, uint32_t p_ParentId, float p_PosX, float p_PosY, float p_PosZ, std::string p_Name)
 Skeletons are pretty extensive in their data setup so we have several support functions so we can correctly receive and parse the data, this function helps setup the data. More...
 
static ManusVec3 CreateManusVec3 (float p_X, float p_Y, float p_Z)
 
- Static Protected Member Functions inherited from SDKClientPlatformSpecific
static bool CopyString (char *const p_Target, const size_t p_MaxLengthThatWillFitInTarget, const std::string &p_Source)
 Copy the given string into the given target. More...
 
static void ClearConsole (void)
 Clear the console window. More...
 

Protected Attributes

bool m_RequestedExit = false
 
uint32_t m_ConsoleClearTickCount = 0
 
const short int m_ConsoleWidth = 220
 
const short int m_ConsoleHeight = 44
 
const short int m_ConsoleScrollback = 500
 
int m_ConsoleCurrentOffset = 0
 
SessionType m_ClientType = SessionType::SessionType_CoreSDK
 
ClientState m_State = ClientState::ClientState_PickingConnectionType
 
ClientState m_PreviousState = m_State
 
std::function< ClientReturnCode()> m_CurrentInteraction = nullptr
 
bool m_ShouldConnectLocally = true
 
bool m_ShouldConnectGRPC = true
 
uint32_t m_HostToConnectTo = 0
 
uint32_t m_NumberOfHostsFound = 0
 
uint32_t m_SecondsToFindHosts = 2
 
int32_t m_SecondsToAttemptReconnecting = 60
 
int32_t m_MaxReconnectionAttempts = 10
 
uint32_t m_SleepBetweenReconnectingAttemptsInMs = 100
 
std::unique_ptr< ManusHost[]> m_AvailableHosts = nullptr
 
std::unique_ptr< ManusHostm_Host
 
uint32_t m_SessionId = 0
 
bool m_RumblingWrist [NUMBER_OF_HANDS_SUPPORTED] = { false, false }
 
std::vector< uint32_t > m_LoadedSkeletons
 
std::vector< uint32_t > m_TemporarySkeletons
 
std::mutex m_SkeletonMutex
 
ClientSkeletonCollectionm_NextSkeleton = nullptr
 
ClientSkeletonCollectionm_Skeleton = nullptr
 
std::chrono::time_point< std::chrono::high_resolution_clock > m_TimeSinceLastDisconnect
 
std::chrono::time_point< std::chrono::high_resolution_clock > m_LastTemporarySkeletonUpdate = std::chrono::high_resolution_clock::now()
 
std::mutex m_SystemMessageMutex
 
std::string m_SystemMessage = ""
 
SystemMessageType m_SystemMessageCode = SystemMessageType::SystemMessageType_Unknown
 
uint32_t m_ModifiedSkeletonIndex = UINT_MAX
 
ManusTimestampInfo m_ErgoTimestampInfo
 
ErgonomicsData m_LeftGloveErgoData
 
ErgonomicsData m_RightGloveErgoData
 
ChainType m_ChainType = ChainType::ChainType_Invalid
 
bool m_TrackerTest = false
 
bool m_TrackerDataDisplayPerUser = false
 
float m_TrackerOffset = 0.0f
 
std::mutex m_LandscapeMutex
 
Landscapem_NewLandscape = nullptr
 
Landscapem_Landscape = nullptr
 
uint32_t m_FirstLeftGloveID = 0
 
uint32_t m_FirstRightGloveID = 0
 

Static Protected Attributes

static SDKClients_Instance = nullptr
 
- Static Protected Attributes inherited from SDKClientPlatformSpecific
static const std::string s_SlashForFilesystemPath = "/"
 The slash character that is used in the filesystem. More...
 

Constructor & Destructor Documentation

◆ SDKClient()

SDKClient ( )

Definition at line 16 of file SDKClient.cpp.

◆ ~SDKClient()

~SDKClient ( )

Definition at line 27 of file SDKClient.cpp.

Member Function Documentation

◆ AdvanceConsolePosition()

void AdvanceConsolePosition ( short int  p_Y)

Set the position that the next log message will appear at. Using this allows us to have somewhat of a static, yet flexible layout of logging.

Definition at line 345 of file SDKClient.cpp.

◆ AllocateChains()

void AllocateChains ( )
protected

This support function sets up an incomplete hand skeleton and then uses manus core to allocate chains for it.

Definition at line 1981 of file SDKClient.cpp.

◆ BuildTemporarySkeleton()

void BuildTemporarySkeleton ( )
protected

This support function is used for the manual allocation of the skeleton chains with means of a temporary skeleton. Temporary Skeletons can be helpful when the user wants to modify the skeletons chains or nodes more than once before retargeting, as they can be saved in core and retrieved later by the user to apply further modifications. This can be done easily with means of the Dev Tools. The current function contains an example that shows how to create a temporary skeleton, modify its chains, nodes and skeleton info, and save it into Core. This process should be used during development. After that, the final skeleton should be loaded into core for retargeting and for getting the actual data,as displayed in the LoadTestSkeleton function.

Definition at line 2085 of file SDKClient.cpp.

◆ ClearAllTemporarySkeletons()

void ClearAllTemporarySkeletons ( )
protected

This support function is used to clear all temporary skeletons associated to the current SDK session, it can be used when the max number of temporary skeletons has been reached for the current session and we want to make room for more.

Definition at line 2331 of file SDKClient.cpp.

◆ ClearTemporarySkeleton()

void ClearTemporarySkeleton ( )
protected

This support function is used to clear a temporary skeleton from the temporary skeleton list, for example it can be used when the max number of temporary skeletons has been reached for a specific session.

Definition at line 2311 of file SDKClient.cpp.

◆ ConnectingToCore()

ClientReturnCode ConnectingToCore ( )
protectedvirtual

After a connection option was selected, the client will now try to connect to manus core via the SDK.

Definition at line 675 of file SDKClient.cpp.

◆ CreateManusVec3()

ManusVec3 CreateManusVec3 ( float  p_X,
float  p_Y,
float  p_Z 
)
staticprotected

Definition at line 1733 of file SDKClient.cpp.

◆ CreateNodeSetup()

NodeSetup CreateNodeSetup ( uint32_t  p_Id,
uint32_t  p_ParentId,
float  p_PosX,
float  p_PosY,
float  p_PosZ,
std::string  p_Name 
)
staticprotected

Skeletons are pretty extensive in their data setup so we have several support functions so we can correctly receive and parse the data, this function helps setup the data.

Parameters
p_Idthe id of the created node setup
p_ParentIdthe id of the node parent
p_PosXX position of the node, this is defined with respect to the global coordinate system or the local one depending on the parameter p_UseWorldCoordinates set when initializing the sdk,
p_PosYY position of the node this is defined with respect to the global coordinate system or the local one depending on the parameter p_UseWorldCoordinates set when initializing the sdk,
p_PosZZ position of the node this is defined with respect to the global coordinate system or the local one depending on the parameter p_UseWorldCoordinates set when initializing the sdk,
p_Namethe name of the node setup
Returns
the generated node setup

Definition at line 1716 of file SDKClient.cpp.

◆ DisconnectedFromCore()

ClientReturnCode DisconnectedFromCore ( )
protectedvirtual

When the SDK loses the connection with Core the user can either close the sdk or try to reconnect to a local or to a remote host.

Definition at line 885 of file SDKClient.cpp.

◆ DisplayingData()

ClientReturnCode DisplayingData ( )
protectedvirtual

Once the connections are made we loop this function it calls all the input handlers for different aspects of the SDK and then prints any relevant data of it.

Definition at line 766 of file SDKClient.cpp.

◆ DisplayingDataGlove()

ClientReturnCode DisplayingDataGlove ( )
protectedvirtual

display the ergonomics data of the gloves, and handles haptic commands.

Returns

Definition at line 790 of file SDKClient.cpp.

◆ DisplayingDataSkeleton()

ClientReturnCode DisplayingDataSkeleton ( )
protectedvirtual

Definition at line 808 of file SDKClient.cpp.

◆ DisplayingDataTemporarySkeleton()

ClientReturnCode DisplayingDataTemporarySkeleton ( )
protectedvirtual

Definition at line 845 of file SDKClient.cpp.

◆ DisplayingDataTracker()

ClientReturnCode DisplayingDataTracker ( )
protectedvirtual

Definition at line 828 of file SDKClient.cpp.

◆ DisplayingLandscapeTimeData()

ClientReturnCode DisplayingLandscapeTimeData ( )
protectedvirtual

Definition at line 866 of file SDKClient.cpp.

◆ GetTemporarySkeletonFromFile()

void GetTemporarySkeletonFromFile ( )
protected

Definition at line 2443 of file SDKClient.cpp.

◆ GetTemporarySkeletonIfModified()

void GetTemporarySkeletonIfModified ( )
protected

This support function checks if a temporary skeleton related to the current session has been modified and gets it. Whenever the Dev Tools saves the changes to the skeleton, it sets the boolean t_IsSkeletonModified to true for that skeleton. With callback OnSystemCallback this application can be notified when one of its temporary skeletons has been modified, so it can get it and, potentially, load it.

Definition at line 1369 of file SDKClient.cpp.

◆ HandleHapticCommands()

void HandleHapticCommands ( )
protected

This showcases haptics support on gloves. Send haptics commands to connected gloves if specific keys were pressed. We have two ways of sending the vibration commands, based on the dongle id or based on the skeleton id.

Definition at line 1450 of file SDKClient.cpp.

◆ HandleSkeletonCommands()

void HandleSkeletonCommands ( )
protected

Handles the console commands for the skeletons.

Definition at line 1558 of file SDKClient.cpp.

◆ HandleSkeletonHapticCommands()

void HandleSkeletonHapticCommands ( )
protected

This showcases haptics support on the skeletons. Send haptics commands to the gloves connected to a skeleton if specific keys were pressed. We have two ways of sending the vibration commands, based on the dongle id or based on the skeleton id.

Definition at line 1573 of file SDKClient.cpp.

◆ HandleTemporarySkeletonCommands()

void HandleTemporarySkeletonCommands ( )
protected

Handles the console commands for the temporary skeletons.

Definition at line 1633 of file SDKClient.cpp.

◆ HandleTrackerCommands()

void HandleTrackerCommands ( )
protected

This support function is used to set a test tracker and add it to the landscape.

Definition at line 1662 of file SDKClient.cpp.

◆ Initialize()

ClientReturnCode Initialize ( )

Initialize the sample console and the SDK. This function attempts to resize the console window and then proceeds to initialize the SDK's interface.

Definition at line 34 of file SDKClient.cpp.

◆ InitializeSDK()

ClientReturnCode InitializeSDK ( )
protectedvirtual

Initialize the sdk, register the callbacks and set the coordinate system. This needs to be done before any of the other SDK functions can be used.

Definition at line 361 of file SDKClient.cpp.

◆ LoadTestSkeleton()

void LoadTestSkeleton ( )
protected

This function sets up a very minimalistic hand skeleton. In order to have any 3d positional/rotational information from the gloves or body, one needs to setup a skeleton on which this data can be applied. In the case of this sample we create a Hand skeleton in order to get skeleton information in the OnSkeletonStreamCallback function. This sample does not contain any 3D rendering, so we will not be applying the returned data on anything.

Definition at line 1915 of file SDKClient.cpp.

◆ LookingForHosts()

ClientReturnCode LookingForHosts ( )
protectedvirtual

Simple example of the SDK looking for manus core hosts on the network and display them on screen.

Definition at line 556 of file SDKClient.cpp.

◆ NoHostsFound()

ClientReturnCode NoHostsFound ( )
protectedvirtual

When no available hosts are found the user can either retry or exit.

Definition at line 605 of file SDKClient.cpp.

◆ OnConnectedCallback()

void OnConnectedCallback ( const ManusHost *const  p_Host)
static

Gets called when the client is connects to manus core Using this callback is optional. In this sample we use this callback to change the client's state and switch to another screen.

Definition at line 172 of file SDKClient.cpp.

◆ OnDisconnectedCallback()

void OnDisconnectedCallback ( const ManusHost *const  p_Host)
static

Gets called when the client disconnects from manus core. This callback is optional and in the sample changes the client's state.

Definition at line 225 of file SDKClient.cpp.

◆ OnErgonomicsCallback()

void OnErgonomicsCallback ( const ErgonomicsStream *const  p_Ergo)
static

This gets called when receiving ergonomics data from Manus Core In our sample we only save the first left and first right glove's latests ergonomics data. Ergonomics data gets generated and sent when glove data changes, this means that the stream does not always contain ALL of the devices, because some may not have had new data since the last time the ergonomics data was sent.

Parameters
p_Ergocontains the ergonomics data for each glove connected to Core.

Definition at line 301 of file SDKClient.cpp.

◆ OnLandscapeCallback()

void OnLandscapeCallback ( const Landscape *const  p_Landscape)
static

This gets called when receiving landscape information from core.

Parameters
p_Landscapecontains the new landscape from core.

Definition at line 259 of file SDKClient.cpp.

◆ OnSkeletonStreamCallback()

void OnSkeletonStreamCallback ( const SkeletonStreamInfo *const  p_SkeletonStreamInfo)
static

This gets called when the client is connected to manus core.

Parameters
p_SkeletonStreamInfocontains the meta data on how much data regarding the skeleton we need to get from the SDK.

Definition at line 236 of file SDKClient.cpp.

◆ OnSystemCallback()

void OnSystemCallback ( const SystemMessage *const  p_SystemMessage)
static

This gets called when receiving a system message from Core.

Parameters
p_SystemMessagecontains the system message received from core.

Definition at line 273 of file SDKClient.cpp.

◆ PickingConnectionType()

ClientReturnCode PickingConnectionType ( )
protectedvirtual

Overridable switch states of how the client flow is done. This is the first option screen in the client to determine how the client is going to connect to manus core it sets the m_state based on user input.

Definition at line 500 of file SDKClient.cpp.

◆ PickingHost()

ClientReturnCode PickingHost ( )
protectedvirtual

Print the found hosts and give the user the option to select one.

Definition at line 627 of file SDKClient.cpp.

◆ PrintDongleData()

void PrintDongleData ( )
protected

Print the ergonomics data received from Core.

Definition at line 1103 of file SDKClient.cpp.

◆ PrintErgonomicsData()

void PrintErgonomicsData ( )
protected

Print the ergonomics data received from Core.

Definition at line 1042 of file SDKClient.cpp.

◆ PrintHandErgoData()

void PrintHandErgoData ( ErgonomicsData p_ErgoData,
bool  p_Left 
)
protected

Prints the ergonomics data of a hand.

Parameters
p_ErgoData

Definition at line 1014 of file SDKClient.cpp.

◆ PrintLandscapeTimeData()

void PrintLandscapeTimeData ( )
protected

Definition at line 1274 of file SDKClient.cpp.

◆ PrintSkeletonData()

void PrintSkeletonData ( )
protected

Prints the finalized skeleton data received from Core. Since our console cannot render this data visually in 3d (its not in the scope of this client) we only display a little bit of data of the skeletons we receive.

Definition at line 1146 of file SDKClient.cpp.

◆ PrintSkeletonInfo()

void PrintSkeletonInfo ( )
protected

Prints the type of the first chain generated by the AllocateChain function, this is used for testing.

Definition at line 1287 of file SDKClient.cpp.

◆ PrintSystemMessage()

void PrintSystemMessage ( )
protected

Prints the last received system messages received from Core.

Definition at line 1135 of file SDKClient.cpp.

◆ PrintTemporarySkeletonInfo()

void PrintTemporarySkeletonInfo ( )
protected

This support function gets the temporary skeletons for all sessions connected to Core and it prints the total number of temporary skeletons associated to the current session. Temporary skeletons are used for auto allocation and in the Dev Tools.

Definition at line 1410 of file SDKClient.cpp.

◆ PrintTrackerData()

void PrintTrackerData ( )
protected

Prints the tracker data Since our console cannot render this data visually in 3d (its not in the scope of this client) we only display a little bit of data of the trackers we receive.

Definition at line 1161 of file SDKClient.cpp.

◆ PrintTrackerDataGlobal()

void PrintTrackerDataGlobal ( )
protected

Prints the tracker data without taking users into account. This shows how one can get the tracker data that is being streamed without caring about users.

Definition at line 1182 of file SDKClient.cpp.

◆ PrintTrackerDataPerUser()

void PrintTrackerDataPerUser ( )
protected

Prints the tracker data per user, this shows how to access this data for each user.

Definition at line 1205 of file SDKClient.cpp.

◆ ReconnectingToCore()

ClientReturnCode ReconnectingToCore ( int32_t  p_ReconnectionTime = 0,
int32_t  p_ReconnectionAttempts = 0 
)
protectedvirtual

It is called when the sdk is disconnected from Core and the user select one of the options to reconnect.

Definition at line 954 of file SDKClient.cpp.

◆ RegisterAllCallbacks()

ClientReturnCode RegisterAllCallbacks ( )
protectedvirtual

Used to register the callbacks between sdk and core. Callbacks that are registered functions that get called when a certain 'event' happens, such as data coming in from Manus Core. All of these are optional, but depending on what data you require you may or may not need all of them.

Definition at line 433 of file SDKClient.cpp.

◆ RemoveIndexFromTemporarySkeletonList()

void RemoveIndexFromTemporarySkeletonList ( uint32_t  p_Idx)
protected

Definition at line 2546 of file SDKClient.cpp.

◆ RestartSDK()

ClientReturnCode RestartSDK ( )
protectedvirtual

Used to restart and initialize the SDK to make sure a new connection can be set up. This function is used by the client to shutdown the SDK and any connections it has. After that it reinitializes the SDK so that it is ready to connect to a new Manus Core.

Definition at line 411 of file SDKClient.cpp.

◆ RoundFloatValue()

float RoundFloatValue ( float  p_Value,
int  p_NumDecimalsToKeep 
)

Round the given float value so that it has no more than the given number of decimals.

Definition at line 331 of file SDKClient.cpp.

◆ Run()

The main SDKClient loop. This is a simple state machine which switches between different substates.

Definition at line 62 of file SDKClient.cpp.

◆ SaveTemporarySkeletonToFile()

void SaveTemporarySkeletonToFile ( )
protected

Definition at line 2347 of file SDKClient.cpp.

◆ SetupHandChains()

bool SetupHandChains ( uint32_t  p_SklIndex)
protected

This function sets up some basic hand chains. Chains are required for a Skeleton to be able to be animated, it basically tells Manus Core which nodes belong to which body part and what data needs to be applied to which node.

Parameters
p_SklIndexThe index of the temporary skeleton on which the chains will be added.
Returns
Returns true if everything went fine, otherwise returns false.

Definition at line 1825 of file SDKClient.cpp.

◆ SetupHandNodes()

bool SetupHandNodes ( uint32_t  p_SklIndex)
protected

This support function sets up the nodes for the skeleton hand In order to have any 3d positional/rotational information from the gloves or body, one needs to setup the skeleton on which this data should be applied. In the case of this sample we create a Hand skeleton for which we want to get the calculated result. The ID's for the nodes set here are the same IDs which are used in the OnSkeletonStreamCallback, this allows us to create the link between Manus Core's data and the data we enter here.

Definition at line 1748 of file SDKClient.cpp.

◆ ShutDown()

ClientReturnCode ShutDown ( )

When you are done with the SDK, don't forget to nicely shut it down this will close all connections to the host, close any threads and clean up after itself after this is called it is expected to exit the client program. If not it needs to call initialize again.

Definition at line 152 of file SDKClient.cpp.

◆ TestTimestamp()

void TestTimestamp ( )
protected

Definition at line 2525 of file SDKClient.cpp.

◆ UnloadTestSkeleton()

void UnloadTestSkeleton ( )
protected

This support function is used to unload a skeleton from Core.

Definition at line 1961 of file SDKClient.cpp.

◆ UpdateBeforeDisplayingData()

ClientReturnCode UpdateBeforeDisplayingData ( )
protectedvirtual

Some things happen before every display update, no matter what state. They happen here, such as the updating of the landscape and the generated tracker.

Returns

Definition at line 717 of file SDKClient.cpp.

Member Data Documentation

◆ m_AvailableHosts

std::unique_ptr<ManusHost[]> m_AvailableHosts = nullptr
protected

Definition at line 204 of file SDKClient.hpp.

◆ m_ChainType

ChainType m_ChainType = ChainType::ChainType_Invalid
protected

Definition at line 233 of file SDKClient.hpp.

◆ m_ClientType

SessionType m_ClientType = SessionType::SessionType_CoreSDK
protected

Definition at line 185 of file SDKClient.hpp.

◆ m_ConsoleClearTickCount

uint32_t m_ConsoleClearTickCount = 0
protected

Definition at line 179 of file SDKClient.hpp.

◆ m_ConsoleCurrentOffset

int m_ConsoleCurrentOffset = 0
protected

Definition at line 183 of file SDKClient.hpp.

◆ m_ConsoleHeight

const short int m_ConsoleHeight = 44
protected

Definition at line 181 of file SDKClient.hpp.

◆ m_ConsoleScrollback

const short int m_ConsoleScrollback = 500
protected

Definition at line 182 of file SDKClient.hpp.

◆ m_ConsoleWidth

const short int m_ConsoleWidth = 220
protected

Definition at line 180 of file SDKClient.hpp.

◆ m_CurrentInteraction

std::function<ClientReturnCode()> m_CurrentInteraction = nullptr
protected

Definition at line 190 of file SDKClient.hpp.

◆ m_ErgoTimestampInfo

ManusTimestampInfo m_ErgoTimestampInfo
protected

Definition at line 229 of file SDKClient.hpp.

◆ m_FirstLeftGloveID

uint32_t m_FirstLeftGloveID = 0
protected

Definition at line 243 of file SDKClient.hpp.

◆ m_FirstRightGloveID

uint32_t m_FirstRightGloveID = 0
protected

Definition at line 244 of file SDKClient.hpp.

◆ m_Host

std::unique_ptr<ManusHost> m_Host
protected

Definition at line 205 of file SDKClient.hpp.

◆ m_HostToConnectTo

uint32_t m_HostToConnectTo = 0
protected

Definition at line 196 of file SDKClient.hpp.

◆ m_Landscape

Landscape* m_Landscape = nullptr
protected

Definition at line 241 of file SDKClient.hpp.

◆ m_LandscapeMutex

std::mutex m_LandscapeMutex
protected

Definition at line 239 of file SDKClient.hpp.

◆ m_LastTemporarySkeletonUpdate

std::chrono::time_point<std::chrono::high_resolution_clock> m_LastTemporarySkeletonUpdate = std::chrono::high_resolution_clock::now()
protected

Definition at line 222 of file SDKClient.hpp.

◆ m_LeftGloveErgoData

ErgonomicsData m_LeftGloveErgoData
protected

Definition at line 230 of file SDKClient.hpp.

◆ m_LoadedSkeletons

std::vector<uint32_t> m_LoadedSkeletons
protected

Definition at line 212 of file SDKClient.hpp.

◆ m_MaxReconnectionAttempts

int32_t m_MaxReconnectionAttempts = 10
protected

Definition at line 201 of file SDKClient.hpp.

◆ m_ModifiedSkeletonIndex

uint32_t m_ModifiedSkeletonIndex = UINT_MAX
protected

Definition at line 227 of file SDKClient.hpp.

◆ m_NewLandscape

Landscape* m_NewLandscape = nullptr
protected

Definition at line 240 of file SDKClient.hpp.

◆ m_NextSkeleton

ClientSkeletonCollection* m_NextSkeleton = nullptr
protected

Definition at line 217 of file SDKClient.hpp.

◆ m_NumberOfHostsFound

uint32_t m_NumberOfHostsFound = 0
protected

Definition at line 197 of file SDKClient.hpp.

◆ m_PreviousState

ClientState m_PreviousState = m_State
protected

Definition at line 188 of file SDKClient.hpp.

◆ m_RequestedExit

bool m_RequestedExit = false
protected

Definition at line 176 of file SDKClient.hpp.

◆ m_RightGloveErgoData

ErgonomicsData m_RightGloveErgoData
protected

Definition at line 231 of file SDKClient.hpp.

◆ m_RumblingWrist

bool m_RumblingWrist[NUMBER_OF_HANDS_SUPPORTED] = { false, false }
protected

Definition at line 210 of file SDKClient.hpp.

◆ m_SecondsToAttemptReconnecting

int32_t m_SecondsToAttemptReconnecting = 60
protected

Definition at line 200 of file SDKClient.hpp.

◆ m_SecondsToFindHosts

uint32_t m_SecondsToFindHosts = 2
protected

Definition at line 198 of file SDKClient.hpp.

◆ m_SessionId

uint32_t m_SessionId = 0
protected

Definition at line 208 of file SDKClient.hpp.

◆ m_ShouldConnectGRPC

bool m_ShouldConnectGRPC = true
protected

Definition at line 194 of file SDKClient.hpp.

◆ m_ShouldConnectLocally

bool m_ShouldConnectLocally = true
protected

Definition at line 193 of file SDKClient.hpp.

◆ m_Skeleton

ClientSkeletonCollection* m_Skeleton = nullptr
protected

Definition at line 218 of file SDKClient.hpp.

◆ m_SkeletonMutex

std::mutex m_SkeletonMutex
protected

Definition at line 215 of file SDKClient.hpp.

◆ m_SleepBetweenReconnectingAttemptsInMs

uint32_t m_SleepBetweenReconnectingAttemptsInMs = 100
protected

Definition at line 202 of file SDKClient.hpp.

◆ m_State

ClientState m_State = ClientState::ClientState_PickingConnectionType
protected

Definition at line 187 of file SDKClient.hpp.

◆ m_SystemMessage

std::string m_SystemMessage = ""
protected

Definition at line 225 of file SDKClient.hpp.

◆ m_SystemMessageCode

SystemMessageType m_SystemMessageCode = SystemMessageType::SystemMessageType_Unknown
protected

Definition at line 226 of file SDKClient.hpp.

◆ m_SystemMessageMutex

std::mutex m_SystemMessageMutex
protected

Definition at line 224 of file SDKClient.hpp.

◆ m_TemporarySkeletons

std::vector<uint32_t> m_TemporarySkeletons
protected

Definition at line 213 of file SDKClient.hpp.

◆ m_TimeSinceLastDisconnect

std::chrono::time_point<std::chrono::high_resolution_clock> m_TimeSinceLastDisconnect
protected

Definition at line 221 of file SDKClient.hpp.

◆ m_TrackerDataDisplayPerUser

bool m_TrackerDataDisplayPerUser = false
protected

Definition at line 236 of file SDKClient.hpp.

◆ m_TrackerOffset

float m_TrackerOffset = 0.0f
protected

Definition at line 237 of file SDKClient.hpp.

◆ m_TrackerTest

bool m_TrackerTest = false
protected

Definition at line 235 of file SDKClient.hpp.

◆ s_Instance

SDKClient * s_Instance = nullptr
staticprotected

Definition at line 174 of file SDKClient.hpp.

Enumeration Type Documentation

◆ ClientReturnCode

enum class ClientReturnCode : int
strong

Values that can be returned by this application.

Enumerator
ClientReturnCode_Success 
ClientReturnCode_FailedPlatformSpecificInitialization 
ClientReturnCode_FailedToResizeWindow 
ClientReturnCode_FailedToInitialize 
ClientReturnCode_FailedToFindHosts 
ClientReturnCode_FailedToConnect 
ClientReturnCode_UnrecognizedStateEncountered 
ClientReturnCode_FailedToShutDownSDK 
ClientReturnCode_FailedPlatformSpecificShutdown 
ClientReturnCode_FailedToRestart 
ClientReturnCode_FailedWrongTimeToGetData 
ClientReturnCode_MAX_CLIENT_RETURN_CODE_SIZE 
ClientReturnCode_Success 
ClientReturnCode_FailedPlatformSpecificInitialization 
ClientReturnCode_FailedToResizeWindow 
ClientReturnCode_FailedToInitialize 
ClientReturnCode_FailedToFindHosts 
ClientReturnCode_FailedToConnect 
ClientReturnCode_UnrecognizedStateEncountered 
ClientReturnCode_FailedToShutDownSDK 
ClientReturnCode_FailedPlatformSpecificShutdown 
ClientReturnCode_FailedToRestart 
ClientReturnCode_FailedWrongTimeToGetData 
ClientReturnCode_MAX_CLIENT_RETURN_CODE_SIZE 

Definition at line 46 of file SDKClient.hpp.

◆ ClientState

enum class ClientState : int
strong

The current state of the client.

Enumerator
ClientState_PickingConnectionType 
ClientState_LookingForHosts 
ClientState_NoHostsFound 
ClientState_PickingHost 
ClientState_ConnectingToCore 
ClientState_DisplayingData 
ClientState_Disconnected 
ClientState_MAX_CLIENT_STATE_SIZE 

Definition at line 32 of file SDKClient.hpp.

◆ MicrosoftVirtualKeyCodes

Enumerator
VK_TAB 
VK_RETURN 
VK_ESCAPE 
VK_DOWN 
VK_UP 
VK_LEFT 
VK_RIGHT 
VK_HOME 
VK_BACK 
VK_F1 
VK_F2 
VK_F3 
VK_F4 
VK_F5 
VK_F6 
VK_F7 
VK_F8 
VK_F9 
VK_F10 
VK_F11 
VK_F12 
VK_DELETE 
VK_INSERT 
VK_NEXT 
VK_PRIOR 
VK_END 

Definition at line 13 of file ClientPlatformSpecificTypes.hpp.

Variable Documentation

◆ MILLISECONDS_BETWEEN_TEMPORARY_SKELETONS_UPDATE

constexpr unsigned long long int MILLISECONDS_BETWEEN_TEMPORARY_SKELETONS_UPDATE = 1000
constexpr

Constant expression used to define the time between two updates of the temporary skeleton count printing.

Definition at line 29 of file SDKClient.hpp.

◆ MINIMUM_MILLISECONDS_BETWEEN_HAPTICS_COMMANDS

constexpr unsigned long long int MINIMUM_MILLISECONDS_BETWEEN_HAPTICS_COMMANDS = 20
constexpr

Constant expression used to define the time between two possible haptics commands sent.

Definition at line 26 of file SDKClient.hpp.

◆ NUMBER_OF_HANDS_SUPPORTED

constexpr unsigned int NUMBER_OF_HANDS_SUPPORTED = 2
constexpr

Constant expression: number of hands supported by demo.

Definition at line 23 of file SDKClient.hpp.