Hermes SDK Documentation
LeafInfo.h
1 #ifndef LEAFINFO_HPP_
2 #define LEAFINFO_HPP_
3 
4 #include "protodefinitions/Landscape.pb.h"
5 #include <string>
6 #include "FamilyInfo.h"
7 
8 
11 class LeafInfo
12 {
13 public:
14 
15  enum class DeviceType : int
16  {
17  PrimeOneGlove,
18  PrimeTwoGlove,
19  HapticsModule,
20  ApolloLegacyGlove,
21  Undefined
22  };
23 
25 
27  int BatteryPercentage();
28  DeviceType DeviceOfType();
29  std::string Name();
30  Hermes::Protocol::HandType HandOfType();
31  std::string Description();
32  int TransmissionStrength();
34  std::string FamilyToString();
35  bool HasHaptics();
36 
37 private:
38  int m_batteryPercentage;
39  DeviceType m_deviceType;
40  std::string m_name;
41  Hermes::Protocol::HandType m_handType;
42  std::string m_description;
43  int m_transmissionStrength;
44  FamilyInfo::DeviceFamily m_family;
45 };
46 
47 #endif
Hermes::Protocol::Hardware::DeviceLeaf
Definition: Landscape.proto:18
LeafInfo::FamilyToString
std::string FamilyToString()
returns the current family as a string
Definition: LeafInfo.cpp:77
FamilyInfo::DeviceFamily
DeviceFamily
clone of the original devicefamily fromthe protobuf in landscape.proto
Definition: FamilyInfo.h:16
LeafInfo::BatteryPercentage
int BatteryPercentage()
generic get functions for the data, so that the user is not tempted to set values (set batterypercent...
Definition: LeafInfo.cpp:54
LeafInfo
Definition: LeafInfo.h:12
LeafInfo::Family
FamilyInfo::DeviceFamily Family()
returns the family. this is based on the internal Hermes enum.
Definition: LeafInfo.cpp:68