Go to the documentation of this file.
16 #include "grpc++/grpc++.h"
17 #include "protodefinitions/Devices.pb.h"
18 #include "protodefinitions/Hermes.pb.h"
19 #include "protodefinitions/Pipeline.pb.h"
20 #include "protodefinitions/Landscape.pb.h"
21 #include "protodefinitions/Session.pb.h"
22 #include "protodefinitions/ParameterSet.pb.h"
23 #include "protodefinitions/Hermes.grpc.pb.h"
35 std::atomic<bool> m_isRunning;
37 void DeviceDataSubscriberThreadFunction();
38 void DeviceLandscapeSubscriberThreadFunction();
39 void HeartbeatThreadFunction();
45 bool initHapticsSocket();
47 static std::vector<uint8_t> Decompress(
const std::vector<uint8_t>& in);
48 static size_t LzfDecompress(
const std::vector<uint8_t> &in, std::vector<uint8_t> &out );
50 std::shared_ptr<grpc::Channel> m_Channel;
51 std::unique_ptr<Hermes::Protocol::Hermes::Stub> m_Stub;
53 const std::string m_clientName;
54 const std::string m_clientDescription;
60 std::unique_ptr<std::thread> m_deviceDataThread;
61 std::unique_ptr<std::thread> m_deviceLandscapeThread;
62 std::unique_ptr<std::thread> m_heartbeatThread;
72 const std::string &clientInfo,
82 bool Rumble(uint32_t deviceId,
float unitStrength, uint16_t durationInMilliseconds );
83 bool SendHapticData(uint32_t _dongleId, Hermes::Protocol::HandType _handType,
const std::array<float, 5>& _powers);
std::function< void(Hermes::Protocol::Pipeline &_pipeline)> filterSetupCallback
Typedef to support callback for filter pipeline data.
Definition: HermesCallbackTypes.hpp:61
std::function< void(const ErrorMessage &msg)> errorMessageCallback
Typedef to support callback for error messages.
Definition: HermesCallbackTypes.hpp:63
Definition: CareTaker.hpp:34
CareTaker(const std::string &clientName, const std::string &clientInfo, filterSetupCallback &_onFilterSetup, deviceDataCallback &_onDeviceData, deviceLandscapeCallback &_onDeviceLandscape, errorMessageCallback &onError)
Definition: CareTaker.cpp:51
bool SendHapticData(uint32_t _dongleId, Hermes::Protocol::HandType _handType, const std::array< float, 5 > &_powers)
Definition: CareTaker.cpp:234
Definition: Pipeline.proto:17
void Stop()
Definition: CareTaker.cpp:136
Definition: Session.proto:48
bool Rumble(uint32_t deviceId, float unitStrength, uint16_t durationInMilliseconds)
Definition: CareTaker.cpp:166
bool GetFilterInventory(Hermes::Protocol::FilterInventory &inventory) const
Definition: CareTaker.cpp:279
bool IsRunning()
Definition: CareTaker.cpp:605
bool SetPipeline(Hermes::Protocol::Pipeline *pipeline)
Definition: CareTaker.cpp:317
Hermes::Protocol::Pipeline * GetActivePipeline()
Definition: CareTaker.cpp:298
std::function< void(const Hermes::Protocol::Devices &_devices)> deviceDataCallback
Typedef to support callback for device data
Definition: HermesCallbackTypes.hpp:57
Definition: Session.proto:10
Definition: Pipeline.proto:23
void Connect(const Hermes::Protocol::ServiceRoute &_coordinatorRoute)
Definition: CareTaker.cpp:92
std::function< void(const Hermes::Protocol::Hardware::DeviceLandscape &_landscape)> deviceLandscapeCallback
Typedef to support callback for landscape (connected devices) data.
Definition: HermesCallbackTypes.hpp:59