|
| CareTaker (const std::string &clientName, const std::string &clientInfo, filterSetupCallback &_onFilterSetup, deviceDataCallback &_onDeviceData, deviceLandscapeCallback &_onDeviceLandscape, errorMessageCallback &onError) |
|
void | Connect (const Hermes::Protocol::ServiceRoute &_coordinatorRoute) |
|
void | Stop () |
|
bool | Rumble (uint32_t deviceId, float unitStrength, uint16_t durationInMilliseconds) |
|
bool | SendHapticData (uint32_t _dongleId, Hermes::Protocol::HandType _handType, const std::array< float, 5 > &_powers) |
|
bool | GetFilterInventory (Hermes::Protocol::FilterInventory &inventory) const |
|
Hermes::Protocol::Pipeline * | GetActivePipeline () |
|
bool | SetPipeline (Hermes::Protocol::Pipeline *pipeline) |
|
bool | IsRunning () |
|
◆ CareTaker()
Caretaker constructor.
- 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 |
◆ Connect()
Connects to a Hermes instance using the specificied service route. Logs in, starts a session, and sets up a filter pipeline based on the Filter Pipeline Callback. Then spawns threads to handle incoming device data, incoming landscape data, and keep-alive communication with Hermes.
- Parameters
-
_coordinatorRoute | A ServiceRoute to a Hermes Instance |
◆ 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.
◆ IsRunning()
bool HermesSDK::CareTaker::IsRunning |
( |
| ) |
|
Gets the current running state of the CareTaker
- Returns
- True if the CareTaker is running, false otherwise
◆ Rumble()
bool HermesSDK::CareTaker::Rumble |
( |
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.
◆ SendHapticData()
bool HermesSDK::CareTaker::SendHapticData |
( |
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
◆ 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()
void HermesSDK::CareTaker::Stop |
( |
| ) |
|
Stops caretaker. Joins all threads, then logs out of its session with Hermes.
The documentation for this class was generated from the following files: