CommonLibSSE (Parapets fork)
Properties.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace vr
4 {
5  // Refers to a single container of properties
6  using PropertyContainerHandle_t = std::uint64_t;
7  using PropertyTypeTag_t = std::uint32_t;
8 
11 
12  // Use these tags to set/get common types as struct properties
16  static constexpr PropertyTypeTag_t k_unBoolPropertyTag = 4;
18 
23 
25 
28 
29  // Each entry in this enum represents a property that can be retrieved about a
30  // tracked device. Many fields are only valid for one ETrackedDeviceClass.
32  {
34 
35  // general properties that apply to all device classes
48  Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full
72 
73  // Properties that are unique to TrackedDeviceClass_HMD
121 
122  // Properties that are unique to TrackedDeviceClass_Controller
125  Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType
126  Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType
127  Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType
128  Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType
129  Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType
130  Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole
131 
132  // Properties that are unique to TrackedDeviceClass_TrackingReference
140 
141  // Properties that are used for user interface like icons names
142  Prop_IconPathName_String = 5000, // DEPRECATED. Value not referenced. Now expected to be part of icon path properties.
143  Prop_NamedIconPathDeviceOff_String = 5001, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
144  Prop_NamedIconPathDeviceSearching_String = 5002, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
145  Prop_NamedIconPathDeviceSearchingAlert_String = 5003, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
146  Prop_NamedIconPathDeviceReady_String = 5004, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
147  Prop_NamedIconPathDeviceReadyAlert_String = 5005, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
148  Prop_NamedIconPathDeviceNotReady_String = 5006, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
149  Prop_NamedIconPathDeviceStandby_String = 5007, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
150  Prop_NamedIconPathDeviceAlertLow_String = 5008, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
151 
152  // Properties that are used by helpers, but are opaque to applications
155 
156  // Properties that are unique to drivers
164 
165  // Vendors are free to expose private debug data in this reserved region
168  };
169 
170  // No string property will ever be longer than this length
171  static const uint32_t k_unMaxPropertyStringSize = 32 * 1024;
172 
173  // Used to return errors that occur when reading properties.
175  {
180  TrackedProp_UnknownProperty = 4, // Driver has not set the property (and may not ever).
185  TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later.
188  };
189 }
Definition: COpenVRContext.h:4
static constexpr PropertyTypeTag_t k_unHiddenAreaPropertyTag
Definition: Properties.h:24
static constexpr PropertyTypeTag_t k_unHmdMatrix34PropertyTag
Definition: Properties.h:19
static constexpr PropertyTypeTag_t k_unFloatPropertyTag
Definition: Properties.h:13
std::uint64_t PropertyContainerHandle_t
Definition: Properties.h:6
static constexpr PropertyTypeTag_t k_unInt32PropertyTag
Definition: Properties.h:14
static constexpr PropertyTypeTag_t k_unHmdVector4PropertyTag
Definition: Properties.h:22
static constexpr PropertyTypeTag_t k_unBoolPropertyTag
Definition: Properties.h:16
static constexpr PropertyTypeTag_t k_unHmdVector3PropertyTag
Definition: Properties.h:21
std::uint32_t PropertyTypeTag_t
Definition: Properties.h:7
static constexpr PropertyContainerHandle_t k_ulInvalidPropertyContainer
Definition: Properties.h:9
static constexpr PropertyTypeTag_t k_unInvalidPropertyTag
Definition: Properties.h:10
ETrackedDeviceProperty
Definition: Properties.h:32
@ Prop_TrackingRangeMinimumMeters_Float
Definition: Properties.h:137
@ Prop_TrackingRangeMaximumMeters_Float
Definition: Properties.h:138
@ Prop_DongleVersion_Uint64
Definition: Properties.h:58
@ Prop_ModeLabel_String
Definition: Properties.h:139
@ Prop_ScreenshotHorizontalFieldOfViewDegrees_Float
Definition: Properties.h:108
@ Prop_StatusDisplayTransform_Matrix34
Definition: Properties.h:49
@ Prop_DisplayGCBlackClamp_Float
Definition: Properties.h:88
@ Prop_IsOnDesktop_Bool
Definition: Properties.h:81
@ Prop_DisplayMCImageWidth_Int32
Definition: Properties.h:112
@ Prop_LensCenterRightV_Float
Definition: Properties.h:99
@ Prop_GraphicsAdapterLuid_Uint64
Definition: Properties.h:119
@ Prop_DeviceClass_Int32
Definition: Properties.h:65
@ Prop_TrackingFirmwareVersion_String
Definition: Properties.h:42
@ Prop_CanUnifyCoordinateSystemWithHmd_Bool
Definition: Properties.h:60
@ Prop_HasControllerComponent_Bool
Definition: Properties.h:160
@ Prop_VRCVersion_Uint64
Definition: Properties.h:56
@ Prop_AttachedDeviceId_String
Definition: Properties.h:123
@ Prop_BlockServerShutdown_Bool
Definition: Properties.h:59
@ Prop_FirmwareVersion_Uint64
Definition: Properties.h:54
@ Prop_ParentDriver_Uint64
Definition: Properties.h:70
@ Prop_ScreenshotVerticalFieldOfViewDegrees_Float
Definition: Properties.h:109
@ Prop_ModelNumber_String
Definition: Properties.h:37
@ Prop_DisplayHiddenArea_Binary_Start
Definition: Properties.h:153
@ Prop_HasDisplayComponent_Bool
Definition: Properties.h:159
@ Prop_HasCameraComponent_Bool
Definition: Properties.h:161
@ Prop_HasVirtualDisplayComponent_Bool
Definition: Properties.h:163
@ Prop_DeviceIsWireless_Bool
Definition: Properties.h:46
@ Prop_HardwareRevision_String
Definition: Properties.h:43
@ Prop_PreviousUniverseId_Uint64
Definition: Properties.h:79
@ Prop_FieldOfViewTopDegrees_Float
Definition: Properties.h:135
@ Prop_NamedIconPathDeviceSearching_String
Definition: Properties.h:144
@ Prop_DisplayHiddenArea_Binary_End
Definition: Properties.h:154
@ Prop_DisplayBootloaderVersion_Uint64
Definition: Properties.h:104
@ Prop_DisplayAllowNightMode_Bool
Definition: Properties.h:111
@ Prop_UserIpdMeters_Float
Definition: Properties.h:77
@ Prop_EdidProductID_Int32
Definition: Properties.h:89
@ Prop_CameraFirmwareDescription_String
Definition: Properties.h:102
@ Prop_Invalid
Definition: Properties.h:33
@ Prop_NamedIconPathDeviceAlertLow_String
Definition: Properties.h:150
@ Prop_DisplayFirmwareVersion_Uint64
Definition: Properties.h:80
@ Prop_DisplayGCType_Int32
Definition: Properties.h:91
@ Prop_DisplayGCImage_String
Definition: Properties.h:95
@ Prop_ReportsTimeSinceVSync_Bool
Definition: Properties.h:74
@ Prop_CurrentUniverseId_Uint64
Definition: Properties.h:78
@ Prop_SecondsFromPhotonsToVblank_Float
Definition: Properties.h:116
@ Prop_RadioVersion_Uint64
Definition: Properties.h:57
@ Prop_AllWirelessDongleDescriptions_String
Definition: Properties.h:44
@ Prop_ViveSystemButtonFixRequired_Bool
Definition: Properties.h:69
@ Prop_SerialNumber_String
Definition: Properties.h:38
@ Prop_ControllerRoleHint_Int32
Definition: Properties.h:130
@ Prop_FieldOfViewLeftDegrees_Float
Definition: Properties.h:133
@ Prop_NamedIconPathDeviceNotReady_String
Definition: Properties.h:148
@ Prop_ResourceRoot_String
Definition: Properties.h:71
@ Prop_DisplaySuppressed_Bool
Definition: Properties.h:110
@ Prop_CameraToHeadTransform_Matrix34
Definition: Properties.h:90
@ Prop_NamedIconPathDeviceOff_String
Definition: Properties.h:143
@ Prop_VendorSpecific_Reserved_Start
Definition: Properties.h:166
@ Prop_DisplayFPGAVersion_Uint64
Definition: Properties.h:103
@ Prop_NamedIconPathDeviceReady_String
Definition: Properties.h:146
@ Prop_Firmware_ManualUpdate_Bool
Definition: Properties.h:51
@ Prop_ContainsProximitySensor_Bool
Definition: Properties.h:61
@ Prop_ManufacturerName_String
Definition: Properties.h:41
@ Prop_AudioFirmwareVersion_Uint64
Definition: Properties.h:106
@ Prop_NamedIconPathDeviceSearchingAlert_String
Definition: Properties.h:145
@ Prop_VendorSpecific_Reserved_End
Definition: Properties.h:167
@ Prop_DeviceBatteryPercentage_Float
Definition: Properties.h:48
@ Prop_DisplayMCImageHeight_Int32
Definition: Properties.h:113
@ Prop_NamedIconPathDeviceStandby_String
Definition: Properties.h:149
@ Prop_SupportedButtons_Uint64
Definition: Properties.h:124
@ Prop_CameraFirmwareVersion_Uint64
Definition: Properties.h:101
@ Prop_DisplayMCImageLeft_String
Definition: Properties.h:86
@ Prop_DeviceProvidesBatteryStatus_Bool
Definition: Properties.h:62
@ Prop_Axis1Type_Int32
Definition: Properties.h:126
@ Prop_InstallPath_String
Definition: Properties.h:158
@ Prop_DeviceIsCharging_Bool
Definition: Properties.h:47
@ Prop_Axis0Type_Int32
Definition: Properties.h:125
@ Prop_RenderModelName_String
Definition: Properties.h:39
@ Prop_ConnectedWirelessDongle_String
Definition: Properties.h:45
@ Prop_DisplayFrequency_Float
Definition: Properties.h:76
@ Prop_HasDriverDirectModeComponent_Bool
Definition: Properties.h:162
@ Prop_DisplayGCOffset_Float
Definition: Properties.h:92
@ Prop_DisplayMCOffset_Float
Definition: Properties.h:83
@ Prop_Axis4Type_Int32
Definition: Properties.h:129
@ Prop_Firmware_ManualUpdateURL_String
Definition: Properties.h:52
@ Prop_DisplayMCImageRight_String
Definition: Properties.h:87
@ Prop_UserHeadToEyeDepthMeters_Float
Definition: Properties.h:100
@ Prop_Firmware_ProgrammingTarget_String
Definition: Properties.h:64
@ Prop_DisplayMCImageNumChannels_Int32
Definition: Properties.h:114
@ Prop_HasCamera_Bool
Definition: Properties.h:66
@ Prop_SecondsFromVsyncToPhotons_Float
Definition: Properties.h:75
@ Prop_LensCenterRightU_Float
Definition: Properties.h:98
@ Prop_LensCenterLeftV_Float
Definition: Properties.h:97
@ Prop_DisplayDebugMode_Bool
Definition: Properties.h:118
@ Prop_Axis3Type_Int32
Definition: Properties.h:128
@ Prop_Firmware_UpdateAvailable_Bool
Definition: Properties.h:50
@ Prop_DisplayMCImageData_Binary
Definition: Properties.h:115
@ Prop_IconPathName_String
Definition: Properties.h:142
@ Prop_EdidVendorID_Int32
Definition: Properties.h:85
@ Prop_WillDriftInYaw_Bool
Definition: Properties.h:40
@ Prop_DriverVersion_String
Definition: Properties.h:67
@ Prop_HardwareRevision_Uint64
Definition: Properties.h:53
@ Prop_DisplayMCType_Int32
Definition: Properties.h:82
@ Prop_DisplayMCScale_Float
Definition: Properties.h:84
@ Prop_DeviceCanPowerOff_Bool
Definition: Properties.h:63
@ Prop_FieldOfViewBottomDegrees_Float
Definition: Properties.h:136
@ Prop_DriverProvidedChaperonePath_String
Definition: Properties.h:120
@ Prop_LensCenterLeftU_Float
Definition: Properties.h:96
@ Prop_TrackingSystemName_String
Definition: Properties.h:36
@ Prop_DriverDirectModeSendsVsyncEvents_Bool
Definition: Properties.h:117
@ Prop_NamedIconPathDeviceReadyAlert_String
Definition: Properties.h:147
@ Prop_UserConfigPath_String
Definition: Properties.h:157
@ Prop_DisplayGCScale_Float
Definition: Properties.h:93
@ Prop_Axis2Type_Int32
Definition: Properties.h:127
@ Prop_Firmware_ForceUpdateRequired_Bool
Definition: Properties.h:68
@ Prop_CameraCompatibilityMode_Int32
Definition: Properties.h:107
@ Prop_DisplayGCPrescale_Float
Definition: Properties.h:94
@ Prop_FieldOfViewRightDegrees_Float
Definition: Properties.h:134
@ Prop_DisplayHardwareVersion_Uint64
Definition: Properties.h:105
@ Prop_FPGAVersion_Uint64
Definition: Properties.h:55
static constexpr PropertyTypeTag_t k_unHmdMatrix44PropertyTag
Definition: Properties.h:20
static constexpr PropertyTypeTag_t k_unOpenVRInternalReserved_End
Definition: Properties.h:27
static constexpr PropertyTypeTag_t k_unStringPropertyTag
Definition: Properties.h:17
static constexpr PropertyTypeTag_t k_unUint64PropertyTag
Definition: Properties.h:15
static constexpr PropertyTypeTag_t k_unOpenVRInternalReserved_Start
Definition: Properties.h:26
ETrackedPropertyError
Definition: Properties.h:175
@ TrackedProp_CouldNotContactServer
Definition: Properties.h:182
@ TrackedProp_ValueNotProvidedByDevice
Definition: Properties.h:183
@ TrackedProp_InvalidDevice
Definition: Properties.h:181
@ TrackedProp_NotYetAvailable
Definition: Properties.h:185
@ TrackedProp_WrongDeviceClass
Definition: Properties.h:178
@ TrackedProp_WrongDataType
Definition: Properties.h:177
@ TrackedProp_StringExceedsMaximumLength
Definition: Properties.h:184
@ TrackedProp_UnknownProperty
Definition: Properties.h:180
@ TrackedProp_InvalidOperation
Definition: Properties.h:187
@ TrackedProp_PermissionDenied
Definition: Properties.h:186
@ TrackedProp_BufferTooSmall
Definition: Properties.h:179
@ TrackedProp_Success
Definition: Properties.h:176
static const uint32_t k_unMaxPropertyStringSize
Definition: Properties.h:171