Hermes SDK Documentation
Functions
HermesSDK.h File Reference
#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.

Functions

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::PipelineHermesSDK::GetActivePipeline ()
 
bool HermesSDK::SetPipeline (Hermes::Protocol::Pipeline *_pipeline)
 
std::map< std::string, std::string > HermesSDK::GetFoundHosts ()
 
LeafInfo HermesSDK::GetLeafInfo (Hermes::Protocol::Hardware::DeviceLeaf &leaf)
 

Function Documentation

◆ ConnectLocal()

void HermesSDK::ConnectLocal ( const std::string &  _clientName,
const std::string &  _clientInfo,
HermesSDK::filterSetupCallback _onFilterSetup,
HermesSDK::deviceDataCallback _onDeviceData,
HermesSDK::deviceLandscapeCallback _onDeviceLandscape,
HermesSDK::errorMessageCallback _onError 
)

Connect to a Hermes host running on this local pc.

Parameters
_clientNameThe client name that will be advertised to the Hermes host
_clientInfoThe client description that will be advertised to the Hermes host
_onFilterSetupCallback that will be called when setting up the filters
_onDeviceDataCallback that will be called when devicedata is available
_onDeviceLandscapeCallback that will be called when landscape (connected devices) data is available
_onErrorCallback that will be called when there is an error encountered

◆ ConnectNetworkAddress()

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 
)

Connect to a Hermes host running on the network by address.

Parameters
_clientNameThe client name that will be advertised to the Hermes host
_clientInfoThe client description that will be advertised to the Hermes host
_adddressthe address of the host you are connecting to
_onFilterSetupCallback that will be called when setting up the filters
_onDeviceDataCallback that will be called when devicedata is available
_onDeviceLandscapeCallback that will be called when landscape (connected devices) data is available
_onErrorCallback that will be called when there is an error encountered

◆ ConnectNetworkHostName()

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 
)

Connect to a Hermes host running on the network by hostname.

Parameters
_clientNameThe client name that will be advertised to the Hermes host
_clientInfoThe client description that will be advertised to the Hermes host
_hostnamethe hostname of the host you are connecting to
_onFilterSetupCallback that will be called when setting up the filters
_onDeviceDataCallback that will be called when devicedata is available
_onDeviceLandscapeCallback that will be called when landscape (connected devices) data is available
_onErrorCallback that will be called when there is an error encountered

◆ FindNetworkHosts()

void HermesSDK::FindNetworkHosts ( HermesSDK::filterSetupCallback _onFilterSetup,
HermesSDK::deviceDataCallback _onDeviceData,
HermesSDK::deviceLandscapeCallback _onDeviceLandscape,
HermesSDK::errorMessageCallback _onError 
)

find hermes hosts connected to the network (please check your firewall to not block anything

Parameters
_onFilterSetupCallback that will be called when setting up the filters
_onDeviceDataCallback that will be called when devicedata is available
_onDeviceLandscapeCallback that will be called when landscape (connected devices) data is available
_onErrorCallback that will be called when there is an error encountered

◆ GetActivePipeline()

Hermes::Protocol::Pipeline * HermesSDK::GetActivePipeline ( )

Gets the currently active filter pipeline.

Returns
A pointer to a Pipeline object detailing the pipeline that is currently active.

◆ GetFilterInventory()

bool HermesSDK::GetFilterInventory ( Hermes::Protocol::FilterInventory _inventory)

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
_inventoryInventory to fill with all available filters
Returns
True on a succesful fetch, or false otherwise.

◆ GetLeafInfo()

LeafInfo HermesSDK::GetLeafInfo ( Hermes::Protocol::Hardware::DeviceLeaf leaf)

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
DeviceLeafref 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()

bool HermesSDK::SetPipeline ( Hermes::Protocol::Pipeline _pipeline)

Sets the currently active pipeline.

Parameters
_pipelinePointer to a Pipeline object to commit.
Returns
True on a successful commit, or false otherwise

◆ Stop()

void HermesSDK::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
_dongleIdThe id of the haptics dongle to send the data to.
_handTypeLeft, right, or unknown (which will send data to both hands)
_powersAn 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
_deviceIdThe device id of the glove to rumble
_unitStrengthStrength of the rumble, from 0.0 to 1.0
_durationInMillisecondsDuration to rumble the glove for
Returns
True on a successful send, or false otherwise.