#include "HermesCallbackTypes.hpp"
#include "protodefinitions/Landscape.pb.h"
#include "protodefinitions/Devices.pb.h"
#include "protodefinitions/MeshConfig.pb.h"
#include "LeafInfo.h"
Go to the source code of this file.
|
void | HermesSDK::ConnectLocal (const std::string &_clientName, const std::string &_clientInfo, HermesSDK::filterSetupCallback &_onFilterSetup, HermesSDK::deviceDataCallback &_onDeviceData, HermesSDK::deviceLandscapeCallback &_onDeviceLandscape, HermesSDK::errorMessageCallback &_onError) |
|
void | HermesSDK::FindNetworkHosts (HermesSDK::filterSetupCallback &_onFilterSetup, HermesSDK::deviceDataCallback &_onDeviceData, HermesSDK::deviceLandscapeCallback &_onDeviceLandscape, HermesSDK::errorMessageCallback &_onError) |
|
void | HermesSDK::ConnectNetworkHostName (const std::string &_clientName, const std::string &_clientInfo, const std::string &_hostName, HermesSDK::filterSetupCallback &_onFilterSetup, HermesSDK::deviceDataCallback &_onDeviceData, HermesSDK::deviceLandscapeCallback &_onDeviceLandscape, HermesSDK::errorMessageCallback &_onError) |
|
void | HermesSDK::ConnectNetworkAddress (const std::string &_clientName, const std::string &_clientInfo, const std::string &_address, HermesSDK::filterSetupCallback &_onFilterSetup, HermesSDK::deviceDataCallback &_onDeviceData, HermesSDK::deviceLandscapeCallback &_onDeviceLandscape, HermesSDK::errorMessageCallback &_onError) |
|
bool | HermesSDK::VibrateWrist (uint32_t _deviceId, float _unitStrength, uint16_t _durationInMilliseconds) |
|
bool | HermesSDK::VibrateFingers (uint32_t _dongleId, Hermes::Protocol::HandType _handType, const std::array< float, 5 > &_powers) |
|
void | HermesSDK::Stop () |
|
bool | HermesSDK::IsRunning () |
|
bool | HermesSDK::GetFilterInventory (Hermes::Protocol::FilterInventory &_inventory) |
|
Hermes::Protocol::Pipeline * | HermesSDK::GetActivePipeline () |
|
bool | HermesSDK::SetPipeline (Hermes::Protocol::Pipeline *_pipeline) |
|
std::map< std::string, std::string > | HermesSDK::GetFoundHosts () |
|
LeafInfo | HermesSDK::GetLeafInfo (Hermes::Protocol::Hardware::DeviceLeaf &leaf) |
|
◆ ConnectLocal()
Connect to a Hermes host running on this local pc.
- Parameters
-
_clientName | The client name that will be advertised to the Hermes host |
_clientInfo | The client description that will be advertised to the Hermes host |
_onFilterSetup | Callback that will be called when setting up the filters |
_onDeviceData | Callback that will be called when devicedata is available |
_onDeviceLandscape | Callback that will be called when landscape (connected devices) data is available |
_onError | Callback that will be called when there is an error encountered |
◆ ConnectNetworkAddress()
Connect to a Hermes host running on the network by address.
- Parameters
-
_clientName | The client name that will be advertised to the Hermes host |
_clientInfo | The client description that will be advertised to the Hermes host |
_adddress | the address of the host you are connecting to |
_onFilterSetup | Callback that will be called when setting up the filters |
_onDeviceData | Callback that will be called when devicedata is available |
_onDeviceLandscape | Callback that will be called when landscape (connected devices) data is available |
_onError | Callback that will be called when there is an error encountered |
◆ ConnectNetworkHostName()
Connect to a Hermes host running on the network by hostname.
- Parameters
-
_clientName | The client name that will be advertised to the Hermes host |
_clientInfo | The client description that will be advertised to the Hermes host |
_hostname | the hostname of the host you are connecting to |
_onFilterSetup | Callback that will be called when setting up the filters |
_onDeviceData | Callback that will be called when devicedata is available |
_onDeviceLandscape | Callback that will be called when landscape (connected devices) data is available |
_onError | Callback that will be called when there is an error encountered |
◆ FindNetworkHosts()
find hermes hosts connected to the network (please check your firewall to not block anything
- Parameters
-
_onFilterSetup | Callback that will be called when setting up the filters |
_onDeviceData | Callback that will be called when devicedata is available |
_onDeviceLandscape | Callback that will be called when landscape (connected devices) data is available |
_onError | Callback that will be called when there is an error encountered |
◆ GetActivePipeline()
Gets the currently active filter pipeline.
- Returns
- A pointer to a Pipeline object detailing the pipeline that is currently active.
◆ GetFilterInventory()
Gets the list of available filters to apply. This is the list of filters currently available to Hermes, filled in to the provided inventory. From here you can add them to your filter pipeline by name.
- Parameters
-
_inventory | Inventory to fill with all available filters |
- Returns
- True on a succesful fetch, or false otherwise.
◆ GetLeafInfo()
Support function to get a generalized LeafInfo of the leaf. to prevent having to check which type of leaf it is, if you just want its basic info like battery percentage, name, etc etc. (see LeafInfo for more details) The Leaf represents a type of glove, like the PrimeOne, PrimeTwo, Haptics or Appololegacy.
- Parameters
-
DeviceLeaf | ref that we want to generalize |
- Returns
- LeafInfo instance.
◆ IsRunning()
bool HermesSDK::IsRunning |
( |
| ) |
|
Gets the current running state of the SDK (CareTaker)
- Returns
- True if the CareTaker is running, false otherwise
◆ SetPipeline()
Sets the currently active pipeline.
- Parameters
-
_pipeline | Pointer to a Pipeline object to commit. |
- Returns
- True on a successful commit, or false otherwise
◆ Stop()
Stops the SDK (Caretaker and Hive) Joins all threads, then logs out of its session with Hermes.
◆ VibrateFingers()
bool HermesSDK::VibrateFingers |
( |
uint32_t |
_dongleId, |
|
|
Hermes::Protocol::HandType |
_handType, |
|
|
const std::array< float, 5 > & |
_powers |
|
) |
| |
Sends haptic data to the specified haptics module Internally, this opens a socket (if one is not open already) to communicate with Hermes for extra responsiveness.
- Parameters
-
_dongleId | The id of the haptics dongle to send the data to. |
_handType | Left, right, or unknown (which will send data to both hands) |
_powers | An array of 5 floats [0.0, 1.0], thumb to pinky, with the strength of vibration for each actuator |
- Returns
- True on a successful send, or false otherwise
◆ VibrateWrist()
bool HermesSDK::VibrateWrist |
( |
uint32_t |
_deviceId, |
|
|
float |
_unitStrength, |
|
|
uint16_t |
_durationInMilliseconds |
|
) |
| |
Sends a rumble command to the specified glove. Note that this is the wrist actuator - Prime Haptics modules use a different interface for more precise feedback.
- Parameters
-
_deviceId | The device id of the glove to rumble |
_unitStrength | Strength of the rumble, from 0.0 to 1.0 |
_durationInMilliseconds | Duration to rumble the glove for |
- Returns
- True on a successful send, or false otherwise.