Device Enumerator Programmer Notes - psmoveservice/PSMoveService GitHub Wiki
Device Enumerators
The DeviceEnumerator
is a simple iterator that walks over all connected devices of a specified device class that match a USB VendorID and ProductID. DeviceManagers that derive from DeviceTypeMangager
allocate enumerators derived from DeviceEnumerator
.
ControllerDeviceEnumerator
Iterates over connected HID controllers of the following types using HIDAPI:
- VID:0x054c/PID:0x03d4 (Vendor:Sony, Product:PSMove)
- VID:0x054c/PID:0x042f (Vendor:Sony, Product:PSNavi)
TrackerDeviceEnumerator
Iterates over connected cameras of the following types using LIBUSB:
- VID:0x1415/PID:0x2000 (Vendor:Sony, Product:PS3EYE)
HMDDeviceEnumerator
Iterates over connected HMDs of the following types using HIDAPI:
- VID:0x2833/PID:0x0021 (Vendor:Oculus, Product:DK2)
DeviceEnumerator
Members
CommonDeviceState::eDeviceType m_deviceType;
CommonDeviceState::eDeviceType m_deviceTypeFilter;
Functions
virtual bool is_valid() const =0;
virtual bool next()=0;
virtual int get_vendor_id() const =0;
virtual int get_product_id() const =0;
virtual const char *get_path() const =0;
inline CommonDeviceState::eDeviceType get_device_type() const
inline CommonDeviceState::eDeviceType get_device_type_filter() const
};
ControllerDeviceEnumerator
Function
const class ControllerHidDeviceEnumerator *get_hid_controller_enumerator() const;
const class ControllerUSBDeviceEnumerator *get_usb_controller_enumerator() const;
const class ControllerGamepadEnumerator *get_gamepad_controller_enumerator() const;
Members
eAPIType api_type;
DeviceEnumerator **enumerators;
int enumerator_count;
int enumerator_index;
ControllerHidDeviceEnumerator
ControllerUSBDeviceEnumerator
ControllerGamepadEnumerator
HMDDeviceEnumerator
TrackerDeviceEnumerator