Hermes SDK Documentation
CoreSdkWrapper.h
1 #ifndef H_CORESDKWRAPPER
2 #define H_CORESDKWRAPPER
3 
4 // Set up a Doxygen group.
9 #ifdef __cplusplus
10 extern "C"
11 {
12 #endif
13 
14 #include "CoreSdkWrapperTypes.h"
15 
16 #include <stdint.h>
17 
18 #ifdef _WIN32
19  // CORESDKWRAPPER_EXPORTS defines if the functions are exported to or
20  // imported from a DLL.
21  #ifdef CORESDKWRAPPER_EXPORTS
22  #define CORESDK_API __declspec(dllexport)
23  #else
24  #define CORESDK_API __declspec(dllimport)
25  #endif
26 #elif defined(__linux__)
27  #define CORESDK_API
28 #else
29  #error Unrecognised platform.
30 #endif
31 
32 /******************************************************************************
33  * Wrapper startup and shutdown.
34  *****************************************************************************/
35 
40 
41 /******************************************************************************
42  * Utility functions.
43  *****************************************************************************/
44 
46 CORESDK_API WrapperReturnCode_t CoreSdk_WasDllBuiltInDebugConfiguration(bool& a_WasBuiltInDebugConfiguration);
47 
48 /******************************************************************************
49  * Connection handling.
50  *****************************************************************************/
51 
64 CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailableHostsFound(uint32_t& a_NumberOfAvailableHostsFound);
69 CORESDK_API WrapperReturnCode_t CoreSdk_GetAvailableHostsFound(ManusHost* a_AvailableHostsFound, const uint32_t a_NumberOfHostsThatFitInArray);
70 CORESDK_API WrapperReturnCode_t CoreSdk_GetIsConnectedToCore(bool& a_ConnectedToCore);
71 
76 
78 CORESDK_API WrapperReturnCode_t CoreSdk_WasConnectionLostDueToTimeout(bool& a_WasConnectionLost);
79 CORESDK_API WrapperReturnCode_t CoreSdk_GetVersionsAndCheckCompatibility(ManusVersion& a_WrapperVersion, ManusVersion& a_SdkVersion, ManusVersion& a_CoreVersion, bool& a_AreVersionsCompatible);
80 
81 // Callbacks
82 CORESDK_API WrapperReturnCode_t CoreSdk_RegisterCallbackForOnConnect(ConnectedToCoreCallback_t a_ConnectedCallback);
83 CORESDK_API WrapperReturnCode_t CoreSdk_RegisterCallbackForOnDisconnect(DisconnectedFromCoreCallback_t a_DisconnectedCallback);
84 
85 /******************************************************************************
86  * Basic glove interaction.
87  *****************************************************************************/
88 
90 CORESDK_API WrapperReturnCode_t CoreSdk_VibrateWristOfGlove(uint32_t a_GloveId, float a_UnitStrength, uint16_t a_DurationInMilliseconds);
92 CORESDK_API WrapperReturnCode_t CoreSdk_VibrateFingers(uint32_t a_DongleId, HandType a_HandType, const float* a_Powers);
93 
101 CORESDK_API WrapperReturnCode_t CoreSdk_GetGloveIdOfUser_UsingUserIndex(uint32_t a_UserIndex, HandType a_HandType, uint32_t& a_GloveId);
103 CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailableGloves(uint32_t& a_NumberOfAvailableGloves);
108 CORESDK_API WrapperReturnCode_t CoreSdk_GetIdsOfAvailableGloves(uint32_t* a_IdsOfAvailableGloves, uint32_t a_NumberOfIdsThatFitInArray);
110 CORESDK_API WrapperReturnCode_t CoreSdk_GetHandTypeOfGlove(uint32_t a_GloveId, HandType& a_HandType);
112 CORESDK_API WrapperReturnCode_t CoreSdk_GetIdOfFirstAvailableGloveOfType(HandType a_HandType, uint32_t& a_GloveId);
113 
115 CORESDK_API WrapperReturnCode_t CoreSdk_GetDataForGlove_UsingGloveId(uint32_t a_GloveId, GloveData& a_GloveData);
118 
119 /******************************************************************************
120  * Haptics module.
121  *****************************************************************************/
122 
124 CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfHapticsDongles(uint32_t& a_NumberOfHapticsDongles);
130 CORESDK_API WrapperReturnCode_t CoreSdk_GetHapticsDongleIds(uint32_t* a_HapticsDongleIds, uint32_t a_NumberOfIdsThatFitInArray);
131 
132 /******************************************************************************
133  * Polygon.
134  *****************************************************************************/
135 
137 CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailablePolygonUsers(uint32_t& a_NumberOfAvailableUsers);
143 CORESDK_API WrapperReturnCode_t CoreSdk_GetIdsOfAvailablePolygonUsers(int32_t* a_IdsOfAvailablePolygonUsers, uint32_t a_NumberOfIdsThatFitInArray);
144 
150 CORESDK_API WrapperReturnCode_t CoreSdk_SetPolygonSkeletonTarget(const PolygonTargetArgs& a_SetSkeletonTargetArgs);
154 CORESDK_API WrapperReturnCode_t CoreSdk_IsPolygonSkeletonIdValid(uint32_t a_PolygonSkeletonId, bool& a_IsValid);
156 CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailablePolygonSkeletons(uint32_t& a_NumberOfAvailablePolygonSkeletons);
162 CORESDK_API WrapperReturnCode_t CoreSdk_GetIdsOfAvailablePolygonSkeletons(uint32_t* a_IdsOfAvailablePolygonSkeletons, uint32_t a_NumberOfIdsThatFitInArray);
164 CORESDK_API WrapperReturnCode_t CoreSdk_GetIdOfFirstAvailablePolygonSkeleton(uint32_t& a_PolygonSkeletonId);
166 CORESDK_API WrapperReturnCode_t CoreSdk_GetDataForPolygonSkeleton(uint32_t a_PolygonSkeletonId, PolygonSkeletonData& a_PolygonSkeletonData);
167 
168 /******************************************************************************
169  * Users.
170  *****************************************************************************/
172 CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfUsers(uint32_t& a_NumberOfUsers);
173 
174 /******************************************************************************
175  * Tracking.
176  *****************************************************************************/
177 
179 CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailableTrackers(uint32_t& a_NumberOfAvailableTrackers);
184 CORESDK_API WrapperReturnCode_t CoreSdk_GetIdsOfAvailableTrackers(TrackerId* a_IdsOfAvailableTrackers, uint32_t a_NumberOfIdsThatFitInArray);
185 
187 CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailableTrackersForUserIndex(uint32_t& a_NumberOfAvailableTrackers, uint32_t a_UserIndex);
188 
193 CORESDK_API WrapperReturnCode_t CoreSdk_GetIdsOfAvailableTrackersForUserIndex(TrackerId* a_IdsOfAvailableTrackers, uint32_t a_UserIndex, uint32_t a_NumberOfIdsThatFitInArray);
194 
198 CORESDK_API WrapperReturnCode_t CoreSdk_GetDataForTracker_UsingIndexAndType(uint32_t a_UserIndex, uint32_t a_TrackerType, TrackerData& a_TrackerData);
200 CORESDK_API WrapperReturnCode_t CoreSdk_SendDataForTrackers(const TrackerData* a_TrackerData, uint32_t a_NumberOfTrackers);
201 
202 #ifdef __cplusplus
203 } // extern "C"
204 #endif
205 
206 // Close the Doxygen group.
209 #endif // #ifndef H_CORESDKWRAPPER
WrapperReturnCode_t
uint32_t WrapperReturnCode_t
The type used for the return values of SDK wrapper functions.
Definition: CoreSdkWrapperTypes.h:148
CoreSdk_GetNumberOfHapticsDongles
CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfHapticsDongles(uint32_t &a_NumberOfHapticsDongles)
Get the number of available haptics dongles.
CoreSdk_GetAvailableHostsFound
CORESDK_API WrapperReturnCode_t CoreSdk_GetAvailableHostsFound(ManusHost *a_AvailableHostsFound, const uint32_t a_NumberOfHostsThatFitInArray)
Fill the given array with information on the hosts that were found.
CoreSdk_GetHandTypeOfGlove
CORESDK_API WrapperReturnCode_t CoreSdk_GetHandTypeOfGlove(uint32_t a_GloveId, HandType &a_HandType)
Get the hand type of the glove with the given glove ID.
CoreSdk_StartLookingForHosts
CORESDK_API WrapperReturnCode_t CoreSdk_StartLookingForHosts(void)
Start a background task that looks for hosts running Manus Core.
CoreSdk_GetDataForPolygonSkeleton
CORESDK_API WrapperReturnCode_t CoreSdk_GetDataForPolygonSkeleton(uint32_t a_PolygonSkeletonId, PolygonSkeletonData &a_PolygonSkeletonData)
Get data for the given Polygon skeleton ID.
ManusVersion
Stores a single version string.
Definition: CoreSdkWrapperTypes.h:311
CoreSdk_GetDataForGlove_UsingGloveId
CORESDK_API WrapperReturnCode_t CoreSdk_GetDataForGlove_UsingGloveId(uint32_t a_GloveId, GloveData &a_GloveData)
Get data for the glove with the given glove ID.
CoreSdk_SendDataForTrackers
CORESDK_API WrapperReturnCode_t CoreSdk_SendDataForTrackers(const TrackerData *a_TrackerData, uint32_t a_NumberOfTrackers)
Send data to Core for a tracker.
CoreSdk_GetNumberOfAvailablePolygonUsers
CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailablePolygonUsers(uint32_t &a_NumberOfAvailableUsers)
Get the number of available Polygon users.
CoreSdk_RemovePolygonSkeleton
CORESDK_API WrapperReturnCode_t CoreSdk_RemovePolygonSkeleton(const RemoveSkeletonArgs &a_RemoveSkeletonArgs)
Remove the skeleton described by the arguments.
GloveData
All data for a single glove.
Definition: CoreSdkWrapperTypes.h:409
CoreSdk_ShutDown
CORESDK_API WrapperReturnCode_t CoreSdk_ShutDown(void)
Shut down the wrapper. This needs to be called last.
CoreSdk_GetNumberOfUsers
CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfUsers(uint32_t &a_NumberOfUsers)
Get number of users. (that were created in the dashboard)
CoreSdk_GetIdOfFirstAvailablePolygonSkeleton
CORESDK_API WrapperReturnCode_t CoreSdk_GetIdOfFirstAvailablePolygonSkeleton(uint32_t &a_PolygonSkeletonId)
Get the ID of the first Polygon skeleton available.
CoreSdk_GetIdsOfAvailablePolygonUsers
CORESDK_API WrapperReturnCode_t CoreSdk_GetIdsOfAvailablePolygonUsers(int32_t *a_IdsOfAvailablePolygonUsers, uint32_t a_NumberOfIdsThatFitInArray)
Fill the given array with the IDs of all available Polygon users.
CoreSdk_IsPolygonSkeletonIdValid
CORESDK_API WrapperReturnCode_t CoreSdk_IsPolygonSkeletonIdValid(uint32_t a_PolygonSkeletonId, bool &a_IsValid)
Check if the given Polygon skeleton ID is valid.
HandType
HandType
Used to tell what hand is being referred to.
Definition: CoreSdkWrapperTypes.h:152
CoreSdk_WasDllBuiltInDebugConfiguration
CORESDK_API WrapperReturnCode_t CoreSdk_WasDllBuiltInDebugConfiguration(bool &a_WasBuiltInDebugConfiguration)
Check if the wrapper DLL was built in the debug configuration.
CoreSdk_ConnectToHost
CORESDK_API WrapperReturnCode_t CoreSdk_ConnectToHost(ManusHost a_Host)
Connect to a host using the given host information.
CoreSdk_GetIdsOfAvailablePolygonSkeletons
CORESDK_API WrapperReturnCode_t CoreSdk_GetIdsOfAvailablePolygonSkeletons(uint32_t *a_IdsOfAvailablePolygonSkeletons, uint32_t a_NumberOfIdsThatFitInArray)
Fill the given array with the IDs of available Polygon skeletons.
ClientType
ClientType
Used to tell what client is using the wrapper.
Definition: CoreSdkWrapperTypes.h:169
CoreSdk_GetDataForGlove_UsingHandType
CORESDK_API WrapperReturnCode_t CoreSdk_GetDataForGlove_UsingHandType(HandType a_HandType, GloveData &a_GloveData)
Get data for the first available glove with the given hand type.
TrackerData
All the tracker data that can be sent or received.
Definition: CoreSdkWrapperTypes.h:588
ManusHost
Contains information for connecting to a host running Manus Core.
Definition: CoreSdkWrapperTypes.h:615
CoreSdk_GetDataForTracker_UsingTrackerId
CORESDK_API WrapperReturnCode_t CoreSdk_GetDataForTracker_UsingTrackerId(TrackerId a_TrackerId, TrackerData &a_TrackerData)
Get data for the tracker with the given tracker ID.
CoreSdk_GetDataForTracker_UsingIndexAndType
CORESDK_API WrapperReturnCode_t CoreSdk_GetDataForTracker_UsingIndexAndType(uint32_t a_UserIndex, uint32_t a_TrackerType, TrackerData &a_TrackerData)
Get data for the tracker with the given Polygon user index and type.
PolygonTargetArgs
Contains everything needed to set a Polygon target.
Definition: CoreSdkWrapperTypes.h:532
CoreSdk_GetNumberOfAvailablePolygonSkeletons
CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailablePolygonSkeletons(uint32_t &a_NumberOfAvailablePolygonSkeletons)
Get the number of available Polygon skeletons.
CoreSdk_GetNumberOfAvailableTrackersForUserIndex
CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailableTrackersForUserIndex(uint32_t &a_NumberOfAvailableTrackers, uint32_t a_UserIndex)
Get the number of available trackers in a user.
RemoveSkeletonArgs
Data required for the removal of a skeleton.
Definition: CoreSdkWrapperTypes.h:572
CoreSdk_GetIdsOfAvailableTrackersForUserIndex
CORESDK_API WrapperReturnCode_t CoreSdk_GetIdsOfAvailableTrackersForUserIndex(TrackerId *a_IdsOfAvailableTrackers, uint32_t a_UserIndex, uint32_t a_NumberOfIdsThatFitInArray)
Fill the given array with the IDs of available trackers in a user.
CoreSdk_GetGloveIdOfUser_UsingUserIndex
CORESDK_API WrapperReturnCode_t CoreSdk_GetGloveIdOfUser_UsingUserIndex(uint32_t a_UserIndex, HandType a_HandType, uint32_t &a_GloveId)
Get a glove ID for the given hand of the given Polygon user.
CoreSdk_AddOrUpdatePolygonSkeleton
CORESDK_API WrapperReturnCode_t CoreSdk_AddOrUpdatePolygonSkeleton(const PolygonSkeletonData &a_PolygonSkeletonData)
Send skeleton data to Core. If new, the skeleton will be added.
CoreSdk_Initialise
CORESDK_API WrapperReturnCode_t CoreSdk_Initialise(ClientType a_TypeOfClient)
Initialise the wrapper. Call this before using the wrapper.
CoreSdk_GetNumberOfAvailableTrackers
CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailableTrackers(uint32_t &a_NumberOfAvailableTrackers)
Get the number of available trackers.
CoreSdk_StopLookingForHosts
CORESDK_API WrapperReturnCode_t CoreSdk_StopLookingForHosts(void)
Stop the background task that looks for hosts running Manus Core.
TrackerId
Stores the name of a tracker.
Definition: CoreSdkWrapperTypes.h:582
CoreSdk_GetIdOfFirstAvailableGloveOfType
CORESDK_API WrapperReturnCode_t CoreSdk_GetIdOfFirstAvailableGloveOfType(HandType a_HandType, uint32_t &a_GloveId)
Get the glove ID of the first available glove of the given type.
CoreSdk_SetPolygonSkeletonRetargetingSettings
CORESDK_API WrapperReturnCode_t CoreSdk_SetPolygonSkeletonRetargetingSettings(const RetargetingSettingsArgs &a_RetargetingSettingsArgs)
Set the retargeting settings for the given Polygon skeleton.
CoreSdk_GetHapticsDongleIds
CORESDK_API WrapperReturnCode_t CoreSdk_GetHapticsDongleIds(uint32_t *a_HapticsDongleIds, uint32_t a_NumberOfIdsThatFitInArray)
Fill the given array with the IDs of all available haptics dongles.
CoreSdk_SetPolygonSkeletonTarget
CORESDK_API WrapperReturnCode_t CoreSdk_SetPolygonSkeletonTarget(const PolygonTargetArgs &a_SetSkeletonTargetArgs)
Set the target for the given Polygon skeleton.
CoreSdk_VibrateFingers
CORESDK_API WrapperReturnCode_t CoreSdk_VibrateFingers(uint32_t a_DongleId, HandType a_HandType, const float *a_Powers)
Vibrate the motor on the given finger of a haptic glove.
CoreSdk_WasConnectionLostDueToTimeout
CORESDK_API WrapperReturnCode_t CoreSdk_WasConnectionLostDueToTimeout(bool &a_WasConnectionLost)
Check if the connection to Manus Core was lost due to a timeout.
CoreSdk_GetIdsOfAvailableTrackers
CORESDK_API WrapperReturnCode_t CoreSdk_GetIdsOfAvailableTrackers(TrackerId *a_IdsOfAvailableTrackers, uint32_t a_NumberOfIdsThatFitInArray)
Fill the given array with the IDs of available trackers.
RetargetingSettingsArgs
A wrapper for Polygon retargeting settings.
Definition: CoreSdkWrapperTypes.h:477
CoreSdk_ConnectLocally
CORESDK_API WrapperReturnCode_t CoreSdk_ConnectLocally(void)
Connect to Manus Core on the same device the wrapper is running on.
CoreSdk_GetIdsOfAvailableGloves
CORESDK_API WrapperReturnCode_t CoreSdk_GetIdsOfAvailableGloves(uint32_t *a_IdsOfAvailableGloves, uint32_t a_NumberOfIdsThatFitInArray)
Fill the given array with the IDs of all available gloves.
CoreSdk_GetNumberOfAvailableGloves
CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailableGloves(uint32_t &a_NumberOfAvailableGloves)
Get the number of gloves that are available.
PolygonSkeletonData
All the skeleton data that can be sent to or received from Polygon.
Definition: CoreSdkWrapperTypes.h:539
CoreSdk_VibrateWristOfGlove
CORESDK_API WrapperReturnCode_t CoreSdk_VibrateWristOfGlove(uint32_t a_GloveId, float a_UnitStrength, uint16_t a_DurationInMilliseconds)
Vibrate the motor on the back of the glove.
CoreSdk_GetNumberOfAvailableHostsFound
CORESDK_API WrapperReturnCode_t CoreSdk_GetNumberOfAvailableHostsFound(uint32_t &a_NumberOfAvailableHostsFound)
Get the number of hosts running Manus Core that were found.